Page 1 of 2

XI services needed on Mod Gearman Remote Server

Posted: Thu Mar 19, 2015 2:02 pm
by brdr
Hi

Using XI 2014R2.3.

Is there documentation indicating what Nagios services are required to run on a remote Mod Gearman server processing XI host/service checks?

I ask because my /usr/local/nagios/var/spool/xidpe directory is filling up the inodes usage. I followed post below and made suggested changes but files keep showing up in xidpe directory. NOTE: I do not see perfdata.log in /usr/local/nagios/var.

http://support.nagios.com/forum/viewtop ... 16&t=22288

Thx

Re: XI services needed on Mod Gearman Remote Server

Posted: Thu Mar 19, 2015 3:19 pm
by cmerchant
Is NPCD running on the XI server?

Code: Select all

service npcd status
tail -25 /usr/local/nagios/var/perfdata.log
tail -25 /usr/local/nagios/var/npcd.log
In addition to this you must have all of the plugins which your hosts use to run checks installed on your worker servicers.
Mod_Gearman follows the same rule sets as DNX as far as plugin requirements and configuration.
http://assets.nagios.com/downloads/nagi ... lugins.pdf

Re: XI services needed on Mod Gearman Remote Server

Posted: Thu Mar 19, 2015 3:23 pm
by brdr
Yes, npcd has always been running. I do not have that perfdata.log.

NPCD LOG
[11-06-2014 16:07:14] NPCD: Please have a look at 'npcd -V' to get license information
[11-06-2014 16:07:14] NPCD: HINT: load_threshold is enabled - ('10.000000')
[12-03-2014 14:11:18] NPCD: Caught Termination Signal - Hasta la vista... baby
[02-22-2015 11:40:44] NPCD: npcd Daemon (0.4.14) started with PID=2262
[02-22-2015 11:40:44] NPCD: Please have a look at 'npcd -V' to get license information
[02-22-2015 11:40:44] NPCD: HINT: load_threshold is enabled - ('10.000000')
[03-19-2015 14:24:34] NPCD: Caught Termination Signal - Hasta la vista... baby
[03-19-2015 14:25:01] NPCD: npcd Daemon (0.4.14) started with PID=32756
[03-19-2015 14:25:01] NPCD: Please have a look at 'npcd -V' to get license information
[03-19-2015 14:25:01] NPCD: HINT: load_threshold is enabled - ('30.000000')

Re: XI services needed on Mod Gearman Remote Server

Posted: Thu Mar 19, 2015 9:52 pm
by Box293
Lets increase the logging verbosity and then take a deeper look into the logs. Follow the FAQ entry below to increase the log level of process_perfdata and npcd:

http://support.nagios.com/wiki/index.ph ... leshooting

Wait 15 - 20 minutes and then get a tail of the logs:

Code: Select all

tail -250 /usr/local/nagios/var/perfdata.log > /tmp/perfdata.txt
tail -250 /usr/local/nagios/var/npcd.log > /tmp/npcd.txt
Send us a copy of /tmp/perfdata.txt and /tmp/npcd.txt

Don't forget to turn down the log level as per the FAQ when you are done!

Re: XI services needed on Mod Gearman Remote Server

Posted: Fri Mar 20, 2015 8:49 am
by brdr
Attached is the tail output from npcd.log. I still do NOT have a perfdata.log in the /usr/local/nagios/var directory.

The following services are running on the remote gearman worker server:
npcd
ndo2db
nagios

There are 972 files now in the /usr/local/nagios/var/spool/xidpe directory which i cleaned late yesterday on the remote worker.
- A good majority of these are 0 length files
- The ones that have data in them are service related. All of these services should NOT even run on this remote server because these services (assigned to service group 'nagios_localhost_sg') are for the XI server only and in the /etc/mod_gearman_neb.conf on the XI server i have this:
# sets a list of servicegroups which will not be executed
# by gearman. They are just passed through.
# Default is none
localservicegroups=nagios_localhost_sg

So, in recap, there are 3 issues:

1) no perfdata.log is created
2) files are being dumped in xidpe directory (0 length) on remote server (local XI server xidpe directory is always clean)
3) gearmand is pushing through service checks that should ONLY be handled local XI Server

NOTE: On remote server:
$ grep xidpe commands.cfg
command_line /bin/mv /usr/local/nagios/var/host-perfdata /usr/local/nagios/var/spool/xidpe/$TIMET$.perfdata.host
command_line /bin/mv /usr/local/nagios/var/service-perfdata /usr/local/nagios/var/spool/xidpe/$TIMET$.perfdata.service

Thx,
brdr

Re: XI services needed on Mod Gearman Remote Server

Posted: Fri Mar 20, 2015 11:16 am
by lmiltchev
The following services are running on the remote gearman worker server:
npcd
ndo2db
nagios
Is your remote box a Nagios XI server?

Can you run the following commands on the "local" Nagios XI server and show us the output in code wraps?

Code: Select all

grep perfdata=  /etc/mod_gearman/mod_gearman_neb.conf
cat /usr/local/nagios/etc/pnp/process_perfdata.cfg
cat /usr/local/nagios/etc/pnp/npcd.cfg

Re: XI services needed on Mod Gearman Remote Server

Posted: Fri Mar 20, 2015 12:03 pm
by brdr
Yes, all of our remote workers are Nagios XI.

mod gearman neb file

Code: Select all

perfdata=no

Code: Select all

[root@bed-600-124 ~]# cat /usr/local/nagios/etc/pnp/process_perfdata.cfg
#
# Config File for process_perfdata.pl
#
# $Id: process_perfdata.cfg-sample.in 520 2008-09-16 12:50:10Z pitchfork $
#
# process_perfdata.pl Timout
#
TIMEOUT = 5
#
# Use RRDs Perl Module
#
USE_RRDs = 1
#
#
#
RRDPATH = /usr/local/nagios/share/perfdata
#
#
#
RRDTOOL = /usr/bin/rrdtool
#
#
#
CFG_DIR = /usr/local/nagios/etc/pnp
#
#
#
RRD_HEARTBEAT = 8460
#
#
#
RRA_CFG = /usr/local/nagios/etc/pnp/rra.cfg
#
#
#
RRA_STEP = 60
#
#
#
LOG_FILE = /usr/local/nagios/var/perfdata.log
#
# Loglevel 0=silent 1=normal 2=debug
#
LOG_LEVEL = 0
#
# XML encoding
# The supported encodings are ISO-8859-1, UTF-8 and US-ASCII.
# http://www.php.net/xml-parser-create
XML_ENC = UTF-8
#
# EXPERIMENTAL rrdcached Support
# Use only with rrdtool svn revision 1511+
#
# RRD_DAEMON_OPTS = unix:/tmp/rrdcached.sock

Code: Select all

# NPCD.cfg - sample configuration file for PNPs NPCD
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation;
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
#
# $Id: npcd.cfg-sample.in 440 2008-04-24 09:08:20Z hendrikb $

# Privilege Options

user = nagios
group = nagios


# Logging Options

# log_type - define if you want your logs to
# 'syslog' or to a 'file'
#
# log_type = <value>
#

log_type = file
#log_type = syslog


# log_file - define a path to your logfile
# needed if 'log_type'='file'
#
# log_file = </path/to/logpath/filename>
#

log_file = /usr/local/nagios/var/npcd.log


# max_logfile_size - defines the maximum filesize (bytes)
# before the logfile will rotated.
#
# max_logfile_size = <value> (default 10Mbyte)
#

max_logfile_size = 10485760


# log_level - how much should we log?
#
# log_level = <integer value>
#
#  0 = No logging - except errors
#  1 = Small logging - some few more output
#  2 = More Logging (actual ALL logs)
# -1 = DEBUG Mode - ALL Logging and slower processing
#

log_level = 0


# NEEDED OPTIONS
#
# perfdata_spool_dir - where we can find the
# performance data files
#

Re: XI services needed on Mod Gearman Remote Server

Posted: Fri Mar 20, 2015 2:35 pm
by tgriep
I have a few questions.

You have a local Nagios Xi running the Gearman server and a remote Nagios XI server running the Gearman worker that is receiving checks from the local XI/Gearman server.
If that correct?

Can you post the following files and which server they are on?
mod_gearman_neb.conf
mod_gearman_worker.conf

Re: XI services needed on Mod Gearman Remote Server

Posted: Sat Mar 21, 2015 6:22 am
by brdr
Yes, that is correct. Attached are the files. Thx.

NOTE: On the remote server I do not run the gearmand, just the mod_gearman_worker service.

Re: XI services needed on Mod Gearman Remote Server

Posted: Sat Mar 21, 2015 6:23 am
by brdr
here is the remote worker conf.