Page 1 of 1
Inconsistent results
Posted: Fri May 15, 2015 10:32 am
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.
Re: Inconsistent results
Posted: Fri May 15, 2015 10:49 am
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"
Re: Inconsistent results
Posted: Fri May 15, 2015 2:32 pm
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
Re: Inconsistent results
Posted: Fri May 15, 2015 2:34 pm
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...
Re: Inconsistent results
Posted: Mon May 18, 2015 7:17 am
by jkinning
Code: Select all
./check_nrpe -H <host>
I (0.4.3.131 2015-02-15) seem to be doing fine...
Re: Inconsistent results
Posted: Mon May 18, 2015 9:38 am
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.
Re: Inconsistent results
Posted: Mon May 18, 2015 12:08 pm
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.
Re: Inconsistent results
Posted: Mon May 18, 2015 12:12 pm
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.
Re: Inconsistent results
Posted: Mon May 18, 2015 12:27 pm
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!
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.