Skip to content

Commit

Permalink
Merge pull request #1217 from StackStorm/remove_sensu_rule_example
Browse files Browse the repository at this point in the history
Remove example sensu rule
  • Loading branch information
Kami committed Mar 4, 2015
2 parents a290a17 + 5f52070 commit af6a13a
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 33 deletions.
30 changes: 0 additions & 30 deletions contrib/examples/rules/sensu_action_runners_rule.json

This file was deleted.

39 changes: 36 additions & 3 deletions docs/source/resources/monitoring.rst
Expand Up @@ -13,17 +13,50 @@ Prerequisites

Instructions
^^^^^^^^^^^^

1. Install `StackStorm sensu integration pack <https://github.com/StackStorm/st2contrib/tree/master/packs/sensu>`_. If you have already installed all the packs, skip this step.

::

st2 run packs.install packs=sensu

2. A sample sensu rule is shown below.
Copy the sample rule to /opt/stackstorm/packs/sensu/rules/sensu_action_runners_rule.json.

.. literalinclude:: /../../contrib/examples/rules/sensu_action_runners_rule.json
:language: json
.. sourcecode:: json

{
"name": "sensu.action-runners-rule",
"description": "Sample rule that dogfoods st2.",

"trigger": {
"type": "sensu.event_handler",
"parameters": {
}
},

"criteria": {
"trigger.check.name": {
"pattern": "cron_check",
"type": "equals"
},
"trigger.check.output": {
"pattern": "CheckProcs CRITICAL*",
"type": "matchregex"
}
},

"action": {
"ref": "core.local",
"parameters": {
"cmd": "echo \"{{trigger}}\" >> /tmp/sensu.webhook-sample.out"
}
},

"enabled": true
}

Copy the content of the sample rule to
``/opt/stackstorm/packs/sensu/rules/sensu_action_runners_rule.json``.

3. Now create the rule.

Expand Down

0 comments on commit af6a13a

Please sign in to comment.