Every check writes one or more lines to stdout in the format
SEVERITY:CHECK:INFORMATION
where
SEVERITYis one ofC(critical),W(warning) orI(informational - quite verbose, also used for debugging)CHECKis the name of the check that wrote the lineINFORMATIONis freetext information about the details of the check
All checks should provide sensible default values for their parameters so it is possible to call them without any parameters.
Notifications are called with these environment variables set:
NOMD_CHECK_RESULTSis pointing to a file with the complete results of the preceding checksNOMD_CRIT_COUNTholds the number of critical check resultsNOMD_WARN_COUNTholds the number of warning check resultsNOMD_INFO_COUNTholds the number of informational check resultsNOMD_HIGHEST_SEVERITYis eitherC,WorIdepending on the worst check result
All notifications should provide sensible default values for their parameters so it is possible to call them without any parameters.
nomdep parses both Perl and shell scripts:
- Perl
uselines are picked up automatically - shell scripts (checks and notifications) must explicitely
declare their dependencies by adding one
##SHELLDEPcomment line per dependency:##SHELLDEP xyzdepends on binaryxyz##SHELLDEP x y zdepends on any one ofx,yorz(seehttp.check, which can use eitherwget,curlorGET/HEADto do HTTP requests)
nomdoc parses both Perl and shell scripts:
- functions in shell scripts not beginning with an underscore are treated as commands
- commands must be followed by one or more comment lines to be recognized
##CHECKDSClines describe check commands##NOTYDESClines describe notification commands
- both command types describe their parameters by the following
comment types as needed
##PARMNAMEdefines a new parameter and binds the following two comment types to this parameter##PARMDESCdescribes the parameter##PARMDFLTcontains the parameter default