Page 1 of 1

How do I trigger an nagios server crash purposely ?

Posted: Wed Dec 14, 2016 4:58 am
by nagmoto
Hi
Looking at https://github.com/NagiosEnterprises/na ... issues/299.
I am hoping I can learn more on crash debugging using abrt.
Question is how can I trigger nagios server coredump into /var/abrt purposely on my test server ?

Re: How do I trigger an nagios server crash purposely ?

Posted: Wed Dec 14, 2016 10:53 am
by rkennedy
This is a bit above support that we can provide, but you would need to create a custom configuration file for ABRT. Take a look at this link - https://fedorahosted.org/abrt/wiki/AbrtConfiguration

From what it looks like, hooking abrt into everything, or perhaps starting the process through abrt instead of as a service.

Re: How do I trigger an nagios server crash purposely ?

Posted: Wed Dec 14, 2016 11:00 am
by avandemore
You should rest up on Linux internals, Nagios processes are subject to those parameters and are not specific to Nagios.

To begin with you want to see ulimit. Good luck!

Re: How do I trigger an nagios server crash purposely ?

Posted: Thu Dec 15, 2016 2:34 am
by nagmoto
Thanks to avandemore and rkennedy for responses.
To be more specific,on a centos 7.2 nagios test server, I did the following

1.Make sure abrt is enabled and ready to catch the coredump.

Code: Select all

[nagios@nagios02t ~] sleep 100 &
[1] 35223
[nagios@nagios02t ~]$ kill -s SEGV 35223

[nagios@nagios02t ~]$ sudo abrt-cli list
id 184720a9a7be951757917580cc76411d8a492cf4
reason:         sleep killed by SIGSEGV
time:           Thu 15 Dec 2016 03:39:32 AM EST
cmdline:        sleep 100
package:        coreutils-8.22-15.el7_2.1
uid:            35233 (nagios)
count:          1
Directory:      /var/spool/abrt/ccpp-2016-12-15-03:39:32-14701

The Autoreporting feature is disabled. Please consider enabling it by issuing
'abrt-auto-reporting enabled' as a user with root privileges
[nagios@nagios02t ~]$

2. I tried " kill -s SIGSEGV 8041" and it won't trigger the core-dump of nagios server process into /var/spool/abrt.

Code: Select all

[1481786374] wproc: Registry request: name=Core Worker 8046;pid=8046
[1481786374] Successfully launched command file worker with pid 8051
[1481786470] Caught SIGSEGV, shutting down...
[1481786470] Successfully shutdown... (PID=8041)
[1481786470] Event broker module 'NERD' deinitialized successfully.
3. I don't Nagios coredump issure now, but I think it is good idea to know how to deal with Nagios coredump by simulation.
R1: https://access.redhat.com/documentation ... _test.html

Re: How do I trigger an nagios server crash purposely ?

Posted: Thu Dec 15, 2016 10:53 am
by tmcdonald
This might be the first time we've been asked in a professional context for advice on how to crash our product :)

In this case I would recommend speaking to a Linux admin on your team about this, as it is somewhat out of scope for our forum. Generally speaking if you are unable to get a core dump this is a configuration which must be made at the OS level.

Re: How do I trigger an nagios server crash purposely ?

Posted: Thu Dec 15, 2016 1:59 pm
by nagmoto
ok, please close this thread.