Skip to content

Commit

Permalink
Merge pull request #66 from drn05r/main
Browse files Browse the repository at this point in the history
Adds conntrackd, keepalived and temperature checks
  • Loading branch information
drn05r authored Feb 25, 2024
2 parents c814c1f + b9fe2b6 commit c9f2420
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 1 deletion.
2 changes: 1 addition & 1 deletion roles/gw/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
template:
src: conntrackd.conf
dest: /etc/conntrackd/conntrackd.conf
mode: "600"
mode: "644"
notify:
- Restart conntrackd
- name: Deploy keepalived config
Expand Down
9 changes: 9 additions & 0 deletions roles/monitored/tasks/conntrackd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
- name: Add check_conntrackd sudo config
copy:
dest: /etc/sudoers.d/check_conntrackd
mode: 0644
content: |
User_Alias CHECK_CONNTRACKD=nagios
Defaults:CHECK_CONNTRACKD !requiretty
CHECK_CONNTRACKD ALL=(root) NOPASSWD: /usr/sbin/conntrackd -s
become: true
8 changes: 8 additions & 0 deletions roles/monitored/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,11 @@
import_tasks: raid.yml
tags: nrpe_raid
when: "'tags_raid' in group_names"
- name: Configure temperature checks
import_tasks: temperature.yml
tags: nrpe_temperature
when: "ansible_facts['virtualization_role'] in ('NA', 'host')" # physical machines
- name: Configure conntrackd checks
import_tasks: conntrackd.yml
tags: nrpe_conntrackd
when: "'device_roles_router' in group_names"
5 changes: 5 additions & 0 deletions roles/monitored/tasks/temperature.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- name: Install lm-sensors (for check_temp)
apt:
name: lm-sensors
state: present
become: true
9 changes: 9 additions & 0 deletions roles/monitored/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,14 @@ nrpe_checks:
check: "/usr/local/lib/nagios/plugins/check_systemd"
psu:
check: "/usr/local/lib/nagios/plugins/check_psu"
temp:
check: "/usr/local/lib/nagios/plugins/check_temp"
arguments: "-w 50 -c 60"
git:
check: "/usr/local/lib/nagios/plugins/check_git"
conntrackd:
check: "/usr/local/lib/nagios/plugins/check_conntrackd"
arguments: "70 95"
keepalived:
check: "/usr/lib/nagios/plugins/check_procs"
arguments: "-w 2:2 -c 1:2 -C keepalived"

0 comments on commit c9f2420

Please sign in to comment.