Skip to content

Commit

Permalink
Fix node_exporter options (#41)
Browse files Browse the repository at this point in the history
Changes:

- The `--web.config` command line option for `node_exporter` is actually
`--web.config.file`

Closes #39

---------

Co-authored-by: Haroon Chughtai <[email protected]>
  • Loading branch information
drmatthews and HChughtai authored Jan 8, 2024
1 parent 9807009 commit 814f84b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion roles/monitoring_client/templates/node_exporter.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ After=syslog.target network.target
User= {{ monitoring_client_owner }}
Group= {{ monitoring_client_group }}

ExecStart={{ monitoring_client_node_exporter_install_dir }}/node_exporter --web.config={{ monitoring_client_node_exporter_web_config }}
ExecStart={{ monitoring_client_node_exporter_install_dir }}/node_exporter --web.config.file={{ monitoring_client_node_exporter_web_config }}

[Install]
WantedBy=multi-user.target
12 changes: 6 additions & 6 deletions roles/monitoring_server/templates/prometheus_rules.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,22 @@ groups:
- name: metrics
rules:
- alert: MemoryUsageHigh
expr: 100- node_memory_MemAvailable_bytes/node_memory_MemTotal_bytes*100 > 80
expr: 100- node_memory_MemAvailable_bytes/node_memory_MemTotal_bytes*100 > 90
for: 5m
labels:
severity: warning
annotations:
summary: Instance memory usage high (Instance:{{ $labels.instance }})
description: "Instance memory usage more than 80% within 5 minutus, value:{{ $labels.value }}%"
description: "Instance memory usage more than 90% within 5 minutes, value:{{ $labels.value }}%"

- alert: CpuLoadHigh
expr: 100 - avg by(instance)(rate(node_cpu_seconds_total{mode="idle"}[5m]))*100 > 80
expr: 100 - avg by(instance)(rate(node_cpu_seconds_total{mode="idle"}[5m]))*100 > 90
for: 0m
labels:
severity: warning
annotations:
summary: Instance cpu load high (Instance:{{ $labels.instance }})
description: "Instance cpu load more than 80% within 5 minutes, value: {{ $labels.value }}%"
description: "Instance cpu load more than 90% within 5 minutes, value: {{ $labels.value }}%"

- alert: FilesystemFull
expr: 100 - node_filesystem_free_bytes{mountpoint!~"/*|/boot.*|/run.*"}/node_filesystem_size_bytes*100 > 90
Expand All @@ -58,10 +58,10 @@ groups:
description: "The used space of the mounted filestore (mountpoint:{{ $labels.mountpoint }}) is more than 90%, value: {{ $labels.value }}%"

- alert: InodeUsageHigh
expr: 100 - node_filesystem_files_free/node_filesystem_files*100 > 80
expr: 100 - node_filesystem_files_free/node_filesystem_files*100 > 90
for: 0m
labels:
severity: warning
annotations:
summary: Instance inode usage high (Instance:{{ $labels.instance }})
description: "The used file nodes(inodes) of the filesystem(filesystem:{{ $labels.mountpoint }}) is more than 80%, value: {{ $labels.value }}%"
description: "The used file nodes(inodes) of the filesystem(filesystem:{{ $labels.mountpoint }}) is more than 90%, value: {{ $labels.value }}%"

0 comments on commit 814f84b

Please sign in to comment.