Nagios - MagicMirror² module
This is a module for MagicMirror². Shows informantion from nagios.
Installing the module
The module uses the JSON formatted Nagios status as formattted by php-nagios-json.
To install the module, just clone this repository to your modules folder:
git clone https://github.com/qistoph/MMM-nagios.git nagios
.
The run cd nagios
and npm install
to install the dependencies.
Updating the module
Pull the git updates: git pull
.
The update dependencies in the module folder: cd nagios
followed by npm install
.
Using the module
To use this module, add it to the modules array in the config/config.js
file:
modules: [
{
module: 'nagios',
position: 'top_right',
header: 'Nagios',
config: {
statusUrl: 'https://<YOUR URL>/',
username:'Basic auth username',
password: 'Basic auth password',
showDetails: true
}
}
]
Configuration options
The following properties can be configured:
Option | Description |
---|---|
statusUrl |
The URL to get the status from. Must be a php-nagios-json page. Required |
username |
HTTP Basic Auth username, if need to access the page. Optional |
password |
HTTP Basic Auth password, should be specified if the username is. Optional |
showDetails |
Show the service and host for each nagios status (except OK). Optional |
reloadInterval |
Number of milliseconds between refresh. Default value: 5 * 60 * 1000 (5 minutes) |
labels |
Defines the labels for each type of status. Default value: See Default labels |
Default labels
labels: {
'ok': 'Ok',
'warning': 'Warning',
'critical': 'Critical',
'unknown': 'Unknown'
}
Notifications
This module supports the following notifications:
Notification | Description |
---|---|
SHOW_DETAILS |
Payload is a boolean indicating if the details should be shown, just like (showDetails in the config). |