I'm having issues installing nagiosgraph. I am using ansible to deploy a series of configuration changes and, with the exception of the nagiosgraph, everything else works OK. If I remove/disable to nagiosgraph configuration file, nagios works without issues.
Here is the configuration file:
Code: Select all
# process nagios performance data using nagiosgraph
process_performance_data=1
service_perfdata_file=/opt/ng_perfdata
service_perfdata_file_template=$LASTSERVICECHECK$||$HOSTNAME$||$SERVICEDESC$||$SERVICEOUTPUT$||$SERVICEPERFDATA$
service_perfdata_file_mode=a
service_perfdata_file_processing_interval=30
service_perfdata_file_processing_command=process-service-perfdata-for-nagiosgraph
define command {
command_name process-service-perfdata-for-nagiosgraph
command_line /usr/local/nagiosgraph/bin/insert.pl
}
define service {
name nagiosgraph
action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$
register 0
}
Code: Select all
[root@ops-yum-mon01 etc]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Nagios Core 4.2.4
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 12-07-2016
License: GPL
Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Error: Unexpected token or statement in file '/usr/local/nagios/etc/conf.d/perfdata.cfg' on line 2.
Error: Invalid max_check_attempts value for host 'localhost'
Error: Could not register host (config file '/usr/local/nagios/etc/objects/localhost.cfg', starting on line 24)
Error processing object config files!
***> One or more problems was encountered while processing the config files...
Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
- Confirmed and, when necessary, remove duplicate variable declarations
- Restarted nagios with and without the perfdata.cfg file (restarting without it works)
OS = CentOS Linux release 7.3.1611 (Core)
Nagios Version = 4.2.4
NagiosGraph Version = 1.5.2