Page 2 of 2

Re: Nagios 3.5.1 problems with mrtg and snmp

Posted: Tue Oct 22, 2013 3:50 am
by ArKanToS
Nagios started up.
Are this ubuntu commands?

root@*****:/tmp/nagios-plugins-1.4.15# chkconfig --add nagios
/sbin/insserv: No such file or directory
nagios 0:off 1:off 2:off 3:off 4:off 5:off 6:off S:on
root@*****:/tmp/nagios-plugins-1.4.15# chkconfig --level 35 nagios on
/sbin/insserv: No such file or directory
root@*****:/tmp/nagios-plugins-1.4.15# chkconfig --add httpd
httpd: unknown service

edit: after configure like you told me, mrtg continues don't working http://img404.imageshack.us/img404/5377/e542.jpg. Do i need to configure other things? and what about uptime error :/

Re: Nagios 3.5.1 problems with mrtg and snmp

Posted: Tue Oct 22, 2013 3:36 pm
by abrist
You may be using update-rc instead of systemd . . .

Code: Select all

sudo update-rc.d nagios defaults
sudo update-rc.d httpd defaults
Do you have an mrtg cron job?

Re: Nagios 3.5.1 problems with mrtg and snmp

Posted: Wed Oct 23, 2013 3:07 am
by ArKanToS
abrist wrote:You may be using update-rc instead of systemd . . .

Code: Select all

sudo update-rc.d nagios defaults
sudo update-rc.d httpd defaults
Do you have an mrtg cron job?
root@******:/tmp/nagios-plugins-1.4.15# sudo update-rc.d nagios defaults
update-rc.d: warning: /etc/init.d/nagios missing LSB keyword 'default-start'

update-rc.d: warning: /etc/init.d/nagios missing LSB keyword 'default-stop'

System start/stop links for /etc/init.d/nagios already exist.
root@******:/tmp/nagios-plugins-1.4.15# sudo update-rc.d httpd defaults
update-rc.d: /etc/init.d/httpd: file does not exist

mrtg cron job?

Re: Nagios 3.5.1 problems with mrtg and snmp

Posted: Wed Oct 23, 2013 4:46 pm
by abrist
Is the nagios process running yet? Or are you still having problems with startup?

Re: Nagios 3.5.1 problems with mrtg and snmp

Posted: Wed Oct 23, 2013 5:12 pm
by ArKanToS
Already running

Re: Nagios 3.5.1 problems with mrtg and snmp

Posted: Thu Oct 24, 2013 10:59 am
by abrist
Well, you may just have to use rc.local to start nagios as your server's init system and the hacked out init script are not playing well together.

Re: Nagios 3.5.1 problems with mrtg and snmp

Posted: Thu Oct 24, 2013 12:06 pm
by ArKanToS
abrist wrote:Well, you may just have to use rc.local to start nagios as your server's init system and the hacked out init script are not playing well together.
how?

Re: Nagios 3.5.1 problems with mrtg and snmp

Posted: Fri Oct 25, 2013 12:47 pm
by slansing
Edit:

Code: Select all

/etc/rc.d/rc.local
And add:

Code: Select all

# Start nagios:
if [ -x /etc/rc.d/rc.nagios ]; then
  echo "Starting nagios..."
  /etc/rc.d/rc.nagios start
fi

Re: Nagios 3.5.1 problems with mrtg and snmp

Posted: Sat Oct 26, 2013 6:26 am
by ArKanToS
i have 8 rc*.d, rc0.d, rc1.d, rc2.d, rc3.d, rc4.d, rc5.d, rc6.d and rcS.d. i assume that is'nt righ?

Re: Nagios 3.5.1 problems with mrtg and snmp

Posted: Mon Oct 28, 2013 12:12 pm
by abrist
You would have to create an rc.local file and then create the systemd config and then add it through systemd. This can be a pain in the rear. You may just want to try to use the old v3.5.1 init script.