How do I trigger an nagios server crash purposely ?

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
nagmoto
Posts: 195
Joined: Fri Jan 09, 2015 8:05 am

How do I trigger an nagios server crash purposely ?

Post 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 ?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

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

Post 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.
Former Nagios Employee
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

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

Post 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!
Previous Nagios employee
nagmoto
Posts: 195
Joined: Fri Jan 09, 2015 8:05 am

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

Post 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
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

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

Post 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.
Former Nagios employee
nagmoto
Posts: 195
Joined: Fri Jan 09, 2015 8:05 am

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

Post by nagmoto »

ok, please close this thread.
Locked