Skip to content

Commit

Permalink
Merge pull request #116 from cbeneke/fix/node_filesystem
Browse files Browse the repository at this point in the history
Fix node_filesystem_* for node-exporter 16.0 syntax
  • Loading branch information
metalmatze authored Nov 8, 2018
2 parents 1595151 + 0a1e39a commit 58c53cb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions rules/rules.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -294,15 +294,15 @@
// Disk saturation (ms spent, by rate() it's bound by 1 second)
record: ':node_disk_saturation:avg_irate',
expr: |||
avg(irate(node_disk_io_time_weighted_seconds_total_seconds_total{%(nodeExporterSelector)s,device=~"(sd|xvd|nvme).+"}[1m]) / 1e3)
avg(irate(node_disk_io_time_weighted_seconds_total{%(nodeExporterSelector)s,device=~"(sd|xvd|nvme).+"}[1m]) / 1e3)
||| % $._config,
},
{
// Disk saturation (ms spent, by rate() it's bound by 1 second)
record: 'node:node_disk_saturation:avg_irate',
expr: |||
avg by (node) (
irate(node_disk_io_time_weighted_seconds_total_seconds_total{%(nodeExporterSelector)s,device=~"(sd|xvd|nvme).+"}[1m]) / 1e3
irate(node_disk_io_time_weighted_seconds_total{%(nodeExporterSelector)s,device=~"(sd|xvd|nvme).+"}[1m]) / 1e3
* on (namespace, %(podLabel)s) group_left(node)
node_namespace_pod:kube_pod_info:
)
Expand All @@ -311,15 +311,15 @@
{
record: 'node:node_filesystem_usage:',
expr: |||
max by (namespace, %(podLabel)s, device) ((node_filesystem_size{%(fstypeSelector)s}
- node_filesystem_avail{%(fstypeSelector)s})
/ node_filesystem_size{%(fstypeSelector)s})
max by (namespace, %(podLabel)s, device) ((node_filesystem_size_bytes{%(fstypeSelector)s}
- node_filesystem_avail_bytes{%(fstypeSelector)s})
/ node_filesystem_size_bytes{%(fstypeSelector)s})
||| % $._config,
},
{
record: 'node:node_filesystem_avail:',
expr: |||
max by (namespace, %(podLabel)s, device) (node_filesystem_avail{%(fstypeSelector)s} / node_filesystem_size{%(fstypeSelector)s})
max by (namespace, %(podLabel)s, device) (node_filesystem_avail_bytes{%(fstypeSelector)s} / node_filesystem_size_bytes{%(fstypeSelector)s})
||| % $._config,
},
{
Expand Down

0 comments on commit 58c53cb

Please sign in to comment.