diff --git a/docs/20_Checks/_index.md b/docs/20_Checks/_index.md index f4620728d62b895015dfeee943320378eaf43744..8187155a706a938f9866cf222c13cb9fc8637788 100644 --- a/docs/20_Checks/_index.md +++ b/docs/20_Checks/_index.md @@ -25,6 +25,8 @@ There is one include script used by all checks: * check_memory * check_netio * [check_netstat](check_netstat.md) +* [check_onehost](check_onehost.md) +* [check_onevm](check_onevm.md) * check_opencpu * check_packages2install * check_proc_mem diff --git a/docs/20_Checks/check_ceph_diskfree.md b/docs/20_Checks/check_ceph_diskfree.md index 3a96e2491adeca37170d1f7d16b178d79c9e6250..c960504b219f787dd2c1ca8d56f6b21811fb329a 100644 --- a/docs/20_Checks/check_ceph_diskfree.md +++ b/docs/20_Checks/check_ceph_diskfree.md @@ -9,6 +9,10 @@ It returns a single line for the status, data and performance data. * `ceph` binary and sudo permission on it to get the information +```txt +icingaclient ALL=(ALL) NOPASSWD: /bin/ceph +``` + ## Syntax ``` diff --git a/docs/20_Checks/check_onehost.md b/docs/20_Checks/check_onehost.md new file mode 100644 index 0000000000000000000000000000000000000000..82359ce9507b6cc71e5aace75885e696dbf9c33b --- /dev/null +++ b/docs/20_Checks/check_onehost.md @@ -0,0 +1,65 @@ +# check OpenNebula hosts + +## Introduction + +**check_onevm** is a plugin to show count of hosts in OpenNebula and warn if a host is down. + +## Requirements + +The icinga user needs sudo permissions on `onehost`. + +```txt +icingaclient ALL=(ALL) NOPASSWD: /bin/onehost +``` + +## Syntax + +`$ check_onevm [-c CRITICAL] [-w WARING]` + +### Parameters + +```txt +./check_onehost -h +______________________________________________________________________ + +CHECK_ONEHOST +v1.1 + +(c) Institute for Medical Education - University of Bern +Licence: GNU GPL 3 +______________________________________________________________________ + +show count of hosts in OpenNebula and warn if a host is down. + +SYNTAX: +check_onehost [ -w value -c value -h ] + + -w VALUE cpu usage warning level (default: 1) + -c VALUE cpu usage critical level (default: 2) + -h or --help show this help. + +PARAMETERS: + + None. + +EXAMPLE: +check_onehost -c 1 set to critical if the 1st host is off. + +``` + +## Example + +Without parameter + +```txt +/check_onehost +OK: ONEHOST - Total: 5 .. on: 5 .. 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 diff --git a/docs/20_Checks/check_onevm.md b/docs/20_Checks/check_onevm.md new file mode 100644 index 0000000000000000000000000000000000000000..425bc6a07606b3ed5dae040660dd27f1ab3ec476 --- /dev/null +++ b/docs/20_Checks/check_onevm.md @@ -0,0 +1,66 @@ +# Check OpenNebula virtual machines + +## Introduction + +**check_onevm** is a plugin to show count of vms in OpenNebula - listed by state and by host. + +## Requirements + +The icinga user needs sudo permissions on `onevm`. + +```txt +icingaclient ALL=(ALL) NOPASSWD: /bin/onevm +``` + +## Syntax + +`$ check_onevm` (without parameters) + +### Parameters + +```txt +./check_onevm -h +______________________________________________________________________ + +CHECK_ONEVM +v1.0 + +(c) Institute for Medical Education - University of Bern +Licence: GNU GPL 3 +______________________________________________________________________ + +Show count of vms in OpenNebula - listed by state and by host. +It will go to warning if a non running state was found. +It will go to critical if a vm is on failure. + + +SYNTAX: +check_onevm + + -h or --help show this help. + +PARAMETERS: + + None. + +``` + +### Examples + +Without parameter: + +``` +./check_onevm +OK: OpenNebula VMs - Total: 32 .. running: 32 .. other: 0 +>>>>>> By state +--- Running (runn): 32 +The VM is running (note that this stage includes the internal virtualized machine booting and shutting down phases). In this state, the virtualization driver will periodically monitor it. +>>>>>> By host: +--- kvm1.ecample.com: 8 +--- kvm2.ecample.com: 6 +--- kvm3.ecample.com: 8 +--- kvm4.ecample.com: 5 +--- kvm5.ecample.com: 5 + +|total=32;; running=32;; fail=0;; unknown=0;; other=0;; +```