summaryrefslogtreecommitdiffstats
path: root/lib/utils_base.h
AgeCommit message (Collapse)AuthorFilesLines
2019-02-15check_by_ssh: fix child process leak on timeoutsSven Nierlein1-0/+5
When check_by_ssh runs into a timeout it simply exits keeping all child processes running. Simply adopting the kill loop from runcmd_timeout_alarm_handler() fixes this. Signed-off-by: Sven Nierlein <sven@nierlein.de>
2014-07-06check_icmp/check_dhcp: disable check, if we are rootJan Wagner1-3/+0
As it is possible to use capabilities(7) on linux or solaris privileges for example, it is not necessary in all cases to have those binaries making use of setuid.
2014-01-31Handle negative values properly with check_snmpStephane Lapie1-1/+1
check_snmp becomes capable of evaluating negative values properly, but it might be returning CRITICALs where it used to return OK and was ignored, if a negative value turns out to actually be a valid value. If negative values are valid, this can be worked around, by adding "~:" to the warning/critical threshold : 100 -> ~:100
2014-01-29Move negate' translate_state() to utils_base.h mp_translate_state()Thomas Guyot-Sionnest1-4/+9
Also use strcasecmp imported from gnulib for simplicity
2014-01-25Ignore MP_STATE_DIRECTORY in suid pluginsThomas Guyot-Sionnest1-0/+4
If a plugin still has suid privileges at the time np_enable_state() is called, the MP_STATE_DIRECTORY environment will be ignored. There is no need for a NEWS entry as no suid plugins use np_enable_state yet.
2014-01-21Capitalize "Monitoring Plugins"Holger Weiss1-1/+1
"Monitoring Plugins" is a name.
2014-01-19Project rename initial commit.Monitoring Plugins Development Team1-2/+2
This is an initial take at renaming the project to Monitoring Plugins. It's not expected to be fully complete, and it is expected to break things (The perl module for instance). More testing will be required before this goes mainline.
2010-06-23Added state retention APIs. Implemented for check_snmp with --rate option.Ton Voon1-0/+35
See http://nagiosplugin.org/c-api-private for more details on the API. Also updated check_snmp -l option to change the perfdata label.
2009-05-28check_snmp: Make use of standard threshold functionsThomas Guyot-Sionnest1-0/+3
This patch makes use of standard threshold functions. This allows using doubles as thresholds. Since SNMP supports only integers, double precision numbers are only printed when parsed from a STRING type. In addition, support for printing properly Timeticks type has been added, and the code has been thoroughly cleaned.
2009-01-26Make extract_value more generic:Thomas Guyot-Sionnest1-1/+7
Add a separator argument passed using defines.
2009-01-21Move check_ntp's extract_value to utils_base.c.Thomas Guyot-Sionnest1-0/+8
This function can also be used to parse performance data strings which could be useful in the future.
2007-05-27added functions to utils_base:M. Sean Finney1-0/+7
np_check_if_root() - returns nonzero if geteuid()==0 np_warn_if_not_root() - uses the above to print an informative warning added uses of these functions to check_dhcp and check_icmp. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1718 f882894a-f735-0410-b71e-b25c423dba1c
2007-04-20Declare print_thresholds().Holger Weiss1-0/+1
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1696 f882894a-f735-0410-b71e-b25c423dba1c
2006-10-18Cater for different errors when setting thresholdsTon Voon1-0/+4
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1496 f882894a-f735-0410-b71e-b25c423dba1c
2006-09-02- explicitly include utils_base.h from utils.hM. Sean Finney1-0/+4
- put utils.h inside of an #ifndef/#endif git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1474 f882894a-f735-0410-b71e-b25c423dba1c
2006-07-13Major fixes to check_disk. Now should return same data as dfTon Voon1-0/+37
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1452 f882894a-f735-0410-b71e-b25c423dba1c