Skip to content

Instantly share code, notes, and snippets.

---
name: conditional_action
pack: test
description: "Executes the action based on run_action parameter."
runner_type: orquesta
entry_point: workflow/conditional_action.yaml
enabled: True
parameters:
run_action:
required: true
Case 1: Identify hosts with faults detected by Shinken monitoring. Request made via LiveStatus.
DATA
"result": {
"result": [
[
"bench-05.example.com",
0
],
[
"bench-03.example.com",
@nzlosh
nzlosh / gist:139e4705b098c33ff61b0db6c774dc6c
Created March 24, 2018 08:57
unattended debian package upgrade
DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confold" --force-yes -fuy dist-upgrade
apt-get --purge -y autoremove
@nzlosh
nzlosh / notification_action-chain
Created December 1, 2017 14:16
Logging action results to syslog
---
chain:
-
name: say_it
ref: core.local
parameters:
cmd: 'echo "{{ cmd }}"'
on-success: run_it
-
name: run_it
@nzlosh
nzlosh / nagios.xml
Created November 10, 2017 11:08
patterndb to extract key/value pairs using syslog-ng
<?xml version='1.0' encoding='UTF-8'?>
<patterndb version='5' pub_date='2017-06-15'>
<ruleset id='a0dab742fc66ad5cdf41bfd0c105f3df' name='nagios'>
<patterns>
<pattern>nagios</pattern>
<pattern>shinken</pattern>
</patterns>
<rules>
<rule provider='github.com/nzlosh' id='nagios-1' class='monitoring'>
<patterns>
@nzlosh
nzlosh / test_slack_attachment.plug
Created October 30, 2017 07:42
Plugin to test send card in multipart of slack backend.
[Core]
name = Test Slack Attachment
module = .
[Documentation]
description = Test slack attachments message split.
[Python]
version = 3
@nzlosh
nzlosh / gist:c6d357f7891ee4080977536071dda296
Created September 29, 2017 22:27
ActionAlias Matching
ActionChain
-----------
---
chain:
-
name: hello_world
ref: core.local
parameters:
cmd: |