Nagios configuration to monitorize virtual machine using Hyper-V with NAT

0

I will start by thank you very much for any help that i may possible have from any of you.

I have a centos box that have nagios installed. I'm able to monitor several servers so far but I’m stuck in a situation that i don't know how to overcome.

My setup:

  • Centos Server (Nagios Server)
  • Windows 2008 R2 ( Host server for several VM's using HYPER-V): This server is already being monitorized via Nagios.
  • REDHAT Virtual Machine that is inside Hosting Server.  I’m not able to reach this server with the default plugins of Nagios.

I'm able to connect to REDHAT VM via CENTOS box using port redirection that i configured in Windows Server. (eg: netsh interface portproxy add v4tov4 listenport=2221 listenaddres=window_2008_IP connectport=22 connectaddress=REDHAT_VIRTUAL_MACHINE_IP)

What options do I have to:

Configure Nagios pluging “check_nrpe” to by pass the host (Windows server 2008) and connect directly to REDHAT virtual machine.

Can someone point me in the right direction?

Thank you!

user2820879

Posted 2015-03-06T17:35:06.710

Reputation: 11

Answers

0

It looks like you will need another port redirection for your Nagios/NRPE to talk through. NRPE uses 5666 by default.

Using your example from your post, a port redirection for NRPE should look something like this. Note, I corrected a typo:

netsh interface portproxy add v4tov4 listenport=5666 listenaddress=window_2008_IP connectport=5666 connectaddress=REDHAT_VIRTUAL_MACHINE_IP`

I hope that helps!

jdelaporte

Posted 2015-03-06T17:35:06.710

Reputation: 126

Thanks for your reply but i had try that one already (before doing the post) no luck. Not sure the reason but this redirection don't work with nrpe. – user2820879 – 2015-03-07T19:19:35.437