windows server version monitoring using ncpa

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
mejokj
Posts: 353
Joined: Mon Jul 22, 2013 10:31 pm

windows server version monitoring using ncpa

Post by mejokj »

Hi Team,

Want to monitor windows server version for eg: "windows server 2016" using ncpa agent on nagios.

Thanks
gsmith
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: windows server version monitoring using ncpa

Post by gsmith »

Hi

You could use SNMP to get:

Code: Select all

SNMPv2-MIB::sysDescr.0 = STRING: Hardware: Intel64 Family 6 Model 63 Stepping 2 AT/AT COMPATIBLE - Software: Windows Version 6.3 (Build 9600 Multiprocessor Free)
If you wanted to use a script you could create something like:

Code: Select all

@echo off
set ERRORLEVEL=2
for /f  "tokens=1,2,3,4,5,6,7,8 delims= " %%i in ('C:\Windows\System32\systeminfo.exe') do ( 
  if %%i==OS (
     if %%j==Name: (
        echo %%k %%l %%m %%n %%o %%p
        set ERRORLEVEL=0
     )
  )  
)
And put it in C:\Program Files (x86)\Nagios\ncpa\plugins on the machine to be monitored. Then call it from the XI server with check_ncpa.py

The issue I see with that is if you are going to the trouble of installing a script on the remote Windows server
it would be just as easy to check the OS rather than deploying the script ;)

Thanks
Locked