Notification warning/critical issue

(Andre) #1

Hi there,

I build a Service Template (SNMP) for the QNAP-NAS. It works fine to get the VolumeFreeSize of the QNAP:

qnapsnmp

Now I want that I get a warning when the Volume is less than 1.5 TB and critical less than 1 TB.

How can I do that? The custom properties snmp_warn and snmp_crit reach only when the value is higher, I need the opposite.

/André

(Aflatto) #2

Have you looked at the “negate” plugin ?
/usr/lib64/nagios/plugins/negate -h
negate v2.2.1.git (nagios-plugins 2.2.1)
Copyright © 2002-2014 Nagios Plugin Development Team
devel@nagios-plugins.org

Negates the status of a plugin (returns OK for CRITICAL and vice-versa).
Additional switches can be used to control which state becomes what.

So you can set the thresholds for the high and negate the outcome to get warning on the lower result.

1 Like
(Andre) #3

Good morninig,

that is exactly what I need :slight_smile: thank you so much :slight_smile: