Commit 087aa06c by Joe Blaylock

Stanford datadog log watcher fixups

parent a90dd101
...@@ -76,7 +76,7 @@ def event_example(logger, line): ...@@ -76,7 +76,7 @@ def event_example(logger, line):
'timestamp': 1384313730} 'timestamp': 1384313730}
""" """
raise Exception, "Do not use this method." raise Exception, "Do not use this method. It murders their servers."
import time import time
from datetime import datetime from datetime import datetime
e = None e = None
......
...@@ -80,7 +80,6 @@ ...@@ -80,7 +80,6 @@
template: dest=/etc/dd-agent/conf.d/nginx.yaml src=nginx.yaml.j2 owner=root group=root mode=0644 template: dest=/etc/dd-agent/conf.d/nginx.yaml src=nginx.yaml.j2 owner=root group=root mode=0644
notify: notify:
- datadog | restart the datadog service - datadog | restart the datadog service
when: nginx_sites is defined
tags: tags:
- datadog - datadog
...@@ -99,7 +98,7 @@ ...@@ -99,7 +98,7 @@
dest="/etc/dd-agent/datadog.conf" dest="/etc/dd-agent/datadog.conf"
"line=hostname:{{ansible_hostname}}.{{environment_tag}}" "line=hostname:{{ansible_hostname}}.{{environment_tag}}"
state=present state=present
"regexp=^\#?\s*hostname:.+$" "regexp=^\s*#?\s*hostname\s*:.+$"
notify: notify:
- datadog | restart the datadog service - datadog | restart the datadog service
tags: tags:
...@@ -110,7 +109,7 @@ ...@@ -110,7 +109,7 @@
dest="/etc/dd-agent/datadog.conf" dest="/etc/dd-agent/datadog.conf"
"line=dogstatsd_interval:10" "line=dogstatsd_interval:10"
state=present state=present
"regexp=^\#?\s*dogstatsd_interval:.+$" "regexp=^\s*#?\s*dogstatsd_interval\s*:.+$"
notify: notify:
- datadog | restart the datadog service - datadog | restart the datadog service
tags: tags:
...@@ -119,11 +118,9 @@ ...@@ -119,11 +118,9 @@
- name: datadog | update dogstreams - name: datadog | update dogstreams
lineinfile: lineinfile:
dest="/etc/dd-agent/datadog.conf" dest="/etc/dd-agent/datadog.conf"
"line=dogstreams:{{nginx_log_dir}}/access.log:nginx_log_http_response_counter:count" line='dogstreams:{{nginx_log_dir}}/access.log:nginx_log_http_response_counter:count'
state=present state=present
insertafter=EOF regexp='^\s*#?\s*dogstreams\s*:.+$'
"regexp=^\#?\s*dogstreams:.+$"
when: nginx_sites is defined
notify: notify:
- datadog | restart the datadog service - datadog | restart the datadog service
tags: tags:
...@@ -132,7 +129,7 @@ ...@@ -132,7 +129,7 @@
- name: datadog | update api-key - name: datadog | update api-key
lineinfile: lineinfile:
dest="/etc/dd-agent/datadog.conf" dest="/etc/dd-agent/datadog.conf"
"regexp=^api_key:.*" "regexp=^api_key\s*:.*"
"line=api_key:{{ common_dd_api_key }}" "line=api_key:{{ common_dd_api_key }}"
notify: notify:
- datadog | restart the datadog service - datadog | restart the datadog service
......
...@@ -24,8 +24,8 @@ serverurl=unix://{{ supervisor_data_dir }}/supervisor.sock ; use a unix:// URL ...@@ -24,8 +24,8 @@ serverurl=unix://{{ supervisor_data_dir }}/supervisor.sock ; use a unix:// URL
; interpreted as relative to this file. Included files *cannot* ; interpreted as relative to this file. Included files *cannot*
; include files themselves. ; include files themselves.
[inet_http_server] ;[inet_http_server]
port = {{ SUPERVISOR_HTTP_BIND_IP }}:{{ supervisor_http_bind_port }} ;port = {{ SUPERVISOR_HTTP_BIND_IP }}:{{ supervisor_http_bind_port }}
[include] [include]
files = {{ supervisor_cfg_dir }}/*.conf files = {{ supervisor_cfg_dir }}/*.conf
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment