nagios command not found.

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
jim
Posts: 37
Joined: Wed Jun 08, 2016 11:18 am

nagios command not found.

Post 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
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: nagios command not found.

Post 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
Former Nagios Employee
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: nagios command not found.

Post by eloyd »

Also, is this a bare Nagios installation, or is it something embedded into another product like Evanios?
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: nagios command not found.

Post 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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
jim
Posts: 37
Joined: Wed Jun 08, 2016 11:18 am

Re: nagios command not found.

Post 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.
jim
Posts: 37
Joined: Wed Jun 08, 2016 11:18 am

Re: nagios command not found.

Post 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?
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: nagios command not found.

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
jim
Posts: 37
Joined: Wed Jun 08, 2016 11:18 am

Re: nagios command not found.

Post 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
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: nagios command not found.

Post by rkennedy »

Great! Marking this as resolved, and closing it out.
Former Nagios Employee
Locked