Inconsistent results
Inconsistent results
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.
./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
Working OK for me - see attachments.
Copied ARG1 for your convenience:
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.
Re: Inconsistent results
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
./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
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
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
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.
Re: Inconsistent results
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.
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
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 wrote:A few hosts are doing thisCode: 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
Re: Inconsistent results
jdalrymple wrote: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 wrote:A few hosts are doing thisCode: 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
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.