Nagios Operations Dashboard

We had an idea of putting up an operations monitoring screen in our workplace for more effecient discover alerts from nagios.
We found a php nagios dash app which parses status.dat (Nagios Dashboard – PHP)
We modified this to only show criticals/warnings, made a ajax interface for refreshing/showing the data, and modified the css a bit (Thanks Jonas!)

Here is the modified version:
dash.tar

To install just extract this on your nagios server and edit the $file in nagios_get.php to your status.dat file of your nagios :)

Here is a demo of the dash in real surroundings:

operations dashboard

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Reddit
  • Twitter
  • Slashdot
  • StumbleUpon

Tags: , ,

24 Responses to “Nagios Operations Dashboard”

  1. Zeed Says:

    Hi,

    I’m not really good on editing php files.
    Is there a way that I can put in a Page Title inside the webpage.
    When I view using full screen the Page Title is not visible. Can it be put inside the webpage.
    Sorry for my english.
    Thanks

  2. The light, the salvation Says:

    Hi, Zeed.
    Check this out:
    http://pastebin.org/54152

  3. Zeed Says:

    Cool… it’s work… :) one more request…
    can I put the page title at center and have it Bold
    Thanks

  4. Benjamin Says:

    Hey,

    thanks a lot for your script, I really like it ! I have one request though: I would like the script to exclude the services that are put in downtime (maintenance mode). I’ve been trying for a few hours to get it to do that but I can’t get it to work :(

    in short: when the scheduled_downtime_depth0 it should not show the monitor … so I tried adding an array and then checking it, but for some reason it won’t work.

    Could you guys implement this please ? That would be great !!

    Thanks in advance

  5. rofl Says:

    Zeed: you really should learn some html.. ;)
    TEXT HERE Makes text center and be bold.

    Benjamin: Use scheduled downtime in nagios, or ack the services. They shouldnt show on the dash then.

  6. rofl Says:

    Edit:
    ATT: Zeed
    Check out center and strong html tags.

  7. david guenault Says:

    hi there ! this seems really interesting. But instead of parsing status.dat (not really a good thing on large perimeters) why not use the mk_livestatus which permit to directly dialog with nagios (it consist of an eventbroker which listen on an unix socket, you write on the socket queries and then read the response on the same way… no io, nearly 0 cpu load!). Try it ! http://mathias-kettner.de/checkmk_livestatus.html. I wrote a little php class you could use instead of parsing the status.dat. Email me if you want the class (early alpha) soon published on nagios-fr wiki.

  8. Gregorian Says:

    Hey MrBerry, i am the creator of the dashboard script. I am glad to see you, Zeed and Benjamin are able to make use of it. Drop me an email if you have any questions. David that php class is cool but from the tests i ran, reading from the status.dat didnt hammer the box at all. PHP has a relatively low overhead when using strpos it seems, i could be wrong. Aslong as the nagios box is failry powerful i believe io and cpu usage will be negligable.

    nagiosgregorian@gmail.com

    Cheers,
    Gregorian

  9. Norbert Says:

    Hi,

    my apache2 error_log was spamed with (6.5GB in 12 hours)
    PHP Notice: Undefined offset: 0 in /srv/www/htdocs/nagios_get.php on line 211, referer: https://nagios-cnsv.sozvers.at/nagios.php

    this message comes also on other lines with other offsets

    hope you will fix it

  10. The light, the salvation Says:

    @Norbert, make php less verbose? Either just the script, or your php config.

    http://php.net/manual/en/function.error-reporting.php

  11. Slade Says:

    Hi,

    Found this page while searching for different nagios dashboards. I’ve got a spare desktop & LCD, and I’d like to put them up at a cube at work to accomplish the same thing.

    What size status.dat file do you guys typically use this with? Mine is about 3 MB right now, and my browser is just hanging trying to load the page.

    Thanks!

  12. Slade Says:

    Update:

    This hanging was caused by Norbert’s issue of all those “Undefined offset: 0″ — this can just be ignored by adding the following at the top of the file [ after the "<?php" line ]:

    error_reporting(0);

    No issues anymore. We have a ton of warnings we send off to other teams, so for our purposes there is some additional parsing to do within the PHP, but this is a great start.

    Thanks again

  13. Daniel Bond Says:

    Hi I edited lines 209 and 225 to get rid of the php-warnings:

    if (isset($servicearray[$servicecount]) && $servicearray[$servicecount] == “”)

    Thanks for the updated dashboard!

    Cheers.

  14. Spaceship Says:

    There seems to be a problem with ie 7 & 8 with the refresh not working correctly when displaying updates.

    If you disable the AJAX caching at the beginning of the javascript section in nagios.php

    $.ajaxSetup ({
    // Disable caching of AJAX responses */
    cache: false
    });

    Also I do agree with Daniel some ‘isset’ around the place would make everything cleaner. Great work anyway.

    Thanks

  15. Spaceship Says:

    Sorry wasn’t clear there disabling the AJAX caching and it works fine with the M$ rubbish

  16. darz Says:

    Would it be possible to integrate an alert sound to the dashboard? So when an issue comes up it plays a alert sound.

    Cheers,
    darz

  17. Neil Says:

    We like this a lot. Been using it for a few months now, but did encounter one issue today. You can acknowledge a host being down which removes it from the dashboard, but it’s services still show up.

  18. Muschl Says:

    IE 6 do not display anything…
    no error and no status displayed

  19. mortis Says:

    What can I say, Muschl, you should have stopped using that browser about 10 years ago :)

  20. Our new dashboard | dingleberry.me Says:

    [...] The old dashboard we used earlier had a couple of issues. It showed all SOFT nagios states and it also listed every service pr host that was down. Since it’s pretty obvious that a service is down on a host that is down, we wanted to change that. Instead of continuing the rather hard work of changing the dirty status.dat parsing, we just dropped that project and checked out Merlin. Once installed and configured correctly, merlin will enable an eventbrokermodule in the nagiosconfig and update merlins mysql database via the eventbroker. The database contains all hosts and statuses state changes and so on, so this is what we ended up with : (Pic of our current dashboard in our office) [...]

  21. morten Says:

    New dashboard:

    http://dingleberry.me/2010/04/our-new-dashboard/

  22. John R Says:

    I have installed Nagios Dashboard with no problems. However is it possible to display the hosts Alias field in the dash board, any advice please?

  23. Fladi Says:

    Thank you for this great piece of software! our operations monitor is so more informative now.

  24. morten Says:

    you might want to take a look at the new version of the board :

    http://dingleberry.me/2010/04/our-new-dashboard/

Leave a Reply