Skip to content

Commit 4679a0f

Browse files
authored
Merge pull request #39 from redis-field-engineering/newrelic_v2
verify formulas and metrics, remove duplicate queries, create except list, update readme
2 parents 526425c + 7ab6044 commit 4679a0f

File tree

7 files changed

+338
-226
lines changed

7 files changed

+338
-226
lines changed

newrelic_v2/README.adoc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,22 @@ Replace NEW_RELIC_BEARER_TOKEN with the value of the bearer token you just gener
7171
Finally, find the "scrape_config" configuration directive where "job_name" is "redis-enterprise".
7272
Under "static_configs", replace REDIS_ENTERPRISE_HOST with the FQDN or hostname of your Redis Enterprise deployment.
7373

74+
Redis reports hundreds of metrics, and depending on the size of your deployment this may require large amounts of storage.
75+
In order to tailor the stored data to meet minimal requirements we have included an link:./config/except.txt[except file].
76+
The contents of this file should be used in conjunction with an except clause:
77+
78+
```
79+
transformations:
80+
- description: "General processing rules"
81+
ignore_metrics:
82+
- except:
83+
- kube_hpa_
84+
```
85+
86+
See the documentation link:https://docs.newrelic.com/docs/infrastructure/prometheus-integrations/install-configure-openmetrics/ignore-or-include-prometheus-metrics/[here]
87+
if you have further questions.
88+
89+
7490
=== Run a Prometheus Server using Docker
7591

7692
If you don't already have a Prometheus server, you can run Prometheus using a Docker container. This container will

newrelic_v2/config/except.txt

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
database_syncer_current_status
2+
database_syncer_ingress_bytes
3+
database_syncer_ingress_bytes_decompressed
4+
database_syncer_lag_ms
5+
database_syncer_rdb_size
6+
db_config
7+
endpoint_client_connections
8+
endpoint_other_requests
9+
endpoint_other_requests_latency_histogram_bucket
10+
endpoint_other_requests_latency_histogram_count
11+
endpoint_other_requests_latency_histogram_sum
12+
endpoint_read_requests
13+
endpoint_read_requests_latency_histogram_bucket
14+
endpoint_read_requests_latency_histogram_count
15+
endpoint_read_requests_latency_histogram_sum
16+
endpoint_write_requests
17+
endpoint_write_requests_latency_histogram_bucket
18+
endpoint_write_requests_latency_histogram_count
19+
endpoint_write_requests_latency_histogram_sum
20+
namedprocess_namegroup_cpu_seconds_total
21+
namedprocess_namegroup_thread_cpu_seconds_total
22+
node_cert_expires_in_seconds
23+
node_filefd_allocated
24+
node_filefd_maximum
25+
node_metrics_up
26+
node_os_info
27+
node_dmi_info
28+
redis_allocator_resident
29+
redis_server_allocator_allocated
30+
redis_server_allocator_resident
31+
redis_server_crdt_backlog_size
32+
redis_server_crdt_gc_pending
33+
redis_server_crdt_key_headers
34+
redis_server_crdt_merge_reqs
35+
redis_server_crdt_raw_dbsize
36+
redis_server_crdt_replica_max_ops_lag
37+
redis_server_crdt_replica_min_ops_lag
38+
redis_server_expired_keys
39+
redis_server_instantaneous_ops_per_sec
40+
redis_server_maxmemory
41+
redis_server_mem_fragmentation_ratio
42+
redis_server_total_commands_processed
43+
redis_server_total_connections_received
44+
redis_server_total_net_input_bytes
45+
redis_server_total_net_output_bytes
46+
redis_server_up
47+
redis_server_used_memory
48+
redis_total_net_output_bytes

newrelic_v2/dashboards/newrelic-database.json

Lines changed: 90 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"id": "viz.markdown"
2121
},
2222
"rawConfiguration": {
23-
"text": "# Database Dashboard\n\n### The various panels can be filtered by both cluster and database by entering those terms in the filter text area. \n\n#### - Click in the text area and wait until it loads the metadata\n#### - Scroll down and select the attribute and value with which you wish to filter\n#### - Choose an individual database -- bdb_name is the attribute -- for the finest granularity\n\n\n### See the following [page](https://redis.io/docs/latest/integrate/prometheus-with-redis-enterprise/prometheus-metrics-definitions/#database-metrics) for the details of the available database metrics. "
23+
"text": "# Database Dashboard\n\n### The various panels can be filtered by both cluster and database by entering those terms in the filter text area. \n\n#### - Click in the text area and wait until it loads the metadata\n#### - Scroll down and select the attribute and value with which you wish to filter\n#### - Choose an individual database -- db_name is the attribute -- for the finest granularity\n\n\n### See the following [page](https://redis.io/docs/latest/integrate/prometheus-with-redis-enterprise/prometheus-metrics-definitions/#database-metrics) for the details of the available database metrics. "
2424
}
2525
},
2626
{
@@ -44,7 +44,7 @@
4444
"accountIds": [
4545
3321735
4646
],
47-
"query": "SELECT latest(db_config) as Up FROM Metric FACET cluster as Cluster, db_name as Name, db as Id"
47+
"query": "SELECT if(latest(db_config) = 1, 'Up', 'Down') as Status FROM Metric FACET substring(cluster, 0, 15) as Cluster, db_name as Name, db as Id"
4848
}
4949
],
5050
"platformOptions": {
@@ -80,7 +80,7 @@
8080
"accountIds": [
8181
3321735
8282
],
83-
"query": "FROM Metric SELECT percentage(rate(count(*), 1 minute)/100, WHERE metricName = 'namedprocess_namegroup_cpu_seconds_total') SINCE 6 hours ago"
83+
"query": "SELECT percentage(rate(count(*), 1 minute)/100, WHERE metricName = 'namedprocess_namegroup_cpu_seconds_total') FROM Metric SINCE 1 hour ago"
8484
}
8585
],
8686
"platformOptions": {
@@ -98,7 +98,7 @@
9898
},
9999
"linkedEntityGuids": null,
100100
"visualization": {
101-
"id": "viz.stacked-bar"
101+
"id": "viz.line"
102102
},
103103
"rawConfiguration": {
104104
"facet": {
@@ -126,8 +126,14 @@
126126
"platformOptions": {
127127
"ignoreTimeRange": false
128128
},
129-
"units": {
130-
"unit": "BYTES"
129+
"thresholds": {
130+
"isLabelVisible": true
131+
},
132+
"yAxisLeft": {
133+
"zero": true
134+
},
135+
"yAxisRight": {
136+
"zero": true
131137
}
132138
}
133139
},
@@ -141,7 +147,7 @@
141147
},
142148
"linkedEntityGuids": null,
143149
"visualization": {
144-
"id": "viz.stacked-bar"
150+
"id": "viz.line"
145151
},
146152
"rawConfiguration": {
147153
"facet": {
@@ -150,19 +156,36 @@
150156
"legend": {
151157
"enabled": true
152158
},
159+
"markers": {
160+
"displayedTypes": {
161+
"criticalViolations": false,
162+
"deployments": true,
163+
"relatedDeployments": true,
164+
"warningViolations": false
165+
}
166+
},
153167
"nrqlQueries": [
154168
{
155169
"accountIds": [
156170
3321735
157171
],
158-
"query": "SELECT latest(bdb_main_thread_cpu_user) + latest(bdb_main_thread_cpu_system) FROM Metric FACET bdb_name TIMESERIES 1 MINUTES"
172+
"query": "SELECT rate(average(namedprocess_namegroup_thread_cpu_seconds_total), 1 minute) FROM Metric WHERE (mode = 'user' OR mode = 'system') AND threadname like 'redis-server%' TIMESERIES 1 MINUTES"
159173
}
160174
],
161175
"platformOptions": {
162176
"ignoreTimeRange": false
163177
},
178+
"thresholds": {
179+
"isLabelVisible": true
180+
},
164181
"units": {
165182
"unit": "PERCENTAGE"
183+
},
184+
"yAxisLeft": {
185+
"zero": true
186+
},
187+
"yAxisRight": {
188+
"zero": true
166189
}
167190
}
168191
},
@@ -198,7 +221,7 @@
198221
"accountIds": [
199222
3321735
200223
],
201-
"query": "SELECT latest(endpoint_client_connections) FROM Metric FACET db TIMESERIES 1 MINUTES"
224+
"query": "SELECT rate(latest(endpoint_client_connections), 5 minutes) FROM Metric FACET db TIMESERIES 5 MINUTES"
202225
}
203226
],
204227
"platformOptions": {
@@ -247,7 +270,7 @@
247270
"accountIds": [
248271
3321735
249272
],
250-
"query": "SELECT latest(endpoint_write_requests) FROM Metric FACET db TIMESERIES 1 MINUTES"
273+
"query": "SELECT rate(latest(endpoint_read_requests), 1 minute) + rate(latest(endpoint_write_requests), 1 minute) + rate(latest(endpoint_other_requests), 1 minute) FROM Metric FACET db TIMESERIES 1 MINUTES"
251274
}
252275
],
253276
"platformOptions": {
@@ -277,14 +300,40 @@
277300
"id": "viz.line"
278301
},
279302
"rawConfiguration": {
303+
"facet": {
304+
"showOtherSeries": false
305+
},
306+
"legend": {
307+
"enabled": true
308+
},
309+
"markers": {
310+
"displayedTypes": {
311+
"criticalViolations": false,
312+
"deployments": true,
313+
"relatedDeployments": true,
314+
"warningViolations": false
315+
}
316+
},
280317
"nrqlQueries": [
281318
{
282319
"accountIds": [
283320
3321735
284321
],
285-
"query": "SELECT latest(endpoint_read_requests) FROM Metric TIMESERIES 1 MINUTES"
322+
"query": "SELECT rate(latest(endpoint_read_requests), 1 minutes) AS 'reads/sec' FROM Metric FACET db TIMESERIES 1 MINUTES"
286323
}
287-
]
324+
],
325+
"platformOptions": {
326+
"ignoreTimeRange": false
327+
},
328+
"thresholds": {
329+
"isLabelVisible": true
330+
},
331+
"yAxisLeft": {
332+
"zero": true
333+
},
334+
"yAxisRight": {
335+
"zero": true
336+
}
288337
}
289338
},
290339
{
@@ -300,18 +349,44 @@
300349
"id": "viz.line"
301350
},
302351
"rawConfiguration": {
352+
"facet": {
353+
"showOtherSeries": false
354+
},
355+
"legend": {
356+
"enabled": true
357+
},
358+
"markers": {
359+
"displayedTypes": {
360+
"criticalViolations": false,
361+
"deployments": true,
362+
"relatedDeployments": true,
363+
"warningViolations": false
364+
}
365+
},
303366
"nrqlQueries": [
304367
{
305368
"accountIds": [
306369
3321735
307370
],
308-
"query": "SELECT latest(endpoint_write_requests) FROM Metric TIMESERIES 1 MINUTES"
371+
"query": "SELECT rate(latest(endpoint_write_requests), 1 minute) AS 'writes/sec' FROM Metric FACET db TIMESERIES 1 MINUTES"
309372
}
310-
]
373+
],
374+
"platformOptions": {
375+
"ignoreTimeRange": false
376+
},
377+
"thresholds": {
378+
"isLabelVisible": true
379+
},
380+
"yAxisLeft": {
381+
"zero": true
382+
},
383+
"yAxisRight": {
384+
"zero": true
385+
}
311386
}
312387
}
313388
]
314389
}
315390
],
316391
"variables": []
317-
}
392+
}

0 commit comments

Comments
 (0)