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

Tags: , ,

38 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/

  25. Skeeve Says:

    C’mon! “@Norbert, make php less verbose? Either just the script, or your php config.” Is NOT a solution!

    @Norbert: I think you can fix it by changing 2 lines in nagios_get.php. Add “$servicecount>0 &&” in these 2 lines:

    if ($servicecount>0 && $servicearray[$servicecount] != “”) { //if the host has a service being checked

    if ($servicecount>0 && $servicearray[$servicecount] == “”) { //if the host has no service being checked

  26. Bignew Says:

    We are now using this in our production environment.
    It’s great. I’m no php expert, but is there a way to add a message saying “No problems” if there is no warning,critical or host down issues.

  27. mike Says:

    Hey

    Thanks for the helpful dashboard, should come in very handy!
    Although had to disable the Service column as it seemed to pull out random services which confused some people

    Anyone else come across this

    Thanks
    Mike

  28. mike Says:

    Had a little play about and it seems this was caused by the fix suggested by skeeve

    ended up just using error_reporting(0);

  29. Jeff Says:

    Rather than displaing the last check date – I would like to diplay the duration of the current alert (Last status change?) – Is there an easy way to modify the code to do this?

  30. Jeff Says:

    In case anyone else is looking for the answer… Replace line:

    $lastcheck = ‘last_check=’;

    with:

    $lastcheck = ‘last_state_change=’;

    This will show you the time the state last change, so you can see how old the alert it. I took it a bit further and showed the date as “1 hour, 4 mins”

  31. Cjfwkahl Says:

    What do you like doing in your spare time? pthc lolita
    278139

  32. Zbqqqjqv Says:

    I’m on work experience nn pre teen
    :-[[[

  33. Mnsgcdew Says:

    I can’t get a signal Nymphets Lolitas qxuwx

  34. Rckwpvlh Says:

    I’d like to take the job Loli Nymphets 937175

  35. Attlsakc Says:

    Thanks for calling Pedo Park 8O

  36. Nagios Operations Dashboard | Osties.com! Says:

    [...] Dejo aqui un link de descarga del software dash y su web oficial [...]

  37. Mathieu Says:

    Somehow the site isn’t able to view all services. There is only one service visible that is critical while there are 5. I must say that I have over 1000 services so maybe there is an issue with loading time? Any ideas?

    pls mail me

  38. cj Says:

    Excellent tool thankyou. Is there way display “no problem” if no critical problem? Thanks advance.

Leave a Reply