Page 3 of 3

Re: NAGIOS ERROR:Cannot open main configuration file

Posted: Wed Sep 14, 2016 4:17 am
by Vishal41
PLEASE SEE OUTPUT BELOW:

TO uninstall Nagios do I just use rm command and delete the directories for Nagios

nagios.x86_64 3.2.3-3.el5.rf installed
nagios-nrpe.x86_64 2.14-1.el5.rf installed
nagios-plugins.x86_64 1.4.16-1.el5.rf installed
nagios-plugins-nrpe.x86_64 2.14-1.el5.rf installed

PLEASE GUIDE WHICH DIRECTORIES NEED TO BE REMOVED

/usr/local/nagios/share/ (new path 4.2.0 and index file)
/usr/share/nagios/ ( old path 3.2.3)/etc/nagios/
/usr/bin/nagios
/usr/share/nagios
/usr/lib64/nagios/plugins/
/etc/init.d/nagios
/usr/local/nagios
/usr/nagios/nagios-4.2.0 ( I downloaded the 4.2 tar file form the web and extracted to install this version)

WHEN I INSTALLED NAGIOS 4.2.0 I had this file

Creating sample config files in sample-config/ ...


*** Configuration summary for nagios 4.2.0 08-01-2016 ***:

General Options:
-------------------------
Nagios executable: nagios
Nagios user/group: nagios,nagios
Command user/group: nagios,nagcmd
Event Broker: yes
Install ${prefix}: /usr/local/nagios
Install ${includedir}: /usr/local/nagios/include/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
IOBroker Method: epoll

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


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


YOUR GUIDANCE IS HIGHLY VALUED

THANKS

Re: NAGIOS ERROR:Cannot open main configuration file

Posted: Wed Sep 14, 2016 5:05 am
by Vishal41
FYI USING FIND COMMAND find / -name "nagios" *

HELP !!! Which directory and files can I delete which will remove both version of Nagios- 3.2.3 and 4.2.0

Please let me know if you need more information. THANKS A LOT!

/etc/selinux/targeted/modules/previous/modules/nagios.pp
/etc/nagios
/etc/nagios/nagios.cfg
/etc/httpd/conf.d/nagios.conf
/etc/rc.d/init.d/nagios
/var/lock/subsys/nagios
/var/log/nagios
/var/log/nagios/nagios.log
/var/log/nagios/archives/nagios-09-07-2016-00.log
/var/nagios
/var/nagios/nagios.log
/var/nagios/rw/nagios.cmd
/var/nagios/nagios.pid
/var/spool/mail/nagios1
/usr/bin/nagiostats
/usr/bin/nagios
/usr/lib64/nagios
/usr/share/selinux/targeted/nagios.pp
/usr/share/locale/fr/LC_MESSAGES/nagios-plugins.mo
/usr/share/doc/nagios-3.2.3
/usr/share/doc/nagios-nrpe-2.14
/usr/share/doc/nagios-plugins-nrpe-2.14
/usr/share/doc/nagios-plugins-1.4.16
/usr/share/nagios
/usr/share/nagios/images/logos/nagios.gif
/usr/share/nagios/images/logos/nagiosvrml.png
/usr/share/nagios/images/logos/nagios.gd2
/usr/share/nagios/docs/images/nagiosexchange.png
/usr/share/nagios/docs/images/nagiossupport.png
/usr/share/nagios/docs/images/nagios.jpg
/usr/share/nagios/docs/nagiostats.html
/usr/nagios
/usr/nagios/nagios-4.2.0.tar.gz
/usr/nagios/nagios-plugins-2.1.2.tar.gz
/usr/local/nagios
/usr/local/nagios/bin/nagiostats
/usr/local/nagios/bin/nagios
/usr/local/nagios/var/nagios.log
/usr/local/nagios/share/images/logos/nagios.gif
/usr/local/nagios/share/images/logos/nagiosvrml.png
/usr/local/nagios/share/images/logos/nagios.gd2
/usr/local/nagios/share/js/nagios-decorations.js
/usr/local/nagios/share/js/nagios-time.js

Re: NAGIOS ERROR:Cannot open main configuration file

Posted: Wed Sep 14, 2016 3:59 pm
by rkennedy
It's not going to be possible for us to look through every file on your system and tell you what is needed to delete. Can you spin up a new virtual machine, on Virtual Box (which you mentioned was already running on the host machine) and run Nagios from there?

Re: NAGIOS ERROR:Cannot open main configuration file

Posted: Fri Sep 16, 2016 3:57 am
by Vishal41
Hi it is not possible for me to spin another VM else I would have done it! I am running few VM on the same box so I don't want to make any silly changes which could impact other vm in the box.

I can appreciate what you are saying its okay if you cannot guide any further, Many thanks for time until now!

Regards

Re: NAGIOS ERROR:Cannot open main configuration file

Posted: Fri Sep 16, 2016 1:27 pm
by lmiltchev
In this case, as you are not able to follow our recommendations (to start a new "clean" VM), I will be closing this topic. If you have any other unrelated questions/issues, please start a new thread.