FBR: Stop emailing puiterwijk for ticketkey and add nagios check

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

 



Hi all,

Can I get +1s to make Nagios check the ticketkey age and to make it stop email me hourly?

Thanks,
Patrick


commit 3fc57e699b9c524d5683fcc39231f7b1f425bbb9 (HEAD -> master)
Author: Patrick Uiterwijk <patrick@xxxxxxxxxxxxxx>
Date:   Sat Oct 20 15:36:00 2018 +0200

    Enable nagios checks for ticketkey, and stop emailing puiterwijk
    
    Signed-off-by: Patrick Uiterwijk <patrick@xxxxxxxxxxxxxx>

diff --git a/roles/batcave/files/ticketkey.cron b/roles/batcave/files/ticketkey.cron
index 9041e2410..d8ce11acc 100755
--- a/roles/batcave/files/ticketkey.cron
+++ b/roles/batcave/files/ticketkey.cron
@@ -4,4 +4,4 @@ source /root/sshagent >>/dev/null
 export ANSIBLE_HOST_KEY_CHECKING=False
 export HOME=/root/
 #export ANSIBLE_SSH_PIPELINING=False
-/usr/bin/ansible-playbook /srv/web/infra/ansible/playbooks/update_ticketkey.yml | mailx -s "TickeyKey rollover" puiterwijk@xxxxxxxxxxxxxxxxx
+/usr/bin/ansible-playbook /srv/web/infra/ansible/playbooks/update_ticketkey.yml >/dev/null 2>&1
diff --git a/roles/nagios_client/templates/check_proxies.cfg.j2 b/roles/nagios_client/templates/check_proxies.cfg.j2
new file mode 100644
index 000000000..055f4d0ca
--- /dev/null
+++ b/roles/nagios_client/templates/check_proxies.cfg.j2
@@ -0,0 +1 @@
+command[check_ticketkey_age]={{ libdir }}/nagios/plugins/check_file_age -w 3600 -c 7200 -f /etc/httpd/ticketkey_{{env}}.tkey
diff --git a/roles/nagios_server/files/nagios/services/file_age.cfg b/roles/nagios_server/files/nagios/services/file_age.cfg
index c04ffa69f..3a1a9fc2a 100644
--- a/roles/nagios_server/files/nagios/services/file_age.cfg
+++ b/roles/nagios_server/files/nagios/services/file_age.cfg
@@ -16,6 +16,15 @@ define service {
   notification_interval 130
 }
 
+define service {
+  hostgroup_name       proxies
+  service_description   Check TicketKey age
+  check_command         check_by_nrpe!check_ticketkey_age
+  use                   defaulttemplate
+  check_interval 120
+  notification_interval 130
+}
+
 define service {
   host_name            log01.phx2.fedoraproject.org
   service_description   Check Merged Log
_______________________________________________
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




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

  Powered by Linux