Methods
(route) retrieveAggregations(:id)
Route:
Method | Path |
POST |
/api/bucket/:id/data/metrics/aggregations |
Retrieve metrics aggregations
Authentication
A authentication is needed to access this endpoint
Body Parameters:
Name |
Type |
Attributes |
Description |
aggregations |
Object |
|
array of aggregations to compute |
aggregations[].name |
String |
|
the name of metric to compute the graph |
aggregations[].types |
Array |
|
type of aggregation (e.g. ['histogram', 'servers']) |
aggregations[].start |
Date |
|
oldest documents to aggregate on |
aggregations[].end |
Date |
optional |
newest documents to aggregate on |
aggregations[].apps |
Array |
optional |
filter source applications to aggregate on |
aggregations[].interval |
Number |
optional |
interval between two points |
aggregations[].servers |
Array |
optional |
filter source server to aggregate on |
aggregations[].initiator |
String |
optional |
filter source initiator to aggregate on |
aggregations[].webcheck |
String |
optional |
filter source webcheck to aggregate on |
aggregations[].collector |
String |
optional |
filter source collector to aggregate on |
aggregations[].tags |
Array |
optional |
filter tags to aggregate on |
Header Parameters:
Name |
Type |
Description |
Authorization |
String |
bearer access token issued for the user |
Route Parameters:
Name |
Type |
Description |
:id |
String |
bucket id |
Response:
Name |
Type |
Description |
. |
Array |
aggregations |
Response Code:
Type |
Description |
500 |
database error |
200 |
succesfully retrieved data |
Example
// Example #1: Retrieve HTTP metrics of app INTERACTION, WEB-API, WORKER from all servers
km.data.metrics.retrieveAggregations(bucket._id, {
aggregations: [
{
'start': 'now-5m',
'apps': ['INTERACTION', 'WEB-API', 'WORKER'],
'types': ['histogram', 'apps', 'servers'],
'name': 'HTTP'
}
]
})
// Example #2: Retrieve HTTP metrics of ALL apps from all servers
km.data.metrics.retrieveAggregations(bucket._id, {
aggregations: [
{
'start': 'now-1d',
'types': ['histogram', 'apps', 'servers'],
'name': 'HTTP'
}
]
})
Parameters:
Name |
Type |
Description |
:id |
|
bucket id |
(route) retrieveHistogram(:id)
Route:
Method | Path |
POST |
/api/bucket/:id/data/metrics/histogram |
Retrieve metrics histograms (DEPRECATED)
Authentication
A authentication is needed to access this endpoint
Body Parameters:
Name |
Type |
Attributes |
Default |
Description |
app_name |
String |
optional |
|
filter probes by app source |
server_name |
String |
optional |
|
filter probes by server source |
interval |
String |
optional |
minute |
interval of time between two point |
before |
String |
optional |
60 |
filter out probes that are after X minute |
Header Parameters:
Name |
Type |
Description |
Authorization |
String |
bearer access token issued for the user |
Route Parameters:
Name |
Type |
Description |
:id |
String |
bucket id |
Response:
Name |
Type |
Description |
server_name |
Object |
|
server_name.app_name |
Object |
|
server_name.app_name.metrics |
Object |
|
server_name.app_name.metrics.agg_type |
String |
the type of aggregation for this probe |
server_name.app_name.metrics_name.timestamps_and_stats |
Array |
array of point |
Response Code:
Type |
Description |
500 |
database error |
200 |
succesfully retrieved data |
Parameters:
Name |
Type |
Description |
:id |
|
bucket id |
(route) retrieveHistogramPrecise(:id)
Route:
Method | Path |
POST |
/api/bucket/:id/data/metrics/histogramPrecise |
Pass probe, app, server and get meaningful data for your metric
Authentication
A authentication is needed to access this endpoint
Body Parameters:
Name |
Type |
Attributes |
Description |
probe |
String |
|
probe name |
app |
String |
|
filter probes by app source |
server |
String |
|
filter probes by server source |
after |
String |
optional |
interval of time between two point (now-5d, now-5m...) |
Header Parameters:
Name |
Type |
Description |
Authorization |
String |
bearer access token issued for the user |
Route Parameters:
Name |
Type |
Description |
:id |
String |
bucket id |
Response:
Name |
Type |
Description |
Array |
Array |
of points |
Response Code:
Type |
Description |
500 |
database error |
200 |
succesfully retrieved data |
Parameters:
Name |
Type |
Description |
:id |
|
bucket id |
(route) retrieveList(:id)
Route:
Method | Path |
POST |
/api/bucket/:id/data/metrics/list |
Retrieve metrics list
Authentication
A authentication is needed to access this endpoint
Body Parameters:
Name |
Type |
Attributes |
Description |
servers |
Object |
optional |
filter metrics by app name |
apps |
Object |
optional |
filter metrics by server name |
initiator |
String |
optional |
filter metrics by a specific initiator |
source |
String |
optional |
filter metrics by a specific source |
collector |
String |
optional |
filter metrics by a specific collector |
webcheck |
String |
optional |
filter metrics by a specific webcheck |
Header Parameters:
Name |
Type |
Description |
Authorization |
String |
bearer access token issued for the user |
Route Parameters:
Name |
Type |
Description |
:id |
String |
bucket id |
Response Code:
Type |
Description |
500 |
database error |
200 |
succesfully retrieved data |
Parameters:
Name |
Type |
Description |
:id |
|
bucket id |
Route:
Method | Path |
POST |
/api/bucket/:id/data/metrics |
Retrieve metrics name
Authentication
A authentication is needed to access this endpoint
Body Parameters:
Name |
Type |
Attributes |
Default |
Description |
app_name |
String |
|
|
filter metrics by app source |
server_name |
String |
optional |
|
filter metrics by server source |
before |
String |
optional |
720 |
filter out metrics that are after X minute |
Header Parameters:
Name |
Type |
Description |
Authorization |
String |
bearer access token issued for the user |
Route Parameters:
Name |
Type |
Description |
:id |
String |
bucket id |
Response Code:
Type |
Description |
500 |
database error |
200 |
succesfully retrieved data |
Parameters:
Name |
Type |
Description |
:id |
|
bucket id |