I’ve been recently experimenting with Nagios/Adagios trying to have it do something more than simple monitoring, but i’ve come to realize i’m spending time doing the same thing every time a new server is set up to add Nagvis, which i think whoever uses nagios would find interesting at least !
Is there any chance nagvis could be added to software center and get installed automagically whenever the Monitoring and inventorying package is installed? Or is there any way someone could point me to the right direction to automate these steps?
This is what works for me, but i do believe some steps could be taken differently, if you have any hints, please share (especially on the httpd conf file edit to bind login to ldap)
yum install php-gd php-mbstring php-pdo graphviz graphviz-graphs graphviz-doc rsync -y
download latest nagvis from http://www.nagvis.org/downloads, 1.8.5 is the latest as of today
tar -xvzf nagvis-1.8.5.tar.gz
chmod +x install.sh
When the prompt appears, enter
| Please enter the path to the nagios base directory /usr/share/nagios/
| Please enter the path to NagVis base /usr/share/nagvis/
| Do you want to use backend mklivestatus? [y]: y | Do you want to use backend ndo2db? [n]: n | Do you want to use backend ido2db? [n]: n
| Please enter your MKLivestatus socket: unix:/var/spool/nagios/cmd/livestatus
| Please enter the web path to NagVis [/nagvis]: /nagvis
| Please enter the name of the web-server user [apache]: nagios | Please enter the name of the web-server group [apache]: nagios | create Apache config file [y]: y
Edit nagvis config file
In the “backend” section, after “[backend_live_1]”, there should be:
backendtype="mklivestatus" socket="unix:/var/spool/nagios/cmd/livestatus" htmlcgi="/nagios/cgi-bin" <-- ADD THIS
Add this at the end to bind authentication to NS LDAP (not sure if this is how you properly do it, maybe i should use e-smith templates?)
<Directory "/usr/share/nagvis/share"> SSLRequireSSL AuthType Basic AuthName "NethServer LDAP" AuthBasicProvider ldap AuthLDAPBindDN cn=adagios,dc=directory,dc=nh AuthLDAPBindPassword xxxxxxxxxxxxxxxxxxxxx AuthLDAPURL "ldap://localhost/ou=People,dc=directory,dc=nh?uid?sub?(objectClass=posixAccount)" Require user admin Satisfy all </Directory>
service httpd restart
To add a little more “integration” between Adagios and Nagvis, i usually do:
Login with admin user to https://FQDN/nagvis
Options-> Object Defaults
Tick: hosturl, hostgroupurl, serviceurl and servicegroupurl, and change their values to the url of Adagios’, ie.
So that icons in nagvis, when clicked, open up Adagios page of that icon
On Adagios, it’s possible to create a “Nagvis” button in the top bar that links to Nagvis’ page
cp /usr/lib/python2.6/site-packages/adagios/etc/adagios/ssi/common-footer.ssi /etc/adagios/ssi
Edit the copied file
The final result would be something similar to these pictures
Link to Nagvis on topbar in Adagios:
Example Nagvis Map with custom background and Adagios host added on top of it
Clicking on the host icon in Nagvis, opens up the host page in Adagios:
Hope someone finds this useful!