gwdetchar.nagios.core module
Utilities for providing status updates to Nagios
-
gwdetchar.nagios.core.write_status(message, code, timeout=0, tmessage=None, nagiosfile=None)[source]
Write a Nagios status file in JSON format
- Parameters:
- message
str
status message for Nagios
- code
int
exit code for process
- timeout
int
, optional timeout length, in seconds
- tmessage
str
, optional timeout message
- nagiosfile
str
, optional full path to a JSON status file, defaults to nagios.json
Notes
This function will write an output to the requested location, then exit
without returning.