mirror of https://github.com/k3s-io/k3s
Add prometheus plugin on fluentd image.
parent
7df2bce1ec
commit
0e52082673
|
@ -32,6 +32,7 @@ sed -i -e "s/USER=td-agent/USER=root/" -e "s/GROUP=td-agent/GROUP=root/" /etc/in
|
|||
# http://docs.fluentd.org/articles/plugin-management
|
||||
td-agent-gem install --no-document fluent-plugin-kubernetes_metadata_filter -v 0.27.0
|
||||
td-agent-gem install --no-document fluent-plugin-elasticsearch -v 1.9.5
|
||||
td-agent-gem install --no-document fluent-plugin-prometheus -v 0.3.0
|
||||
|
||||
# Remove docs and postgres references
|
||||
rm -rf /opt/td-agent/embedded/share/doc \
|
||||
|
|
|
@ -283,6 +283,44 @@
|
|||
type kubernetes_metadata
|
||||
</filter>
|
||||
|
||||
# Prometheus Exporter Plugin
|
||||
# input plugin that exports metrics
|
||||
<source>
|
||||
type prometheus
|
||||
</source>
|
||||
|
||||
<source>
|
||||
type monitor_agent
|
||||
</source>
|
||||
|
||||
<source>
|
||||
type forward
|
||||
</source>
|
||||
|
||||
# input plugin that collects metrics from MonitorAgent
|
||||
<source>
|
||||
@type prometheus_monitor
|
||||
<labels>
|
||||
host ${hostname}
|
||||
</labels>
|
||||
</source>
|
||||
|
||||
# input plugin that collects metrics for output plugin
|
||||
<source>
|
||||
@type prometheus_output_monitor
|
||||
<labels>
|
||||
host ${hostname}
|
||||
</labels>
|
||||
</source>
|
||||
|
||||
# input plugin that collects metrics for in_tail plugin
|
||||
<source>
|
||||
@type prometheus_tail_monitor
|
||||
<labels>
|
||||
host ${hostname}
|
||||
</labels>
|
||||
</source>
|
||||
|
||||
<match **>
|
||||
type elasticsearch
|
||||
log_level info
|
||||
|
|
Loading…
Reference in New Issue