Hi all,
We host a fair few websites and have Nagios doing various checks to check if sites are up and then login and trawl various areas of the pages (using a custom written script)
I have been thinking recently something that would be nice to have is a live Service status page.
So rather than have people call up asking if there are problems with the website etc etc and batting a no it isnt, yes it is, no it isnt email convo back and forth, they could first and foremost just visit a web page that will have the live status of the site in question, pulled from Nagios.
So customer A could go to http://mycompanylivestatus.co.uk/customerA - obviously we would have to design some sort of page for this data to be displayed in but thats no biggy.
The websites in question are hosted in IIS on Windows Server 2012 boxes.
There is a main parent site and then all of these sites id like a live status for a virtual directories of that.
My Nagios is running on Ubuntu 12.04 and is a single instance only box - checking only about 200 hosts and services combined
Is there anything out there that will accomplish this do you guys know of?
Thanks
Live Service Status Widgit/webpage
Re: Live Service Status Widgit/webpage
A few ideas right off the bat:
Maybe a little dated but could be a good starting point: Nagios Looking-Glass
Within core you can do this, but it's sorta tricky and would expose the Nagios server's address directly.
You could take a look at the JSON branch of the Nagios Core project: http://sourceforge.net/p/nagios/nagiosc ... json/tree/
HTML scraping might be somewhat easy in perl, using something like http://192.168.1.100/nagios/cgi-bin/sta ... =localhost - or just php include() the page itself if you can get the authentication working.
If you're really looking for a custom solution you can just pull everything from /usr/local/nagios/var/status.dat and cut out the middleman.
Maybe a little dated but could be a good starting point: Nagios Looking-Glass
Within core you can do this, but it's sorta tricky and would expose the Nagios server's address directly.
I think you answered part of your own question there. Are you looking for an API to pull this data so you can display it in your own custom page? If so:FTL wrote:obviously we would have to design some sort of page for this data to be displayed in but thats no biggy.
You could take a look at the JSON branch of the Nagios Core project: http://sourceforge.net/p/nagios/nagiosc ... json/tree/
HTML scraping might be somewhat easy in perl, using something like http://192.168.1.100/nagios/cgi-bin/sta ... =localhost - or just php include() the page itself if you can get the authentication working.
If you're really looking for a custom solution you can just pull everything from /usr/local/nagios/var/status.dat and cut out the middleman.
Former Nagios employee
Re: Live Service Status Widgit/webpage
Hi Tmcdonald,
Thanks for your input.
Looking Glass is very close to what id like - however i dont want to have to give away the Nagios address directly.
I have had a slight change of opinion now on what i want to do after sitting down and having another think.
Instead of creating a page for each client to be able to go to (big overheads for such a small feature) - instead im going to use the customer area of my companies website that they can log into and then only be greeted with a service status for their own website taken from Nagios. - hopefully using some sort of iframe or something - doing a curl or something to get the data from Nagios from http://server/nagios/cgi-bin/extinfo.cg ... t=hostname
If it sees green UP then it displays a green Traffic light - amber WARNING - amber light - red CRITICAL a red light.
Just going to work how to do it now
Thanks for your input.
Looking Glass is very close to what id like - however i dont want to have to give away the Nagios address directly.
I have had a slight change of opinion now on what i want to do after sitting down and having another think.
Instead of creating a page for each client to be able to go to (big overheads for such a small feature) - instead im going to use the customer area of my companies website that they can log into and then only be greeted with a service status for their own website taken from Nagios. - hopefully using some sort of iframe or something - doing a curl or something to get the data from Nagios from http://server/nagios/cgi-bin/extinfo.cg ... t=hostname
If it sees green UP then it displays a green Traffic light - amber WARNING - amber light - red CRITICAL a red light.
Just going to work how to do it now
Re: Live Service Status Widgit/webpage
That would be the suggested method. Curl and parse the cgi. Others use the json api from mklivestatus. Others parse the status.dat file directly. There are other more exotic ways as well. That actual process of skinning the cat is much shorter than enumerating the different ways.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.