[Check_mk (english)] OMD and QEMU

Michael A Cooper nexusguy59 at gmail.com
Mon Jul 18 23:20:15 CEST 2016


Okay so when I installed it it went to this path

/usr/share/check_mk/agents/qemu
/usr/share/bash-completion/completions/qemu

and the contents of qemu is:
#!/bin/bash

# based upon 'qemu' from
# 12/2010 Matthias Henze
# Lizenz: GPL v2
#
# updated for libvirtd (virsh) by
# Jonathan Mills 09/2011
#
# updated by
# Christian Burmeister 05/2015

if which virsh >/dev/null; then
        echo '<<<qemu>>>'
        virsh list | grep -v 'State' | grep -v '^--' | grep -v '^$' | while
read L
        do
                ID=$(echo $L | awk '{print $1}')
                NAME=$(echo $L | awk '{print $2}')
                STATE=$(echo $L | awk '{print $3}')
                MEM=$(virsh dominfo $NAME | grep 'Used memory' | awk
'{print $3}')
                let MEM=MEM/1024
                PID=$(ps aux | grep kvm | grep $NAME | awk '{print $2}')
                if [ $PID -gt 0 ]; then
                        #DATA=$(top -p $PID -n 1 -b | tail -n 2 | head -n 1
| awk -- $
                        DATA=$(top -p $PID -n 1 -b | tail -1  | awk --
'{print $9" "$$
                else
                        DATA=""
                fi
                echo $ID" "$NAME" "$STATE" "$MEM" "$DATA
        done
fi

So I copied the script to /usr/lib/check_mk_agent/plugins and made it
executable with chmod +x, my question is how do I perform service
discovery?

I am sorry I am very new to this OMD and I am trying to find these things
on my own, but I am baffled.

Thanks,

Michael A Cooper
Linux & Zerto Certified Professional



On Mon, Jul 18, 2016 at 12:45 PM, Marius Pana <marius.pana at sphs.ro> wrote:

> Hi,
>
> Install the qemu/checks/qemu script in /usr/lib/check_mk_agent/plugins.
> Make sure it is executable and perform a service discovery. You should be
> good to go.
>
> Regards,
> Marius
>
> On 18 Jul 2016, at 16:00, Michael A Cooper <nexusguy59 at gmail.com> wrote:
>
> Hello Everyone,
>
>          I am sorry if i have asked this before but I have
> installed qemu-1.0.mkp into my OMD instance, However I am not sure how to
> figure it or where to put the parameters for monitoring my 4 KVM
> Virtualization hosts.
>
> Any help would be appreciated. Just an FYI I have already looked through
> all the rulsets and didn't find anything pertain to qemu, I did find plenty
> about ESXi and VMWare.
>
> Thanks,
> Michael A Cooper
> Linux & Zerto Certified Professional
>
>
> _______________________________________________
> checkmk-en mailing list
> checkmk-en at lists.mathias-kettner.de
> http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en
>
>
>
> _______________________________________________
> checkmk-en mailing list
> checkmk-en at lists.mathias-kettner.de
> http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mathias-kettner.de/pipermail/checkmk-en/attachments/20160718/ee576915/attachment.html>


More information about the checkmk-en mailing list