Skip to content
Nagios - MagicMirror² module
JavaScript
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.previews Initial commit Nov 18, 2016
.eslintrc.json
.gitignore
.stylelintrc
.travis.yml
Gruntfile.js
README.md Fix linting errors Mar 29, 2019
nagios.js
node_helper.js Improve code style Dec 13, 2016
package-lock.json
package.json
statusfetcher.js

README.md

Nagios - MagicMirror² module

Build Status

This is a module for MagicMirror². Shows informantion from nagios.

Example Visualization

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).
You can’t perform that action at this time.