-
Notifications
You must be signed in to change notification settings - Fork 121
/
Copy pathnginx-opensource-stub-example.yml
33 lines (33 loc) · 1.18 KB
/
nginx-opensource-stub-example.yml
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
---
integrations:
- name: nri-flex
# interval: 30s
config:
name: nginxFlex
apis:
- name: nginxStub
url: http://127.0.0.1:9999/nginx_status # get stub status output
- name: nginx
event_type: NginxSample
commands:
- cache: http://127.0.0.1:9999/nginx_status # use commands to parse the response
split_output: Active
regex_matches:
- expression: Active connections:\s(\S+)
keys: [net.connectionsActive]
- expression: \s(\d+)\s(\d+)\s(\d+)
keys:
[
net.connectionsAcceptedPerSecond,
net.handledPerSecond,
net.requestsPerSecond,
]
- expression: Reading:\s(\d+)\s\S+\s(\d+)\s\S+\s(\d+)
keys:
[
net.connectionsReading,
net.connectionsWriting,
net.connectionsWaiting,
]
math:
net.connectionsDroppedPerSecond: ${net.connectionsAcceptedPerSecond} - ${net.handledPerSecond}