From 4522546edd1170ad959eae73cbd14a1e6a41f39a Mon Sep 17 00:00:00 2001 From: Jeremy Dubois Date: Wed, 15 Dec 2021 16:29:48 +0100 Subject: [PATCH] Add NRPE check bioctl for RAID devices and fix CHANGELOG and README syntax --- CHANGELOG | 8 +++++--- README.md | 2 +- roles/nagios-nrpe/tasks/main.yml | 3 ++- roles/nagios-nrpe/templates/evolix_bsd.cfg.j2 | 1 + roles/post-install/files/ldap.sh | 12 ++++++++++++ 5 files changed, 21 insertions(+), 5 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 5c748ce..2a0a7c3 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,15 +5,17 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] - -## [7.0.0] - 2021-12-09 +## [Unreleased - 7.0.0] ### Changed - Configure locale to en_US.UTF-8 in .profile file so that "git log" displays the accents correctly - Use vim as default git editor +### Added + +- Add a bioctl NRPE check for RAID devices + ## [6.9.2] - 2021-10-15 ### Added diff --git a/README.md b/README.md index ef12f7c..583c151 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# EvoBSD 7.0.0 +# EvoBSD EvoBSD is an ansible project used for customising OpenBSD hosts used by Evolix. diff --git a/roles/nagios-nrpe/tasks/main.yml b/roles/nagios-nrpe/tasks/main.yml index e82a151..3a9cf70 100644 --- a/roles/nagios-nrpe/tasks/main.yml +++ b/roles/nagios-nrpe/tasks/main.yml @@ -5,10 +5,11 @@ - nrpe-- state: present -- name: Install monitoring-plugins +- name: Install monitoring packages openbsd_pkg: name: - monitoring-plugins + - check_bioctl state: present - name: Create nrpe.d dir diff --git a/roles/nagios-nrpe/templates/evolix_bsd.cfg.j2 b/roles/nagios-nrpe/templates/evolix_bsd.cfg.j2 index 8a821b1..4e96b7a 100644 --- a/roles/nagios-nrpe/templates/evolix_bsd.cfg.j2 +++ b/roles/nagios-nrpe/templates/evolix_bsd.cfg.j2 @@ -33,6 +33,7 @@ command[check_unbound]=/usr/local/libexec/nagios/check_dig -l evolix.net -H loca command[check_mysql]=/usr/local/libexec/nagios/check_mysql -H 127.0.0.1 -f /etc/nrpe.d/.my.cnf #command[check_vpn]=/usr/local/libexec/nagios/check_ping -H IPDISTANTE -p 1 -w 5000,100% -c 5000,100% command[check_dhcpd]=/usr/local/libexec/nagios/check_procs -c1:1 -C dhcpd +command[check_bioctl]=/usr/local/libexec/nagios/check_bioctl -d sd2 # Local checks (not packaged) #command[check_openvpn]=/usr/local/libexec/nagios/plugins/check_openvpn.pl -H 127.0.0.1 -p 1195 -P PASSWORD diff --git a/roles/post-install/files/ldap.sh b/roles/post-install/files/ldap.sh index 0fa304d..4e7ebea 100755 --- a/roles/post-install/files/ldap.sh +++ b/roles/post-install/files/ldap.sh @@ -146,3 +146,15 @@ ServiceType: firewall ServiceVersion: packetfilter EOT + +if egrep -q 'sd.*RAID' /var/run/dmesg.boot; then +cat<>/root/${EvoComputerName}.ldif +dn: ServiceName=bioctl,EvoComputerName=${EvoComputerName},ou=computer,dc=evolix,dc=net +objectClass: EvoService +NagiosEnabled: TRUE +ServiceName: bioctl +ServiceType: RAID +ServiceVersion: RAID + +EOT +fi