Page 1 of 2

check_drivesize issue again

Posted: Fri May 08, 2020 2:12 am
by rajasegar
Old thread
https://support.nagios.com/forum/viewto ... 16&t=53665


There is a new issue now.

I have a server where there is drive C & E. Individual checks works fine

Code: Select all

[nagios@nagiosprodxi1 services]$  /usr/local/nagios/libexec/check_nrpe -u -t 60 -H 10.104.19.120 -p 5666 -c check_drivesize -a 
 warn=used>=70' 'crit=used>=85' 'drive=C'                                                                        OK All 1 drive(s) are ok|'C: used'=94.68646GB;105.00068;127.50082;0;150.00097 'C: used %'=63%;70;85;0;100

[nagios@nagiosprodxi1 services]$  /usr/local/nagios/libexec/check_nrpe -u -t 60 -H 10.104.19.120 -p 5666 -c check_drivesize -a 'warn=used>=70' 'crit=used>=85' 'drive=D'
Filter processing failed: Failed to get size for D:: 3: The system cannot find the path specified.
: 0 >= convert(0)

[nagios@nagiosprodxi1 services]$  /usr/local/nagios/libexec/check_nrpe -u -t 60 -H 10.104.19.120 -p 5666 -c check_drivesize -a 'warn=used>=70' 'crit=used>=85' 'drive=E'
OK All 1 drive(s) are ok|'E: used'=66.88811GB;155.30634;188.58627;0;221.8662 'E: used %'=30%;70;85;0;100
However if I use drive =* it bombs

Code: Select all

[nagios@nagiosprodxi1 services]$  /usr/local/nagios/libexec/check_nrpe -u -t 60 -H 10.104.19.120 -p 5666 -c check_drivesize -a 'warn=used>=70' 'crit=used>=85' 'drive=*' "filter=drive_or_id not like 'Volume' and type not in ('CDROM', 'REMOVABLE')"
CHECK_NRPE: Invalid packet type received from server.
Is there a way to get this to work? I think it is checking drive D and exits with error.

Re: check_drivesize issue again

Posted: Fri May 08, 2020 11:42 am
by ssax
If you restart the nsclient service, does it fix it?

Please enable trace logging in your nsclient.ini, make the check fail again, and then attach (or PM) your nsclient.log for us to review.

Code: Select all

; LOG SECTION - Configure log properties.
[/settings/log]

; DATEMASK - The size of the buffer to use when getting messages this affects the speed and maximum size of messages you can recieve.
date format = %Y-%m-%d %H:%M:%S

; LOG LEVEL - Log level to use. Available levels are error,warning,info,debug,trace
level = trace

; FILENAME - The file to write log data to. Set this to none to disable log to file.
file name = ${exe-path}/nsclient.log
Thank you

Re: check_drivesize issue again

Posted: Tue May 12, 2020 1:48 am
by rajasegar
ssax wrote:If you restart the nsclient service, does it fix it?

Please enable trace logging in your nsclient.ini, make the check fail again, and then attach (or PM) your nsclient.log for us to review.

Code: Select all

; LOG SECTION - Configure log properties.
[/settings/log]

; DATEMASK - The size of the buffer to use when getting messages this affects the speed and maximum size of messages you can recieve.
date format = %Y-%m-%d %H:%M:%S

; LOG LEVEL - Log level to use. Available levels are error,warning,info,debug,trace
level = trace

; FILENAME - The file to write log data to. Set this to none to disable log to file.
file name = ${exe-path}/nsclient.log
Thank you
Restart no luck. Trace attached but I dont see any useful info in there
nsclient.log

Re: check_drivesize issue again

Posted: Tue May 12, 2020 10:43 am
by ssax
Does it work if you don't use the filter?

Code: Select all

/usr/local/nagios/libexec/check_nrpe -u -t 60 -H 10.104.19.120 -p 5666 -c check_drivesize -a 'warn=used>=70' 'crit=used>=85' 'drive=*'

Re: check_drivesize issue again

Posted: Tue May 12, 2020 8:19 pm
by rajasegar
ssax wrote:Does it work if you don't use the filter?

Code: Select all

/usr/local/nagios/libexec/check_nrpe -u -t 60 -H 10.104.19.120 -p 5666 -c check_drivesize -a 'warn=used>=70' 'crit=used>=85' 'drive=*'
Still does not work

Code: Select all

[nagios@nagiosprodxi1 ~]$ /usr/local/nagios/libexec/check_nrpe -u -t 60 -H 10.104.19.120 -p 5666 -c check_drivesize -a 'warn=used>=70' 'crit=used>=85' 'drive=*'
CHECK_NRPE: Invalid packet type received from server.

Re: check_drivesize issue again

Posted: Wed May 13, 2020 9:38 am
by ssax
I tested on mine with the latest and it's working properly.

Was this a drive that was removed while the system was running? Maybe it still sees it but can't get the statistics on it.

Does it work if you do this?

Code: Select all

/usr/local/nagios/libexec/check_nrpe -u -t 60 -H 10.104.19.120 -P 8192 -p 5666 -c check_drivesize -a 'warn=used>=70' 'crit=used>=85'
Can you try upgrading to the latest on the system and test again?

https://nsclient.org/download/

Re: check_drivesize issue again

Posted: Wed May 13, 2020 7:48 pm
by rajasegar
ssax wrote:I tested on mine with the latest and it's working properly.

Was this a drive that was removed while the system was running? Maybe it still sees it but can't get the statistics on it.

Does it work if you do this?

Code: Select all

/usr/local/nagios/libexec/check_nrpe -u -t 60 -H 10.104.19.120 -P 8192 -p 5666 -c check_drivesize -a 'warn=used>=70' 'crit=used>=85'
Can you try upgrading to the latest on the system and test again?

https://nsclient.org/download/

Code: Select all

[nagios@MYUCBPNAGIAPP01 ~]$ /usr/local/nagios/libexec/check_nrpe -2 -u -t 60 -H 10.104.19.120 -P 8192 -p 5666 -c check_drivesize -a 'warn=used>=70' 'crit=used>=85'
CHECK_NRPE: Receive underflow - only 1026 bytes received (4 expected).
BTW we are already using 0.5.2.39 the latest. Last update was in 2018. Is NSClient++ not updated anymore?
You want me to try the nightly builds?

Re: check_drivesize issue again

Posted: Thu May 14, 2020 1:27 pm
by ssax
No, that's correct, they don't update it often but they do work on it. We don't control that because we don't develop that agent (NCPA is our client).

Does this work by chance?

Code: Select all

/usr/local/nagios/libexec/check_nrpe -2 -u -t 60 -H 10.104.19.120 -P 1026 -p 5666 -c check_drivesize -a 'warn=used>=70' 'crit=used>=85'
Please attach (or PM) your latest nsclient.ini so that I can lab it up with yours.

Re: check_drivesize issue again

Posted: Thu May 14, 2020 10:28 pm
by rajasegar
ssax wrote:No, that's correct, they don't update it often but they do work on it. We don't control that because we don't develop that agent (NCPA is our client).

Does this work by chance?

Code: Select all

/usr/local/nagios/libexec/check_nrpe -2 -u -t 60 -H 10.104.19.120 -P 1026 -p 5666 -c check_drivesize -a 'warn=used>=70' 'crit=used>=85'
Please attach (or PM) your latest nsclient.ini so that I can lab it up with yours.
/usr/local/nagios/libexec/check_nrpe -2 -u -t 60 -H 10.104.19.120 -P 1026 -p 5666 -c check_drivesize -a 'warn=used>=70' 'crit=used>=85'
CHECK_NRPE: Response packet had invalid CRC32.
nsclient.ini
This is the disk management screenshot from the server.
disks.png

Re: check_drivesize issue again

Posted: Fri May 15, 2020 2:54 pm
by ssax
Where are those other ones mounted to?

Open up a admin prompt on that server and PM me the output of these commands:

Code: Select all

diskpart
list volume