Skip to content
Snippets Groups Projects

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.

icingaclient ALL=(ALL) NOPASSWD: /bin/onehost

Syntax

$ check_onevm [-c CRITICAL] [-w WARING]

Parameters

./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

/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;;