Inconsistent results

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jkinning
Posts: 747
Joined: Wed Oct 09, 2013 2:54 pm

Inconsistent results

Post by jkinning »

On the Nagios XI terminal I run this command:
./check_nrpe -H <host> -c check_drivesize -a "filter=type = 'fixed' and drive regexp '.*[C-Z].*'" "warn=free<4G" "crit=free<2G"
OK All 2 drive(s) are ok|'C:\ free'=25.54739GB;4;2;0;39.65527 'C:\ free %'=64%;10;5;0;100 'D:\ free'=6.00631GB;4;2;0;14.99706 'D:\ free %'=40%;26;13;0;100

Within Nagios XI Console I am using the check_nrpe command with $ARG1$=check_drivesize -a "filter=type = 'fixed' and drive regexp '.*[C-Z].*'" "warn=free<4G" "crit=free<2G" and I get these results:
WARNING : Total: 349.996MB - Used: 290.57MB (84%) - Free: 59.426MB (16%)

This is from the same exact host.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Inconsistent results

Post by jdalrymple »

Working OK for me - see attachments.

Copied ARG1 for your convenience:

Code: Select all

check_drivesize -a "filter=type = 'fixed' and drive regexp '.*[C-Z].*'" "warn=free<4G" "crit=free<2G"
You do not have the required permissions to view the files attached to this post.
jkinning
Posts: 747
Joined: Wed Oct 09, 2013 2:54 pm

Re: Inconsistent results

Post by jkinning »

Strange cause I have several machines all using the same checks but some are still demonstrating this behavior.

./check_nrpe -H wstravel1t -c check_drivesize -a "filter=type = 'fixed' and drive regexp '.*[C-Z].*'" "warn=free<4G" "crit=free<2G"
WARNING D:\: 11.908GB/14.997GB used|'C:\ free'=18.17928GB;4;2;0;39.89941 'C:\ free %'=45%;10;5;0;100 'D:\ free'=3.08884GB;4;2;0;14.99706 'D:\ free %'=20%;26;13;0;100
You do not have the required permissions to view the files attached to this post.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Inconsistent results

Post by jdalrymple »

I wonder if it's argument parsing on the far end. What version of NSCP are you using?

Code: Select all

[root@jrd-cent65-1 libexec]# ./check_nrpe -H 192.168.145.1
I (0.4.3.131 2015-02-15) seem to be doing fine...
jkinning
Posts: 747
Joined: Wed Oct 09, 2013 2:54 pm

Re: Inconsistent results

Post by jkinning »

Code: Select all

./check_nrpe -H <host>
I (0.4.3.131 2015-02-15) seem to be doing fine...
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Inconsistent results

Post by jdalrymple »

When you look in the appropriate config file under /usr/local/nagios/etc/services do you see any funny extra whitespace, or strange line-end characters or anything? Everything works great for me using that $ARG1$ I even changed it so that the warn filter was 10G to create a warning and that looks OK.
You do not have the required permissions to view the files attached to this post.
jkinning
Posts: 747
Joined: Wed Oct 09, 2013 2:54 pm

Re: Inconsistent results

Post by jkinning »

Most of the servers are reporting just fine, at least what I can tell. Some are exhibiting this behavior where it is looking at the drive

Some work:
./check_nrpe -H <host> -c check_drivesize -a "filter=type = 'fixed' and drive regexp '.*[C-Z].*'" "warn=free<4G" "crit=free<2G"
OK All 2 drive(s) are ok|'C:\ free'=25.54739GB;4;2;0;39.65527 'C:\ free %'=64%;10;5;0;100 'D:\ free'=6.00631GB;4;2;0;14.99706 'D:\ free %'=40%;26;13;0;100

A few hosts are doing this
./check_nrpe -H <host> -c check_drivesize -a "filter=type = 'fixed' and drive regexp '.*[C-Z].*'" "warn=free<4G" "crit=free<2G"
WARNING D:\: 11.908GB/14.997GB used|'C:\ free'=18.17928GB;4;2;0;39.89941 'C:\ free %'=45%;10;5;0;100 'D:\ free'=3.08884GB;4;2;0;14.99706 'D:\ free %'=20%;26;13;0;100

I am not sure where the 11.908G is coming from as this server has 2 disks. C:\ is 40GB and D:\ is 15GB. All the servers have the same nsclient.ini file too.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Inconsistent results

Post by jdalrymple »

jkinning wrote:A few hosts are doing this

Code: Select all

./check_nrpe -H <host> -c check_drivesize -a "filter=type = 'fixed' and drive regexp '.*[C-Z].*'" "warn=free<4G" "crit=free<2G"
WARNING D:\: 11.908GB/14.997GB used|'C:\ free'=18.17928GB;4;2;0;39.89941 'C:\ free %'=45%;10;5;0;100 'D:\ free'=3.08884GB;4;2;0;14.99706 'D:\ free %'=20%;26;13;0;100
Bear with me for sounding dumb - but what's wrong with this output? It appears to fit the specifications you're passing into the service check. Going back to the initial thread post I see malformed output, but this one looks skookum to me.
jkinning
Posts: 747
Joined: Wed Oct 09, 2013 2:54 pm

Re: Inconsistent results

Post by jkinning »

jdalrymple wrote:
jkinning wrote:A few hosts are doing this

Code: Select all

./check_nrpe -H <host> -c check_drivesize -a "filter=type = 'fixed' and drive regexp '.*[C-Z].*'" "warn=free<4G" "crit=free<2G"
WARNING D:\: 11.908GB/14.997GB used|'C:\ free'=18.17928GB;4;2;0;39.89941 'C:\ free %'=45%;10;5;0;100 'D:\ free'=3.08884GB;4;2;0;14.99706 'D:\ free %'=20%;26;13;0;100
Bear with me for sounding dumb - but what's wrong with this output? It appears to fit the specifications you're passing into the service check. Going back to the initial thread post I see malformed output, but this one looks skookum to me.

Doh! You can slap me now! :oops:

I don't know what I was thinking and you are right this server should be spitting out a Warning with less than 4G of space. I am sorry for wasting your time.

Close at your convenience.
Locked