If you’ve spent any time working with development, operations or at a Network Operations Center (NOC), you are most likely familiar with Nagios.
While it might not be the sexiest web app, it is more or less the industry standard for monitoring both physical hardware and services.
Nagios is an open-source software that helps you monitor your computer systems and network infrastructure for problems or performance issues. It works by periodically checking various aspects of your systems, such as server availability, CPU usage, memory usage, disk space, and network connectivity.
If Nagios detects a problem, it can send alerts to notify you via email, SMS, or other means. Nagios can also be configured to run automated scripts to perform corrective actions, such as restarting a service or server.
Overall, Nagios helps you keep track of the health and performance of your IT infrastructure, so you can identify and resolve issues before they become major problems.
Once you have Nagios up and running, you most likely want to display this data on a big screen. This is where Screenly comes into play. Thanks to our powerful digital signage solution, it is both easy and cost effective to provide your team with the dashboard they need.
Creating your dashboards
The first thing you need to do in order to use Nagios with Screenly is to decide what to view. Some users are happy with displaying already-built graphs, reports or maps from their Nagios account, while others prefer to go a bit further and build custom dashboards.
When building out your dashboards, you should keep the target resolution in mind. Most TVs are running 1920x1080px, so this is probably the resolution for which you want to optimize. Also, since you can cycle through multiple dashboards with Screenly, it may be better to break up your IT metrics into multiple dashboards rather than trying to squeeze everything into a single dashboard.
Configuring Nagios for Screenly
In order to display your Nagios dashboards on a digital sign, you will have to obtain the URL to the dashboard. To obtain the URL, log in to your Nagios account on your local computer.
From the top-menu, click on “Dashboards”. This will open the dashboards page.
In the “Dashboards” page, from the left-hand menu, right click on the name of the dashboard you want to display on your digital sign and copy the link address to the dashboard.
Setting up authentication
Once you have your dashboards and the dashboard URLs ready, we can tackle the next piece: authentication. Screenly has made authenticating your Nagios account easy by creating a ready-to-use Javascript snippet on the Screenly playground. Modifying this script with your Nagios username and password allows you to automate the login process to your Nagios instance in Screenly.
Adding your dashboards to Screenly
To display your Nagios dashboard on your Screenly digital sign, make sure the Screenly player is connected to the same network as the computer running Nagios. Armed with the URLs to your dashboards, we can now add your dashboards to Screenly. The recommended way to work with our JavaScript Injector is to use Screenly’s Command Line Interface, so visit our CLI repository for more information on how to work with the CLI.
To add your Nagios dashboard to Screenly, simply add your dashboards as a new URL by running the following command on our CLI
$ screenly asset add "<http://path-to-Nagios-dashboard>" Nagios
+----------------------------+-------------+------+--------+
| Id | Title | Type | Status |
+----------------------------+-------------+------+--------+
| XXXXXXXXXXXXXXXXXXXXXXXXXX | Nagios| N/A | none |
+----------------------------+-------------+------+--------+
After adding the asset to your Screenly account, it is important to store the Asset ID, as it will be referenced later. You can store the Asset ID for later by running the following command.
$ export ASSET_ID=XXXXXXXXXXXXXXXXXXXXXXXXXX
[...]
With our asset created, we can now apply the JavaScript Injection for Nagios authentication. Proceed to download nagios-signin-via-credentials.js from Screenly’s playground and modify it with your credentials. Run the following command to add the JavaScript to the Nagios dashboard.
$ screenly asset inject-js "$ASSET_ID" /path/to/script.js
[...]
After running the above command, your Nagios dashboard should display correctly on your screen instead of the Nagios login page.
We are here to help
For more information on how to make use of our CLI, visit the repository for our CLI on github. To learn more about our javascript injector feature, you can also visit Screenly’s playground on github. If you have any trouble integrating Nagios with Screenly, let us know at Screenly Support. We are here to help!