fluent / fluent/fluent-plugin-prometheus

Different ports for different sources

Open
#236 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
257
Forks
83
Avg merge
1d 16h
Merged PRs (30d)
7

Description

How can I сonfigure expose different ports for different sources? For example:

espose port 24231 for tail file /var/log/nginx/access1.log

```

@type prometheus_tail_monitor

@type prometheus
port 24231

@type tail

@type regexp
expression /^(?[^ ]*) \[(?[^ ]*)\] (?[^ ]*) (?[^ ]*) \[(?
tag nginx1.default
path /var/log/nginx/access1.log
pos_file /tmp/fluent_nginx1.pos

@type prometheus


name nginx_size_bytes_total
type counter
desc nginx bytes sent

site default

key size

```
and espose port 24232 for tail file /var/log/nginx/access2.log

```

@type prometheus_tail_monitor

@type prometheus
port 24232

@type tail

@type regexp
expression /^(?[^ ]*) \[(?[^ ]*)\] (?[^ ]*) (?[^ ]*) \[(?
tag nginx2.default
path /var/log/nginx/access2.log
pos_file /tmp/fluent_nginx2.pos

@type prometheus


name nginx_size_bytes_total
type counter
desc nginx bytes sent

site default

key size

```
I want to see metric from file /var/log/nginx/access1.log in http://localhost:24231/metrics
and metric from file /var/log/nginx/access2.log in http://localhost:24232/metrics

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.