LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-14-2017, 06:15 AM   #1
genese
Member
 
Registered: Feb 2006
Location: belgium
Posts: 76

Rep: Reputation: 20
Disabled nagios service starts on update (CentOS 6)


Hi,

Nagios is installed because I need a few plugins, but I don't run it. I use only nrpe.

Here are the relevant chkconfig lines :
Code:
nagios          0:off   1:off   2:off   3:off   4:off   5:off   6:off        
nrpe            0:off   1:off   2:on    3:on    4:on    5:on    6:off
No problem with this setup for years.

Now, the nagios service is started after each update.

How do I stop this behavior ?
 
Old 12-14-2017, 07:53 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Review /etc/init.d/nrpe and see if it has anything in it that starts Nagios as a dependency. You might also just do
"grep -i nagios /etc/init.d/*" to see if any new startup script has been created which is turned on.

Also a lot of people put Nagios in xinit.d rather than running it as a standalone. Is it possible what you're seeing is the Nagios port being LISTENed on by xinit.d rather than Nagios daemon actually running?
 
Old 12-14-2017, 10:25 AM   #3
genese
Member
 
Registered: Feb 2006
Location: belgium
Posts: 76

Original Poster
Rep: Reputation: 20
Quote:
Originally Posted by MensaWater View Post
Review /etc/init.d/nrpe and see if it has anything in it that starts Nagios as a dependency. You might also just do
"grep -i nagios /etc/init.d/*" to see if any new startup script has been created which is turned on.
Nothing found

Quote:
Also a lot of people put Nagios in xinit.d rather than running it as a standalone. Is it possible what you're seeing is the Nagios port being LISTENed on by xinit.d rather than Nagios daemon actually running?
No, it's the real thing
Code:
# ps -eaf | grep nagios
nrpe      4711     1  0 16:53 ?        00:00:00 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d
nagios    4971     1  0 16:54 ?        00:00:00 /usr/sbin/nagios -d /etc/nagios/nagios.cfg
nagios    4973  4971  0 16:54 ?        00:00:00 /usr/sbin/nagios --worker /var/spool/nagios/cmd/nagios.qh
.
.
nagios    4984  4971  0 16:54 ?        00:00:00 /usr/sbin/nagios --worker /var/spool/nagios/cmd/nagios.qh
The problem seem to be related more to the update process (yum ? rpm ?) than dependencies :

Restarting nrpe doesn't start nagios.

"yum reinstall nagios" starts nagios.
 
Old 12-14-2017, 01:03 PM   #4
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,780

Rep: Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198
Why
yum reinstall nagios
and not
yum update nagios
?
 
Old 12-14-2017, 01:38 PM   #5
genese
Member
 
Registered: Feb 2006
Location: belgium
Posts: 76

Original Poster
Rep: Reputation: 20
Quote:
Why yum reinstall nagios and not yum update nagios ?
because my nagios is up to date.

so "update" will do nothing.

I'm debugging a problem, not doing a normal server management.
 
Old 12-14-2017, 01:52 PM   #6
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
So this only happens on the (re)install? If so why not just run "service nagios stop" after the reinstall and verify it leaves nrpe running?

Maybe the start of Nagios is occurring as part of the postinstall step of the rpm?
 
Old 12-14-2017, 02:22 PM   #7
genese
Member
 
Registered: Feb 2006
Location: belgium
Posts: 76

Original Poster
Rep: Reputation: 20
Quote:
Originally Posted by MensaWater View Post
So this only happens on the (re)install? If so why not just run "service nagios stop" after the reinstall and verify it leaves nrpe running?
Yes, I do it after each update. A few days later to be precise, because the start of nagios service with a nearly empty .cfg is quite silent.

Of course this problem is not critical. If it was, I would not be here discussing about it.

Quote:
Maybe the start of Nagios is occurring as part of the postinstall step of the rpm?
Yes, it's my feeling since the beginning.
 
Old 12-15-2017, 10:12 AM   #8
genese
Member
 
Registered: Feb 2006
Location: belgium
Posts: 76

Original Poster
Rep: Reputation: 20
Final word

As I mark this thread as solved, I must left a pointer to the accepted solution : https://www.linuxquestions.org/quest...ort-4175619584
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NAGIOS: Name or service not known output returned for custom developed service status katsanterre Linux - Software 2 05-07-2013 08:55 AM
CentOS 6.3 Problem Booting Disabled the Console Management Service and 2 others j.smith1981 Linux - General 3 10-02-2012 10:36 AM
Nagios Web Interface does not notify when nagios service is killed! learnerAlways Linux - Newbie 1 11-04-2011 12:23 AM
Nagios problem when starts andybrr Linux - Networking 1 04-18-2008 03:46 PM
named Starts at Boot Even When Disabled? sancho Fedora 4 09-15-2006 12:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration