Page 1 of 1

nagios command not found.

Posted: Wed Jun 08, 2016 11:33 am
by jim
Hey Guys,

Just installed nagios core 4.1.1 as per:
https://assets.nagios.com/downloads/nag ... 1465398477

My previous version was working in essence I could access it through apache. It was not configured and I deleted it left and right as I could not find any good documentation to uninstall it.

I have definitely followed the steps above but when I boot in and sudo to root, for nagios command I get the following.

[root@agent2 init.d]# nagios
-bash: nagios: command not found
[root@agent2 init.d]#

User nagios exist

[root@agent2 init.d]# cat /etc/passwd|grep nagios
nagios:x:495:492::/var/spool/nagios:/sbin/nologin
[root@agent2 init.d]#

No idea where is my user nagios admin which I did create with htppasswd command.

[root@agent2 init.d]# cat /etc/passwd|grep -i nagiosadmin
[root@agent2 init.d]# pwd
/etc/init.d
[root@agent2 init.d]# ./nagios status
nagios (pid 3264) is running...
[root@agent2 init.d]#

But when I try to access the nagios through http://localhost/nagios, I don't seems to have any luck.

What is annoying is when I run command locate nagios there is still something on system from nagios 3.5.1
The list is too big to paste here but I need some help to have nagios accessible through UI

Any help would be greatly appreciated

Thanks

Re: nagios command not found.

Posted: Wed Jun 08, 2016 11:42 am
by rkennedy
Did you follow a set of instructions for installation? The nagios command has never been something that has worked from what I recall.

What OS are you attempting to install on? Those instructions are a bit old.

Take a look at these -
https://support.nagios.com/kb/category.php?id=58

or, specifically for CentOS7 -
https://assets.nagios.com/downloads/nag ... entos7.pdf

Re: nagios command not found.

Posted: Wed Jun 08, 2016 11:51 am
by eloyd
Also, is this a bare Nagios installation, or is it something embedded into another product like Evanios?

Re: nagios command not found.

Posted: Wed Jun 08, 2016 3:28 pm
by tgriep
Are you trying to remove the 3.x version of Nagios Core and install the 4.1.1 version?
What is OS type and version is running on your server?

Re: nagios command not found.

Posted: Wed Jun 08, 2016 7:33 pm
by jim
tgriep wrote:Are you trying to remove the 3.x version of Nagios Core and install the 4.1.1 version?
What is OS type and version is running on your server?
Yes that is correct.
I am running CentsOS 6.8 Desktop. I think in un-installation process it got screwed up somewhere. I want to investigate where exactly it went wrong.

Re: nagios command not found.

Posted: Wed Jun 08, 2016 8:50 pm
by jim
Guys,

Good news is that old doco guidelines still did work. The issue was
1. httpd was not working
2. plugin installation on server was missing

I can access nagios with http://localhost/nagios however cannot access it with http://<unix server ip>/nagios

How to get this fixed?

Re: nagios command not found.

Posted: Thu Jun 09, 2016 9:39 am
by tgriep
Can you post your /etc/httpd/conf.d/nagios.conf file so we can review it?
If you see a line like the following

Code: Select all

Allow from 127.0.0.1
change it to

Code: Select all

Allow from all
Restart apache and that could fix it for you.

Re: nagios command not found.

Posted: Thu Jun 09, 2016 9:41 am
by jim
Hello,

The issue is fixed and thread can be set to resolved status.

I am opening a new thread for new issue.

Regards
Jim

Re: nagios command not found.

Posted: Thu Jun 09, 2016 10:46 am
by rkennedy
Great! Marking this as resolved, and closing it out.