Nagios Netsaint Related Tips

Installation (Ubuntu)

I already had many packages, so maybe i am missing some, but at least I did:

sudo apt-get install djagios libnagios-object-perl libnagios-plugin-perl nagios-images nagios-plugins nagios-plugins-basic nagios-plugins-extra nagios-plugins-standard nagios-snmp-plugins nagios3 nagios3-cgi nagios3-common nagios3-core nagios3-dbg nagios3-doc nagiosgrapher

we need to set at this point the htaccess rights, ok

ocm@achtung:/etc/nagios3$ htpasswd -c htpasswd.users nagiosadmin

Then we setup the auth dir in order to store the ssh remote keys:

sudo mkdir /etc/nagios3/.ssh
cd .ssh 
sudo ssh-keygen -b 1024 -f id_dsa -t dsa -N ''
 ssh-copy-id -i id_dsa nagios@remotebox

and copy && compile the nagios plugins to the remote servers (non root paths requires user's relative path prefix):

./configure --prefix=/soft/apache-tomcat-6.0.18/tmp/
make 
make install

SOLARIS REMOTE HOST MONITORED TIP:
PATH=/usr/sfw/bin:/usr/ccs/bin:$PATH
./configure --prefix=/soft/TOMCAT/tmp/ --without-mysql
/usr/sfw/bin/gmake
/usr/sfw/bin/gmake install

NOTE: please don't user my testing path "/soft/TOMCAT/tmp/" for working purposes ;)

Then we have to test the remote auth from the nagios box:

ocm@achtung:/etc/nagios3$ /usr/lib/nagios/plugins/check_by_ssh -Hremotehost -i /home/ocm/.ssh/id_rsa -l remoteuser -C "tmp/libexec/check_disk -w10% -c 5% -e -m "
DISK OK| /=2543MB;7141;7538;0;7935 /var=231MB;8927;9423;0;9919 /soft=8176MB;17854;18846;0;19838 /usr=2670MB;8927;9423;0;9919 /boot=11MB;88;93;0;98 /dev/shm=0MB;1780;1879;0;1978

External commands issue, thanks to : http://technosophos.com/content/nagios-fixing-error-could-not-stat-command-file-debian

ocm@achtung:~/$ sudo chmod g+x /var/lib/nagios3/rw

Bow we want to add a readonly user to the webUI:

root@achtung:/etc/nagios3# htpasswd htpasswd.users reader
root@achtung:/etc/nagios3# grep reader cgi.cfg
authorized_for_all_services=nagiosadmin,reader
authorized_for_all_hosts=nagiosadmin,reader
authorized_for_read_only=reader