Private
Public Access
1
0

Add png graph handler
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-12-09 13:53:56 -08:00
parent 69cc4b4e80
commit e824274998
13 changed files with 400 additions and 135 deletions

View File

@@ -95,11 +95,14 @@ func (d *ClickHouse) ServerAnswerCounts(ctx context.Context, serverIP string, da
}
func (d *ClickHouse) AnswerTotals(ctx context.Context, qtype string, days int) (ServerTotals, error) {
log := logger.Setup()
ctx, span := tracing.Tracer().Start(ctx, "AnswerTotals")
defer span.End()
// queries by UserCC / Qtype for the ServerIP
rows, err := d.conn.Query(ctx, `
rows, err := d.conn.Query(clickhouse.Context(ctx,
clickhouse.WithSpan(span.SpanContext()),
), `
select UserCC,Qtype,sum(queries) as queries
from by_server_ip_1d
where