Page 2 of 2

Re: IO monitoring in Nagios XI

Posted: Tue Apr 06, 2021 3:25 am
by kalyanpabolu
Hello,

I wanted to understand what threshold it is taking for the drives?

Re: IO monitoring in Nagios XI

Posted: Tue Apr 06, 2021 2:20 pm
by vtrac
Hi,
What is the output of this command? .... please upload outputs.

Code: Select all

curl -k -v "https://x.x.x.x:5693/api/disk/physical/PhysicalDrive0/?token=<yourToken>"
Based on the output above, you can apply that to the "check_ncpa.py" script with the "-M" option.


Regards,
Vinh

Re: IO monitoring in Nagios XI

Posted: Tue Apr 13, 2021 11:18 pm
by kalyanpabolu
Hello,

Below is the output:

[root@HO1-NAGIOSXI ~]# curl -k -v "https://10.1.0.22:5693/api/disk/physica ... Lhoub.2018"
* Trying 10.1.0.22...
* TCP_NODELAY set
* Connected to 10.1.0.22 (10.1.0.22) port 5693 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server did not agree to a protocol
* Server certificate:
* subject: C=US; ST=Minnesota; L=St. Paul; O=Nagios Enterprises, LLC; OU=Development; CN=JA-FILESRV1
* start date: Jul 16 14:19:23 2020 GMT
* expire date: Jul 14 14:19:23 2030 GMT
* issuer: C=US; ST=Minnesota; L=St. Paul; O=Nagios Enterprises, LLC; OU=Development; CN=JA-FILESRV1
* SSL certificate verify result: self signed certificate (18), continuing anyway.
> GET /api/disk/physical/PhysicalDrive0/[email protected] HTTP/1.1
> Host: 10.1.0.22:5693
> User-Agent: curl/7.61.1
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: application/json
< Content-Length: 471
< Access-Control-Allow-Origin: *
< X-Frame-Options: SAMEORIGIN
< Content-Security-Policy: frame-ancestors 'self'
< Date: Wed, 14 Apr 2021 04:18:10 GMT
<
{
"PhysicalDrive0": {
"read_time": [
3348,
"ms"
],
"read_bytes": [
23.34,
"GiB"
],
"write_count": [
2476796,
"c"
],
"write_time": [
1358,
"ms"
],
"write_bytes": [
34.2,
"GiB"
],
"read_count": [
1071000,
"c"
]
}
* Connection #0 to host 10.1.0.22 left intact
}[root@HO1-NAGIOSXI ~]#

Re: IO monitoring in Nagios XI

Posted: Wed Apr 14, 2021 12:27 pm
by kalyanpabolu
Hello,

I was checking for other plugins and this one seems to be better:

https://exchange.nagios.org/directory/P ... ad/details

Can someone please help me the exact command?
Also, will it work for NCPA latest version?

Re: IO monitoring in Nagios XI

Posted: Wed Apr 14, 2021 1:51 pm
by vtrac
Hi,
I have downloaded the file and also attached to this post.

However, please change the name to "check_ms_win_disk_load.ps1" once you pick it up since the forum does not let me upload ".ps1" file.

Here what you do:
- Put the "check_ms_win_disk_load.ps1" file under the (below) folder on your remote Windows machine that has NCPA agent installed:

Code: Select all

C:\Program Files (x86)\Nagios\NCPA\plugins
Now, you can test it by running the below (ONE line) command on your Nagios XI command prompt:
NOTE: "x.x.x.x" is your remote IP and "yourToken' is your NCPA's token defined in "ncpa.cfg".

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H x.x.x.x-t 'yourToken' -P 5693 -M plugins/check_ms_win_disk_load.ps1 -a '-dl C'
Here's an example of my test:

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H 192.168.254.149 -t 'VT9900' -P 5693 -M plugins/check_ms_win_disk_load.ps1 -a '-dl C'


Here are the outputs:

OK: Drive C: Avg of 2 samples: {Rate (Read: 0.00000MB/s)(Write: 0.13468MB/s)} {Avg Nr of (Reads: 0.00000r/s)(Writes: 6.40290w/s)} {Latency (Read: 0.00000ms)(Write: 0.10900ms)} {Queue Length (Read: 0.00000ql)(Write: 0.00140ql)} | 'Read_Latency'=0.00000ms 'Write_Latency'=0.10900ms 'Read_Queue'=0.00000ql 'Write_Queue'=0.00140ql 'Number_of_Reads'=0.00000r/s 'Number_of_Writes'=6.40290w/s 'Read_Rate'=0.00000MB/s 'Write_Rate'=0.13468MB/s
Also, here are the HELP options I found inside the script which you can try:

Code: Select all

check_ms_windows_disk_load.ps1:
This script is designed to monitor Microsoft Windows disk load.
Arguments:
    -H 	 | --Hostname			=> Optional hostname of remote system, default is localhost, not yet tested on remote host.
    -dl  | --DiskLetter			=> Diskletter to get data from.
    -rqw | --ReadQueueWarn  	=> Warning threshold for read queue length.
    -rqc | --ReadQueueCrit		=> Critical threshold for read queue length.
    -wqw | --WriteQueueWarn  	=> Warning threshold for write queue length.
    -wqc | --WriteQueueCrit		=> Critical threshold for write queue length.
    -ms  | --MaxSamples 		=> Amount of samples to take.
    -h   | --Help 				=> Print this help output.
It is best that you play with the above options to get what you wanted out of this tool.

Since this package came from Nagios Exchange, we do not support it.
We will try to help you as much as we can, base on our knowledge as this is my very first time trying it.
Please contact the owner of this tool, if you need more info or suggestions.


Best Regards,
Vinh

Re: IO monitoring in Nagios XI

Posted: Thu Apr 15, 2021 7:55 am
by kalyanpabolu
Hello,

Thank you so much for your help.
It is working as expected.

Could you please help me understand the threshold values it is taking?

Re: IO monitoring in Nagios XI

Posted: Thu Apr 15, 2021 3:21 pm
by vtrac
Hi,
I searched and hopefully the below URL(s) can give you more details.

https://github.com/OutsideIT/check_ms_win_disk_load
https://outsideit.net/monitoring-windows-disk-load/


Best Regards,
Vinh

Re: IO monitoring in Nagios XI

Posted: Sun May 30, 2021 11:24 am
by kalyanpabolu
Hello,

We need to place this script on the target servers. I am using this for Disk IO monitoring for Windows servers. I am placing this script on all servers.
Could you please help me to understand if this script can create any performance issues on Windows servers?
Nagios would be accessing the script every 15 minutes which means it will run every 15 minutes. Will that create any impact on Windows servers performance?

Thanks in advance!!

Re: IO monitoring in Nagios XI

Posted: Tue Jun 01, 2021 9:13 am
by vtrac
Hi kalyanpabolu,
How are you doing?
I think this script is very light weight and fast, which should not put any load on your Windows server.

Best Regards,
Vinh