Skip to content
Snippets Groups Projects
Commit 3e2aefd6 authored by jurgenhaas's avatar jurgenhaas
Browse files

ansible-roles/netdata#8 Configure weblog monitoring

parent 7158a386
No related branches found
No related tags found
No related merge requests found
......@@ -19,3 +19,11 @@
- name: "Enable Apache Status Site"
command: a2ensite status creates=/etc/apache2/sites-enabled/status{{ apache_conf_ext|default('.conf') }}
notify: "Restart Apache"
- name: "Weblog Module Configuration"
template:
src: 'web_log.conf'
dest: '/etc/netdata/python.d/web_log.conf'
owner: 'netdata'
group: 'netdata'
mode: '660'
......@@ -32,6 +32,7 @@
backup: yes
with_items:
- 'health_alarm_notify.conf'
- 'python.d.conf'
notify:
- "Restart NetData"
......
......@@ -23,20 +23,36 @@ log_interval: 3600
# Setting any of these to no will disable it.
apache: {{ (groups['webserver'] is defined and inventory_hostname in groups['webserver'])|ternary("yes", "no") }}
apache_cache: {{ (groups['webserver'] is defined and inventory_hostname in groups['webserver'])|ternary("yes", "no") }}
apache_cache: no
bind_rndc: yes
cpufreq: yes
cpuidle: yes
dovecot: no
elasticsearch: {{ (groups['logserver'] is defined and inventory_hostname in groups['logserver'])|ternary("yes", "no") }}
example: no
exim: no
fail2ban: yes
freeradius: yes
gunicorn_log: no
haproxy: {{ (groups['proxyserver'] is defined and inventory_hostname in groups['proxyserver'])|ternary("yes", "no") }}
hddtemp: yes
ipfs: no
isc_dhcpd: yes
mdstat: yes
memcached: {{ (groups['webserver'] is defined and inventory_hostname in groups['webserver'])|ternary("yes", "no") }}
mysql: {{ (groups['dbserver-mysql'] is defined and inventory_hostname in groups['dbserver-mysql'])|ternary("yes", "no") }}
nginx: no
nginx_log: no
nginx_log: no
ovpn_status_log: yes
phpfpm: {{ (groups['webserver'] is defined and inventory_hostname in groups['webserver'])|ternary("yes", "no") }}
postfix: yes
postgres: yes
redis: {{ (groups['webserver'] is defined and inventory_hostname in groups['webserver'])|ternary("yes", "no") }}
retroshare: yes
sensors: yes
smartd_log: yes
squid: no
tomcat: no
varnish: {{ (groups['varnishserver'] is defined and inventory_hostname in groups['varnishserver'])|ternary("yes", "no") }}
web_log: {{ (groups['webserver'] is defined and inventory_hostname in groups['webserver'])|ternary("yes", "no") }}
apache_log:
name: 'apache'
path: '/var/log/apache2/access.log'
apache_ssl_log:
name: 'apache_ssl'
path: '/var/log/apache2/ssl_access.log'
apache_vhosts_log:
name: 'apache_vhosts'
path: '/var/log/apache2/other_vhosts_access.log'
{% for drupal in drupal_settings|default([]) %}
{% for drupal_domain in drupal.domains|default([]) %}
apache_log_{{ drupal_domain.domain|regex_replace('[\.\-]', '_') }}:
name: 'apache_{{ drupal_domain.domain|regex_replace('[\.\-]', '_') }}'
path: '{% if drupal.jail is defined %}{{ jailroot|default('/jails') }}/{{ drupal.jail.name }}{% endif %}/var/log/apache2/{{ drupal_domain.domain }}-access.log'
{% endfor %}
{% endfor %}
{% for nextcloud in nextcloud_settings|default([]) %}
apache_log_{{ nextcloud.domain|regex_replace('[\.\-]', '_') }}:
name: 'apache_{{ nextcloud.domain|regex_replace('[\.\-]', '_') }}'
path: '{% if nextcloud.jail is defined %}{{ jailroot|default('/jails') }}/{{ nextcloud.jail.name }}{% endif %}/var/log/apache2/{{ nextcloud.domain }}-access.log'
{% endfor %}
{% for piwik in piwik_settings|default([]) %}
apache_log_{{ piwik.domain|regex_replace('[\.\-]', '_') }}:
name: 'apache_{{ piwik.domain|regex_replace('[\.\-]', '_') }}'
path: '{% if piwik.jail is defined %}{{ jailroot|default('/jails') }}/{{ piwik.jail.name }}{% endif %}/var/log/apache2/{{ piwik.domain }}-access.log'
{% endfor %}
{% for youtrack in youtrack_settings|default([]) %}
apache_log_{{ youtrack.domain|regex_replace('[\.\-]', '_') }}:
name: 'apache_{{ youtrack.domain|regex_replace('[\.\-]', '_') }}'
path: '{% if youtrack.jail is defined %}{{ jailroot|default('/jails') }}/{{ youtrack.jail.name }}{% endif %}/var/log/apache2/{{ youtrack.domain }}-access.log'
{% endfor %}
{% for log in apache_logs|default([]) %}
apache_log_{{ log.name }}:
name: 'apache_{{ log.name }}'
path: '{{ log.file }}'
{% endfor %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment