summaryrefslogtreecommitdiffstats
path: root/lib/utils_base.h
AgeCommit message (Collapse)AuthorFilesLines
2009-04-21Make C plugin output format configurableHolger Weiss1-0/+19
*** THIS COMMIT WILL BE MODIFIED IN THE FUTURE! *** The development guidelines¹ currently state that the plugin output should be in the format "SERVICE STATUS: Information text". However, when a plugin is called via Nagios in order to perform a service check, adding SERVICE and STATUS to the output is redundant. And when a plugin is called on the command line for testing, there is no use in printing out the SERVICE string, either. However, for debugging, it does make sense to print out the STATUS so that the user won't have to check and interpret the exit code manually. But it should suffice to print such debug output only when called with "--verbose", not in production. Space for plugin output is sometimes scarce, so that we should try to keep the output "short and to the point" (as the guide states) and not waste space with redundant information. Therefore, we decided² to make the ("normal" and "verbose") plugin output configurable at compile time. ¹ http://nagiosplug.sf.net/developer-guidelines.html ² http://thread.gmane.org/gmane.network.nagios.plugins.devel/5155
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