patch review: storage check for retrace.f.o

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I want to set up monitoring of free space on /srv of retrace.fedoraproject.org. It is huge volume therefore normal
check_disk_/srv does not have sense. I created new check, but it is my first time working with nrpe. I would welcome if
someone can review it, before I push it.
Patch is in the attachment.

Miroslav
>From f3181a95857e65ddd40f966938bae0dd0d32d02f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miroslav=20Such=C3=BD?= <msuchy@xxxxxxxxxx>
Date: Fri, 15 Jun 2018 14:45:56 +0200
Subject: [PATCH] check free space on retrace

retrace\'s /srv volume is 9.6TB big. So 5% (warning) is 480GB and 1% (critical) is 96GB
---
 roles/nagios_client/templates/check_disk.cfg.j2    | 1 +
 roles/nagios_server/files/nagios/services/disk.cfg | 7 +++++++
 roles/nagios_server/files/nrpe/nrpe.cfg            | 1 +
 3 files changed, 9 insertions(+)

diff --git a/roles/nagios_client/templates/check_disk.cfg.j2 b/roles/nagios_client/templates/check_disk.cfg.j2
index 79f7c8906..cc8e8b7a1 100644
--- a/roles/nagios_client/templates/check_disk.cfg.j2
+++ b/roles/nagios_client/templates/check_disk.cfg.j2
@@ -13,6 +13,7 @@ command[check_disk_/srv/cache/lookaside]=/usr/lib64/nagios/plugins/check_disk -w
 command[check_disk_/srv/diskimages]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /srv/diskimages
 command[check_disk_/srv/taskotron]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /srv/taskotron
 command[check_disk_/srv]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /srv
+command[check_disk_huge_/srv]=/usr/lib64/nagios/plugins/check_disk -w 5% -c 1% -p /srv
 command[check_disk_/u01]=/usr/lib64/nagios/plugins/check_disk -w 15% -c 10% -p /u01
 command[check_disk_/var/lib/registry]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /var/lib/registry
 command[check_disk_/var/lib64/mock]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /var/lib/mock
diff --git a/roles/nagios_server/files/nagios/services/disk.cfg b/roles/nagios_server/files/nagios/services/disk.cfg
index ad8228db4..4e9b45cff 100644
--- a/roles/nagios_server/files/nagios/services/disk.cfg
+++ b/roles/nagios_server/files/nagios/services/disk.cfg
@@ -68,6 +68,13 @@ define service {
   use                   retracetemplate
 }
 
+define service {
+  hostgroup_name        retrace
+  service_description   Disk Space for huge /srv
+  check_command         check_by_nrpe!check_disk_huge_/srv
+  use                   disktemplate
+}
+
 define service {
   hostgroup_name        people
   service_description   Disk space /project
diff --git a/roles/nagios_server/files/nrpe/nrpe.cfg b/roles/nagios_server/files/nrpe/nrpe.cfg
index 061feecfd..b650b86b1 100644
--- a/roles/nagios_server/files/nrpe/nrpe.cfg
+++ b/roles/nagios_server/files/nrpe/nrpe.cfg
@@ -295,6 +295,7 @@ command[check_disk_/boot]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p
 command[check_disk_/git]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /git
 command[check_disk_/postgreslogs]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /postgreslogs
 command[check_disk_/srv]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /srv
+command[check_disk_huge_/srv]=/usr/lib64/nagios/plugins/check_disk -w 5% -c 1% -p /srv
 command[check_disk_/srv/diskimages]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /srv/diskimages
 command[check_disk_/srv/buildmaster]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /srv/buildmaster
 command[check_disk_/srv/taskotron]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /srv/taskotron
-- 
2.17.1

_______________________________________________
infrastructure mailing list -- infrastructure@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to infrastructure-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/infrastructure@xxxxxxxxxxxxxxxxxxxxxxx/message/H6OW3TNYOKZIMBSUAC376CVIIBNANPGW/

[Index of Archives]     [Fedora Development]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux