[nagios@nagiosprodxi3 bin]$ ./npcd -V
npcd 0.4.14 - $Revision: 647 $
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.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
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
[nagios@nagiosprodxi3 bin]$
[nagios@nagiosprodxi3 nagios]$ cat ./etc/pnp/npcd.cfg
# 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
#
# perfdata_spool_dir = </path/to/directory/>
#
perfdata_spool_dir = /usr/local/nagios/var/spool/perfdata/
# Execute following command for each found file
# in 'perfdata_spool_dir'
#
# perfdata_file_run_cmd = </path/to/command>
#
# Must be executable by user/group from above
#
# perfdata_file_run_cmd = </path/to/filename>
#
perfdata_file_run_cmd = /usr/local/nagios/libexec/process_perfdata.pl
# perfdata_file_run_cmd_args (optional)
#
# If you wish, you can apply more arguments to the
# perfdata_file_run_cmd
#
# Hint:
# NPCD will create a command line like this:
# '<perfdata_file_runc_cmd> <perfdata_file_runc_cmd_args> <filename_from_spool_dir>'
#
perfdata_file_run_cmd_args = -b
# npcd_max_threads - define how many parallel threads we
# should start
npcd_max_threads = 10
# sleep_time - how many seconds should npcd wait between dirscans
#
# sleep_time = 15 (default)
sleep_time = 15
# EXPERIMENTAL
#
# use_load_threshold - enables/disables load watching
#
# use_load_threshold = <0 / 1> (default: 0)
#
#use_load_threshold = 0
# EXPERIMENTAL
#
# load_threshold - npcd won't start new threads
# if your system load is over this threshold
#
# load_threshold = <float value> (default: 10.0)
#
# Hint: Do not use "," as decimal delimeter
#
load_threshold = 120.0
# location of your pid file
#pid_file=/var/run/npcd.pid
pid_file=/usr/local/nagiosxi/var/subsys/npcd.pid
# We have to end with a newline
Last edited by dwhitfield on Mon Oct 10, 2016 9:38 am, edited 1 time in total.
Reason:marking with green check mark
I've got quite many perfdata files piled up in the "/usr/local/nagios/var/spool/perfdata" directory.
[nagios@nagiosprodxi3 nagios]$ ls /usr/local/nagios/var/spool/perfdata | wc -l 2693
It is possible that npcd will "catch up", and process these files now that is running. Watch the above command for a while to see if this number (2693) is decreasing.
cd /usr/local/nagios/var/spool
rm -rf perfdata
mkdir perfdata
chown nagios.nagios perfdata
chmod 755 perfdata
service npcd restart
Note: You will lose only a chunk of the historical data (whatever was if the files you deleted) but not all of it.
I would also recommend increasing the timeout in the "/usr/local/nagios/etc/pnp/process_perfdata.cfg" to 20. See our KB article on the issue. https://support.nagios.com/kb/article.php?id=9
Be sure to check out our Knowledgebase for helpful articles and solutions!
lmiltchev wrote:I've got quite many perfdata files piled up in the "/usr/local/nagios/var/spool/perfdata" directory.
[nagios@nagiosprodxi3 nagios]$ ls /usr/local/nagios/var/spool/perfdata | wc -l 2693
It is possible that npcd will "catch up", and process these files now that is running. Watch the above command for a while to see if this number (2693) is decreasing.
cd /usr/local/nagios/var/spool
rm -rf perfdata
mkdir perfdata
chown nagios.nagios perfdata
chmod 755 perfdata
service npcd restart
Note: You will lose only a chunk of the historical data (whatever was if the files you deleted) but not all of it.
I would also recommend increasing the timeout in the "/usr/local/nagios/etc/pnp/process_perfdata.cfg" to 20. See our KB article on the issue. https://support.nagios.com/kb/article.php?id=9
Glad to hear it is resolved. I am going to lock the thread. Please feel free to post again if you have you another issue. Thank you for using the Nagios forums!