Metrics
- Get metrics metadata for nodes
- Get metric metadata for node families
- Get metric historical data for a node
- Get metric historical data for a node family
- Get metric histogram for a node
- Get metric duration for a node
- Get metric meter for a node
- Get spiral metric for a node
- Get gauge info for a node
Get metrics metadata for nodes
Section titled “Get metrics metadata for nodes”Get metadata for all known metrics in the managed nodes. The metrics are put hierarchically into groups and the categories under which they are displayed in the web dashboard.
Definition
Section titled “Definition”GET /api/metric/metric-info/node/NODE_ID?tags=LISTOFTAGSExample request
Section titled “Example request”curl -X GET "http://127.0.0.1:8080/api/metric/metric-info/node/3fa56f92-3195-401b-93a8-7bc43e54d66f?tags=dev,op" -u admin:PASSWORDExample response
Section titled “Example response”{ "groups": [ { "name": "error_logger", "display": "error_logger metrics", "categories": [ { "display": "Error log notifications", "metrics": [ { "name": "'SASL error events'", "description": "SASL error events", "type": "counter", "display": "SASL error events", "unit": "numeric" }, { "name": "'SASL warning events'", "description": "SASL warning events", "type": "counter", "display": "SASL warning events", "unit": "numeric" }, {...}, {...}, {...} ] }, {...}, {...}, {...} ] }, { "name": "logger", "display": "logger metrics", "categories": [ { "display": "Logger Notifications", "metrics": [ { "name": "'Logger debug events'", "description": "Logger debug events", "type": "counter", "display": "Logger debug events", "unit": "numeric" }, { "name": "'Logger info events'", "description": "Logger info events", "type": "counter", "display": "Logger info events", "unit": "numeric" }, { "name": "'Logger warning events'", "description": "Logger warning events", "type": "counter", "display": "Logger warning events", "unit": "numeric" }, {...}, {...}, {...} ] }, {...}, {...}, {...} ] }, {...}, {...}, {...} ]}Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
| node ID | Required. The identifier of the node for which to retrieve metrics metadata. |
| tags | Optional. A comma separated list of tags that overrides the tags set for the user. |
Returns
Section titled “Returns”An array of metric groups, categories, and information about individual metrics that are tagged with any of the active tags. The “display” property is the text that is displayed in the web dashboard.
For each individual metric:
| Property | Description |
|---|---|
| name | The internal name of the metric. This name should be used in calls to retrieve data for specific individual metrics. |
| type | The type of metric, determining the call that should be used when retrieving data for that metric. |
| description | The description of the metric |
| display | The text displayed in the web dashboard. |
| unit | The metric’s unit of measurement. |
Get metric metadata for node families
Section titled “Get metric metadata for node families”Get metadata for all known metrics in node families.
Definition
Section titled “Definition”GET /api/metric/metric-info/node-family/NODE_FAMILY_ID?tags=LISTOFTAGSExample request
Section titled “Example request”curl -X GET "http://127.0.0.1:8080/api/metric/metric-info/node-family/93be4f01-dae6-49b0-9608-4552f841a720" \ -u admin:PASSWORDExample response
Section titled “Example response”See “Get metrics metadata for nodes”, above.
Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
| node family ID | Required. Description |
| tags | Optional. A comma separated list of tags that overrides the tags set for the user. |
Returns
Section titled “Returns”An array of metric groups, categories, and information about individual metrics that are tagged with any of the active tags.. The “display” property is the text that is displayed in the web dashboard.
For each individual metric:
| Property | Description |
|---|---|
| name | The internal name of the metric. This name should be used in calls to retrieve data for specific individual metrics. |
| type | The type of metric, determining the call that should be used when retrieving data for that metric. |
| description | The description of the metric |
| display | The text displayed in the web dashboard. |
| unit | The metric’s unit of measurement. |
Get metric historical data for a node
Section titled “Get metric historical data for a node”Retrieve the historical data for a specified node and a specified metric. The request needs to specify the series from which to query (see “Arguments”, below), as well as the time interval.
Definition
Section titled “Definition”GET /api/metric/history/node/NODE_ID/METRIC/SERIES?from=FROM&to=TOExample request
Section titled “Example request”curl -X GET "http://127.0.0.1:8080/api/metric/history/node/3fa56f92-3195-401b-93a8-7bc43e54d66f/total_memory/3?from=2014-07-31T00:00:00.000Z&to=2014-07-31T23:59:59.999Z" \ -u admin:PASSWORDExample response
Section titled “Example response”{ "data": [ { "time": "2014-07-31 12:40:40.000", "jstime": "1406810440000", "value": 50258288.0 }, { "time": "2014-07-31 12:55:40.000", "jstime": "1406811340000", "value": 43555390.4 } ]}Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
| node ID | Required. The identifier of the node for which to retrieve metrics data. |
| metric | Required. The name of the metric (see “Get metrics metadata…”, above). |
| series | Required. The numeric identifier of the series. 1 means the base sample data, 2 is the first consolidated series, and 3 is the second consolidated series. |
| from | Required. The start date and time of the samples. Combined date and time in ISO 8601 format. For example: 2014-07-31T00:00:00.000Z |
| to | Required. The end date and time of the samples. Combined date and time in ISO 8601 format. For example: 2014-07-31T23:59:59.999Z |
Returns
Section titled “Returns”A data property that contains an array of metric samples, each with the following details:
| Property | Description |
|---|---|
| time | The date and time of the sample. |
| jstime | The millisecond value of the date and time. |
| value | The value of the metric sample. |
Get metric historical data for a node family
Section titled “Get metric historical data for a node family”Retrieve the historical data for a specified node family and a specified metric. The request needs to specify the series from which to query (see “Arguments”, below), as well as the time interval.
Definition
Section titled “Definition”GET /api/metric/history/node-family/NODE_FAMILY_ID/METRIC/SERIES?from=FROM&to=TOExample request
Section titled “Example request”curl -X GET "http://127.0.0.1:8080/api/metric/history/node-family/93be4f01-dae6-49b0-9608-4552f841a720/total_memory/3?from=2014-07-31T00:00:00.000Z&to=2014-07-31T23:59:59.999Z" \ -u admin:PASSWORDExample response
Section titled “Example response”[ { "nodeId": "5b16ec55-56a3-4430-b174-c996897ccd14", "data": [ { "time": "2014-07-31 12:40:40.000", "jstime": "1406810440000", "value": 49912632.0 }, { "time": "2014-07-31 12:55:41.000", "jstime": "1406811341000", "value": 43825455 }, {...}, {...}, {...} ] }, { "nodeId": "3fa56f92-3195-401b-93a8-7bc43e54d66f", "data": [ { "time": "2014-07-31 12:40:40.000", "jstime": "1406810440000", "value": 50258288.0 }, { "time": "2014-07-31 12:55:41.000", "jstime": "1406811341000", "value": 43555233 }, {...}, {...}, {...} ] }]Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
| node family ID | Required. The identifier of the node family for which to retrieve metrics data. |
| metric | Required. The name of the metric (see “Get metrics metadata…”, above). |
| series | Required. The numeric identifier of the series. 1 means the base sample data, 2 is the first consolidated series, and 3 is the second consolidated series. |
| from | Required. The start date and time of the samples. Combined date and time in ISO 8601 format. For example: 2014-07-31T00:00:00.000Z |
| to | Required. The end date and time of the samples. Combined date and time in ISO 8601 format. For example: 2014-07-31T23:59:59.999Z |
Returns
Section titled “Returns”For each node, a data property that contains an array of metric samples, each with the following details:
| Property | Description |
|---|---|
| time | The date and time of the sample. |
| jstime | The millisecond value of the date and time. |
| value | The value of the metric sample. |
Get metric histogram for a node
Section titled “Get metric histogram for a node”Use this call to retrieve metric data for metrics of the type histogram (see “Get metrics metadata for a node”).
Definition
Section titled “Definition”GET /api/metric/histogram/node/NODE_ID/METRIC?from=FROM&to=TOExample request
Section titled “Example request”curl -X GET "http://127.0.0.1:8080/api/metric/histogram/node/3fa56f92-3195-401b-93a8-7bc43e54d66f/%7Bcpu,histogram%7D?from=2014-07-31T00:00:00.000Z&to=2014-07-31T23:59:59.999Z" \ -u admin:PASSWORDExample response
Section titled “Example response”{ "data": [ { "time": "2014-07-31 12:47:10.261", "jstime": "1406810830000", "value": { "min": 0, "max": 100, "arithmetic_mean": 51.00486381322957, "geometric_mean": 35.66788826103998, "harmonic_mean": 23.94843838939527, "median": 52, "variance": 1002.5579120554382, "standard_deviation": 31.663194912317966, "skewness": -0.053591991674156764, "kurtosis": -1.3019963450719712, "n": 1028, "percentiles": [ {"percentile": 50, "value": 52}, {"percentile": 75, "value": 79}, {"percentile": 90, "value": 93}, {"percentile": 95, "value": 98}, {"percentile": 99, "value": 100}, {"percentile": 999, "value": 100} ], "histogram": [ {"x": 11, "num": 146}, {"x": 22, "num": 106}, {"x": 40, "num": 176}, {"x": 50, "num": 74}, {"x": 60, "num": 81}, {"x": 70, "num": 103}, {"x": 80, "num": 91}, {"x": 90, "num": 107}, {"x": 100, "num": 144}, {"x": 110, "num": 0} ] } }, {...}, {...}, {...} ]}Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
| node ID | Required. The identifier of the node for which to retrieve metrics data. |
| metric | Required. The name of the metric (see “Get metrics metadata…”, above). |
| from | Required. The start date and time of the samples. Combined date and time in ISO 8601 format. For example: 2014-07-31T00:00:00.000Z |
| to | Required. The end date and time of the samples. Combined date and time in ISO 8601 format. For example: 2014-07-31T23:59:59.999Z |
Returns
Section titled “Returns”A data property that contains an array of metric samples within the specified time interval, each with the following details:
| Property | Description |
|---|---|
| time | The date and time of the sample. |
| jstime | The millisecond value of the date and time. |
| value | A data structure which provides the details of the data point. |
Get metric duration for a node
Section titled “Get metric duration for a node”Use this call to retrieve metric data for metrics of the type duration (see “Get metrics metadata for a node”).
Definition
Section titled “Definition”GET /api/metric/duration/node/NODE_ID/METRIC?from=FROM&to=TOExample request
Section titled “Example request”curl -X GET "http://127.0.0.1:8080/api/metric/duration/node/3fa56f92-3195-401b-93a8-7bc43e54d66f/%7Bhandle_req_duration%7D?from=2014-07-31T00:00:00.000Z&to=2014-07-31T23:59:59.999Z" \ -u admin:PASSWORDExample response
Section titled “Example response”{ "data": [ { "time": "2014-07-31 12:47:10.261", "jstime": "1406810830000", "value": { "count": 2567, "last": 34, "min": 0, "max": 100, "arithmetic_mean": 51.00486381322957, "geometric_mean": 35.66788826103998, "harmonic_mean": 23.94843838939527, "median": 52, "variance": 1002.5579120554382, "standard_deviation": 31.663194912317966, "skewness": -0.053591991674156764, "kurtosis": -1.3019963450719712, "n": 1028, "percentiles": [ {"percentile": 50, "value": 52}, {"percentile": 75, "value": 79}, {"percentile": 90, "value": 93}, {"percentile": 95, "value": 98}, {"percentile": 99, "value": 100}, {"percentile": 999, "value": 100} ], "histogram": [ {"x": 11, "num": 146}, {"x": 22, "num": 106}, {"x": 40, "num": 176}, {"x": 50, "num": 74}, {"x": 60, "num": 81}, {"x": 70, "num": 103}, {"x": 80, "num": 91}, {"x": 90, "num": 107}, {"x": 100, "num": 144}, {"x": 110, "num": 0} ] } }, {...}, {...}, {...} ]}Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
| node ID | Required. The identifier of the node for which to retrieve metrics data. |
| metric | Required. The name of the metric (see “Get metrics metadata…”, above). |
| from | Required. The start date and time of the samples. |
| to | Required. The end date and time of the samples. |
The from and to fields are combined date and time in ISO 8601 format. For example: 2014-07-31T23:59:59.999Z
Returns
Section titled “Returns”A data property that contains an array of metric samples within the specified time interval, each with the following details:
| Property | Description |
|---|---|
| time | The date and time of the sample. |
| jstime | The millisecond value of the date and time. |
| value | A data structure which provides the details of the data point. |
Get metric meter for a node
Section titled “Get metric meter for a node”Use this call of retrieving metric data for metrics of the type meter (see “Get metrics metadata for a node”).
Definition
Section titled “Definition”GET /api/metric/meter/node/NODE_ID/METRIC?from=FROM&to=TOExample request
Section titled “Example request”curl -X GET "http://127.0.0.1:8080/api/metric/meter/node/3fa56f92-3195-401b-93a8-7bc43e54d66f/%7Bcpu,meter%7D?from=2014-07-31T00:00:00.000Z&to=2014-07-31T23:59:59.999Z" \ -u admin:PASSWORDExample response
Section titled “Example response”{ "data": [ { "time": "2014-07-31 12:47:10.261", "jstime": "1406810830000", "value": { "one": "2.068", "five": "3.085", "fifteen": "2.993", "day": "2.226" } }, { "time": "2014-07-31 12:47:59.213", "jstime": "1406810879000", "value": { "one": "4693.918", "five": "1164.305", "fifteen": "403.433", "day": "6.443" } }, {...}, {...}, {...} ]}Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
| node ID | Required. The identifier of the node for which to retrieve metrics data. |
| metric | Required. The name of the metric (see “Get metrics metadata…”, above). |
| from | Required. The start date and time of the samples. Combined date and time in ISO 8601 format. For example: 2014-07-31T00:00:00.000Z |
| to | Required. The end date and time of the samples. Combined date and time in ISO 8601 format. For example: 2014-07-31T23:59:59.999Z |
Returns
Section titled “Returns”A data property that contains an array of metric samples within the specified time interval, each with the following details:
| Property | Description |
|---|---|
| time | The date and time of the sample. |
| jstime | The millisecond value of the date and time. |
| value | The data points at the given time. |
Get spiral metric for a node
Section titled “Get spiral metric for a node”Use this call of retrieving metric data for metrics of the type spiral (see “Get metrics metadata for a node”).
Definition
Section titled “Definition”GET /api/metric/spiral/node/NODE_ID/METRIC/SERIES?from=FROM&to=TOExample request
Section titled “Example request”curl -X GET "http://127.0.0.1:8080/api/metric/spiral/node/3fa56f92-3195-401b-93a8-7bc43e54d66f/%5Bcpu,duration%5D/2?from=2014-07-31T00:00:00.000Z&to=2014-07-31T23:59:59.999Z" \ -u admin:PASSWORDExample response
Section titled “Example response”{ "data": [ { "time": "2014-07-31 12:47:13.754", "jstime": "1406810833000", "value": { "count": 305076, "one": 38554 } }, { "time": "2014-07-31 12:48:01.240", "jstime": "1406810881000", "value": { "count": 737557, "one": 461738 } }, {...}, {...}, {...} ]}Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
| node ID | Required. The identifier of the node for which to retrieve metrics data. |
| metric | Required. The name of the metric (see “Get metrics metadata…”, above). |
| Series | Optional. The numeric identifier of the series. 1 means the base sample data, 2 is the first consolidated series, and 3 is the second consolidated series. The default value is 1. |
| from | Required. The start date and time of the samples. Combined date and time in ISO 8601 format. For example: 2014-07-31T00:00:00.000Z |
| to | Required. The end date and time of the samples. Combined date and time in ISO 8601 format. For example: 2014-07-31T23:59:59.999Z |
Returns
Section titled “Returns”A data property that contains an array of metric samples within the specified time interval, each with the following details:
| Property | Description |
|---|---|
| time | The date and time of the sample. |
| jstime | The millisecond value of the date and time. |
| value | The data points at the given time. |
Get gauge info for a node
Section titled “Get gauge info for a node”Retrieve the current configuration of gauges shown on the web dashboard.
Definition
Section titled “Definition”GET /api/metric/gauge-info/node/NODE_IDExample request
Section titled “Example request”curl -X GET "http://127.0.0.1:8080/api/metric/gauge-info/node/3fa56f92-3195-401b-93a8-7bc43e54d66f" \ -u admin:PASSWORDExample response
Section titled “Example response”{ "gauges": [ { "name": "total_memory", "min_value": 10000000, "max_value": 30000000 } ]}Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
| node ID | Required. The identifier of the node for which to retrieve gauge details. |
Returns
Section titled “Returns”An array containing each gauge’s name, minimum value, and maximum value.
