store the usage in influx (#128)

This commit is contained in:
Michael Quigley
2023-03-07 16:29:39 -05:00
parent 97f20acd87
commit 7ac9e25611
5 changed files with 25 additions and 2 deletions

View File

@ -49,7 +49,7 @@ func sparkFluxQuery(shrs []*store.Share) string {
"|> range(start: -5m)" +
"|> filter(fn: (r) => r[\"_measurement\"] == \"xfer\")" +
"|> filter(fn: (r) => r[\"_field\"] == \"bytesRead\" or r[\"_field\"] == \"bytesWritten\")" +
"|> filter(fn: (r) => r[\"namespace\"] == \"frontend\")" +
"|> filter(fn: (r) => r[\"namespace\"] == \"backend\")" +
shrFilter +
"|> aggregateWindow(every: 5s, fn: sum, createEmpty: true)\n" +
"|> pivot(rowKey:[\"_time\"], columnKey: [\"_field\"], valueColumn: \"_value\")" +