-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathcollector-config.yaml
More file actions
36 lines (33 loc) · 1.42 KB
/
collector-config.yaml
File metadata and controls
36 lines (33 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
receivers:
castai_audit_logs:
api:
url: ${env:CASTAI_API_URL} # Use CASTAI_API_URL env variable to override default API URL (https://api.cast.ai/)
key: ${env:CASTAI_API_KEY} # Use CASTAI_API_KEY env variable to provide API Access Key
poll_interval_sec: 10 # This parameter defines poll cycle in seconds.
page_limit: 10 # This parameter defines the max number of records returned from the backend in one page.
storage:
type: "persistent"
filename: "./audit_logs_poll_data.json"
exporters:
otlp_http/loki:
endpoint: http://localhost:3100/otlp
processors:
transform:
log_statements:
- context: log
statements:
- set(resource.attributes["eventType"], attributes["eventType"]) where attributes["eventType"] != nil
- set(resource.attributes["id"], attributes["id"]) where attributes["id"] != nil
- set(resource.attributes["initiatedBy"], attributes["initiatedBy"]["id"]) where attributes["initiatedBy"]["id"] != nil
- set(resource.attributes["clusterId"], attributes["labels"]["clusterId"]) where attributes["labels"]["clusterId"] != nil
# Convert all attributes to JSON string and set as body.
- set(body, attributes)
service:
telemetry:
logs:
level: "debug"
pipelines:
logs:
receivers: [castai_audit_logs]
processors: [transform]
exporters: [otlp_http/loki]