forked from newrelic/nri-flex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcd-nginx.yml
20 lines (20 loc) · 865 Bytes
/
cd-nginx.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
### Nginx V2 Container Discovery Config
name: nginxFlex
apis:
- name: nginxStub
url: http://${auto:ip}/nginx_status # get stub status output
- name: nginx
entity: ${auto:ip}
event_type: NginxSample
commands:
- cache: http://${auto:ip}/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}