customized ~check_sensors~ plugin (~abbey_pisensors~) in
=/usr/local/sbin/= on the Raspberry Pis.
-** Monitoring The Home Disk
+*** Monitoring The Home Disk
The abbey adds monitoring of the space remaining on the volume at
=/home/= on Core. (The small institute only monitors the space
tags: actualizer
#+END_SRC
-** Custom NAGIOS Monitor ~abbey_pisensors~
+*** Custom NAGIOS Monitor ~abbey_pisensors~
The ~check_sensors~ plugin is included in the package
~monitoring-plugins-basic~, but it does not report any readings. The
esac
#+END_SRC
-** Monitoring The Cloister
+*** Configure NAGIOS Monitoring of The Cloister
The abbey adds monitoring for more servers: Dantooine and Kessel.
They are ~abbey-cloister~ servers, so they are configured as small
institute ~campus~ servers, like Gate, with an NRPE (a NAGIOS Remote
Plugin Executor) server and an ~inst_sensors~ command.
-The configurations for the servers are very similar to Gate's, but are
-idiosyncratically in flux. For example Ord Mantell, the Raspberry Pi
-OS (ARM64) machine, uses the ~abbey_pisensors~ monitor.
+The configurations for these servers are very similar to Gate's, but
+are idiosyncratically in flux.
-*** Cloister Network Addresses
+**** Cloister Network Addresses
The IP addresses of all three hosts are nice to use in the NAGIOS
configuration (to avoid depending on name service) and so are
kessel_addr: 10.84.138.10
#+END_SRC
-*** Installing NAGIOS Configurations
+**** Install NAGIOS Configurations
The following task installs each host's NAGIOS configuration.
**** NAGIOS Monitoring of Dantooine
#+CAPTION: [[file:roles_t/abbey-core/templates/nagios-dantooine.cfg][=roles_t/abbey-core/templates/nagios-dantooine.cfg=]]
-#+BEGIN_SRC conf :tangle roles_t/abbey-core/templates/nagios-dantooine.cfg
+#+BEGIN_SRC conf :tangle roles_t/abbey-core/templates/nagios-dantooine.cfg :mkdirp yes
define host {
use linux-server
host_name dantooine
check_command check_nrpe!inst_root
}
+define service {
+ use generic-service
+ host_name dantooine
+ service_description DVR Recordings
+ check_command check_nrpe!abbey_dvr
+}
+
# define service {
# use generic-service
# host_name dantooine
}
#+END_SRC
-*** NAGIOS Monitoring of Kessel
+**** NAGIOS Monitoring of Kessel
#+CAPTION: [[file:roles_t/abbey-core/templates/nagios-kessel.cfg][=roles_t/abbey-core/templates/nagios-kessel.cfg=]]
#+BEGIN_SRC conf :tangle roles_t/abbey-core/templates/nagios-kessel.cfg
mode: u=rwx,g=rx,o=rx
when: ansible_architecture == 'aarch64'
-- name: Configure NAGIOS command.
+- name: Configure NAGIOS monitor abbey_pisensors.
become: yes
copy:
content: |
mode: u=rwx,g=rxs,o=
#+END_SRC
+** Install Custom NAGIOS Monitor ~abbey_dvr~
+
+DVR hosts install a custom NRPE plugin named ~abbey_dvr~ to monitor
+the storage available on =/DVR/=.
+
+#+CAPTION: [[file:roles_t/abbey-dvr/tasks/main.yml][=roles_t/abbey-dvr/tasks/main.yml=]]
+#+BEGIN_SRC conf :tangle roles_t/abbey-dvr/tasks/main.yml
+
+- name: Configure NAGIOS command abbey_dvr.
+ become: yes
+ vars:
+ lib: /usr/lib/nagios/plugins
+ copy:
+ content: |
+ command[abbey_dvr]={{ lib }}/check_disk -w 20% -c 10% -p /DVR
+ dest: /etc/nagios/nrpe.d/abbey.cfg
+ notify: Reload NRPE server.
+#+END_SRC
+
+#+CAPTION: [[file:roles_t/abbey-dvr/handlers/main.yml][=roles_t/abbey-dvr/handlers/main.yml=]]
+#+BEGIN_SRC conf :tangle roles_t/abbey-dvr/handlers/main.yml :mkdirp yes
+---
+- name: Reload NRPE server.
+ become: yes
+ systemd:
+ service: nagios-nrpe-server
+ state: reloaded
+ tags: actualizer
+#+END_SRC
+
** Configure IP Cameras
A new security camera is setup as described in [[*Cloistering][Cloistering]], after
+++ /dev/null
-define host {
- use linux-server
- host_name kamino
- address {{ kamino_addr }}
-}
-
-define service {
- use generic-service
- host_name kamino
- service_description Root Partition
- check_command check_nrpe!inst_root
-}
-
-define service {
- use generic-service
- host_name kamino
- service_description Current Load
- check_command check_nrpe!check_load
-}
-
-define service {
- use generic-service
- host_name kamino
- service_description Zombie Processes
- check_command check_nrpe!check_zombie_procs
-}
-
-# define service {
-# use generic-service
-# host_name kamino
-# service_description Total Processes
-# check_command check_nrpe!check_total_procs
-# }
-
-define service {
- use generic-service
- host_name kamino
- service_description Swap Usage
- check_command check_nrpe!inst_swap
-}
-
-define service {
- use generic-service
- host_name kamino
- service_description Temperature Sensors
- check_command check_nrpe!inst_sensors
-}