
Solutions :
Assign full permission to file nagios.cmd file.
# chmod 777 /usr/local/nagios/var/rw/nagios.cmd

To configure and install nagios link is :-
http://www.thegeekstuff.com/2008/05/nagios-30-jumpstart-guide-for-red-hat-overview-installation-and-configuration/
-----------------------------------------------------------------------------
when your trying to add the service of nagios in chkconfig by using following command then sometime you will get error such as:
[root@anup ~]# chkconfig --add nagios
error reading information on service nagios: No such file or directory
[root@anup ~]#
-----------------------------------------------------------------------------
To solve this error Go to the directory where you have install nagios and use following command:
[root@anup nagios-3.0.1]# make install-init
/usr/bin/install -c -m 755 -d -o root -g root /etc/rc.d/init.d
/usr/bin/install -c -m 755 -o root -g root daemon-init /etc/rc.d/init.d/nagios
*** Init script installed ***
[root@anup nagios-3.0.1]#
-----------------------------------------------------------------------------
The try to add the service of nagios i hope i will work
[root@anup nagios-3.0.1]# chkconfig --add nagios
[root@anup nagios-3.0.1]# service nagios restart
Running configuration check...done.
Stopping nagios: .done.
Starting nagios: done.
[root@anup nagios-3.0.1]#
[root@anup nagios-3.0.1]# chkconfig nagios on
-----------------------------------------------------------------------------
Here if you get Error:
“You don’t have permission to access /nagios/ on this server.”
Check /etc/httpd/conf/httpd.conf for DirectoryIndex.
If it’s not having index.php add it as follows:
vi /etc/httpd/conf/httpd.conf
DirectoryIndex index.php index.html index.html.var
Make sure you do restart apache(httpd) and nagios every time you change the config file. You must have php installed.
-----------------------------------------------------------------------------
IF YOU GET ERROR:-
=======================================
It appears as though you do not have permission to view information for any of the hosts you requested...
If you believe this is an error, check the HTTP server authentication requirements for accessing this CGI
and check the authorization options in your CGI configuration file.
===================================
SOLUTION:-
EDIT BELOW CGI LINE
# vim /usr/local/nagios/etc/cgi.cfg
add user name
:wq
# service nagios restart
==========================================
Nagios Error and Solution
Error :- sudo: sorry, you must have a tty to run sudo
Solution:-
[root@server~]# vi /etc/sudoers
comment #Defaults requiretty
and add below lines at end of file
# %users localhost=/sbin/shutdown -h now
nagios ALL=(ALL) NOPASSWD: /usr/local/nagios/libexec/
nagios ALL=(ALL) NOPASSWD: /usr/sbin/vzctl
:wq
[root@server~]# service xinetd restart
No comments:
Post a Comment