From 84e0086aca342da961178d4ce2d3c650f2824779 Mon Sep 17 00:00:00 2001 From: Seth Vidal Date: Mon, 10 Jun 2013 18:37:08 +0000 Subject: [PATCH] add apache_status for collectd to apache add appserver header to all apache instances - just b/c --- files/httpd/apachestatus.conf | 5 +++++ files/httpd/headers.conf.j2 | 5 +++++ tasks/apache.yml | 14 ++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 files/httpd/apachestatus.conf create mode 100644 files/httpd/headers.conf.j2 diff --git a/files/httpd/apachestatus.conf b/files/httpd/apachestatus.conf new file mode 100644 index 0000000000..747fb1a32e --- /dev/null +++ b/files/httpd/apachestatus.conf @@ -0,0 +1,5 @@ +ExtendedStatus on + + + SetHandler server-status + diff --git a/files/httpd/headers.conf.j2 b/files/httpd/headers.conf.j2 new file mode 100644 index 0000000000..a1525c20c4 --- /dev/null +++ b/files/httpd/headers.conf.j2 @@ -0,0 +1,5 @@ +Header set AppTime "%D" +PassEnv HOSTNAME +Header set AppServer "{{ inventory_hostname }}" + + diff --git a/tasks/apache.yml b/tasks/apache.yml index 6857406918..780211629e 100644 --- a/tasks/apache.yml +++ b/tasks/apache.yml @@ -32,3 +32,17 @@ - config - hotfix +- name: add appserver headers.conf + template: src=$files/httpd/headers.conf.j2 dest=/etc/httpd/conf.d/headers.conf + notify: + - restart apache + tags: + - config + +- name: add apache_status location for collectd + template: src=$files/httpd/apachestatus.conf dest=/etc/httpd/conf.d/apachestatus.conf + notify: + - restart apache + tags: + - config + \ No newline at end of file