This guide explains how to send performance metrics about the inmanta server to influxdb.
The inmanta server has a built-in pyformance instrumentation for all API endpoints and supports sending the results to influxdb.
To enable performance reporting, set the options as found under
influxdb in the server
[influxdb] # The hostname of the influxdb server host = localhost # The port of the influxdb server port = 8086 # The name of the database on the influxdb server name = inmanta tags= environment=prod,az=a
To install influxdb, follow the instructions found at docs.influxdata.com.
Create a database to send the data to:
influx CREATE DATABASE inmanta
Update the inmanta config file, add the following block
[influxdb] # The hostname of the influxdb server host = localhost # The port of the influxdb server port = 8086 # The name of the database on the influxdb server name = inmanta
Restart the inmanta server.
[optional] install grafana, follow the instructions found at https://grafana.com/grafana/download
[optional] load the inmanta dashboard found at https://grafana.com/dashboards/10089
This section assumes familiarity with influxdb. See here.
All API metrics are reported under the measurement metrics.
The API endpoint is attached as a tag called key. The API endpoint is reported as the server method, to know which url corresponds to which method, please consult methods.py.
The fields available for each API endpoint are (cfr metrics timer):
|15m_rate||float||fifteen-minute exponentially-weighted moving average of the request rate|
|5m_rate||float||five-minute exponentially-weighted moving average of the request rate|
|1m_rate||float||one-minute exponentially-weighted moving average of the request rate|
|mean_rate||float||mean of the request rate|
|min||float||minimal observed request latency|
|50_percentile||float||median (50 percentile) observed request latency|
|75_percentile||float||75 percentile observed request latency|
|95_percentile||float||95 percentile observed request latency|
|99_percentile||float||99 percentile observed request latency|
|999_percentile||float||999 percentile observed request latency|
|max||float||maximal observed request latency|
|avg||float||average observed latency|
|std_dev||float||standard deviation of the observed latency|
|count||float||number of calls seen since server start|
|sum||float||total wall-time spent executing this call since server start|