forked from alvintzz/prometheus-nginxlog-exporter
-
Notifications
You must be signed in to change notification settings - Fork 1
/
example-config.hcl
62 lines (52 loc) · 1.13 KB
/
example-config.hcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
listen {
port = 4040
// "metrics_endpoint" can be used to configure an alternative metrics URL
// path. Default value is "/metrics".
//
// metrics_endpoint = "/metrics"
}
consul {
enable = true
address = "localhost:8500"
datacenter = "dc1"
scheme = "http"
token = ""
service {
id = "nginx-exporter"
name = "nginx-exporter"
address = "192.168.3.1"
tags = ["foo", "bar"]
}
}
namespace "nginx" {
source = {
files = [
"test.log",
"foo.log",
]
syslog {
listen_address = "udp://0.0.0.0:5531"
format = "rfc3164"
tags = [
"sometag"
]
}
}
format = "$remote_addr - $remote_user [$time_local] \"$request\" $status $body_bytes_sent \"$http_referer\" \"$http_user_agent\" \"$http_x_forwarded_for\""
labels {
app = "magicapp"
foo = "bar"
}
histogram_buckets = [.005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10]
relabel "user" {
from = "remote_user"
// whitelist = ["-", "user1", "user2"]
}
relabel "request_uri" {
from = "request"
split = 2
match "^users/[0-9]+" {
replacement = "/users/:id"
}
}
}