summaryrefslogtreecommitdiffstats
path: root/lib/utils_base.c
AgeCommit message (Collapse)AuthorFilesLines
2009-04-21Make C plugin output format configurableHolger Weiss1-0/+202
*** 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-07-29Don't use C++ style comments.Holger Weiss1-1/+1
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1768 f882894a-f735-0410-b71e-b25c423dba1c
2007-05-27added functions to utils_base:M. Sean Finney1-0/+15
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-01-27Change the variable names `true' and `false' (which are keywords in C99)Holger Weiss1-11/+11
to `yes' and `no'. Fixes compilation when using SGI's MIPSpro c99(1). git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1588 f882894a-f735-0410-b71e-b25c423dba1c
2006-10-18Cater for different errors when setting thresholdsTon Voon1-4/+8
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1496 f882894a-f735-0410-b71e-b25c423dba1c
2006-07-14Missing header filesTon Voon1-0/+1
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1454 f882894a-f735-0410-b71e-b25c423dba1c
2006-07-13Major fixes to check_disk. Now should return same data as dfTon Voon1-0/+225
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1452 f882894a-f735-0410-b71e-b25c423dba1c