Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed formatting of example custom action script (3.21) #3260

Merged
merged 2 commits into from
Apr 11, 2024
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
2 changes: 2 additions & 0 deletions web-ui/custom-actions-for-alerts.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ When you get this to work as expected on the commmand line, you are ready to upl
## Example script: logging policy alert to syslog ##

The following Custom action script will log the status and definition of a policy alert to syslog.

```bash
[file=cfengine_custom_notification_policy_syslog.sh]
#!/bin/bash
Expand All @@ -119,6 +120,7 @@ logger -i "Policy alert '$ALERT_NAME' $ALERT_STATUS. Now triggered on $ALERT_FAI

exit $?
```

What gets logged to syslog depends on which alert is associated with the script, but an example log-line is as follows:

Sep 26 02:00:53 localhost user[18823]: Policy alert 'Web service' fail. Now triggered on 11 hosts. Defined with bundlename='web_service', promise handle '' and outcome NOTKEPT
Expand Down
Loading