Nagios 3.5.1 problems with mrtg and snmp

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.
ArKanToS
Posts: 10
Joined: Wed Oct 16, 2013 4:30 am

Re: Nagios 3.5.1 problems with mrtg and snmp

Post 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 :/
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios 3.5.1 problems with mrtg and snmp

Post 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?
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.
ArKanToS
Posts: 10
Joined: Wed Oct 16, 2013 4:30 am

Re: Nagios 3.5.1 problems with mrtg and snmp

Post 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?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios 3.5.1 problems with mrtg and snmp

Post by abrist »

Is the nagios process running yet? Or are you still having problems with startup?
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.
ArKanToS
Posts: 10
Joined: Wed Oct 16, 2013 4:30 am

Re: Nagios 3.5.1 problems with mrtg and snmp

Post by ArKanToS »

Already running
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios 3.5.1 problems with mrtg and snmp

Post 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.
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.
ArKanToS
Posts: 10
Joined: Wed Oct 16, 2013 4:30 am

Re: Nagios 3.5.1 problems with mrtg and snmp

Post 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?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios 3.5.1 problems with mrtg and snmp

Post 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
ArKanToS
Posts: 10
Joined: Wed Oct 16, 2013 4:30 am

Re: Nagios 3.5.1 problems with mrtg and snmp

Post 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?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios 3.5.1 problems with mrtg and snmp

Post 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.
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.
Locked