1.0.4 • Published 5 years ago
statscloud.io-plugin-system-monitor v1.0.4
statscloud.io system-monitor plugin for node.js
Installation
You can install plugin as usual npm package:
npm install --save statscloud.io-nodejs-plugin-system-monitor
Usage
To use this plugin, just add it to plugins
section in .statscloud.json
file:
{
...
"plugins": [
"system-monitor"
]
}
You can customize plugin settings as well:
{
...
"plugins": [
{
"name": "system-monitor",
"settings": {
"collectIntervalInSeconds": 10, // interval to collect metrics in seconds, default value is 10
"flushIntervalInSeconds": 60, // how often to capture the metric values, default value is specified in .statscloud.json on top level
"retention": [ // how long to store metrics for and at which granularity, default value is specified in .statscloud.json on top level
{
"frequency": "1m",
"keep": "3d"
}
],
"intervals": ["1m"], // interval to count metrics during, default value is ["1m"]
"enableAlerts": false, // you can enable or disable alerts, default value is false
"admins": [], // list of admin names no notify about plugin alerts, default value is an empty array
"channels": [], // list of channels to send notifications via, default value is an empty array
"alertsRepeatInterval": "15m", // how often to repeat the alerts, default value is "15m"
"alertsUnhealthyDelay": "5m", // how much time the metric is allowed to stay in unhealthy zone before alert is raised, default value is "5m"
"alertsHealthyDelay": "2m", // how much time the metric should stay in healthy zone before alert is removed, default value is "2m"
"alerts": { // you can specify settings for each alert
"memory-percent-overlimit": { // alert that raised when memory usage overruns limit
"enabled": true, // enable this alert, default value is taken from enableAlerts setting from top-level plugin configuration
"threshold": 80, // max memory usage in percent, default value is 80
"repeatInterval": "15m", // how often to repeat the alerts, default value is taken from alertsRepeatInterval setting from top-level plugin configuration
"unhealthyDelay": "5m", // how much time the metric is allowed to stay in unhealthy zone before alert is raised, default value is taken from alertsUnhealthyDelay setting from top-level plugin configuration
"healthyDelay": "2m", // how much time the metric should stay in healthy zone before alert is removed, default value is taken from alertsHealthyDelay setting from top-level plugin configuration
"admins": [], // list of admin names no notify about this alert, default value is taken from admins setting from top-level plugin configuration
"channels": [] // list of channels to send notifications via, default value is taken from channels setting from top-level plugin configuration
},
"cpu-percent-overlimit": { // alert that raised when cpu usage overruns limit
"enabled": true, // enable this alert, default value is taken from enableAlerts setting from top-level plugin configuration
"threshold": 70 // max cpu usage in percent, default value is 70
"repeatInterval": "15m", // how often to repeat the alerts, default value is taken from alertsRepeatInterval setting from top-level plugin configuration
"unhealthyDelay": "5m", // how much time the metric is allowed to stay in unhealthy zone before alert is raised, default value is taken from alertsUnhealthyDelay setting from top-level plugin configuration
"healthyDelay": "2m", // how much time the metric should stay in healthy zone before alert is removed, default value is taken from alertsHealthyDelay setting from top-level plugin configuration
"admins": [], // list of admin names no notify about this alert, default value is taken from admins setting from top-level plugin configuration
"channels": [] // list of channels to send notifications via, default value is taken from channels setting from top-level plugin configuration
},
"disk-belowlimit": { // alert that raised when disk free space is too low
"enabled": true, // enable this alert, default value is taken from enableAlerts setting from top-level plugin configuration
"threshold": 1 // min disk free space in Gb, default value is 1
"repeatInterval": "15m", // how often to repeat the alerts, default value is taken from alertsRepeatInterval setting from top-level plugin configuration
"unhealthyDelay": "5m", // how much time the metric is allowed to stay in unhealthy zone before alert is raised, default value is taken from alertsUnhealthyDelay setting from top-level plugin configuration
"healthyDelay": "2m", // how much time the metric should stay in healthy zone before alert is removed, default value is taken from alertsHealthyDelay setting from top-level plugin configuration
"admins": [], // list of admin names no notify about this alert, default value is taken from admins setting from top-level plugin configuration
"channels": [] // list of channels to send notifications via, default value is taken from channels setting from top-level plugin configuration
},
"disk-percent-overlimit": { // alert that raised when disk usage overruns limit
"enabled": true, // enable this alert, default value is taken from enableAlerts setting from top-level plugin configuration
"threshold": 90 // max disk usage in percent, default value is 90
"repeatInterval": "15m", // how often to repeat the alerts, default value is taken from alertsRepeatInterval setting from top-level plugin configuration
"unhealthyDelay": "5m", // how much time the metric is allowed to stay in unhealthy zone before alert is raised, default value is taken from alertsUnhealthyDelay setting from top-level plugin configuration
"healthyDelay": "2m", // how much time the metric should stay in healthy zone before alert is removed, default value is taken from alertsHealthyDelay setting from top-level plugin configuration
"admins": [], // list of admin names no notify about this alert, default value is taken from admins setting from top-level plugin configuration
"channels": [] // list of channels to send notifications via, default value is taken from channels setting from top-level plugin configuration
},
"battery-belowlimit": { // alert that raised when battery is too low
"enabled": true, // enable this alert, default value is taken from enableAlerts setting from top-level plugin configuration
"threshold": 10 // min battery percent value, default value is 10
"repeatInterval": "15m", // how often to repeat the alerts, default value is taken from alertsRepeatInterval setting from top-level plugin configuration
"unhealthyDelay": "5m", // how much time the metric is allowed to stay in unhealthy zone before alert is raised, default value is taken from alertsUnhealthyDelay setting from top-level plugin configuration
"healthyDelay": "2m", // how much time the metric should stay in healthy zone before alert is removed, default value is taken from alertsHealthyDelay setting from top-level plugin configuration
"admins": [], // list of admin names no notify about this alert, default value is taken from admins setting from top-level plugin configuration
"channels": [] // list of channels to send notifications via, default value is taken from channels setting from top-level plugin configuration
},
"system-load-overlimit": { // alert that raised when system load overruns limit
"enabled": true, // enable this alert, default value is taken from enableAlerts setting from top-level plugin configuration
"threshold": 2 // max system load, default value is 2
"repeatInterval": "15m", // how often to repeat the alerts, default value is taken from alertsRepeatInterval setting from top-level plugin configuration
"unhealthyDelay": "5m", // how much time the metric is allowed to stay in unhealthy zone before alert is raised, default value is taken from alertsUnhealthyDelay setting from top-level plugin configuration
"healthyDelay": "2m", // how much time the metric should stay in healthy zone before alert is removed, default value is taken from alertsHealthyDelay setting from top-level plugin configuration
"admins": [], // list of admin names no notify about this alert, default value is taken from admins setting from top-level plugin configuration
"channels": [] // list of channels to send notifications via, default value is taken from channels setting from top-level plugin configuration
}
}
}
}
]
}