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