Skip to main content

Hello,

I have a question about the thresholds, centreon-plugins use many syntax of value about that.

A value with pourcentage symbol, a simple value, and also a value with colon after or before “100:”,  “:100” or “100::100 

Could you explain me the usage of the last syntax ?

With examples on this page :

PostgreSQL DB | Centreon Documentation

Or directly with command examples :

/usr/lib/centreon/plugins//centreon_linux_snmp.pl --plugin=os::linux::snmp::plugin --mode=cpu-detailed --hostname=svlinuxpar.centreon.training --snmp-version='2c' --snmp-community='os_linux'  --warning-idle='20:'  --critical-idle='10:' --verbose

 

/usr/lib64/nagios/plugins/check_icmp -H 13.49.59.207 -n 5 -w 200,20% -c 400,50%

 

/usr/lib/centreon/plugins//centreon_linux_snmp.pl --plugin=os::linux::snmp::plugin --mode=processcount --hostname=172.0.0.1 --snmp-version='2c' --snmp-community='public'  --process-name='^java$' --process-path='' --process-args='' --regexp-name --regexp-path --regexp-args --warning='' --critical='1:1' --memory

 

/usr/lib/centreon/plugins//centreon_linux_snmp.pl --plugin=os::linux::snmp::plugin --mode=processcount --hostname=127.0.0.1 --snmp-version='2c' --snmp-community='public'  --process-name='^snmpd$' --process-path='^/usr/sbin/snmpd$' --process-args='' --regexp-name --regexp-path --regexp-args --warning='' --critical='1:' --cpu --memory

 

/usr/lib/centreon/plugins//centreon_kaspersky_snmp.pl --plugin=apps::antivirus::kaspersky::snmp::plugin --mode=deployment --hostname=svkaspepar.centreon.training --snmp-version='2c' --snmp-community='kaspersky_av'  --warning-status='%{status} =~ /Warning/i' --critical-status='%{status} =~ /Critical/i' --warning-progress='100:' --critical-progress='95:' --warning-failed='0' --critical-failed='' --warning-expiring='0' --critical-expiring='' --warning-expired='0' --critical-expired='' 

Regards,

Hello @gespada,

  • for “string” tresholds like a status check (i.e compare a litteral output to a custom string), we use regex syntax against the counter name (most of the time ‘%{status}’ or ‘%{state}’), in this case this is described in the --help of the mode.

check_icmp though is a very specific case as it is not a Centreon-designed Plugin but a generic one, this is why you can have two values for the same threshold (example: “-w rta,%pl”)

 

Hope it helps,

cheers


Hi @Thibault,

Thank you so much, i forgot it was a Nagios syntax !

It could be great to add this hyperlink at the centreon documentation just for the forgetful like me 😃

Regards,


Reply