Skip to content

Commit

Permalink
fix scrape failures on ch 18.5.x+ (ClickHouse#23)
Browse files Browse the repository at this point in the history
fix scrape failures on ch 18.5.x+
  • Loading branch information
tkroman authored and f1yegor committed Oct 16, 2018
1 parent 85e5803 commit ed5fbec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions exporter/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,21 @@ type Exporter struct {
func NewExporter(uri url.URL, insecure bool, user, password string) *Exporter {
q := uri.Query()
metricsURI := uri
q.Set("query", "select * from system.metrics")
q.Set("query", "select metric, value from system.metrics")
metricsURI.RawQuery = q.Encode()

asyncMetricsURI := uri
q.Set("query", "select * from system.asynchronous_metrics")
asyncMetricsURI.RawQuery = q.Encode()

eventsURI := uri
q.Set("query", "select * from system.events")
q.Set("query", "select event, value from system.events")
eventsURI.RawQuery = q.Encode()

partsURI := uri
q.Set("query", "select database, table, sum(bytes) as bytes, count() as parts, sum(rows) as rows from system.parts where active = 1 group by database, table")
partsURI.RawQuery = q.Encode()

return &Exporter{
metricsURI: metricsURI.String(),
asyncMetricsURI: asyncMetricsURI.String(),
Expand Down

0 comments on commit ed5fbec

Please sign in to comment.