Commit 36f820ee by Max Rothman Committed by GitHub

Merge pull request #3152 from edx/max/jenkins-splunk

Add jenkins to splunk
parents facaa038 9c314e8a
......@@ -9,3 +9,12 @@
roles:
- aws
- jenkins_admin
# This requires an override of the following form:
# SPLUNKFORWARDER_LOG_ITEMS:
# - source: /edx/var/jenkins/jobs/*/builds/*/log
# index: '{{ COMMON_ENVIRONMENT }}-{{ COMMON_DEPLOYMENT }}-jenkins'
# sourcetype: jenkins_build
# followSymlink: false
# crcSalt: <SOURCE>
- role: splunkforwarder
when: COMMON_ENABLE_SPLUNKFORWARDER
......@@ -9,3 +9,12 @@
roles:
- aws
- tools_jenkins
# This requires an override of the following form:
# SPLUNKFORWARDER_LOG_ITEMS:
# - source: /edx/var/jenkins/jobs/*/builds/*/log
# index: '{{ COMMON_ENVIRONMENT }}-{{ COMMON_DEPLOYMENT }}-jenkins'
# sourcetype: jenkins_build
# followSymlink: false
# crcSalt: <SOURCE>
- role: splunkforwarder
when: COMMON_ENABLE_SPLUNKFORWARDER
......@@ -84,7 +84,7 @@
notify: restart splunkforwarder
- name: Update admin pasword
shell: "{{ splunkforwarder_output_dir }}/bin/splunk edit user admin -password {{ SPLUNKFORWARDER_PASSWORD }} -auth admin:changeme --accept-license --answer-yes --no-prompt"
shell: "{{ splunkforwarder_output_dir }}/bin/splunk edit user admin -password '{{ SPLUNKFORWARDER_PASSWORD }}' -auth admin:changeme --accept-license --answer-yes --no-prompt"
when: download_deb.changed
notify: restart splunkforwarder
......
......@@ -3,7 +3,11 @@
{% for loggable in SPLUNKFORWARDER_LOG_ITEMS%}
[monitor://{{ loggable.source }}]
blacklist = \.(gz)$
recursive = {{ loggable.recursive|default(false) }}
{% if loggable.recursive | default(False) %}
{# There's a bug in which "recursive" must be unset for logs to be forwarded #}
{# See https://answers.splunk.com/answers/420901/splunk-not-matching-files-with-wildcard-in-monitor.html #}
recursive = true
{% endif %}
{% if loggable.sourcetype is defined %}
sourcetype = {{ loggable.sourcetype }}
{% endif %}
......
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