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:
messagestr

status message for Nagios

codeint

exit code for process

timeoutint, optional

timeout length, in seconds

tmessagestr, optional

timeout message

nagiosfilestr, 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.