WebHook in Alert and Automations Policy #2113
Replies: 3 comments 1 reply
-
if it works on one it should work on the other :/ check your error logs |
Beta Was this translation helpful? Give feedback.
-
Thank you for your answer. It works now. I only entered the error threshold in the check. I left the Warning Threshold empty. Now the messages arrive at Signl4. But unfortunately no values of the check are passed to me. I have looked up check.name check.status etc. in models.py. |
Beta Was this translation helpful? Give feedback.
-
I found it, at least for the name of the check. alert.assigned_check.readable_desc |
Beta Was this translation helpful? Give feedback.
-
Hey, I have a problem with the automation and the alerts.
What have I done?
First of all, I set up a WebHook for Signl4 under Settings->Global Settings->WEB HOOKS
I set up a WebHook for Signl4.
https://connect.signl4.com/webhook/mysecret
I created the following request body:
{
“Title": ‘Check failed on {{ agent.hostname }}’,
“Message“: ‘The check ’{{ check.name }}‘ has failed on agent ’{{ agent.hostname }}‘ in site ’{{ agent.client_name }}'.”,
“X-S4-SourceSystem": ‘Tactical RMM’,
“X-S4-Location": ‘{{ agent.location }}’,
“CheckDetails": {
“Name": ‘{{ check.name }}’,
“Status": ‘{{ check.status }}’,
“LastRun": ‘{{ check.last_run }}’,
“Output": ”{{ check.output }}”
},
“AgentDetails": {
“Hostname": ‘{{ agent.hostname }}’,
“site": “{{ agent.site }}”,
“Client": ‘{{ agent.client_name }}’,
“OS": ‘{{ agent.operating_system }}’,
“IPAddress": ”{{ agent.ip_address }}”
}
}
The WebHook also works when I test it.
Then I have under Setting->Alerts Manager
I set up an alert.
I have assigned a name under General Settings.
I set the switch to Enabled.
I left Email From address empty.
I have not added any email and SMS recipients.
In Alert Actions I have set Alert Failure Settings,
I activated the Send a Web Hook checkbox and selected my previously created WebHook.
I did the same for Alert Resolved Settings (the same WebHook for testing)
For Run actions only on, I activated all checkboxes. Agents=on Check=on and Tasks=on
I have not set this in the Agent Overdude Settings.
In the Check Settings I have set the Alert Failure Settings to
Text and Dashboard.
I have left Only email on alert severity empty
Only text an alert severity I have selected informational, warning and error.
For Alert Resolved Settings I have only activated Text.
I have not set this in the Agent Overdude Settings.
In the Check Settings I have set the Alert Failure Settings to
Text and Dashboard.
I have left Only email on alert severity empty
Only text an alert severity I have selected informational, warning and error.
For Alert Resolved Settings I have only activated Text.
I have not set up Automated Task Settings.
Then I created a new policy in the Automation Manager.
In the policy a check that checks drive C:.
I added the alert template to the policy.
I added the automation policy to my agent (my PC).
Now I play a bit with the values of the check to trigger it.
I receive the messages on Telegram. But nothing arrives on Signl4.
For me it looks as if the
Unfortunately, I have no idea what the problem could be.
Could someone help me to solve the problem?
Thank you and best regards
Beta Was this translation helpful? Give feedback.
All reactions