Add some opt-in docker checks
This commit is contained in:
parent
fb465a666e
commit
fe00d12377
@ -208,9 +208,6 @@
|
|||||||
command: check_by_ssh!/usr/local/bin/monitoring-scripts/check_systemd_unit cron.service
|
command: check_by_ssh!/usr/local/bin/monitoring-scripts/check_systemd_unit cron.service
|
||||||
- name: Unit dbus.service
|
- name: Unit dbus.service
|
||||||
command: check_by_ssh!/usr/local/bin/monitoring-scripts/check_systemd_unit dbus.service
|
command: check_by_ssh!/usr/local/bin/monitoring-scripts/check_systemd_unit dbus.service
|
||||||
- name: Unit docker.service
|
|
||||||
command: check_by_ssh!/usr/local/bin/monitoring-scripts/check_systemd_unit docker.service
|
|
||||||
hostgroup: "ansible,!tag-no-docker"
|
|
||||||
- name: Unit ssh.service
|
- name: Unit ssh.service
|
||||||
command: check_by_ssh!/usr/local/bin/monitoring-scripts/check_systemd_unit ssh.service
|
command: check_by_ssh!/usr/local/bin/monitoring-scripts/check_systemd_unit ssh.service
|
||||||
- name: Unit systemd-resolved.service
|
- name: Unit systemd-resolved.service
|
||||||
@ -218,6 +215,19 @@
|
|||||||
hostgroup: "ansible,!role-hypervisor"
|
hostgroup: "ansible,!role-hypervisor"
|
||||||
- name: Users
|
- name: Users
|
||||||
command: check_by_ssh!/usr/lib/nagios/plugins/check_users -w 3 -c 5
|
command: check_by_ssh!/usr/lib/nagios/plugins/check_users -w 3 -c 5
|
||||||
|
# Checks for Docker hosts
|
||||||
|
- name: Unit docker.service
|
||||||
|
command: check_by_ssh!/usr/local/bin/monitoring-scripts/check_systemd_unit docker.service
|
||||||
|
hostgroup: "ansible,!tag-no-docker"
|
||||||
|
- name: Docker Status
|
||||||
|
command: check_by_ssh!/usr/bin/sudo /usr/local/bin/monitoring-scripts/check_docker --no-ok --status running
|
||||||
|
hostgroup: tag-nagios-checkdocker
|
||||||
|
- name: Docker CPU Usage
|
||||||
|
command: check_by_ssh!/usr/bin/sudo /usr/local/bin/monitoring-scripts/check_docker --no-ok --cpu 85:90
|
||||||
|
hostgroup: tag-nagios-checkdocker
|
||||||
|
- name: Docker Memory Usage
|
||||||
|
command: check_by_ssh!/usr/bin/sudo /usr/local/bin/monitoring-scripts/check_docker --no-ok --memory 85:90:%
|
||||||
|
hostgroup: tag-nagios-checkdocker
|
||||||
# Privileged checks
|
# Privileged checks
|
||||||
# Required because check_disk may attempt to get the free space of
|
# Required because check_disk may attempt to get the free space of
|
||||||
# restricted mountpoints
|
# restricted mountpoints
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
line: "nagios-checker ALL = (root) NOPASSWD: {{ item }}"
|
line: "nagios-checker ALL = (root) NOPASSWD: {{ item }}"
|
||||||
with_items:
|
with_items:
|
||||||
- /usr/lib/nagios/plugins/check_disk
|
- /usr/lib/nagios/plugins/check_disk
|
||||||
|
- /usr/local/bin/monitoring-scripts/check_docker
|
||||||
- /usr/local/bin/monitoring-scripts/check_temp
|
- /usr/local/bin/monitoring-scripts/check_temp
|
||||||
tags: [ nagios, sudo ]
|
tags: [ nagios, sudo ]
|
||||||
- hosts: all
|
- hosts: all
|
||||||
|
Loading…
Reference in New Issue
Block a user