[feat] Add log dirs for playbook + influxdb

This commit is contained in:
William Wernert
2020-10-08 12:35:14 -04:00
parent d84f85335e
commit e1d8f578c2
3 changed files with 20 additions and 7 deletions

View File

@@ -6,6 +6,7 @@
/opt/so/log/soc/*.log /opt/so/log/soc/*.log
/opt/so/log/kratos/*.log /opt/so/log/kratos/*.log
/opt/so/log/kibana/*.log /opt/so/log/kibana/*.log
/opt/so/log/influxdb/*.log
/opt/so/log/elastalert/*.log /opt/so/log/elastalert/*.log
/opt/so/log/soctopus/*.log /opt/so/log/soctopus/*.log
/opt/so/log/curator/*.log /opt/so/log/curator/*.log

View File

@@ -16,6 +16,14 @@ influxconfdir:
- name: /opt/so/conf/influxdb/etc - name: /opt/so/conf/influxdb/etc
- makedirs: True - makedirs: True
influxlogdir:
file.directory:
- name: /opt/so/log/influxdb
- dir_mode: 775
- user: 939
- group: 939
- makedirs: True
influxdbdir: influxdbdir:
file.directory: file.directory:
- name: /nsm/influxdb - name: /nsm/influxdb
@@ -36,6 +44,7 @@ so-influxdb:
- environment: - environment:
- INFLUXDB_HTTP_LOG_ENABLED=false - INFLUXDB_HTTP_LOG_ENABLED=false
- binds: - binds:
- /opt/so/log/influxdb/:/log:rw
- /opt/so/conf/influxdb/etc/influxdb.conf:/etc/influxdb/influxdb.conf:ro - /opt/so/conf/influxdb/etc/influxdb.conf:/etc/influxdb/influxdb.conf:ro
- /nsm/influxdb:/var/lib/influxdb:rw - /nsm/influxdb:/var/lib/influxdb:rw
- /etc/pki/influxdb.crt:/etc/ssl/influxdb.crt:ro - /etc/pki/influxdb.crt:/etc/ssl/influxdb.crt:ro

View File

@@ -58,6 +58,14 @@ query_updatepluginurls:
- connection_user: root - connection_user: root
- connection_pass: {{ MYSQLPASS }} - connection_pass: {{ MYSQLPASS }}
playbooklogdir:
file.directory:
- name: /opt/so/log/playbook
- dir_mode: 775
- user: 939
- group: 939
- makedirs: True
{% if PLAYBOOKPASS == None %} {% if PLAYBOOKPASS == None %}
playbook_password_none: playbook_password_none:
@@ -73,6 +81,8 @@ so-playbook:
- image: {{ MANAGER }}:5000/{{ IMAGEREPO }}/so-playbook:{{ VERSION }} - image: {{ MANAGER }}:5000/{{ IMAGEREPO }}/so-playbook:{{ VERSION }}
- hostname: playbook - hostname: playbook
- name: so-playbook - name: so-playbook
- binds:
- /opt/so/log/playbook:/playbook/log:rw
- environment: - environment:
- REDMINE_DB_MYSQL={{ MANAGERIP }} - REDMINE_DB_MYSQL={{ MANAGERIP }}
- REDMINE_DB_DATABASE=playbook - REDMINE_DB_DATABASE=playbook
@@ -83,13 +93,6 @@ so-playbook:
{% endif %} {% endif %}
playbooklogdir:
file.directory:
- name: /opt/so/log/playbook
- user: 939
- group: 939
- makedirs: True
so-playbooksynccron: so-playbooksynccron:
cron.present: cron.present:
- name: /usr/sbin/so-playbook-sync > /opt/so/log/playbook/sync.log 2>&1 - name: /usr/sbin/so-playbook-sync > /opt/so/log/playbook/sync.log 2>&1