Re: Monitoring Virtuals with Nagios [message #36923 is a reply to message #36922] |
Thu, 30 July 2009 14:45 ![Go to previous message Go to previous message](/theme/ovz3/images/up.png) ![Go to next message Go to previous message](/theme/ovz3/images/down.png) |
Geek42
Messages: 2 Registered: March 2009 Location: Ottawa, Ontario,Canada
|
Junior Member |
|
|
the get_veid function is something that you need to customize to your environment. I could not find a way to store the VEID in nagios and pass that to the script, so I use the ip address of the VE that nagios does store(some checks, like http, connect directly).
Anyway, I have a personal numbering scheme I use on my server that this translates between. IP is translated to one of 10000 possible(more really, but I ignore them) VEIDs.
My network is setup like this:
VEID IP
0001 X.Y.0.1
0002 X.Y.0.2
...
0250 X.Y.0.250
0251 X.Y.1.1
0252 X.Y.1.2
...
0500 X.Y.1.250
0501 X.Y.2.1
...
1000 X.Y.3.250
...
9999 X.Y.39.249
While the function above is not exactly for that, it get's the idea across(I actually use the last large enough block of addresses in the 10.x.x.x range, so that adds some math to the process, and I collect A and B just in case I want them later).
It does waste numbers, but I find that it also makes numbering much easier to deal with. So your edit, if it works, is all you need, feel free to delete my stuff, I just put it there in case someone wants to do the same type of layout.
Anyway, look up the manual for the exec2 command, but basically it just deals with things in a better way for scripting.
The not connecting from remote is probably in your allowed ip options for nrpe on the host node.
|
|
|