-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add isAccountBalanceBelowMinimum to client * add 12 hours interval to balance report * if no threshold file, default to zero * remove unused import * group metrics to file * get balance metric every 30min * excessive line spacer * remove typo
- Loading branch information
Showing
3 changed files
with
43 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
const promclient = require("prom-client"); | ||
|
||
// Collect default metrics | ||
const collectDefaultMetrics = promclient.collectDefaultMetrics; | ||
const register = new promclient.Registry(); | ||
collectDefaultMetrics({ | ||
app: 'sentinel-monitoring-app', | ||
timeout: 10000, | ||
gcDurationBuckets: [0.001, 0.01, 0.1, 1, 2, 5], | ||
register | ||
}); | ||
|
||
const accountBalanceGauge = new promclient.Gauge({ | ||
name: 'sentinel_account_balance', | ||
help: 'Current balance of the Sentinel account' | ||
}); | ||
|
||
// Register your custom metrics | ||
register.registerMetric(accountBalanceGauge); | ||
|
||
module.exports = { | ||
register, | ||
accountBalanceGauge | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters