Re: FBR: Stop emailing puiterwijk for ticketkey and add nagios check

2018-10-20 Thread Kevin Fenzi
+1

kevin



signature.asc
Description: OpenPGP digital signature
___
infrastructure mailing list -- infrastructure@lists.fedoraproject.org
To unsubscribe send an email to infrastructure-le...@lists.fedoraproject.org
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@lists.fedoraproject.org


Re: FBR: Stop emailing puiterwijk for ticketkey and add nagios check

2018-10-20 Thread Peter Robinson
Seems fine +1


On Sat, Oct 20, 2018 at 2:39 PM Patrick マルタインアンドレアス Uiterwijk
 wrote:
>
> 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 
> Date:   Sat Oct 20 15:36:00 2018 +0200
>
> Enable nagios checks for ticketkey, and stop emailing puiterwijk
>
> Signed-off-by: Patrick Uiterwijk 
>
> 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" puiterw...@fedoraproject.org
> +/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 0..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_namelog01.phx2.fedoraproject.org
>service_description   Check Merged Log
> ___
> infrastructure mailing list -- infrastructure@lists.fedoraproject.org
> To unsubscribe send an email to infrastructure-le...@lists.fedoraproject.org
> 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@lists.fedoraproject.org
___
infrastructure mailing list -- infrastructure@lists.fedoraproject.org
To unsubscribe send an email to infrastructure-le...@lists.fedoraproject.org
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@lists.fedoraproject.org


FBR: Stop emailing puiterwijk for ticketkey and add nagios check

2018-10-20 Thread Patrick マルタインアンドレアス Uiterwijk
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 
Date:   Sat Oct 20 15:36:00 2018 +0200

Enable nagios checks for ticketkey, and stop emailing puiterwijk

Signed-off-by: Patrick Uiterwijk 

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" puiterw...@fedoraproject.org
+/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 0..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_namelog01.phx2.fedoraproject.org
   service_description   Check Merged Log
___
infrastructure mailing list -- infrastructure@lists.fedoraproject.org
To unsubscribe send an email to infrastructure-le...@lists.fedoraproject.org
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@lists.fedoraproject.org