Created
June 19, 2020 19:52
-
-
Save ripienaar/d0bb66fa1af5558b19fcaec9ed8d8308 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
name: check_httpd | |
version: 1.0.0 | |
initial_state: unknown | |
watchers: | |
# check httpd every minute | |
- name: check | |
type: nagios | |
interval: 1m | |
properties: | |
plugin: /usr/lib64/nagios/plugins/check_procs | |
args: | |
- "-C" | |
- "httpd" | |
- "-c" | |
- "1:25" | |
# if its critical we remediate using a restart | |
# if it stays critical for 10 minutes we will try | |
# again to remediate etc | |
- name: remediate | |
type: exec | |
state_match: [critical] | |
interval: 10m | |
properties: | |
command: /sbin/service httpd restart | |
# boilerplate all the nagios ones will look like this | |
# however one can add things like a maintenance mode that | |
# disables checks etc | |
transitions: | |
- name: UNKNOWN | |
from: [unknown, ok, warning, critical] | |
destination: unknown | |
- name: OK | |
from: [unknown, ok, warning, critical] | |
destination: ok | |
- name: WARNING | |
from: [unknown, ok, warning, critical] | |
destination: warning | |
- name: CRITICAL | |
from: [unknown, ok, warning, critical] | |
destination: critical |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment