Skip to content

Instantly share code, notes, and snippets.

@MartinDatadog
Created April 16, 2015 00:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MartinDatadog/f72343f0e4d636c56398 to your computer and use it in GitHub Desktop.
Save MartinDatadog/f72343f0e4d636c56398 to your computer and use it in GitHub Desktop.
def service_check(self, check_name, status, tags=None, timestamp=None,
hostname=None, check_run_id=None, message=None):
"""
Save a service check.
:param check_name: string, name of the service check
:param status: int, describing the status.
0 for success, 1 for warning, 2 for failure
:param tags: (optional) list of strings, a list of tags for this run
:param timestamp: (optional) float, unix timestamp for when the run occurred
:param hostname: (optional) str, host that generated the service
check. Defaults to the host_name of the agent
:param check_run_id: (optional) int, id used for logging and tracing
purposes. Don't need to be unique. If not
specified, one will be generated.
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment