Infrastructure/Fluentd
[Fluentd] 8. Prometheus 연동
상쾌한기분
2021. 5. 11. 14:51
728x90
반응형
Prometheus 연동
https://github.com/fluent/fluent-plugin-prometheus
Prometheus 플러그인은 총 6개를 제공
연동전 설치
CentOS 라 td-agent
$ td-agent-gem install fluent-plugin-prometheus
샘플
input plugin 은 promethues 사용해서
server_ip:24231/metrics 를 리스닝 상태로 두고
output plugin은 prometheus_output_monitor 사용해서
10 초마다 promethues 에서 pull 해가도록 한다.
<source>
@type prometheus
bind 0.0.0.0
port 24231
metrics_path /metrics
</source>
<source>
@type prometheus_output_monitor
interval 10
<labels>
hostname ${hostname}
</labels>
</source>
728x90
반응형