nagios: daemon: 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
amc_oldsarge
Posts: 7
Joined: Mon Jul 16, 2012 2:50 pm

nagios: daemon: not found

Post by amc_oldsarge »

I've just installed Nagios 4.0.0 on Ubuntu Server 13.04

I've followed the instructions here: http://www.nagios-do.org/?p=411

When I try to start nagios via terminal I get:
sudo /etc/init.d/nagios start
* is not running
$Starting nagios: /etc/init.d/nagios: 72: /etc/init.d/nagios: daemon: not found
When running pre-flight check I get:
sudo /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Nagios Core 4.0.0
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 09-20-2013
License: GPL

Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Read object config files okay...

Running pre-flight check on configuration data...

Checking objects...
Checked 8 services.
Checked 1 hosts.
Checked 1 host groups.
Checked 0 service groups.
Checked 1 contacts.
Checked 1 contact groups.
Checked 24 commands.
Checked 5 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 1 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 5 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check
When I look at: /etc/init.d/nagios I see the file is a plain text document when the rest of the files are Link to shell script

Is that right?

I also had to replace the text in daemon-init.in with the recommendation here: http://support.nagios.com/forum/viewtop ... ntu#p74444

What am I doing wrong.........? Halp!
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: nagios: daemon: not found

Post by abrist »

The script requires the daemon utility:

Code: Select all

apt-get install daemon
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
amc_oldsarge
Posts: 7
Joined: Mon Jul 16, 2012 2:50 pm

Re: nagios: daemon: not found

Post by amc_oldsarge »

Do I run the install before Install nagios or after? Or better yet, where would you run it based on the commands list below.....

Here are the steps I am running:

sudo mkdir -p /etc/nagios /var/nagios
sudo groupadd --system --gid 9000 nagios
sudo groupadd --system --gid 9001 nagcmd
sudo adduser --system --gid 9000 --home /usr/local/nagios nagios
sudo usermod --groups nagcmd nagios
sudo usermod --append --groups nagcmd www-data
sudo mkdir /usr/local/nagios
sudo chown nagios:nagios /usr/local/nagios /etc/nagios /var/nagios
Download nagios 4.0.0
Extracting gz
cd nagios
Replacing text inside daemon-init.in with txt found here: http://support.nagios.com/forum/viewtop ... ntu#p74444
sudo ./configure --sysconfdir=/etc/nagios --localstatedir=/var/nagios --with-nagios-user=nagios --with-nagios-group=nagios --with-command-group=nagcmd --with-mail=/usr/bin/sendemail
sudo make all
sudo make install
sudo make install-init
sudo make install-config
sudo make install-commandmode
sudo make install-webconf
sudo cp -R contrib/eventhandlers/ /usr/local/nagios/libexec/
sudo chown -R nagios:nagios /usr/local/nagios/libexec/eventhandlers
sudo htpasswd -c /etc/nagios/htpasswd.users nagios
sudo /etc/init.d/apache2 reload
sudo chmod +x /etc/init.d/nagios
sudo mkdir -p /usr/local/nagios/var/spool/checkresults
sudo chown nagios:nagios /var/nagios/spool/checkresults
sudo chown nagios:nagios /var/nagios/spool
sudo chown nagios:nagios /var/nagios
sudo ln -s /etc/init.d/nagios /etc/rcS.d/S99nagios
sudo /etc/init.d/nagios -v etc/nagios/nagios.cfg
sudo /etc/init.d/nagios start

Thanks for the assistance!!!
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: nagios: daemon: not found

Post by slansing »

I would run that before any installation commands. Since it is a package and it does not require you to compile it along side anything.
Locked