Updated readme, enabled by default universal checks
This commit is contained in:
parent
780b2ac5b3
commit
b93b5eb958
@ -42,6 +42,10 @@ Copy the script and the config file into the system to check:
|
|||||||
cp healthcheck.py /usr/local/bin/healthcheck.py
|
cp healthcheck.py /usr/local/bin/healthcheck.py
|
||||||
cp healthcheck.cfg.example /usr/local/etc/healthcheck.cfg
|
cp healthcheck.cfg.example /usr/local/etc/healthcheck.cfg
|
||||||
```
|
```
|
||||||
|
Make the script executable:
|
||||||
|
```
|
||||||
|
chmod +x /usr/local/bin/healthcheck.py
|
||||||
|
```
|
||||||
Edit `/usr/local/etc/healthcheck.cfg` enabling the checks you need and configuring email settings.
|
Edit `/usr/local/etc/healthcheck.cfg` enabling the checks you need and configuring email settings.
|
||||||
Run `/usr/local/bin/healthcheck.py /usr/local/etc/healthcheck.cfg` to check it is working. If needed, change the config to make a check fail and see if the notification mail is delivered. If you need to do some testing without spamming emails, run with the parameter `--dry-run`.
|
Run `/usr/local/bin/healthcheck.py /usr/local/etc/healthcheck.cfg` to check it is working. If needed, change the config to make a check fail and see if the notification mail is delivered. If you need to do some testing without spamming emails, run with the parameter `--dry-run`.
|
||||||
Now copy the cron file:
|
Now copy the cron file:
|
||||||
|
@ -83,7 +83,7 @@ NOTIFY_ALARM_END=TRUE
|
|||||||
|
|
||||||
[system_load_1min]
|
[system_load_1min]
|
||||||
# The system load average in the last minute
|
# The system load average in the last minute
|
||||||
DISABLED=True
|
DISABLED=False
|
||||||
ALARM_VALUE_MORE_THAN=1.0
|
ALARM_VALUE_MORE_THAN=1.0
|
||||||
COMMAND=uptime
|
COMMAND=uptime
|
||||||
REGEXP=.*load average: (\d+[,.]\d+), \d+[,.]\d+, \d+[,.]\d+
|
REGEXP=.*load average: (\d+[,.]\d+), \d+[,.]\d+, \d+[,.]\d+
|
||||||
@ -91,7 +91,7 @@ REGEXP=.*load average: (\d+[,.]\d+), \d+[,.]\d+, \d+[,.]\d+
|
|||||||
|
|
||||||
[system_load_5min]
|
[system_load_5min]
|
||||||
# The system load average in the last 5 minutes
|
# The system load average in the last 5 minutes
|
||||||
DISABLED=True
|
DISABLED=False
|
||||||
ALARM_VALUE_MORE_THAN=1.0
|
ALARM_VALUE_MORE_THAN=1.0
|
||||||
COMMAND=uptime
|
COMMAND=uptime
|
||||||
REGEXP=.*load average: \d+[,.]\d+, (\d+[,.]\d+), \d+[,.]\d+
|
REGEXP=.*load average: \d+[,.]\d+, (\d+[,.]\d+), \d+[,.]\d+
|
||||||
@ -99,7 +99,7 @@ REGEXP=.*load average: \d+[,.]\d+, (\d+[,.]\d+), \d+[,.]\d+
|
|||||||
|
|
||||||
[system_load_15min]
|
[system_load_15min]
|
||||||
# The system load average in the last 15 minutes
|
# The system load average in the last 15 minutes
|
||||||
DISABLED=True
|
DISABLED=False
|
||||||
ALARM_VALUE_MORE_THAN=1.0
|
ALARM_VALUE_MORE_THAN=1.0
|
||||||
COMMAND=uptime
|
COMMAND=uptime
|
||||||
REGEXP=.*load average: \d+[,.]\d+, \d+[,.]\d+, (\d+[,.]\d+)
|
REGEXP=.*load average: \d+[,.]\d+, \d+[,.]\d+, (\d+[,.]\d+)
|
||||||
@ -144,18 +144,9 @@ REGEXP=Adapter \d: (.+)
|
|||||||
ALARM_STRING_EQUAL=off-line
|
ALARM_STRING_EQUAL=off-line
|
||||||
|
|
||||||
|
|
||||||
[free_ram]
|
|
||||||
# Free ram in %
|
|
||||||
# Shows another approach: does all the computation in the command and picks up
|
|
||||||
# all the output (by not declaring a regexp).
|
|
||||||
DISABLED=True
|
|
||||||
COMMAND=free | grep Mem | awk '{print int($4/$2 * 100.0)}'
|
|
||||||
ALARM_VALUE_LESS_THAN=20
|
|
||||||
|
|
||||||
|
|
||||||
[available_ram]
|
[available_ram]
|
||||||
# Like Free ram, but shows available instead of free. You may want to use this if you use a memcache.
|
# Shows available ram in %.
|
||||||
DISABLED=True
|
DISABLED=False
|
||||||
COMMAND=free | grep Mem | awk '{print int($7/$2 * 100.0)}'
|
COMMAND=free | grep Mem | awk '{print int($7/$2 * 100.0)}'
|
||||||
ALARM_VALUE_LESS_THAN=20
|
ALARM_VALUE_LESS_THAN=20
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user