## Prometheus Input Plugin Configuration # input plugin that exports metrics @type prometheus @type monitor_agent @type forward # input plugin that collects metrics from MonitorAgent @type prometheus_monitor host ${hostname} # input plugin that collects metrics for output plugin @type prometheus_output_monitor host ${hostname} # input plugin that collects metrics for in_tail plugin @type prometheus_tail_monitor host ${hostname} ## Nginx Access Log Configuration @type tail format nginx tag nginx path /var/log/nginx/access.log pos_file /tmp/fluent_nginx.pos types size:integer @type prometheus # You can use counter type with specifying a key, # and increments counter by the value name nginx_size_counter_bytes type counter desc nginx bytes sent key size host ${hostname} foo bar # You can use counter type without specifying a key # This just increments counter by 1 name nginx_record_counts type counter desc the number of emited records host ${hostname} @type copy # for MonitorAgent sample @id test_forward @type forward buffer_type memory flush_interval 1s max_retry_wait 2s disable_retry_limit host 127.0.0.1 port 20000 @type stdout ## Nginx Proxy Log Configuration @type tail format ltsv tag nginx_proxy path /var/log/nginx/access_proxy.log pos_file /tmp/fluent_nginx_proxy.pos types size:integer,request_length:integer,bytes_sent:integer,body_bytes_sent:integer,request_time:float,upstream_response_time:float @type prometheus # common labels for all metrics host ${hostname} method ${request_method} status ${status} name nginx_proxy_request_length_total_bytes type counter desc nginx proxy request length bytes key request_length name nginx_proxy_bytes_sent_total_bytes type counter desc nginx proxy bytes sent key bytes_sent name nginx_proxy_request_duration_total_milliseconds type counter desc nginx proxy request time key request_time name nginx_proxy_upstream_response_duration_total_milliseconds type counter desc nginx proxy upstream response time key upstream_response_time name nginx_proxy_request_duration_milliseconds type summary desc nginx proxy request duration summary key request_time name nginx_proxy_upstream_duration_milliseconds type summary desc nginx proxy upstream response duration summary key upstream_response_time @type copy @type stdout