automatic creation of pids

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.
shivangi
Posts: 32
Joined: Mon Mar 25, 2019 2:01 am

Re: automatic creation of pids

Post by shivangi »

Hi,

Sorry for the late reply .

Can you tell me what should be the output of the command pgrep nagios | wc -l ( this command list the no. of running PIDs ) after i stop the nagios using command service nagios stop.

Thanks.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: automatic creation of pids

Post by scottwilkerson »

Code: Select all

0
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
shivangi
Posts: 32
Joined: Mon Mar 25, 2019 2:01 am

Re: automatic creation of pids

Post by shivangi »

Hi ,

Exactly it should be zero but even after stopping Nagios when i am giving the command pgrep nagios | wc -l , its showing me some PIDs count instead of being zero .

May be due to these fake processes running , the configuration remains the same even after changing it and fake alerts are generated based on the previous configuration.

i hope you got the issue now .

Thanks.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: automatic creation of pids

Post by scottwilkerson »

I would run the following

Code: Select all

service nagios stop
killall -9 nagios
service nagios start
and yes, these extra processes definitely could cause what you described.
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
shivangi
Posts: 32
Joined: Mon Mar 25, 2019 2:01 am

Re: automatic creation of pids

Post by shivangi »

Hi,

Thanks, for the information . I had tried doing this earlier though but didnt got the permanent solution for this . These PIDs are getting generated again after i do some configuration changes and everytime manually i have to kill these fake processes.

Can i have a permanent solution for this so that these Fake PIDs are not created and i dont get fake alerts ?

Thanks .
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: automatic creation of pids

Post by scottwilkerson »

The question becomes "Why is nagios leaving processes open when you restart the service?"

What process are you running after making config changes?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
shivangi
Posts: 32
Joined: Mon Mar 25, 2019 2:01 am

Re: automatic creation of pids

Post by shivangi »

Hi,

I am just making the configuration changes in my files, saving the file, restarting the Nagios instance . That's it .

But i have cron jobs running every 8 hours, that are as well making the configuration changes in the file and restarting the Nagios instance . Can that be a problem?

Thanks .
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: automatic creation of pids

Post by scottwilkerson »

shivangi wrote:But i have cron jobs running every 8 hours, that are as well making the configuration changes in the file and restarting the Nagios instance . Can that be a problem?
Possibly, but I would consider checking that all the processes are stopping correctly when issuing a

Code: Select all

service nagios stop
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
shivangi
Posts: 32
Joined: Mon Mar 25, 2019 2:01 am

Re: automatic creation of pids

Post by shivangi »

and how can i check what processes are running due to i don't know what even after stopping Nagios ?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: automatic creation of pids

Post by scottwilkerson »

Code: Select all

ps -ef|grep nagios.cfg
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked