-
Notifications
You must be signed in to change notification settings - Fork 101
/
Copy pathextra.conf
79 lines (69 loc) · 2.23 KB
/
extra.conf
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
[SERVICE]
HTTP_Server On
HTTP_Listen 0.0.0.0
HTTP_PORT 2020
Parsers_File /fb_metrics_parser.conf
storage.metrics On
# Configure FB to scrape its own prom metrics
[INPUT]
Name exec
Command curl -s http://127.0.0.1:2020/api/v1/metrics/prometheus
Interval_Sec 30
Tag fb_metrics
# Filter out everything except output metrics
# TODO: REMOVE this filter if you want INPUT PLUGIN METRICS
[FILTER]
Name grep
Match fb_metrics
Regex exec output
# Filter out the HELP and TYPE fields which aren't parseable by the cw metric filter
[FILTER]
Name grep
Match fb_metrics
Exclude exec HELP
[FILTER]
Name grep
Match fb_metrics
Exclude exec TYPE
# Parse the metrics to json for easy parsing in CW Log Group Metrics filter
[FILTER]
Name parser
Match fb_metrics
Key_Name exec
Parser fluentbit_prom_metrics_to_json
Reserve_Data True
# Un-comment this section if you want storage metrics
# Unfortunately, Fluent Bit publishes storage metrics via
# a different HTTP path which vends metrics in JSON instead of Prometheus
# These metrics can be sent by the same output as the prom metrics
#[INPUT]
# Name exec
# Command curl -s http://127.0.0.1:2020/api/v1/storage && echo ""
# Interval_Sec 5
# Tag fb_metrics-storage
# Parse the JSON metrics
#[FILTER]
# Name parser
# Match fb_metrics-storage
# Key_Name exec
# Parser json
# Add hostname to metrics to identify them
# [FILTER]
# Name record_modifier
# Match *
# Record hostname ${HOSTNAME}
# Send the metrics as CW Logs
# The CW Metrics filter on the log group will turn them into metrics
# Use hostname in logs to differentiate log streams per task in Fargate
# Alternative is to use: https://github.com/aws/amazon-cloudwatch-logs-for-fluent-bit#templating-log-group-and-stream-names
[OUTPUT]
Name cloudwatch_logs
Match fb_metrics*
region ${FLUENT_BIT_METRICS_LOG_REGION}
log_group_name ${FLUENT_BIT_METRICS_LOG_GROUP}
log_stream_name ${HOSTNAME}-fb-internal-metrics
auto_create_group On
retry_limit 2
# consider configuring more than 1 worker, up to the numer of cores on your host
# to accommodate higher throughput logging. Only 2.32+ supports multi-worker
workers 1