You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 2, 2021. It is now read-only.
Copy file name to clipboardExpand all lines: README.rst
+54-1Lines changed: 54 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,7 @@ NewRelic platform. Currently supported backend systems are:
15
15
- pgBouncer
16
16
- PHP FPM
17
17
- PostgreSQL
18
+
- Prometheus
18
19
- RabbitMQ
19
20
- Redis
20
21
- Riak
@@ -80,7 +81,7 @@ On Ubuntu systems 16.04 and newer, you can try running ``systemctl enable newrel
80
81
Installing Additional Requirements
81
82
----------------------------------
82
83
83
-
To use the MongoDB the ``mongodb`` library is required. For the pgBouncer or PostgreSQL plugin you must install the ``psycopg2`` library. To easily do
84
+
To use the MongoDB the ``mongodb`` library is required. For the pgBouncer or PostgreSQL plugin you must install the ``psycopg2`` library. For the prometheus plugin you must install the ``prometheus_client`` library. To easily do
84
85
this, make sure you have the latest version of ``pip`` installed (https://pip.pypa.io/). This should be done after installing the agent itself:
85
86
86
87
::
@@ -95,6 +96,10 @@ or::
95
96
96
97
$ pip install newrelic-python-agent[postgresql]
97
98
99
+
or::
100
+
101
+
$ pip install newrelic-python-agent[prometheus]
102
+
98
103
If this does not work for you, make sure you are running a recent copy of ``pip`` (>= 1.3).
99
104
100
105
Plugin Configuration Stanzas
@@ -313,6 +318,46 @@ E.g.:
313
318
superuser: False
314
319
relation_stats: False
315
320
321
+
Prometheus Installation Notes
322
+
------------------------
323
+
You can monitor any prometheus exporter endpoint via http/https.
324
+
Prometheus samples are named by their name and their labels.
325
+
E.g. ``http_requests_total{job="apiserver", status=200}`` becomes ``http_requests_total/job/apiserver/status/200``
326
+
327
+
By default all samples are added as derive values. To treat a sample as gauge value you can use the ``gauges`` configuration value.
328
+
E.g.:
329
+
330
+
::
331
+
332
+
prometheus:
333
+
- name: my-go-app
334
+
scheme: http
335
+
host: localhost
336
+
port: 8080
337
+
gauges:
338
+
- go_threads
339
+
340
+
Furthermore the plugin allows you to include and exclude certain samples by their name.
341
+
If the ``include`` configuration parameter is not set, all samples are included (except for excluded ones).
342
+
If the ``include`` configuration parameter is set, only those samples are included.
343
+
If the ``exclude`` configuration parameter is set, those samples are excluded (even if they are listed in the ``include`` configuration parameter).
344
+
E.g.:
345
+
346
+
::
347
+
348
+
prometheus:
349
+
- name: my-go-app
350
+
scheme: http
351
+
host: localhost
352
+
port: 8080
353
+
include:
354
+
- go_threads
355
+
- go_info
356
+
exclude:
357
+
- go_info
358
+
359
+
If you are monitoring a prometheus exporter via a HTTPS connection you can use the ``verify_ssl_cert`` configuration value to disable SSL certificate verification.
360
+
316
361
RabbitMQ Installation Notes
317
362
---------------------------
318
363
The user specified must have access to all virtual hosts you wish to monitor and should have either the Administrator tag or the Monitoring tag.
0 commit comments