Skip to content

Commit c103f37

Browse files
committed
news: added the news file
Signed-off-by: Hofi <hofione@gmail.com>
1 parent 492ed27 commit c103f37

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

news/feature-5259.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
`prometheus-stats`: Added two new sources `prometheus-stats()` and `prometheus-stats-dont-log()` which can serve output of the `syslog-ng-ctl stats` and `syslog-ng-ctl query` commands directly to a prometheus scraper. The only difference between the two is that the latter drops the log messages of the incoming scraper requests (so, an attached destination will not recieve any messages in the log path from the given `prometheus-stats-dont-log()` source). The `prometheus-stats()` source will produce log messages unparsed and store the incoming scraper HTTP requests in the `MSG` field of the log message.
2+
3+
You can set it up like:
4+
5+
``` config
6+
@version: 4.9
7+
@include "scl.conf"
8+
9+
source s_prometheus_stat {
10+
prometheus-stats-dont-log(
11+
ip("0.0.0.0")
12+
port(8080)
13+
stat-type("query")
14+
stat-query("*")
15+
scrape-freq-limit(30)
16+
single-instance(yes)
17+
);
18+
};
19+
20+
log {
21+
source(s_prometheus_stat);
22+
};
23+
```
24+
25+
NOTE: Please see that you do not need a destination to get this work, `prometheus-stats()` source will responde to the scraper regardless of the presence of a destination in the log path.
26+
27+
Options can be used:
28+
29+
`stat-type(string)` - `query` or `stats`
30+
`stat-query(string)` -
31+
`scrape-freq-limit(none-negative-int)` -
32+
`single-instance(yes/no)` -

0 commit comments

Comments
 (0)