Skip to content
Snippets Groups Projects
Select Git revision
  • 51a5e63d862839f163b7ef3d6e143b87369fed59
  • master default protected
  • simple-task/7248-eol-check-add-node-22
  • 6877_check_iml_deployment
4 results

check_onevm.md

Blame
  • 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.

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

    Syntax

    $ check_onevm (without parameters)

    Parameters

    ./check_onevm -h
    ______________________________________________________________________
    
    CHECK_ONEVM
    v1.2
    
    (c) Institute for Medical Education - University of Bern
    Licence: GNU GPL 3
    
    https://os-docs.iml.unibe.ch/icinga-checks/Checks/check_onevm.html
    ______________________________________________________________________
    
    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;; 

    If no vm was created yet the result is OK.

    /check_onevm
    OK: OpenNebula VMs - Total: 0 .. running: 0, Fail: 0, unknown: 0 .. other: 0
    Info: no vm was created yet.
     |total=0;; running=0;; fail=0;; unknown=0;; other=0;; root@admin:one plugins#