@@ -24,138 +24,138 @@ spec:
2424 key : staging/infrastructure/splunk/external_endpoint
2525 property : splunk_index
2626 refreshInterval : 1h
27- target :
28- creationPolicy : Owner
29- deletionPolicy : Delete
30- name : otelcol-config
3127 secretStoreRef :
3228 kind : ClusterSecretStore
3329 name : appsre-stonesoup-vault
34- template :
35- type : Opaque
36- data :
37- config.yaml : |
38- exporters:
39- splunk_hec/corp:
40- endpoint: {{ .endpoint }}
41- token: {{ .token }}
42- disable_compression: false
43- sending_queue:
44- storage: file_storage/otc
45- enabled: true
46- num_consumers: 2
47- queue_size: 10
48- sizer: items
49- batch:
50- max_size: 100
51- min_size: 1
52- flush_timeout: 1s
53- retry_on_failure:
54- enabled: true
55- initial_interval: 10s
56- max_interval: 60s
57- max_elapsed_time: 10m
58- extensions:
59- file_storage/otc:
60- directory: /tmp/otelcollector/oteltmp
61- timeout: 10s
62- create_directory: true
63- processors:
64- transform/common:
65- error_mode: ignore
66- log_statements:
67- - context: log
68- statements:
69- - set(attributes["com.splunk.source"], attributes["log.file.path"])
70- - set(attributes["host.name"], resource.attributes["host.name"])
71- - set(attributes["appcode"], resource.attributes["appcode"])
72- - keep_keys(attributes, ["com.splunk.source", "host.name", "appcode", "com.splunk.index", "com.splunk.sourcetype"])
73- resource/add_appcode:
74- attributes:
75- - action: insert
76- key: appcode
77- value: "ASSH-001"
78- resourcedetection/system:
79- attributes:
80- - host.name
81- - os.type
82- detectors:
83- - system
84- override: true
85- system:
86- hostname_sources:
87- - os
88- resource_attributes:
89- host.id:
90- enabled: false
91- host.name:
92- enabled: true
93- os.type:
94- enabled: true
95- receivers:
96- filelog/rh_rhtap_stage_mpc_audit:
97- include:
98- - /var/log/audit/audit.log
99- - /var/log/messages
100- - /var/log/secure # e.g., /var/log/nginx/access.log
101- include_file_path: true
102- exclude_older_than: 86400s
103- operators:
104- - type: add
105- id: rh_rhtap_stage_mpc_idx
106- field: attributes["com.splunk.index"]
107- value: {{ .index }}
108- on_error: send
109- - type: add
110- id: rh_assh-001_audit_st
111- field: attributes["com.splunk.sourcetype"]
112- value: audit
113- on_error: send
114- filelog/rh_rhtap_stage_mpc_messages:
115- include:
116- - /var/log/messages
117- include_file_path: true
118- exclude_older_than: 86400s
119- operators:
120- - type: add
121- id: rh_rhtap_stage_mpc_idx
122- field: attributes["com.splunk.index"]
123- value: {{ .index }}
124- on_error: send
125- - type: add
126- id: rh_assh-001_messages_st
127- field: attributes["com.splunk.sourcetype"]
128- value: messages
129- on_error: send
130- filelog/rh_rhtap_stage_mpc_secure:
131- include:
132- - /var/log/secure
133- include_file_path: true
134- exclude_older_than: 86400s
135- operators:
136- - type: add
137- id: rh_rhtap_stage_mpc_idx
138- field: attributes["com.splunk.index"]
139- value: {{ .index }}
140- on_error: send
141- - type: add
142- id: rh_assh-001_secure_st
143- field: attributes["com.splunk.sourcetype"]
144- value: secure
145- on_error: send
146- service:
30+ target :
31+ name : otelcol-config
32+ creationPolicy : Owner
33+ deletionPolicy : Delete
34+ template :
35+ type : Opaque
36+ data :
37+ config.yaml : |
38+ exporters:
39+ splunk_hec/corp:
40+ endpoint: {{ .endpoint }}
41+ token: {{ .token }}
42+ disable_compression: false
43+ sending_queue:
44+ storage: file_storage/otc
45+ enabled: true
46+ num_consumers: 2
47+ queue_size: 10
48+ sizer: items
49+ batch:
50+ max_size: 100
51+ min_size: 1
52+ flush_timeout: 1s
53+ retry_on_failure:
54+ enabled: true
55+ initial_interval: 10s
56+ max_interval: 60s
57+ max_elapsed_time: 10m
14758 extensions:
148- - file_storage/otc
149- pipelines:
150- logs:
151- processors:
152- - resource/add_appcode
153- - resourcedetection/system
154- - transform/common
155- receivers:
156- # List all your receivers here
157- - filelog/rh_rhtap_stage_mpc_audit
158- - filelog/rh_rhtap_stage_mpc_messages
159- - filelog/rh_rhtap_stage_mpc_secure
160- exporters:
161- - splunk_hec/corp
59+ file_storage/otc:
60+ directory: /tmp/otelcollector/oteltmp
61+ timeout: 10s
62+ create_directory: true
63+ processors:
64+ transform/common:
65+ error_mode: ignore
66+ log_statements:
67+ - context: log
68+ statements:
69+ - set(attributes["com.splunk.source"], attributes["log.file.path"])
70+ - set(attributes["host.name"], resource.attributes["host.name"])
71+ - set(attributes["appcode"], resource.attributes["appcode"])
72+ - keep_keys(attributes, ["com.splunk.source", "host.name", "appcode", "com.splunk.index", "com.splunk.sourcetype"])
73+ resource/add_appcode:
74+ attributes:
75+ - action: insert
76+ key: appcode
77+ value: "ASSH-001"
78+ resourcedetection/system:
79+ attributes:
80+ - host.name
81+ - os.type
82+ detectors:
83+ - system
84+ override: true
85+ system:
86+ hostname_sources:
87+ - os
88+ resource_attributes:
89+ host.id:
90+ enabled: false
91+ host.name:
92+ enabled: true
93+ os.type:
94+ enabled: true
95+ receivers:
96+ filelog/rh_rhtap_stage_mpc_audit:
97+ include:
98+ - /var/log/audit/audit.log
99+ - /var/log/messages
100+ - /var/log/secure # e.g., /var/log/nginx/access.log
101+ include_file_path: true
102+ exclude_older_than: 86400s
103+ operators:
104+ - type: add
105+ id: rh_rhtap_stage_mpc_idx
106+ field: attributes["com.splunk.index"]
107+ value: {{ .index }}
108+ on_error: send
109+ - type: add
110+ id: rh_assh-001_audit_st
111+ field: attributes["com.splunk.sourcetype"]
112+ value: audit
113+ on_error: send
114+ filelog/rh_rhtap_stage_mpc_messages:
115+ include:
116+ - /var/log/messages
117+ include_file_path: true
118+ exclude_older_than: 86400s
119+ operators:
120+ - type: add
121+ id: rh_rhtap_stage_mpc_idx
122+ field: attributes["com.splunk.index"]
123+ value: {{ .index }}
124+ on_error: send
125+ - type: add
126+ id: rh_assh-001_messages_st
127+ field: attributes["com.splunk.sourcetype"]
128+ value: messages
129+ on_error: send
130+ filelog/rh_rhtap_stage_mpc_secure:
131+ include:
132+ - /var/log/secure
133+ include_file_path: true
134+ exclude_older_than: 86400s
135+ operators:
136+ - type: add
137+ id: rh_rhtap_stage_mpc_idx
138+ field: attributes["com.splunk.index"]
139+ value: {{ .index }}
140+ on_error: send
141+ - type: add
142+ id: rh_assh-001_secure_st
143+ field: attributes["com.splunk.sourcetype"]
144+ value: secure
145+ on_error: send
146+ service:
147+ extensions:
148+ - file_storage/otc
149+ pipelines:
150+ logs:
151+ processors:
152+ - resource/add_appcode
153+ - resourcedetection/system
154+ - transform/common
155+ receivers:
156+ # List all your receivers here
157+ - filelog/rh_rhtap_stage_mpc_audit
158+ - filelog/rh_rhtap_stage_mpc_messages
159+ - filelog/rh_rhtap_stage_mpc_secure
160+ exporters:
161+ - splunk_hec/corp
0 commit comments