OpenVZ Forum


Home » General » Discussions » Monitoring Virtuals with Nagios
Re: Monitoring Virtuals with Nagios [message #36922 is a reply to message #35178] Thu, 30 July 2009 13:11 Go to previous messageGo to previous message
givre is currently offline  givre
Messages: 1
Registered: July 2009
Location: Paris
Junior Member
HI,

In don't understand why this post haven't answers Smile
I thinks this script is very interesting.
Thank you for sharing this script

I will try use it on my system.

I have one question about your function "get_veid"
It doesn't work for me, and i don't see what it do really Smile

I have made a little basic change for test.
This isn't a good solution but for some tests script it's okay.

For example:
$1 ="192.168.0.3"

With

function get_veid {
#       A=`echo $1 | sed -n 's/^\([0-9]*\)\..*/\1/p'`
#       B=`echo $1 | sed -n 's/^[0-9]*\.\([0-9]*\)\..*/\1/p'`
        C=`echo $1 | sed -n 's/^[0-9]*\.[0-9]*\.\([0-9]*\)\..*/\1/p'`
        D=`echo $1 | sed -n 's/^[0-9]*\.[0-9]*\.[0-9]*\.\([0-9]*\)$/\1/p'`

        if [ $D -eq 250 ]; then
                C=$(( $C + 1 ))
                D=0
        fi

        C=$(( $C - 192 ))
        ID=$(( $D + $(( $C * 250 )) ))
}


the result of veid isn't ok : -47997 ( strange ?)

so a made:

function get_veid {
#       A=`echo $1 | sed -n 's/^\([0-9]*\)\..*/\1/p'`
#       B=`echo $1 | sed -n 's/^[0-9]*\.\([0-9]*\)\..*/\1/p'`
#        C=`echo $a | sed -n 's/^[0-9]*\.[0-9]*\.\([0-9]*\)\..*/\1/p'`
        D=`echo $a | sed -n 's/^[0-9]*\.[0-9]*\.[0-9]*\.\([0-9]*\)$/\1/p'`

#        if [ $D -eq 250 ]; then
#                C=$(( $C + 1 ))
#                D=0
#        fi

#        C=$(( $C - 192 ))
        ID="10$D"
}


On my system VM id start at 10X
Where X represent the vm number id .

But would like to understand your function to get the veid Smile and what is exec2 ?

On my Openvz server , no problem, work fine.

On my nagios server, who isn't a VM, i get "CHECK_NRPE: Socket timeout after 10 seconds. "
I will see why.

Thanks for your answer .

Regards,

Benoit.


[Updated on: Thu, 30 July 2009 13:15]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message icon14.gif
Previous Topic: New OpenVZ VPS server control panel
Next Topic: Please help me in choosing web hosting
Goto Forum:
  


Current Time: Tue Jul 16 02:39:32 GMT 2024

Total time taken to generate the page: 0.02564 seconds