Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion icinga2api/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ def process_check_result(self,
plugin_output,
performance_data=None,
check_command=None,
check_source=None):
check_source=None,
ttl=None):
'''
Process a check result for a host or a service.

Expand Down Expand Up @@ -95,12 +96,15 @@ def process_check_result(self,
'exit_status': exit_status,
'plugin_output': plugin_output,
}

if performance_data:
payload['performance_data'] = performance_data
if check_command:
payload['check_command'] = check_command
if check_source:
payload['check_source'] = check_source
if ttl:
payload['ttl'] = ttl

return self._request('POST', url, payload)

Expand Down