Hey all:
I'm looking into using nagios at our company, and I'm interested in using the weathermap to display host/service states. I saw there is an existing project called nagvis that does this very nicely, with mouse-over information on host/service problems. I'd like to see this functionality in weathermap, which I've read can be done, but don't see any information on exactly how to go about it.
I assume you can specify a script in the target, though i'm not sure what the script should be returning to weathermap. I also don't know how to go about doing a mouse-over status report - can a script be specified? Should the target script build a mini-html page that is then pointed to from overlib?
Any help would be appreciated!
Nagios integration
Moderators: Developers, Moderators
-
- Posts: 37
- Joined: Thu Feb 23, 2006 5:59 pm
Hi,
In my company we are doing some integrations with Nagios and weathermap on this way:
Configuration:
- PHP Weathermap V 0.82
- Nagios 2.5 with NDOtoDB (storing Services, Hosts and their respective states) NDO can be found in the nagios official webpage (www.nagios.org)
- RRDtool graphs using MRTG config files and routers2.cgi as frontend
How to:
The nodes that are on the weathermap are named exactly as they are in Nagios (maybe a "pick from nagios" in the editor will help). In the config file under the nodes section there is a commented out line containing the node services that is part of the weathermap.
Ex.:
NODE SERVER1
LABEL SERVER1
#SERVICES PING,HTTP,FTP,SMTP
weathermap is executed and the links usage are updated. An PHP page is called using the config file as parameter. The PHP script checks out the Nagios database looking out for services that have some kind of problem, if it's a warning the icon is replaced by an yellow like, if It's critical the icon is replaced by an red like. The overlib is used to construct an onmouseover containing services informations for that host.
Here are two examples on how this would look like (still in develop):
In my company we are doing some integrations with Nagios and weathermap on this way:
Configuration:
- PHP Weathermap V 0.82
- Nagios 2.5 with NDOtoDB (storing Services, Hosts and their respective states) NDO can be found in the nagios official webpage (www.nagios.org)
- RRDtool graphs using MRTG config files and routers2.cgi as frontend
How to:
The nodes that are on the weathermap are named exactly as they are in Nagios (maybe a "pick from nagios" in the editor will help). In the config file under the nodes section there is a commented out line containing the node services that is part of the weathermap.
Ex.:
NODE SERVER1
LABEL SERVER1
#SERVICES PING,HTTP,FTP,SMTP
weathermap is executed and the links usage are updated. An PHP page is called using the config file as parameter. The PHP script checks out the Nagios database looking out for services that have some kind of problem, if it's a warning the icon is replaced by an yellow like, if It's critical the icon is replaced by an red like. The overlib is used to construct an onmouseover containing services informations for that host.
Here are two examples on how this would look like (still in develop):
-
- Cacti User
- Posts: 59
- Joined: Tue Dec 19, 2006 4:35 pm
Very cool. I'd be interested in seeing your php script, since I do have NDO installed (needed it for nagvis when i was playing around with it).
I also thought of writing a perl script that uses the Nagios::Status or Nagios::StatusLog perl modules, but i'm not that familiar with perl. Also, I need some more information on how weathermap digests the scripts, since i've never played around with MRTG.
Howie, would it be possible to code this functionality directly into weathermap? If livio could provide his script, i'm sure it would be easy to parse its input into weathermap. I'd be willing to take a crack at it
I also thought of writing a perl script that uses the Nagios::Status or Nagios::StatusLog perl modules, but i'm not that familiar with perl. Also, I need some more information on how weathermap digests the scripts, since i've never played around with MRTG.
Howie, would it be possible to code this functionality directly into weathermap? If livio could provide his script, i'm sure it would be easy to parse its input into weathermap. I'd be willing to take a crack at it
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
One of the reasons I added the datasource plugin stuff in 0.9 was for exactly this. You can either: get the data into the existing readable formats (RRD, or plain tab-seperated text), or write a new datasource plugin to read the data directly, like the cactihost: data source plugin does.MagicOneXXX wrote:Very cool. I'd be interested in seeing your php script, since I do have NDO installed (needed it for nagvis when i was playing around with it).
I also thought of writing a perl script that uses the Nagios::Status or Nagios::StatusLog perl modules, but i'm not that familiar with perl. Also, I need some more information on how weathermap digests the scripts, since i've never played around with MRTG.
Howie, would it be possible to code this functionality directly into weathermap? If livio could provide his script, i'm sure it would be easy to parse its input into weathermap. I'd be willing to take a crack at it
Personally, I'd go for the quick & easy text file just to test it out.
The popup status is a little trickier. The NOTES command allows you to add static text under (or instead of) the overlib image, but it is static in the config file. You could use some perl to make an image of the popup text - that's not too hard with something like Imager or GD, or you could have a 'master' config and use something like sed or m4 to paste in the current statuses. Finally, you *can* use the {node:this:blah} type of tokens in the NOTES section, so if you wrote a new DS plugin, it could create new variables for use there.
To get all the functionality you are after, a DS plugin would be needed really. I'd be happy to help, although I don't use Nagios myself. I found it to be a bit clunky compared to WhatsUp, although we are about to review our monitoring situation. I'd be interested in working a little on this plugin though.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
I wish I'd been heere earlier... this is exactly what we've done here, and it all works well.
We have created a Nagios plugin for Weathermap, which works via a client/server HTTPS link to the existing Nagios status CGI if necessary, so the Nagios can be on a different machine if required. This allows us to get node status from Nagios fine.
I've also developed an editor 'Weatherman' to remotely edit the Weathermap files. Yes, I know weathermap comes with an editor, but it needs to run on the local machine. The weatherman editor will run on your local workstation and communicate via an https helper script. It also is Nagios and MRTG/Routers2 aware, so it will provide popup selections and fill in all the overlib stuff correctly to set the changing icons from Nagios status and the MRTG popup graphs, and so on.
If you want a copy, you can see it on the monitoringforge.org website, or on http://www.steveshipway.org/forum/viewforum.php?f=29 in the support forum. Or, it is attached here...
Steve
We have created a Nagios plugin for Weathermap, which works via a client/server HTTPS link to the existing Nagios status CGI if necessary, so the Nagios can be on a different machine if required. This allows us to get node status from Nagios fine.
I've also developed an editor 'Weatherman' to remotely edit the Weathermap files. Yes, I know weathermap comes with an editor, but it needs to run on the local machine. The weatherman editor will run on your local workstation and communicate via an https helper script. It also is Nagios and MRTG/Routers2 aware, so it will provide popup selections and fill in all the overlib stuff correctly to set the changing icons from Nagios status and the MRTG popup graphs, and so on.
If you want a copy, you can see it on the monitoringforge.org website, or on http://www.steveshipway.org/forum/viewforum.php?f=29 in the support forum. Or, it is attached here...
Steve
- Attachments
-
- weatherman-3.5.zip
- Version 3.5 of weatherman editor plus Nagios plugin for weathermap
- (48.52 KiB) Downloaded 516 times
Who is online
Users browsing this forum: No registered users and 4 guests