1

So I've installed my fancy new hyperv server, got a couple of VM's running nicely - and now I realized that I have no way to hook up the host server to my nagios (core) that monitors the rest of my environment.

Is there an alternative to NSClient++ (or some switch or something) that I can use to pull nagios info from the host machine?

What I've tried:

  • Downloading and installing the msi package in the little command window in the hyperv box. Download was fine, but it doesnt recognise the .msi file, says both the 32 and 64 bit ones are invalid

    This installation package could not be opened.Verify that the package exists, and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer package.

  • Reading through this article - although it assumes a full windows server is available at the end: http://www.altaro.com/hyper-v/how-to-monitor-hyper-v/

user230910
  • 205
  • 2
  • 8
  • You could remotely monitor it using WMI. https://exchange.nagios.org/directory/Plugins/Operating-Systems/Windows/WMI/Check-WMI-Plus/details – Zoredache May 09 '17 at 16:35
  • I'm not sure, but I think this is difficult to do without a domain present (i dont have one) – user230910 May 09 '17 at 16:41
  • 1
    This is not a direct answer to your question, but check out https://www.controlup.com... we use it to monitor our huge Hyper-V farms. – Itai Ganot May 09 '17 at 17:28

2 Answers2

1

That article that you reference is older and I've replaced it with a newer one: http://www.altaro.com/hyper-v/how-to-monitor-hyper-v-with-nagios/. However, that doesn't really address your problem.

I would continue to try to get NSClient++ to work. It's still the best tool that I've found for monitoring Hyper-V from Nagios. Did you remember to unblock the MSI file (Unblock-File)? It should work just fine on Hyper-V Server. The original article was tested on both Windows Server and Hyper-V Server. The newer one wasn't tested with Hyper-V Server, but it was tested with Windows Server Core and worked fine.

If the MSI path just doesn't work, use the ZIP distribution of NSClient++. Definitely remember to unblock prior to unzipping. You'll need the latest VC++ Redistributable already installed in order to use the ZIP distribution.

If you use the ZIP distribution, you'll need to build out your own nsclient.ini file. The newer version of the article goes into more detail on setting that up correctly, but this sample should be enough to get basic monitoring going:

[/settings/default]
password = nagios
allowed hosts = 192.168.25.128

[/settings/NRPE/server]
verify mode = none
insecure = true

[/modules]
CheckExternalScripts = 1
CheckHelpers = 1
CheckEventLog = 1
CheckNSCP = 1
CheckDisk = 1
CheckSystem = 1
NRPEServer = 1
NSClientServer = 1
Eric Siron
  • 121
  • 4
  • Hi eric, i didnt consider unblocking it! I'll try to figure out the command line way to unblock it.. – user230910 May 11 '17 at 05:14
  • Also the zip version sounds good.. i'm just worried that the gui components of nsclient wont be supported.. – user230910 May 11 '17 at 05:17
  • Unblock-File is the command line way... well the PowerShell way: https://msdn.microsoft.com/en-us/powershell/reference/5.1/microsoft.powershell.utility/unblock-file – Eric Siron May 12 '17 at 16:40
  • The ZIP version includes everything that is in a "complete" install. You just need to supply your own nsclient.ini. – Eric Siron May 12 '17 at 16:41
  • great, i'll give it a try and report back – user230910 May 13 '17 at 04:01
  • Please will you add the powershell commands into your answer - for downloading and then unblocking and installing, should help the next guy that gets stuck: `Invoke-WebRequest https://github.com/mickem/nscp/releases/download/0.5.0.62/nscp-0.5.0.62-x64.msi -OutFile nscp.msi` **Unblock-File ./nscp.msi** `msiexec.exe /i nscp.msi` – user230910 May 13 '17 at 04:31
  • The unblock advice was the thing that made it work, thanks so much for the info :) – user230910 May 13 '17 at 04:44
1

If WMI is a viable option, then Check WMI Plus is an alternative to NSClient++.

Also, you can use SNMP to check some (many?) metrics/services on Windows. There are plenty of SNMP plugins in the Windows category on Nagios Exchange.

It all depends on what, specifically, you want to monitor.

Keith
  • 4,637
  • 15
  • 25