Monday, March 30, 2009

Nagios notes

nagios-3.0.6.tarGeneral Options:
-------------------------
Nagios executable: nagios
Nagios user/group: nagios,nagios
Command user/group: nagios,nagios
Embedded Perl: no
Event Broker: yes
Install ${prefix}: /usr/local/nagios
Lock file: ${prefix}/var/nagios.lock
Check result directory: ${prefix}/var/spool/checkresults
Init directory: /etc/rc.d/init.d
Apache conf.d directory: /etc/httpd/conf.d
Mail program: /bin/mail
Host OS: linux-gnu

Web Interface Options:
------------------------
HTML URL: http://localhost/nagios/
CGI URL: http://localhost/nagios/cgi-bin/
Traceroute (used by WAP): /usr/sbin/traceroute


Review the options above for accuracy. If they look okay,
type 'make all' to compile the main program and CGIs.

30-mar-09
I edited the /etc/httpd/conf.d/nagios.conf file so that no password would be needed to access the nagios web interface page at http://localhost/nagios/.

I commented out the lines that pertained to authorization:

AuthName
AuthType
AuthUserFile
Require valid-user

ALSO: To use without authorization you must edit the following line in /usr/local/nagios/etc/cgi.cfg:

use_authentication=1

Change it to:
use_authentication=0

Then you must restart nagios so it will read the cgi.cfg file.

7-apr-09 Got Nagios to actually start seeing Jupiter on network. I had to "Allow incoming echo request" (ICMP) on the Windows firewall on Jupiter. That made the nagios "host status" of Jupiter change from down to up. But the service tests (amount of disk space, uptime, etc) were still showing red instead of green. To fix it, I had to open port 12489 tcp on the Jupiter Windows firewall. I figured out which port by turning logging on on the Jupiter Windows firewall and watching which packets were being dropped.

19-apr-09 Figured out how to view the main nagios status webpage from a location remote from Shamrock. When I tried to view the nagios webpage from my apartment, all I got was the Apache default index.html page that says "It works". I had typed "208.115.xx.xx" into my brower address bar. That default page is in the /var/www/html directory on legacy.

But all you have to do to see nagios is change the url from 208.115.xx.xx to 208.115.xx.xx/nagios and you will be able to see the page. I'm not sure why this works, but there is a line in /etc/httpd/conf.d/nagios.conf that says:

Alias /nagios "usr/local/nagios/share"

So that must do it. But when I comment that line out and restart httpd, it still finds the nagios webpage by typing localhost/nagios/ into browser. ???????? You must include the trailing "/".

Also there are the following 2 lines in /usr/local/nagios/etc/cgi.cfg:

physical_html_path=/usr/local/nagios/share
url_html_path=/nagios

Maybe they help.
---------------------------------------------------------------------
24-apr-09 If you add a computer to the host definitions in /usr/local/nagios/etc/objects/windows.cfg, AND you use the windows server template, then that computer automatically gets a ping test because there is a ping test (check-host-alive) included in the windows template. So for most of my computers, all I have to do is add the computer to the list of computers to be monitored by creating a host entry for it in windows.cfg and it will be pinged. You don't have to add a service definition unless you are going to do something fancier than a ping.

No comments: