"Caught SIGTERM, shutting down..." in Nagios 4.2.3

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.
Locked
erilane
Posts: 5
Joined: Fri Feb 17, 2017 8:28 pm

"Caught SIGTERM, shutting down..." in Nagios 4.2.3

Post by erilane »

I've recently upgraded from Nagios 3 to 4.2.3

We use the livestatus broker module mk-livestatus-1.2.8p16 http://mathias-kettner.com/check_mk_dow ... ource.html

The module comes packaged with some older Nagios 4 headers, we copy in the headers to match the Nagios version and compile for Nagios 4

Today, I've already seen two crashes that didn't leave many clues

I turned on module debug logging for broker events, hopefully there will be some clues during the next crash

Are there any other suggestions to help me troubleshoot?
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: "Caught SIGTERM, shutting down..." in Nagios 4.2.3

Post by tmcdonald »

If the crashes are due to those headers, we can't do much for you since we do not maintain them. Aside from watching the logs and running it through a debugger or strace we won't have much to go on if it isn't crashing in an unmodified state.

You could try running the latest Core and seeing if that is more stable.
Former Nagios employee
erilane
Posts: 5
Joined: Fri Feb 17, 2017 8:28 pm

Re: "Caught SIGTERM, shutting down..." in Nagios 4.2.3

Post by erilane »

What are the possible things that can cause Nagios to get a SIGTERM signal? Are broker modules the ONLY thing I should be looking at? If this were a segfault (as we previously saw in older version of Nagios when using the wrong headers), we would expect to see SEGV, wouldn't we?
erilane
Posts: 5
Joined: Fri Feb 17, 2017 8:28 pm

Re: "Caught SIGTERM, shutting down..." in Nagios 4.2.3

Post by erilane »

Also the reason I mentioned headers was because that had been a problem for us in the past, but we copied in the headers to match the exact version of Nagios we're compiling - meaning we *should have* solved any problem that was there.

Our use case for livestatus is sending a lot of passive check results via external commands (and some other manipulations using external commands)
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: "Caught SIGTERM, shutting down..." in Nagios 4.2.3

Post by tmcdonald »

We're getting a fair bit into the weeds with this route, but if you can get dtrace4linux (or standard dtrace if it is available) working you might be able to use the syntax in this ServerFault answer to identify what is sending the SIGTERM: http://serverfault.com/a/667224

Considering you are using a broker module we did not write, that would be where we would have to point the finger for now unless we saw this same behavior on a stock Core system (which we have not).
Former Nagios employee
Locked