-
-
Save froztbyte/84567bc895121152f16e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
checks: | |
https_alive: | |
command: curl -s -kLI https://localhost/ | |
interval: 30 | |
subscribers: [https] | |
handlers: [flapjack] | |
type: metric |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@monitor:/etc/sensu/conf.d# cat https.json | |
{'checks': {'https_alive': {'type': 'metric', 'interval': 30, 'command': 'curl -s -kLI https://localhost/', 'subscribers': ['https'], 'handlers': ['flapjack']}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include: | |
- sensu.server | |
{% set role = 'https' %} | |
{% set components = ["monitoring/files/maps/", role] %} | |
{% set ifilepath = components|join('') %} | |
{% import_yaml ifilepath as contents %} | |
{{ role }} sensu role subscriptions: | |
file.managed: | |
- name: /etc/sensu/conf.d/{{ role }}.json | |
- contents: {{ contents | json }} | |
- watch_in: | |
- service: sensu-server | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment