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

automatic creation of pids

Post by shivangi »

Hi Team,

I am currently working on nagios core version 4.4.1 and the problem i am facing is automatic generation of the nagios pids whenever i do any configuration changes on it as a reult of which nagios sometimes throws fake alerts , no alerts at all , missing configuration changes etc.

So everytime i have to manually kill those nagios pids in order to have nagios function properly ...

Can i know the reason for such behavior of Nagios and have a permanent solution for this so that no fake pids are generated at regular intervals .

Thanks in advance ..
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 »

What is the location of the pid files?

What is set as the

Code: Select all

lock_file
in your nagios.cfg?
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 your response. :)
Location of my lock file is /usr/local/Nagios/var/Nagios.lock

and whenever i do pgrep nagios | wc -l even after stopping nagios ,there are a lot of pids running (approx 100 or even more).
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 »

What OS is this running on?

Also, next time you stop nagios can you run the following so we can see what they are?

Code: Select all

ps -ef|grep nagios
finally, how are you starting/stopping nagios (what commands do you issue)?
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 Scotwilkerson,

Refer the attachment for the information on OS version and output of ps -ef| grep nagios . I hope it helps . :)

Also the commands i use for starting and stopping the nagios are :

service nagios start
service nagios stop

Thanks .
Attachments
doc1.docx
(330.16 KiB) Downloaded 164 times
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 »

Is this the server running nagios? I only see NRPE checks...

let's narrow it down

Code: Select all

ps -ef|grep nagios.cfg
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 »

Yes Nagios is running on this server .

Refer the Attachment for the output of ps -ef | grep Nagios.cfg.
Attachments
doc1.docx
(22.83 KiB) Downloaded 175 times
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 »

What is the output of the following:

Code: Select all

grep nagios.lock /etc/init.d/nagios
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 have attached the document for the command u asked.Hope it helps :)

Thanks.
Attachments
doc1.docx
(16.53 KiB) Downloaded 157 times
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 »

This all looks normal, can you describe the details of what you are seeing as a problem? I think I'm misunderstanding the actual issue.
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked