mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
FIX: Update telegraf init.sls to run telegraf as non-root #7468
This commit is contained in:
@@ -13,6 +13,11 @@ tgraflogdir:
|
|||||||
file.directory:
|
file.directory:
|
||||||
- name: /opt/so/log/telegraf
|
- name: /opt/so/log/telegraf
|
||||||
- makedirs: True
|
- makedirs: True
|
||||||
|
- user: 939
|
||||||
|
- group: 939
|
||||||
|
- recurse:
|
||||||
|
- user
|
||||||
|
- group
|
||||||
|
|
||||||
tgrafetcdir:
|
tgrafetcdir:
|
||||||
file.directory:
|
file.directory:
|
||||||
@@ -29,7 +34,7 @@ tgrafsyncscripts:
|
|||||||
- name: /opt/so/conf/telegraf/scripts
|
- name: /opt/so/conf/telegraf/scripts
|
||||||
- user: root
|
- user: root
|
||||||
- group: 939
|
- group: 939
|
||||||
- file_mode: 700
|
- file_mode: 770
|
||||||
- template: jinja
|
- template: jinja
|
||||||
- source: salt://telegraf/scripts
|
- source: salt://telegraf/scripts
|
||||||
{% if salt['pillar.get']('global:mdengine', 'ZEEK') == 'SURICATA' %}
|
{% if salt['pillar.get']('global:mdengine', 'ZEEK') == 'SURICATA' %}
|
||||||
@@ -57,6 +62,8 @@ node_config:
|
|||||||
so-telegraf:
|
so-telegraf:
|
||||||
docker_container.running:
|
docker_container.running:
|
||||||
- image: {{ MANAGER }}:5000/{{ IMAGEREPO }}/so-telegraf:{{ VERSION }}
|
- image: {{ MANAGER }}:5000/{{ IMAGEREPO }}/so-telegraf:{{ VERSION }}
|
||||||
|
- user: 939
|
||||||
|
- group_add: 939,920
|
||||||
- environment:
|
- environment:
|
||||||
- HOST_PROC=/host/proc
|
- HOST_PROC=/host/proc
|
||||||
- HOST_ETC=/host/etc
|
- HOST_ETC=/host/etc
|
||||||
|
|||||||
Reference in New Issue
Block a user