NCPA Service Monitoring/Disk I/O

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
AMacintosh
Posts: 59
Joined: Mon Nov 07, 2011 12:26 pm

NCPA Service Monitoring/Disk I/O

Post by AMacintosh »

We are in a situation where we have installed 100+ NCPA agents on Windows 2008 servers. We now are required to monitor Disk I/O and Windows Services(for Up/Down). Is this functionality available with NCPA or are we looking at uninstalling NCPA and going with NSClient+?

Thanks,
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NCPA Service Monitoring/Disk I/O

Post by lmiltchev »

You can use a powershell script to query the Windows Performance counter, and call the script with NCPA. Here's a couple of links that can get you started:

https://github.com/sreinhardt/Nagios_Pe ... e_Counters

http://assets.nagios.com/downloads/ncpa/docs/html/

You can monitor services with NCPA. You can specify which services you would like to monitor in Step 3 of the wizard...
example01.PNG
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
AMacintosh
Posts: 59
Joined: Mon Nov 07, 2011 12:26 pm

Re: NCPA Service Monitoring/Disk I/O

Post by AMacintosh »

Thank You. How about log file monitoring?
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: NCPA Service Monitoring/Disk I/O

Post by WillemDH »

Or you could also use http://exchange.nagios.org/directory/Pl ... ad/details

But I did not test it with NCPA, so I can't promise it will work. Can someone from Nagios support tell if NCPA can execute custom PS scripts?

It monitors 8 disk load related performance counters in one script. :) More info here: http://outsideit.net/check_ms_win_disk_load/ resulting in one graph that has all the info you need related to disk load, such as read / write queue, read/write latency, Nr of reads/writes, read/write rate.

Grtz
You do not have the required permissions to view the files attached to this post.
Nagios XI 5.8.1
https://outsideit.net
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NCPA Service Monitoring/Disk I/O

Post by lmiltchev »

But I did not test it with NCPA, so I can't promise it will work. Can someone from Nagios support tell if NCPA can execute custom PS scripts?
It can... kind of... :) I just tested your script and here's what I see in the web UI:

Code: Select all

{
  "value": {
    "returncode": 0, 
    "stdout": "OK: Drive C: Avg of 2 samples: {Rate (Read: 15.55193MB/s)(Write: 0.26591MB/s)} {Avg Nr of (Reads: 256.00892r/s)(Writes: 256.00892w/s)} {Latency (Read: 4.20664us)(Write: 0.26130us)} {Queue Length (Read: 1.04959ql)(Write: 1.04959ql)} | 'Read_Latency'=4.20664us 'Write_Latency'=0.26130us 'Read_Queue'=1.04959ql 'Write_Queue'=0.00647ql 'Nnumber_of_Reads'=256.00892r/s 'Number_of_Writes'=22.21626w/s 'Read_Rate'=15.55193MB/s 'Write_Rate'=0.26591MB/s"
  }
}
In order to make this work I had to modify one line in the "ncpa.cfg" to look like this:

Code: Select all

.ps1 = powershell -ExecutionPolicy Bypass -File $plugin_name $plugin_args
I had an issue with running the command from the CLI.

Code: Select all

[root@testbox libexec]# ./check_ncpa.py -H 192.168.x.x -t token -M agent/plugin/check_ms_disk_load.ps1
Unable to run check on non-child node. Revise your query.
Our developers are looking into this as we speak. I hope this will be resolved soon.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NCPA Service Monitoring/Disk I/O

Post by lmiltchev »

Never mind. I mistyped the plugin's name. :oops:

It works just fine from the CLI:

Code: Select all

[root@testbox libexec]# ./check_ncpa.py -H 192.168.x.x -t token -M agent/plugin/check_ms_win_disk_load.ps1
OK: Drive C: Avg of 2 samples: {Rate (Read: 0.17719MB/s)(Write: 0.77577MB/s)} {Avg Nr of (Reads: 1.97220r/s)(Writes: 1.97220w/s)} {Latency (Read: 5.52499us)(Write: 0.69768us)} {Queue Length (Read: 0.02179ql)(Write: 0.02179ql)} | 'Read_Latency'=5.52499us 'Write_Latency'=0.69768us 'Read_Queue'=0.02179ql 'Write_Queue'=0.01316ql 'Nnumber_of_Reads'=1.97220r/s 'Number_of_Writes'=18.80838w/s 'Read_Rate'=0.17719MB/s 'Write_Rate'=0.77577MB/s
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: NCPA Service Monitoring/Disk I/O

Post by WillemDH »

Good to know it works with NCPA too. If I find some time one day I'll update my documentation with this information.

Grtz
Nagios XI 5.8.1
https://outsideit.net
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: NCPA Service Monitoring/Disk I/O

Post by sreinhardt »

One would hope it should, but agreed always nice to have confirmation!
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked