check_drivesize not accepting warn and crit values

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
nfbnbm
Posts: 3
Joined: Thu May 04, 2017 11:24 am

check_drivesize not accepting warn and crit values

Post by nfbnbm »

Hi guys or girls,

Nobody is answering in Git and thought I might try to receive an answer here.

https://github.com/mickem/nscp/issues/611

In short, warn and crit filter are always overwritten with default 80% and 90%.

Am I missing something?

Thanks in advance.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: check_drivesize not accepting warn and crit values

Post by scottwilkerson »

We have some example syntax here
https://support.nagios.com/kb/article/d ... s-770.html

I looked at your github post and it seems you are grouping parts of the command with quoted around it

Instead of this

Code: Select all

alias_disk = check_drivesize "perf-config=*(unit:g) warning=used>90% critical=used>95% filter=removable=1 and type in ('fixed')" drive=all-drives show-all exclude=A: exclude=D:
maybe try this

Code: Select all

alias_disk = check_drivesize 'warning=used>90%' 'critical=used>95%' 'perf-config=*(unit:G)' "filter=removable=1 and type in ('fixed')" drive=all-drives show-all exclude=A: exclude=D:
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
nfbnbm
Posts: 3
Joined: Thu May 04, 2017 11:24 am

Re: check_drivesize not accepting warn and crit values

Post by nfbnbm »

scottwilkerson wrote:We have some example syntax here
https://support.nagios.com/kb/article/d ... s-770.html

I looked at your github post and it seems you are grouping parts of the command with quoted around it

Instead of this

Code: Select all

alias_disk = check_drivesize "perf-config=*(unit:g) warning=used>90% critical=used>95% filter=removable=1 and type in ('fixed')" drive=all-drives show-all exclude=A: exclude=D:
maybe try this

Code: Select all

alias_disk = check_drivesize 'warning=used>90%' 'critical=used>95%' 'perf-config=*(unit:G)' "filter=removable=1 and type in ('fixed')" drive=all-drives show-all exclude=A: exclude=D:
Hi and thanks for responding!

Your command does not work. Status information:

Code: Select all

Invalid command line: unrecognised option ''warning=used>90%''
When changing the command from 'command' to "command":

Code: Select all

check_drivesize "warning=used>90%" "critical=used>95%" "perf-config=*(unit:G)" "filter=removable=1 and type in ('fixed')" drive=all-drives show-all exclude=A: exclude=D:
Status information:

Code: Select all

OK: No drives found
Any other ideas?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: check_drivesize not accepting warn and crit values

Post by scottwilkerson »

I was going off of your Github issue post where you had filter=removable=1

this means it will only show removable drives....

try this

Code: Select all

alias_disk = check_drivesize 'warning=used>90%' 'critical=used>95%' 'perf-config=*(unit:G)' "filter=type in ('fixed')" drive=all-drives show-all exclude=A: exclude=D:
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
nfbnbm
Posts: 3
Joined: Thu May 04, 2017 11:24 am

Re: check_drivesize not accepting warn and crit values

Post by nfbnbm »

scottwilkerson wrote:I was going off of your Github issue post where you had filter=removable=1

this means it will only show removable drives....

try this

Code: Select all

alias_disk = check_drivesize 'warning=used>90%' 'critical=used>95%' 'perf-config=*(unit:G)' "filter=type in ('fixed')" drive=all-drives show-all exclude=A: exclude=D:
That did the trick. Many thanks Scott.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: check_drivesize not accepting warn and crit values

Post by scottwilkerson »

nfbnbm wrote:
scottwilkerson wrote:I was going off of your Github issue post where you had filter=removable=1

this means it will only show removable drives....

try this

Code: Select all

alias_disk = check_drivesize 'warning=used>90%' 'critical=used>95%' 'perf-config=*(unit:G)' "filter=type in ('fixed')" drive=all-drives show-all exclude=A: exclude=D:
That did the trick. Many thanks Scott.
Great!

Glad it's working

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked