Files

1199 lines
38 KiB
HTML
Raw Permalink Normal View History

2026-11-17 16:15:01 -05:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>metrics - Documentation</title>
<script src="scripts/prettify/prettify.js"></script>
<script src="scripts/prettify/lang-css.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
</head>
<body>
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
<div class="navicon"></div>
</label>
<label for="nav-trigger" class="overlay"></label>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="Actions.html">Actions</a><ul class='methods'><li data-type='method'><a href="Actions.html#triggerAction">triggerAction</a></li><li data-type='method'><a href="Actions.html#triggerPM2Action">triggerPM2Action</a></li><li data-type='method'><a href="Actions.html#triggerScopedAction">triggerScopedAction</a></li></ul></li><li><a href="Auth.html">Auth</a><ul class='methods'><li data-type='method'><a href="Auth.html#register">register</a></li><li data-type='method'><a href="Auth.html#revoke">revoke</a></li></ul></li><li><a href="Bucket.html">Bucket</a><ul class='methods'><li data-type='method'><a href="Bucket.html#claimTrial">claimTrial</a></li><li data-type='method'><a href="Bucket.html#destroy">destroy</a></li><li data-type='method'><a href="Bucket.html#removeInvitation">removeInvitation</a></li><li data-type='method'><a href="Bucket.html#removeUser">removeUser</a></li><li data-type='method'><a href="Bucket.html#retrieveCharges">retrieveCharges</a></li><li data-type='method'><a href="Bucket.html#sendFeedback">sendFeedback</a></li><li data-type='method'><a href="Bucket.html#setNotificationState">setNotificationState</a></li><li data-type='method'><a href="Bucket.html#setUserRole">setUserRole</a></li><li data-type='method'><a href="Bucket.html#transferOwnership">transferOwnership</a></li><li data-type='method'><a href="Bucket.html#update">update</a></li><li data-type='method'><a href="Bucket.html#updateUserOptions">updateUserOptions</a></li></ul></li><li><a href="Bucket.alert.html">alert</a><ul class='methods'><li data-type='method'><a href="Bucket.alert.html#create">create</a></li><li data-type='method'><a href="Bucket.alert.html#delete">delete</a></li><li data-type='method'><a href="Bucket.alert.html#deleteEvent">deleteEvent</a></li><li data-type='method'><a href="Bucket.alert.html#get">get</a></li><li data-type='method'><a href="Bucket.alert.html#list">list</a></li><li data-type='method'><a href="Bucket.alert.html#sendReport">sendReport</a></li><li data-type='method'><a href="Bucket.alert.html#triggerSample">triggerSample</a></li><li data-type='method'><a href="Bucket.alert.html#update">update</a></li><li data-type='method'><a href="Bucket.alert.html#updateAlert">updateAlert</a></li><li data-type='method'><a href="Bucket.alert.html#updateSlack">updateSlack</a></li><li data-type='method'><a href="Bucket.alert.html#updateWebhooks">updateWebhooks</a></li></ul></li><li><a href="Bucket.alert.analyzer.html">analyzer</a><ul class='methods'><li data-type='method'><a href="Bucket.alert.analyzer.html#editState">editState</a></li><li data-type='method'><a href="Bucket.alert.analyzer.html#list">list</a></li><li data-type='method'><a href="Bucket.alert.analyzer.html#updateConfig">updateConfig</a></li></ul></li><li><a href="Bucket.application.html">application</a><ul class='methods'><li data-type='method'><a href="Bucket.application.html#create">create</a></li><li data-type='method'><a href="Bucket.application.html#delete">delete</a></li><li data-type='method'><a href="Bucket.application.html#get">get</a></li><li data-type='method'><a href="Bucket.application.html#getPreview">getPreview</a></li><li data-type='method'><a href="Bucket.application.html#getReports">getReports</a></li><li data-type='method'><a href="Bucket.application.html#list">list</a></li><li data-type='method'><a href="Bucket.application.html#update">update</a></li></ul></li><li><a href="Bucket.billing.html">billing</a><ul class='methods'><li data-type='method'><a href="Bucket.billing.html#attachBankAccount">attachBankAccount</a></li><li data-type='method'><a href="Bucket.billing.html#attachCreditCard">attachCreditCard</a></li><li data-type='method'><a href="Bucket.billing.html#deleteBankAccount">deleteBankAccount</a></li><li data-type='method'><a href="Bucket.billing.html#deleteCreditCard">deleteCreditCard</a></li><li data-type='method'><a href="Bucket.billing.html#fetchBankAccount">fetchBankAccount</a></li><li data-type='method'><a href="Bucket.billing.html#fetchCreditCard">fetchCreditCard</a>
</nav>
<div id="main">
<h1 class="page-title">metrics</h1>
<section>
<header>
<h2>
metrics
</h2>
</header>
<article>
<div class="container-overview">
<dl class="details">
</dl>
</div>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="retrieveAggregations"><span class="type-signature">(route) </span>retrieveAggregations<span class="signature">(:id)</span><span class="type-signature"></span></h4>
<dl class="details">
</dl>
<div class="description">
<h5>Route:</h5>
<table class="params">
<thead><tr><th>Method</th><th class="last">Path</th></tr></thead>
<tr>
<td class="type">POST</td>
<td class="name last">/api/bucket/:id/data/metrics/aggregations</td>
</tr>
</table>
Retrieve metrics aggregations
<h5>Authentication</h5>
<p>A authentication is needed to access this endpoint</p>
<h5>Body Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">aggregations</td>
<td class="type">Object</td>
<td class="attributes"></td>
<td class="description last">array of aggregations to compute</td>
</tr><tr>
<td class="name">aggregations[].start</td>
<td class="type">Date</td>
<td class="attributes">optional</td>
<td class="description last">oldest documents to aggregate on</td>
</tr><tr>
<td class="name">aggregations[].end</td>
<td class="type">Date</td>
<td class="attributes">optional</td>
<td class="description last">newest documents to aggregate on</td>
</tr><tr>
<td class="name">aggregations[].interval</td>
<td class="type">Number</td>
<td class="attributes">optional</td>
<td class="description last">interval between two points</td>
</tr><tr>
<td class="name">aggregations[].name</td>
<td class="type">String</td>
<td class="attributes">optional</td>
<td class="description last">the name of metric to compute the graph</td>
</tr><tr>
<td class="name">aggregations[].servers</td>
<td class="type">Array</td>
<td class="attributes">optional</td>
<td class="description last">filter source server to aggregate on</td>
</tr><tr>
<td class="name">aggregations[].apps</td>
<td class="type">Array</td>
<td class="attributes">optional</td>
<td class="description last">filter source applications to aggregate on</td>
</tr><tr>
<td class="name">aggregations[].initiator</td>
<td class="type">String</td>
<td class="attributes">optional</td>
<td class="description last">filter source initiator to aggregate on</td>
</tr><tr>
<td class="name">aggregations[].webcheck</td>
<td class="type">String</td>
<td class="attributes">optional</td>
<td class="description last">filter source webcheck to aggregate on</td>
</tr><tr>
<td class="name">aggregations[].collector</td>
<td class="type">String</td>
<td class="attributes">optional</td>
<td class="description last">filter source collector to aggregate on</td>
</tr><tr>
<td class="name">aggregations[].tags</td>
<td class="type">Array</td>
<td class="attributes">optional</td>
<td class="description last">filter tags to aggregate on</td>
</tr><tr>
<td class="name">aggregations[].types</td>
<td class="type">Array</td>
<td class="attributes">optional</td>
<td class="description last">type of aggregation</td>
</tr>
</table>
<h5>Header Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">Authorization</td>
<td class="type">String</td>
<td class="description last">bearer access token issued for the user</td>
</tr>
</table>
<h5>Route Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">:id</td>
<td class="type">String</td>
<td class="description last">bucket id</td>
</tr>
</table>
<h5>Response:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">.</td>
<td class="type">Array</td>
<td class="description last">aggregations</td>
</tr>
</table>
<h5>Response Code:</h5>
<table class="params">
<thead>
<tr>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="type">500</td>
<td class="description last">database error</td>
</tr><tr>
<td class="type">200</td>
<td class="description last">succesfully retrieved data</td>
</tr>
</table>
</div>
<h5>Example</h5>
<pre class="prettyprint"><code>km.data.metrics.retrieveAggregations(bucket._id, {
aggregations: [
{
'end': 'now-1d',
'apps': ['INTERACTION', 'WEB-API', 'WORKER'],
'types': ['histogram', 'apps', 'servers'],
'name': 'HTTP'
}
]
})</code></pre>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>:id</code></td>
<td class="type">
</td>
<td class="description last">bucket id</td>
</tr>
</tbody>
</table>
<h4 class="name" id="retrieveHistogram"><span class="type-signature">(route) </span>retrieveHistogram<span class="signature">(:id)</span><span class="type-signature"></span></h4>
<dl class="details">
</dl>
<div class="description">
<h5>Route:</h5>
<table class="params">
<thead><tr><th>Method</th><th class="last">Path</th></tr></thead>
<tr>
<td class="type">POST</td>
<td class="name last">/api/bucket/:id/data/metrics/histogram</td>
</tr>
</table>
Retrieve metrics histograms (DEPRECATED)
<h5>Authentication</h5>
<p>A authentication is needed to access this endpoint</p>
<h5>Body Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">app_name</td>
<td class="type">String</td>
<td class="attributes">optional</td>
<td class="default"></td>
<td class="description last">filter probes by app source</td>
</tr><tr>
<td class="name">server_name</td>
<td class="type">String</td>
<td class="attributes">optional</td>
<td class="default"></td>
<td class="description last">filter probes by server source</td>
</tr><tr>
<td class="name">interval</td>
<td class="type">String</td>
<td class="attributes">optional</td>
<td class="default">minute</td>
<td class="description last">interval of time between two point</td>
</tr><tr>
<td class="name">before</td>
<td class="type">String</td>
<td class="attributes">optional</td>
<td class="default">60</td>
<td class="description last">filter out probes that are after X minute</td>
</tr>
</table>
<h5>Header Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">Authorization</td>
<td class="type">String</td>
<td class="description last">bearer access token issued for the user</td>
</tr>
</table>
<h5>Route Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">:id</td>
<td class="type">String</td>
<td class="description last">bucket id</td>
</tr>
</table>
<h5>Response:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">server_name</td>
<td class="type">Object</td>
<td class="description last"></td>
</tr><tr>
<td class="name">server_name.app_name</td>
<td class="type">Object</td>
<td class="description last"></td>
</tr><tr>
<td class="name">server_name.app_name.metrics</td>
<td class="type">Object</td>
<td class="description last"></td>
</tr><tr>
<td class="name">server_name.app_name.metrics.agg_type</td>
<td class="type">String</td>
<td class="description last">the type of aggregation for this probe</td>
</tr><tr>
<td class="name">server_name.app_name.metrics_name.timestamps_and_stats</td>
<td class="type">Array</td>
<td class="description last">array of point</td>
</tr>
</table>
<h5>Response Code:</h5>
<table class="params">
<thead>
<tr>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="type">500</td>
<td class="description last">database error</td>
</tr><tr>
<td class="type">200</td>
<td class="description last">succesfully retrieved data</td>
</tr>
</table>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>:id</code></td>
<td class="type">
</td>
<td class="description last">bucket id</td>
</tr>
</tbody>
</table>
<h4 class="name" id="retrieveList"><span class="type-signature">(route) </span>retrieveList<span class="signature">(:id)</span><span class="type-signature"></span></h4>
<dl class="details">
</dl>
<div class="description">
<h5>Route:</h5>
<table class="params">
<thead><tr><th>Method</th><th class="last">Path</th></tr></thead>
<tr>
<td class="type">POST</td>
<td class="name last">/api/bucket/:id/data/metrics/list</td>
</tr>
</table>
Retrieve metrics list
<h5>Authentication</h5>
<p>A authentication is needed to access this endpoint</p>
<h5>Body Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">servers</td>
<td class="type">Object</td>
<td class="attributes">optional</td>
<td class="description last">filter metrics by app name</td>
</tr><tr>
<td class="name">apps</td>
<td class="type">Object</td>
<td class="attributes">optional</td>
<td class="description last">filter metrics by server name</td>
</tr><tr>
<td class="name">initiator</td>
<td class="type">String</td>
<td class="attributes">optional</td>
<td class="description last">filter metrics by a specific initiator</td>
</tr><tr>
<td class="name">source</td>
<td class="type">String</td>
<td class="attributes">optional</td>
<td class="description last">filter metrics by a specific source</td>
</tr><tr>
<td class="name">collector</td>
<td class="type">String</td>
<td class="attributes">optional</td>
<td class="description last">filter metrics by a specific collector</td>
</tr><tr>
<td class="name">webcheck</td>
<td class="type">String</td>
<td class="attributes">optional</td>
<td class="description last">filter metrics by a specific webcheck</td>
</tr>
</table>
<h5>Header Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">Authorization</td>
<td class="type">String</td>
<td class="description last">bearer access token issued for the user</td>
</tr>
</table>
<h5>Route Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">:id</td>
<td class="type">String</td>
<td class="description last">bucket id</td>
</tr>
</table>
<h5>Response Code:</h5>
<table class="params">
<thead>
<tr>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="type">500</td>
<td class="description last">database error</td>
</tr><tr>
<td class="type">200</td>
<td class="description last">succesfully retrieved data</td>
</tr>
</table>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>:id</code></td>
<td class="type">
</td>
<td class="description last">bucket id</td>
</tr>
</tbody>
</table>
<h4 class="name" id="retrieveMetadatas"><span class="type-signature">(route) </span>retrieveMetadatas<span class="signature">(:id)</span><span class="type-signature"></span></h4>
<dl class="details">
</dl>
<div class="description">
<h5>Route:</h5>
<table class="params">
<thead><tr><th>Method</th><th class="last">Path</th></tr></thead>
<tr>
<td class="type">POST</td>
<td class="name last">/api/bucket/:id/data/metrics</td>
</tr>
</table>
Retrieve metrics name
<h5>Authentication</h5>
<p>A authentication is needed to access this endpoint</p>
<h5>Body Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">app_name</td>
<td class="type">String</td>
<td class="attributes"></td>
<td class="default"></td>
<td class="description last">filter metrics by app source</td>
</tr><tr>
<td class="name">server_name</td>
<td class="type">String</td>
<td class="attributes">optional</td>
<td class="default"></td>
<td class="description last">filter metrics by server source</td>
</tr><tr>
<td class="name">before</td>
<td class="type">String</td>
<td class="attributes">optional</td>
<td class="default">720</td>
<td class="description last">filter out metrics that are after X minute</td>
</tr>
</table>
<h5>Header Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">Authorization</td>
<td class="type">String</td>
<td class="description last">bearer access token issued for the user</td>
</tr>
</table>
<h5>Route Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">:id</td>
<td class="type">String</td>
<td class="description last">bucket id</td>
</tr>
</table>
<h5>Response Code:</h5>
<table class="params">
<thead>
<tr>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="type">500</td>
<td class="description last">database error</td>
</tr><tr>
<td class="type">200</td>
<td class="description last">succesfully retrieved data</td>
</tr>
</table>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>:id</code></td>
<td class="type">
</td>
<td class="description last">bucket id</td>
</tr>
</tbody>
</table>
</article>
</section>
</div>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Jun 13 2019 12:24:19 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>
<script>prettyPrint();</script>
<script src="scripts/linenumber.js"></script>
</body>
</html>