response - Response Class¶
Contains the class which represents a response for Icinga. This encapsulates the response format that Icinga expects.
-
class
pycinga.response.Response([status=None[, message=None]])[source]¶ Icinga responses are expected to be in a very specific format, and this class allows these responses to easily be built up and extracted in the proper format.
This class makes it easy to set the status, message, and performance data for a response.
Parameters: - status (optional): A
Statusobject representing the status of the response. - message (optional): An information message to include with the output.
-
set_perf_data(label, value, uom=None, warn=None, crit=None, minval=None, maxval=None)[source]¶ Adds performance data to the response. Performance data is shown in the Icinga GUI and can be used by 3rd party programs to build graphs or other informational output. There are many options to this method. They are the same as the initialization parameters for a
PerfDataobject.See also
- status (optional): A