Problems with PNP4Nagios

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.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Problems with PNP4Nagios

Post by dwhitfield »

Whoops, that was supposed to be a service npcd restart on the last one. Please try that and report back.

Also, can you post or PM your /usr/local/nagios/var/objects.cache? If you choose to PM, please make sure you update this thread after doing so, so that it pops back up on our support dashboard.
softw
Posts: 9
Joined: Mon Dec 19, 2016 10:40 am

Re: Problems with PNP4Nagios

Post by softw »

Thanks. NPCD is running. The configuration must be ok, since in the original machine has the same configuration and PNP4Nagios works.

In the destination machine, the perfdata.log shows the error:
2016-12-20 16:14:32 [1590] [0] RRDs::update /usr/local/pnp4nagios/var/perfdata/.pnp-internal/runtime_errors.rrd 0:0
2016-12-20 16:14:32 [1590] [0] RRDs::update ERROR /usr/local/pnp4nagios/var/perfdata/.pnp-internal/runtime_errors.rrd: illegal attempt to update using time 0 when last update time is 1480441853 (minimum one second step)
2016-12-20 16:14:32 [1590] [0] RRDs::update /usr/local/pnp4nagios/var/perfdata/.pnp-internal/runtime_invalid.rrd 0:0
2016-12-20 16:14:32 [1590] [0] RRDs::update ERROR /usr/local/pnp4nagios/var/perfdata/.pnp-internal/runtime_invalid.rrd: illegal attempt to update using time 0 when last update time is 1480441853 (minimum one second step)
2016-12-20 16:14:32 [1590] [0] RRDs::update /usr/local/pnp4nagios/var/perfdata/.pnp-internal/runtime_skipped.rrd 0:0
2016-12-20 16:14:32 [1590] [0] RRDs::update ERROR /usr/local/pnp4nagios/var/perfdata/.pnp-internal/runtime_skipped.rrd: illegal attempt to update using time 0 when last update time is 1480441853 (minimum one second step)
2016-12-20 16:14:32 [1590] [0] RRDs::update /usr/local/pnp4nagios/var/perfdata/.pnp-internal/runtime_update.rrd 0:0
2016-12-20 16:14:32 [1590] [0] RRDs::update ERROR /usr/local/pnp4nagios/var/perfdata/.pnp-internal/runtime_update.rrd: illegal attempt to update using time 0 when last update time is 1480441853 (minimum one second step)
2016-12-20 16:14:32 [1590] [0] RRDs::update /usr/local/pnp4nagios/var/perfdata/.pnp-internal/runtime_create.rrd 0:0
2016-12-20 16:14:32 [1590] [0] RRDs::update ERROR /usr/local/pnp4nagios/var/perfdata/.pnp-internal/runtime_create.rrd: illegal attempt to update using time 0 when last update time is 1480441853 (minimum one second step)

In the original machine does find any problem in updating all what it needs and it has also de same rights.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Problems with PNP4Nagios

Post by dwhitfield »

On both machines (the working and the non-working), please post the results of the two following command.

Code: Select all

ntpstat
ntpq -pn
As for NPCD, I understood that it was running, but sometimes restarting the process kicks things back into gear.

Another thing that can cause these issues is duplicate checks. If you post your objects.cache, I can help you look through it for duplicate checks.
softw
Posts: 9
Joined: Mon Dec 19, 2016 10:40 am

Re: Problems with PNP4Nagios

Post by softw »

In both machines:
ntpstat
Unable to talk to NTP daemon. Is it running?
ntpq -pn
ntpq: read: Connection refused.

The objects.cache file:

Code: Select all

########################################
#       NAGIOS OBJECT CACHE FILE
#
# THIS FILE IS AUTOMATICALLY GENERATED
# BY NAGIOS.  DO NOT MODIFY THIS FILE!
#
# Created: Tue Dec 20 17:59:53 2016
########################################

define timeperiod {
	timeperiod_name	24x7
	alias	24 Hours A Day, 7 Days A Week
	sunday	00:00-24:00
	monday	00:00-24:00
	tuesday	00:00-24:00
	wednesday	00:00-24:00
	thursday	00:00-24:00
	friday	00:00-24:00
	saturday	00:00-24:00
	}

define timeperiod {
	timeperiod_name	24x7_sans_holidays
	alias	24x7 Sans Holidays
	december 25	00:00-00:00
	july 4	00:00-00:00
	january 1	00:00-00:00
	thursday 4 november	00:00-00:00
	monday 1 september	00:00-00:00
	monday -1 may	00:00-00:00
	sunday	00:00-24:00
	monday	00:00-24:00
	tuesday	00:00-24:00
	wednesday	00:00-24:00
	thursday	00:00-24:00
	friday	00:00-24:00
	saturday	00:00-24:00
	}

define timeperiod {
	timeperiod_name	none
	alias	No Time Is A Good Time
	}

define timeperiod {
	timeperiod_name	us-holidays
	alias	U.S. Holidays
	january 1	00:00-00:00
	july 4	00:00-00:00
	december 25	00:00-00:00
	monday -1 may	00:00-00:00
	monday 1 september	00:00-00:00
	thursday 4 november	00:00-00:00
	}

define timeperiod {
	timeperiod_name	workhours
	alias	Normal Work Hours
	monday	09:00-17:00
	tuesday	09:00-17:00
	wednesday	09:00-17:00
	thursday	09:00-17:00
	friday	09:00-17:00
	}

define command {
	command_name	check-host-alive
	command_line	$USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5
	}

define command {
	command_name	check_dhcp
	command_line	$USER1$/check_dhcp $ARG1$
	}

define command {
	command_name	check_ftp
	command_line	$USER1$/check_ftp -H $HOSTADDRESS$ $ARG1$
	}

define command {
	command_name	check_hpjd
	command_line	$USER1$/check_hpjd -H $HOSTADDRESS$ $ARG1$
	}

define command {
	command_name	check_http
	command_line	$USER1$/check_http -I $HOSTADDRESS$ $ARG1$
	}

define command {
	command_name	check_https
	command_line	$USER1$/check_http -I $HOSTADDRESS$ $ARG1$ -S
	}

define command {
	command_name	check_hyperv_perf
	command_line	$USER1$/check_hyperv_perf $HOSTADDRESS$ "myPass" $ARG1$ $_HOSTVM_LIST$
	}

define command {
	command_name	check_imap
	command_line	$USER1$/check_imap -H $HOSTADDRESS$ $ARG1$
	}

define command {
	command_name	check_local_mrtgtraf
	command_line	$USER1$/check_mrtgtraf -F $ARG1$ -a $ARG2$ -w $ARG3$ -c $ARG4$ -e $ARG5$
	}


define command {
	command_name	check_nrpe
	command_line	/usr/local/nagios/libexec/check_nrpe -H $HOSTADDRESS$ -t 640 -c $ARG1$
	}

define command {
	command_name	check_nrpe_arg
	command_line	/usr/local/nagios/libexec/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$ $ARG3$ -t 640
	}

define command {
	command_name	check_nt
	command_line	$USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -v $ARG1$ $ARG2$
	}

define command {
	command_name	check_ping
	command_line	$USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5
	}

define command {
	command_name	check_ping6
	command_line	/usr/bin/ping6 -n -U -w 10 -c 1 $HOSTADDRESS$
	}

define command {
	command_name	check_pop
	command_line	$USER1$/check_pop -H $HOSTADDRESS$ $ARG1$
	}

define command {
	command_name	check_sftp
	command_line	$USER1$/check_ftp -H $HOSTADDRESS$ $ARG1$ -S
	}

define command {
	command_name	check_smtp
	command_line	$USER1$/check_smtp -H $HOSTADDRESS$ $ARG1$
	}

define command {
	command_name	check_snmp
	command_line	/usr/local/nagios/libexec/check_snmp -H $ARG1$ -C $ARG2$ -o $ARG3$ -l $ARG4$ -o $ARG5$ -l $ARG6$
	}

define command {
	command_name	check_ssh
	command_line	$USER1$/check_ssh $ARG1$ $HOSTADDRESS$
	}

define command {
	command_name	check_tcp
	command_line	$USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$
	}

define command {
	command_name	process-host-perfdata
	command_line	'/bin/mv /usr/local/pnp4nagios/var/host-perfdata /usr/local/pnp4nagios/var/spool/host-perfdata.$TIMET$'
	}

define command {
	command_name	process-host-perfdata-file
	command_line	/bin/mv /usr/local/pnp4nagios/var/host-perfdata /usr/local/pnp4nagios/var/spool/host-perfdata.$TIMET$
	}

define command {
	command_name	process-service-perfdata
	command_line	'/bin/mv /usr/local/pnp4nagios/var/service-perfdata /usr/local/pnp4nagios/var/spool/service-perfdata.$TIMET$'
	}

define command {
	command_name	process-service-perfdata-file
	command_line	/bin/mv /usr/local/pnp4nagios/var/service-perfdata /usr/local/pnp4nagios/var/spool/service-perfdata.$TIMET$
	}


define contactgroup {
	contactgroup_name	admins
	alias	Nagios Administrators
	members	nagiosadmin
	}

define contactgroup {
	contactgroup_name	dess
	alias	Operators Dess
	members	jorge.tena,jaime.nomen
	}

define hostgroup {
	hostgroup_name	PDGS
	alias	dcm
	members	host1,host2,host3
	}

define contact {
	contact_name	user
	alias	user
	service_notification_period	24x7
	host_notification_period	24x7
	service_notification_options	r,w,u,c,f,s
	host_notification_options	r,d,u,f,s
	service_notification_commands	notify-service-by-email
	host_notification_commands	notify-host-by-email
	minimum_importance	0
	host_notifications_enabled	1
	service_notifications_enabled	1
	can_submit_commands	1
	retain_status_information	1
	retain_nonstatus_information	1
	}

define host {
	host_name	host1
	alias	host1
	address	address1
	check_period	24x7
	check_command	check-host-alive
	contact_groups	admins
	notification_period	workhours
	initial_state	o
	importance	0
	check_interval	5.000000
	retry_interval	1.000000
	max_check_attempts	10
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,d,u
	notifications_enabled	1
	notification_interval	120.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	retain_status_information	1
	retain_nonstatus_information	1
	}

define host {
	host_name	host2
	alias	host2
	address	address2
	check_period	24x7
	check_command	check-host-alive
	contact_groups	admins
	notification_period	workhours
	initial_state	o
	importance	0
	check_interval	5.000000
	retry_interval	1.000000
	max_check_attempts	10
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,d,u
	notifications_enabled	1
	notification_interval	120.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	retain_status_information	1
	retain_nonstatus_information	1
	}

define host {
	host_name	host3
	alias	host3
	address	address3
	check_period	24x7
	check_command	check-host-alive
	contact_groups	admins
	notification_period	workhours
	initial_state	o
	importance	0
	check_interval	5.000000
	retry_interval	1.000000
	max_check_attempts	10
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,d,u
	notifications_enabled	1
	notification_interval	120.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	retain_status_information	1
	retain_nonstatus_information	1
	}


define service {
	host_name	host1
	service_description	FTP
	check_period	24x7
	check_command	check_ftp
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	5.000000
	retry_interval	1.000000
	max_check_attempts	4
	is_volatile	0
	parallelize_check	1
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,w,u,c
	notifications_enabled	1
	notification_interval	60.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	action_url	/pnp4nagios/graph?host=$HOSTNAME$&srv=$SERVICEDESC$' class='tips' rel='/pnp4nagios/popup?host=$HOSTNAME$&srv=$SERVICEDESC$
	retain_status_information	1
	retain_nonstatus_information	1
	}

define service {
	host_name	host1
	service_description	HTTP
	check_period	24x7
	check_command	check_http
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	5.000000
	retry_interval	1.000000
	max_check_attempts	4
	is_volatile	0
	parallelize_check	1
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,w,u,c
	notifications_enabled	1
	notification_interval	60.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	action_url	/pnp4nagios/graph?host=$HOSTNAME$&srv=$SERVICEDESC$' class='tips' rel='/pnp4nagios/popup?host=$HOSTNAME$&srv=$SERVICEDESC$
	retain_status_information	1
	retain_nonstatus_information	1
	}

define service {
	host_name	host1
	service_description	HTTPS
	check_period	24x7
	check_command	check_https
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	5.000000
	retry_interval	1.000000
	max_check_attempts	4
	is_volatile	0
	parallelize_check	1
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,w,u,c
	notifications_enabled	1
	notification_interval	60.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	action_url	/pnp4nagios/graph?host=$HOSTNAME$&srv=$SERVICEDESC$' class='tips' rel='/pnp4nagios/popup?host=$HOSTNAME$&srv=$SERVICEDESC$
	retain_status_information	1
	retain_nonstatus_information	1
	}


define service {
	host_name	host2
	service_description	FTP
	check_period	24x7
	check_command	check_ftp!-p 4003
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	5.000000
	retry_interval	1.000000
	max_check_attempts	4
	is_volatile	0
	parallelize_check	1
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,w,u,c
	notifications_enabled	1
	notification_interval	60.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	action_url	/pnp4nagios/graph?host=$HOSTNAME$&srv=$SERVICEDESC$' class='tips' rel='/pnp4nagios/popup?host=$HOSTNAME$&srv=$SERVICEDESC$
	retain_status_information	1
	retain_nonstatus_information	1
	}

define service {
	host_name	host2
	service_description	HTTP
	check_period	24x7
	check_command	check_http
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	5.000000
	retry_interval	1.000000
	max_check_attempts	4
	is_volatile	0
	parallelize_check	1
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,w,u,c
	notifications_enabled	1
	notification_interval	60.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	action_url	/pnp4nagios/graph?host=$HOSTNAME$&srv=$SERVICEDESC$' class='tips' rel='/pnp4nagios/popup?host=$HOSTNAME$&srv=$SERVICEDESC$
	retain_status_information	1
	retain_nonstatus_information	1
	}


define service {
	host_name	host3
	service_description	FTP
	check_period	24x7
	check_command	check_ftp
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	5.000000
	retry_interval	1.000000
	max_check_attempts	4
	is_volatile	0
	parallelize_check	1
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,w,u,c
	notifications_enabled	1
	notification_interval	60.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	action_url	/pnp4nagios/graph?host=$HOSTNAME$&srv=$SERVICEDESC$' class='tips' rel='/pnp4nagios/popup?host=$HOSTNAME$&srv=$SERVICEDESC$
	retain_status_information	1
	retain_nonstatus_information	1
	}

define service {
	host_name	host3
	service_description	HTTP
	check_period	24x7
	check_command	check_http
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	5.000000
	retry_interval	1.000000
	max_check_attempts	4
	is_volatile	0
	parallelize_check	1
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,w,u,c
	notifications_enabled	1
	notification_interval	60.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	action_url	/pnp4nagios/graph?host=$HOSTNAME$&srv=$SERVICEDESC$' class='tips' rel='/pnp4nagios/popup?host=$HOSTNAME$&srv=$SERVICEDESC$
	retain_status_information	1
	retain_nonstatus_information	1
	}

define service {
	host_name	host3
	service_description	HTTPS
	check_period	24x7
	check_command	check_https
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	5.000000
	retry_interval	1.000000
	max_check_attempts	4
	is_volatile	0
	parallelize_check	1
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,w,u,c
	notifications_enabled	1
	notification_interval	60.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	action_url	/pnp4nagios/graph?host=$HOSTNAME$&srv=$SERVICEDESC$' class='tips' rel='/pnp4nagios/popup?host=$HOSTNAME$&srv=$SERVICEDESC$
	retain_status_information	1
	retain_nonstatus_information	1
	}
Last edited by dwhitfield on Tue Dec 20, 2016 3:56 pm, edited 1 time in total.
Reason: code blocks FTW
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Problems with PNP4Nagios

Post by dwhitfield »

Let's install ntp, if it isn't: yum install ntp ntpdate ntp-doc

Either after installed, or if it is already installed let's turn on ntp: systemctl start ntpd

Why it works on one and not the other I couldn't tell you. My hunch is the time is just not set on the one not working.
softw
Posts: 9
Joined: Mon Dec 19, 2016 10:40 am

Re: Problems with PNP4Nagios

Post by softw »

In the original machine:
ntpstat
unsynchronised
polling server every 64 s
ntpq -pn
remote refid st t when poll reach delay offset jitter
==============================================================================
address1 address2 2 u 9 64 1 63.636 0.190 0.175
address3 address4 2 u 9 64 1 25.649 0.686 0.930


In the remote machine:
ntpstat
unsynchronised
polling server every 64 s
[root@EnticeNagiosDMS gsc4eo]# ntpq -pn
remote refid st t when poll reach delay offset jitter
==============================================================================
address1 .STEP. 16 u - 64 0 0.000 0.000 0.000
address2 address3 2 u 15 64 0 0.000 0.000 0.000
address4 address5 2 u 16 64 0 0.000 0.000 0.000
*address6 address7 3 u 5 64 1 8.645 -0.758 0.098
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Problems with PNP4Nagios

Post by dwhitfield »

And still seeing new entries of

Code: Select all

 illegal attempt to update using time 0 when last update time is 1480441853 (minimum one second step)
in your perfdata.log?
Locked