Check Disk
Check Disk
Nagios Core 4.3.4
We have several servers that have archive disks and they are usually 99% to 100% full.
The software clears the files automatically.
Currently we use a check_disk command and it is always critical. we tried to change the application to only use 90 % of the disk but have not had any success.
Is there a check disk that will just check to make sure the disk is present? We are not concerned about how much free space is available or space used.
Thank you
Tom
We have several servers that have archive disks and they are usually 99% to 100% full.
The software clears the files automatically.
Currently we use a check_disk command and it is always critical. we tried to change the application to only use 90 % of the disk but have not had any success.
Is there a check disk that will just check to make sure the disk is present? We are not concerned about how much free space is available or space used.
Thank you
Tom
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Check Disk
What if you use check disk but set warning and critical for the path to 0%
e.g.
It will always be OK, but if the drive is not present you would get this
e.g.
Code: Select all
/usr/local/nagios/libexec/check_disk -w 0% -c 0% -p /your/drive/path
Code: Select all
# /usr/local/nagios/libexec/check_disk -w 0% -c 0% -p /your/drive/path
DISK CRITICAL - /your/drive/path is not accessible: No such file or directory
Re: Check Disk
Sorry
Using this command
$ ./check_nrpe -A /usr/local/nagios/certs/ca/anakin-ca.crt -C /usr/local/nagios/certs/nagios_server/nagios_server.crt -K /usr/local/nagios/certs/nagios_server/nagios_server.key -2 -P 8192 -H ale.fdu.edu -t 30 -c check_drivesize -a Warning=0 Critical=0 Drive=F:
Invalid command line: unrecognised option 'Warning=0'
filter=mounted = 1 Filter which marks interesting items.
warning=used > 80% Filter which marks items which generates a warning state.
warn= Short alias for warning
critical=used > 90% Filter which marks items which generates a critical state.
crit= Short alias for critical.
ok= Filter which marks items which generates an ok state.
debug Show debugging information in the log
show-all Show details for all matches regardless of status (normally details are only showed for warnings and criticals).
empty-state=unknown Return status to use when nothing matched filter.
perf-config= Performance data generation configuration
escape-html Escape any < and > characters to prevent HTML encoding
help Show help screen (this screen)
help-pb Show help screen as a protocol buffer payload
show-default Show default values for a given command
help-short Show help screen (short format).
top-syntax=${status} ${problem_list} Top level syntax.
ok-syntax=%(status) All %(count) drive(s) are ok ok syntax.
empty-syntax=%(status): No drives found Empty syntax.
detail-syntax=${drive_or_name}: ${used}/${size} used Detail level syntax.
perf-syntax=${drive_or_id} Performance alias syntax.
drive= The drives to check.
ignore-unreadable DEPRECATED (manually set filter instead) Ignore drives which are not reachable by the current user.
mounted DEPRECATED (this is now default) Show only mounted rives i.e. drives which have a mount point.
magic= Magic number for use with scaling drive sizes.
exclude= A list of drives not to check
total Include the total of all matching drives
thoughts
Using this command
$ ./check_nrpe -A /usr/local/nagios/certs/ca/anakin-ca.crt -C /usr/local/nagios/certs/nagios_server/nagios_server.crt -K /usr/local/nagios/certs/nagios_server/nagios_server.key -2 -P 8192 -H ale.fdu.edu -t 30 -c check_drivesize -a Warning=0 Critical=0 Drive=F:
Invalid command line: unrecognised option 'Warning=0'
filter=mounted = 1 Filter which marks interesting items.
warning=used > 80% Filter which marks items which generates a warning state.
warn= Short alias for warning
critical=used > 90% Filter which marks items which generates a critical state.
crit= Short alias for critical.
ok= Filter which marks items which generates an ok state.
debug Show debugging information in the log
show-all Show details for all matches regardless of status (normally details are only showed for warnings and criticals).
empty-state=unknown Return status to use when nothing matched filter.
perf-config= Performance data generation configuration
escape-html Escape any < and > characters to prevent HTML encoding
help Show help screen (this screen)
help-pb Show help screen as a protocol buffer payload
show-default Show default values for a given command
help-short Show help screen (short format).
top-syntax=${status} ${problem_list} Top level syntax.
ok-syntax=%(status) All %(count) drive(s) are ok ok syntax.
empty-syntax=%(status): No drives found Empty syntax.
detail-syntax=${drive_or_name}: ${used}/${size} used Detail level syntax.
perf-syntax=${drive_or_id} Performance alias syntax.
drive= The drives to check.
ignore-unreadable DEPRECATED (manually set filter instead) Ignore drives which are not reachable by the current user.
mounted DEPRECATED (this is now default) Show only mounted rives i.e. drives which have a mount point.
magic= Magic number for use with scaling drive sizes.
exclude= A list of drives not to check
total Include the total of all matching drives
thoughts
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Check Disk
Whoa, you started the thread asking about check_disk
Now you are changing it to check_nrpe calling check_drivesize which is part of NSClient++?
Which is it? We need to know what you are looking at before we can help, these cannot be intermingled...
Now you are changing it to check_nrpe calling check_drivesize which is part of NSClient++?
Which is it? We need to know what you are looking at before we can help, these cannot be intermingled...
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Check Disk
With check_drivesize and your args, you would make the command like this:
Code: Select all
./check_nrpe -A /usr/local/nagios/certs/ca/anakin-ca.crt -C /usr/local/nagios/certs/nagios_server/nagios_server.crt -K /usr/local/nagios/certs/nagios_server/nagios_server.key -2 -P 8192 -H ale.fdu.edu -t 30 -c check_drivesize "crit=free<0M" "warn=free<0M" drive=F
Re: Check Disk
[grassi-admin@anakin plugins]$ ./check_nrpe -A /usr/local/nagios/certs/ca/anakin-ca.crt -C /usr/local/nagios/certs/nagios_server/nagios_server.crt -K /usr/local/nagios/certs/nagios_server/nagios_server.key -2 -P 8192 -H ale.fdu.edu -t 30 -c check_drivesize "crit=free<0M" "warn=free<0M" drive=F
CRITICAL F:\: 1.925TB/2TB used, G:\: 1.976TB/2TB used, H:\: 1.89TB/2TB used, L:\: 1.998TB/2TB used, M:\: 1.997TB/2TB used|'F:\ used'=1.92471TB;1.5999;1.79988;0;1.99987 'F:\ used %'=96%;80;90;0;100 'G:\ used'=1.97556TB;1.5999;1.79988;0;1.99987 'G:\ used %'=99%;80;90;0;100 'H:\ used'=1.8898TB;1.59999;1.79999;0;1.99999 'H:\ used %'=94%;80;90;0;100 'I:\ used'=0.00049TB;1.5999;1.79988;0;1.99987 'I:\ used %'=0%;80;90;0;100 'J:\ used'=0.78737TB;1.5999;1.79988;0;1.99987 'J:\ used %'=39%;80;90;0;100 'K:\ used'=0.07828TB;1.5999;1.79988;0;1.99987 'K:\ used %'=4%;80;90;0;100 'L:\ used'=1.99776TB;1.5999;1.79988;0;1.99987 'L:\ used %'=100%;80;90;0;100 'M:\ used'=1.99737TB;1.5999;1.79988;0;1.99987 'M:\ used %'=100%;80;90;0;100 'N:\ used'=0.01185TB;1.59999;1.79999;0;1.99999 'N:\ used %'=1%;80;90;0;100 'P:\ used'=0.0005TB;1.59999;1.79999;0;1.99999 'P:\ used %'=0%;80;90;0;100 'O:\ used'=0.05169TB;1.59999;1.79999;0;1.99999 'O:\ used %'=3%;80;90;0;100 'Q:\ used'=0.00051TB;1.59999;1.79999;0;1.99999 'Q:\ used %'=0%;80;90;0;100 'R:\ used'=25.05379GB;35.89765;40.38486;0;44.87206 'R:\ used %'=56%;80;90;0;100 'S:\ used'=14.08783GB;15.99765;17.99736;0;19.99706 'S:\ used %'=70%;80;90;0;100 'C:\ used'=47.52887GB;47.91952;53.90946;0;59.89941 'C:\ used %'=79%;80;90;0;100 'D:\ used'=7.64876GB;15.99999;17.99999;0;19.99999 'D:\ used %'=38%;80;90;0;100 'E:\ used'=28.14151GB;47.99765;53.99736;0;59.99706 'E:\ used %'=47%;80;90;0;100 'B:\ used'=0B;0;0;0;0
CRITICAL F:\: 1.925TB/2TB used, G:\: 1.976TB/2TB used, H:\: 1.89TB/2TB used, L:\: 1.998TB/2TB used, M:\: 1.997TB/2TB used|'F:\ used'=1.92471TB;1.5999;1.79988;0;1.99987 'F:\ used %'=96%;80;90;0;100 'G:\ used'=1.97556TB;1.5999;1.79988;0;1.99987 'G:\ used %'=99%;80;90;0;100 'H:\ used'=1.8898TB;1.59999;1.79999;0;1.99999 'H:\ used %'=94%;80;90;0;100 'I:\ used'=0.00049TB;1.5999;1.79988;0;1.99987 'I:\ used %'=0%;80;90;0;100 'J:\ used'=0.78737TB;1.5999;1.79988;0;1.99987 'J:\ used %'=39%;80;90;0;100 'K:\ used'=0.07828TB;1.5999;1.79988;0;1.99987 'K:\ used %'=4%;80;90;0;100 'L:\ used'=1.99776TB;1.5999;1.79988;0;1.99987 'L:\ used %'=100%;80;90;0;100 'M:\ used'=1.99737TB;1.5999;1.79988;0;1.99987 'M:\ used %'=100%;80;90;0;100 'N:\ used'=0.01185TB;1.59999;1.79999;0;1.99999 'N:\ used %'=1%;80;90;0;100 'P:\ used'=0.0005TB;1.59999;1.79999;0;1.99999 'P:\ used %'=0%;80;90;0;100 'O:\ used'=0.05169TB;1.59999;1.79999;0;1.99999 'O:\ used %'=3%;80;90;0;100 'Q:\ used'=0.00051TB;1.59999;1.79999;0;1.99999 'Q:\ used %'=0%;80;90;0;100 'R:\ used'=25.05379GB;35.89765;40.38486;0;44.87206 'R:\ used %'=56%;80;90;0;100 'S:\ used'=14.08783GB;15.99765;17.99736;0;19.99706 'S:\ used %'=70%;80;90;0;100 'C:\ used'=47.52887GB;47.91952;53.90946;0;59.89941 'C:\ used %'=79%;80;90;0;100 'D:\ used'=7.64876GB;15.99999;17.99999;0;19.99999 'D:\ used %'=38%;80;90;0;100 'E:\ used'=28.14151GB;47.99765;53.99736;0;59.99706 'E:\ used %'=47%;80;90;0;100 'B:\ used'=0B;0;0;0;0
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Check Disk
I'm not sure but this could be a bug in the version of NSClient++ you are using, it appears it is setting default warn/crit values AND it is displaying all drives when you only specified drive=F
We are not the authors of NSClient++ so I cannot say for sure
You could ask here
https://forums.nsclient.org/
We tested this on 2 systems, running
and
We are not the authors of NSClient++ so I cannot say for sure
You could ask here
https://forums.nsclient.org/
We tested this on 2 systems, running
Code: Select all
0.5.2.35
Code: Select all
0.4.4.23
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Check Disk
Scratch that previous post, I just noticed the command I gave you is missing the -a
try this
Sorry about that
try this
Code: Select all
./check_nrpe -A /usr/local/nagios/certs/ca/anakin-ca.crt -C /usr/local/nagios/certs/nagios_server/nagios_server.crt -K /usr/local/nagios/certs/nagios_server/nagios_server.key -2 -P 8192 -H ale.fdu.edu -t 30 -c check_drivesize -a "crit=free<0M" "warn=free<0M" drive=F