Nagios with Nagmap
Nagios core one of the best open source networking and system monitoring that I used. With nagios exchange I get free power full tool to monitor windows and linux. To get more information nagios you can go to www.nagios.org , for installation and configuration you can read documentation on the nagios official website or from nagios packaged on tar.gz after you download. On this step I will explain how to integrate nagios with nagmap to show geographical map from google map api version 3, on this version you don’t need key api, you only know about coordinat/latitude and longtitude you can get it from gps or google earth. For sample you can read from my configuration below to integrate nagios with nagmap :
On my installation I was using centos 5.5, the firs time you should download nagmap from http://labs.shmu.org.uk/nagmap/nagmap-0.9.tar.gz, here the step to do to integrate nagios with nagmap.
# tar –zxvf nagmap-0.9.tar.gz
# cp nagmap/ /var/www/html/
# cd /var/www/html/nagmap/
# nano config.php
Edit nagmap_map_center according your central area. on this sample my country
#nano marker.php
On my configuration, nagios installation on directories /usr/local/nagios/etc/object/hosts.cfg, for moire.cfg I don’t change configuration.
# nano hosts.cfg
define host {
use linux-server
host_name MyCentral
alias Office
address ip_address_mynetwork
check_command check_ping!100.0,20%!500.0,60%
notes latlng: -6.914125,107.609393
register 1
}
define host {
use linux-server
host_name jakarta
alias jakarta
address ip_address_mynetwork
check_command check_ping!100.0,20%!500.0,60%
notes latlng: -6.212470,106.845903
register 1
parents MyCentral
}
define host {
use linux-server
host_name surabaya
alias surabaya
address ip_address_mynetwork
check_command check_ping!100.0,20%!500.0,60%
notes latlng: -7.265742,112.742675
register 1
parents MyCentral
}
Ect just according your network ip address.
After have configuration host like above, to integration with nagios add hosts. cfg in to the nagios cfg. And then make sure on status.php nagmap your running the correct status.dat of your nagios, below on my configuration status.dat for my nagios server.
After that restart your nagios and then open nagmap via browser. Red ballon color indicate the network not connected (unreachable) for gree ballon color indicate the network reachable.
You can remove the line by removing parents on your hosts.cfg. The line function only indicate your network topology. Now we could integrated nagios with nagmap to show map.
Notes:
– On my installation using nagios core 3 and centos 5.5 32 bit
– For nagios installation using tar.gz packaged not .rpm so if you are using rpm maybe have different.
– This configuration working well on my nagios, integration nagios with nagmap for complex system monitoring you should do some exploration.
-Your nagios server should connected to internet
-Feel free to correct me if something wrong for example miss spelling or another.
-Thanks nagmap and nagios developer
hi, can i help me about that how i can view the configuration.
But i think i have a problem because i don get an server page or host, y configuration it`s on localhost.
at localhost or public no problem if connected to internet to load map
Ok thanks for the answer, so my website should look like that: localhost/nagmap
I use Ubuntu 12.4, Nagios Core 3.2.1
I´m from Mexico, regards.