Skip to content
Snippets Groups Projects

check_onehost - add detection for disabled hosts; update texts

Merged Hahn Axel (hahn) requested to merge 6669-warnings-in-journallog into master
2 files
+ 34
29
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -23,7 +23,7 @@ icingaclient ALL=(ALL) NOPASSWD: /bin/onehost
______________________________________________________________________
CHECK_ONEHOST
v1.1
v1.3
(c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3
@@ -31,13 +31,14 @@ Licence: GNU GPL 3
https://os-docs.iml.unibe.ch/icinga-checks/Checks/check_onehost.html
______________________________________________________________________
show count of hosts in OpenNebula and warn if a host is down.
Show count of hosts in OpenNebula and warn if a host is disabled or on error.
It switches to critical if more than a given critical level are not running.
SYNTAX:
check_onehost [ -w value -c value -h ]
-w VALUE cpu usage warning level (default: 1)
-c VALUE cpu usage critical level (default: 2)
-w VALUE warning level (default: 1)
-c VALUE critical level (default: 2)
-h or --help show this help.
PARAMETERS:
@@ -51,17 +52,17 @@ check_onehost -c 1 set to critical if the 1st host is off.
## Example
Without parameter
Without parameter we get a warning if the 1st host is disabled or on error.
``./check_onehost`` returns
```txt
/check_onehost
OK: ONEHOST - Total: 5 .. on: 5 .. other: 0
WARNING: ONEHOST - Total: 5 .. on: 4 .. disabled: 1 ... other: 0
ID,NAME,CLUSTER,TVM,ALLOCATED_CPU,ALLOCATED_MEM,STAT
4,kvm5.backend.one.intra,default,5,600 / 2400 (25%),13G / 503.1G (2%),on
3,kvm4.backend.one.intra,default,5,1100 / 2400 (45%),22G / 503.1G (4%),on
2,kvm3.backend.one.intra,default,8,1150 / 2400 (47%),20G / 251.1G (7%),on
1,kvm2.backend.one.intra,default,6,1000 / 2400 (41%),12G / 188.1G (6%),on
0,kvm1.backend.one.intra,default,8,1350 / 2400 (56%),18.5G / 188.1G (9%),on
|total=5;; on=5;; other=0;;
```
\ No newline at end of file
4,kvm5.example.com,default,11,1930 / 2400 (80%),76G / 503.1G (15%),dsbl
3,kvm4.example.com,default,2,400 / 2400 (16%),5G / 503.1G (0%),on
2,kvm3.example.com,default,9,1600 / 2400 (66%),55G / 251.1G (21%),on
1,kvm2.example.com,default,14,1770 / 2400 (73%),71.5G / 188.1G (38%),on
0,kvm1.example.com,default,16,2380 / 2400 (99%),75G / 188.1G (39%),on
WARNING: not all hosts are up - count 1 reached warning value 1
|total=5;; on=4;; disabled=1;; other=0;;
```
Loading