Skip to content

Commit ffde25a

Browse files
authored
feat(nginx): Update the NGINX OTel dashboard (#2443)
* feat(nginx): Update NGINX OTEL entity dashboard * add active connections to summary metrics
1 parent 916a778 commit ffde25a

File tree

2 files changed

+93
-13
lines changed

2 files changed

+93
-13
lines changed

entity-types/infra-nginxserver/opentelemetry_dashboard.stg.json

Lines changed: 89 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,23 @@
44
"name" : "NGINX Metrics",
55
"widgets" : [ {
66
"visualization" : {
7-
"id" : "viz.line"
7+
"id" : "viz.billboard"
88
},
99
"layout" : {
1010
"column" : 1,
1111
"row" : 1,
1212
"height" : 3,
1313
"width" : 6
1414
},
15-
"title" : "Requests per second",
15+
"title" : "Total Number of Client Requests",
1616
"rawConfiguration" : {
17+
"billboardSettings": {
18+
"visual": {
19+
"display": "value"
20+
}
21+
},
1722
"nrqlQueries" : [ {
18-
"query" : "FROM Metric SELECT sum(`nginx.requests` OR `nginxplus_http_requests_total`) / sum((endTimestamp - timestamp) / 1000) AS 'Requests' WHERE instrumentation.provider = 'opentelemetry' AND ((metricName = 'nginx.requests' AND nginxplus_http_requests_total is NULL) OR (metricName = 'nginxplus_http_requests_total' AND nginx.requests is NULL)) TIMESERIES AUTO",
23+
"query" : "FROM Metric SELECT sum(`nginx.requests` OR `nginxplus_http_requests_total`) AS 'Total Requests' WHERE instrumentation.provider = 'opentelemetry' AND ((metricName = 'nginx.requests' AND nginxplus_http_requests_total is NULL) OR (metricName = 'nginxplus_http_requests_total' AND nginx.requests is NULL))",
1924
"accountId": 0} ]
2025
}
2126
}, {
@@ -28,42 +33,113 @@
2833
"height" : 3,
2934
"width" : 6
3035
},
31-
"title" : "Active connections",
36+
"title" : "Requests per second",
3237
"rawConfiguration" : {
3338
"nrqlQueries" : [ {
34-
"query" : "FROM Metric SELECT average(`nginx.connections_current` OR `nginxplus_connections_active`) AS 'Active connections' WHERE ((nginxplus_connections_active IS NULL AND state = 'active' AND metricName = 'nginx.connections_current') OR (nginx.connections_current is NULL AND metricName = 'nginxplus_connections_active')) AND instrumentation.provider = 'opentelemetry' TIMESERIES AUTO",
39+
"query" : "FROM Metric SELECT sum(`nginx.requests` OR `nginxplus_http_requests_total`) / sum((endTimestamp - timestamp) / 1000) AS 'Requests' WHERE instrumentation.provider = 'opentelemetry' AND ((metricName = 'nginx.requests' AND nginxplus_http_requests_total is NULL) OR (metricName = 'nginxplus_http_requests_total' AND nginx.requests is NULL)) TIMESERIES AUTO",
3540
"accountId": 0} ]
3641
}
3742
}, {
3843
"visualization" : {
39-
"id" : "viz.line"
44+
"id" : "viz.billboard"
4045
},
4146
"layout" : {
4247
"column" : 1,
4348
"row" : 4,
4449
"height" : 3,
45-
"width" : 6
50+
"width" : 4
51+
},
52+
"title" : "Active Connections",
53+
"rawConfiguration" : {
54+
"nrqlQueries" : [ {
55+
"query" : "FROM Metric SELECT average(`nginx.connections_current` OR `nginxplus_connections_active`) AS 'Active Connections' WHERE ((nginxplus_connections_active IS NULL AND state = 'active' AND metricName = 'nginx.connections_current') OR (nginx.connections_current is NULL AND metricName = 'nginxplus_connections_active')) AND instrumentation.provider = 'opentelemetry' TIMESERIES AUTO",
56+
"accountId": 0} ]
57+
}
58+
}, {
59+
"visualization" : {
60+
"id" : "viz.billboard"
4661
},
47-
"title" : "Connections accepted per second",
62+
"layout" : {
63+
"column" : 5,
64+
"row" : 4,
65+
"height" : 3,
66+
"width" : 4
67+
},
68+
"title" : "Connections Dropped",
4869
"rawConfiguration" : {
70+
"dataFormatters": [
71+
{
72+
"name": "Connections Dropped",
73+
"precision": null,
74+
"type": "decimal"
75+
}
76+
],
4977
"nrqlQueries" : [ {
50-
"query" : "FROM Metric SELECT sum(`nginx.connections_accepted` OR `nginxplus_connections_accepted`) / sum((endTimestamp - timestamp) / 1000) AS 'Connections accepted' WHERE ((nginxplus_connections_accepted is NULL AND metricName = 'nginx.connections_accepted') OR (nginx.connections_accepted is NULL AND metricName = 'nginxplus_connections_accepted')) AND instrumentation.provider = 'opentelemetry' TIMESERIES AUTO",
78+
"query" : "FROM Metric SELECT (sum(`nginxplus_connections_dropped`) + abs(sum(`nginx.connections_accepted`) - sum(`nginx.connections_handled`))) / sum((endTimestamp - timestamp) / 1000) AS 'Connections Dropped' WHERE (((metricName = 'nginx.connections_accepted' OR metricName = 'nginx.connections_handled') AND nginxplus_connections_dropped is NULL) OR (nginx.connections_accepted is NULL AND nginx.connections_handled is NULL AND metricName = 'nginxplus_connections_dropped')) AND instrumentation.provider = 'opentelemetry' TIMESERIES AUTO",
5179
"accountId": 0} ]
5280
}
5381
}, {
5482
"visualization" : {
5583
"id" : "viz.line"
5684
},
5785
"layout" : {
58-
"column" : 7,
86+
"column" : 9,
5987
"row" : 4,
6088
"height" : 3,
61-
"width" : 6
89+
"width" : 4
90+
},
91+
"title" : "Active vs Dropped Connections",
92+
"rawConfiguration" : {
93+
"nrqlQueries" : [ {
94+
"query" : "FROM Metric, Metric SELECT filter(average(`nginx.connections_current` OR `nginxplus_connections_active`), WHERE ((nginxplus_connections_active IS NULL AND state = 'active' AND metricName = 'nginx.connections_current') OR (nginx.connections_current is NULL AND metricName = 'nginxplus_connections_active')) AND instrumentation.provider = 'opentelemetry') AS 'Active connections', filter(((sum(`nginx.connections_accepted`) - sum(`nginx.connections_handled`)) + sum(`nginxplus_connections_dropped`)) / sum((endTimestamp - timestamp) / 1000), WHERE ((nginxplus_connections_dropped is NULL AND metricName = 'nginx.connections_accepted' OR metricName = 'nginx.connections_handled') OR (metricName = 'nginxplus_connections_dropped' AND nginx.connections_accepted is NULL AND nginx.connections_handled is NULL)) AND instrumentation.provider = 'opentelemetry') AS 'Connections dropped' TIMESERIES AUTO",
95+
"accountId": 0} ]
96+
}
97+
}, {
98+
"visualization" : {
99+
"id" : "viz.billboard"
100+
},
101+
"layout" : {
102+
"column" : 1,
103+
"row" : 7,
104+
"height" : 3,
105+
"width" : 4
106+
},
107+
"title" : "Total Number of Accepted Connections",
108+
"rawConfiguration" : {
109+
"nrqlQueries" : [ {
110+
"query" : "FROM Metric SELECT sum(`nginx.connections_accepted` OR `nginxplus_connections_accepted`) AS 'Total Connections accepted' WHERE ((nginxplus_connections_accepted is NULL AND metricName = 'nginx.connections_accepted') OR (nginx.connections_accepted is NULL AND metricName = 'nginxplus_connections_accepted')) AND instrumentation.provider = 'opentelemetry'",
111+
"accountId": 0} ]
112+
}
113+
}, {
114+
"visualization" : {
115+
"id" : "viz.billboard"
116+
},
117+
"layout" : {
118+
"column" : 5,
119+
"row" : 7,
120+
"height" : 3,
121+
"width" : 4
122+
},
123+
"title" : "Total Number of Handled Connections",
124+
"rawConfiguration" : {
125+
"nrqlQueries" : [ {
126+
"query" : "FROM Metric SELECT sum(`nginx.connections_handled`) + (sum(`nginxplus_connections_accepted`) - sum(`nginxplus_connections_dropped`)) WHERE ((nginxplus_connections_accepted is NULL AND nginxplus_connections_dropped is NULL AND metricName = 'nginx.connections_handled') OR ((metricName = 'nginxplus_connections_accepted' OR metricName = 'nginxplus_connections_dropped') AND nginx.connections_handled is NULL)) AND instrumentation.provider = 'opentelemetry' ",
127+
"accountId": 0} ]
128+
}
129+
}, {
130+
"visualization" : {
131+
"id" : "viz.line"
132+
},
133+
"layout" : {
134+
"column" : 9,
135+
"row" : 7,
136+
"height" : 3,
137+
"width" : 4
62138
},
63-
"title" : "Connections dropped per second",
139+
"title" : "Connections Accepted vs Handled",
64140
"rawConfiguration" : {
65141
"nrqlQueries" : [ {
66-
"query" : "FROM Metric SELECT ((sum(`nginx.connections_accepted`) - sum(`nginx.connections_handled`)) OR sum(`nginxplus_connections_dropped`)) / sum((endTimestamp - timestamp) / 1000) AS 'Connections dropped' WHERE ((nginxplus_connections_dropped is NULL AND metricName = 'nginx.connections_accepted' OR metricName = 'nginx.connections_handled') OR (metricName = 'nginxplus_connections_dropped' AND nginx.connections_accepted is NULL AND nginx.connections_handled is NULL)) AND instrumentation.provider = 'opentelemetry' TIMESERIES AUTO",
142+
"query" : "FROM Metric, Metric SELECT filter(sum(`nginx.connections_accepted` OR `nginxplus_connections_accepted`) / sum((endTimestamp - timestamp) / 1000), WHERE ((nginxplus_connections_accepted is NULL AND metricName = 'nginx.connections_accepted') OR (nginx.connections_accepted is NULL AND metricName = 'nginxplus_connections_accepted')) AND instrumentation.provider = 'opentelemetry') AS 'Connections accepted', filter(((sum(`nginxplus_connections_accepted`) - sum(`nginxplus_connections_dropped`)) + sum(`nginx.connections_handled`)) / sum((endTimestamp - timestamp) / 1000), WHERE instrumentation.provider = 'opentelemetry' AND (((metricName = 'nginxplus_connections_accepted' OR metricName = 'nginxplus_connections_dropped') AND nginx.connections_handled is NULL) OR (nginxplus_connections_accepted is NULL AND nginxplus_connections_dropped is NULL AND metricName = 'nginx.connections_handled'))) ) AS 'Connections handled' TIMESERIES AUTO",
67143
"accountId": 0} ]
68144
}
69145
} ]

entity-types/infra-nginxserver/summary_metrics.stg.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,7 @@ requests:
1010
goldenMetric: requests
1111
unit: OPERATIONS_PER_SECOND
1212
title: Requests
13+
activeConnections:
14+
goldenMetric: activeConnections
15+
unit: COUNT
16+
title: Active connections

0 commit comments

Comments
 (0)