Unexpected token or statement error when running Nagios w/ -v

Michael A. Carpenter mikec at balmy.net
Thu Jun 19 21:10:31 CEST 2003


This is my first post.

I have searched the FAQ and the list archives and cant find the answer to 
this one...

When running the following command:

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

I get the following error:

Unexpected token or statement in file '/usr/local/nagios/etc/nagios.cfg' on 
line 2.

This line is my log_file entry.  It reads:

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

I have checked and the directory exists, and nagios has permissions to the 
directory.  I have checked for "^M" characters and didnt find any.  I have 
attached the file.

Any help is greatly appreciated.

Mike

-------------- next part --------------
#LOG FILE
log_file=/usr/local/nagios/var/nagios.log

#OBJECT CONFIGURATION FILE

#PLUGIN COMMANDS
cfg_file=/usr/local/nagios/etc/checkcommands.cfg

#MISC COMMANDS
cfg_file=/usr/local/nagios/etc/misccommand.cfg

#OTHER CONFIGURATION FILES
cfg_file=/usr/local/nagios/etc/contactgroups.cfg
cfg_file=/usr/local/nagios/etc/contacts.cfg
cfg_file=/usr/local/nagios/etc/dependencies.cfg
cfg_file=/usr/local/nagios/etc/escalations.cfg
cfg_file=/usr/local/nagios/etc/hostgroups.cfg
cfg_file=/usr/local/nagios/etc/hosts.cfg
cfg_file=/usr/local/nagios/etc/services.cfg
cfg_file=/usr/local/nagios/etc/timeperiods.cfg

#CONFIGURATION DIRECTORY
cfg_dir=/usr/local/nagios/etc

#RESOURCE FILE
resource_file=/usr/local/nagios/etc/resource.cfg

#TEMP FILE
temp_file=/var/tmp/nagios.tmp

#STATUS FILE
status_file=/var/log/nagios/status.log

#AGGREGATED STATUS UPDATES OPTION
aggregate_status_updates=1

#AGGREGATED STATUS INTERVAL
status_update_interval=15

#NAGIOS USER
nagios_user=nagios

#NAGIOS GROUP
nagios_group=nagios

#NOTIFICATIONS OPTION
enable_notifications=1

#SERVICE CHECK EXECUTION OPTION
execute_service_checks=1

#PASSIVE SERVICE CHECK OPTION
accept_passive_service_checks=1

#EVENT HANDLER
enable_event_handlers=1

#LOG ROTATION METHOD
log_rotation_method=d

#LOG ARCHIVE PATH
log_archive_path=/var/log/nagios/archives/

#EXTERNAL COMMAND CHECK OPTION
check_external_commands=0

#EXTERNAL COMMAND CHECK INTERVAL
command_check_interval=60

#EXTERNAL COMMAND FILE
command_file=/usr/local/nagios/var/rw/nagios.cmd

#DOWNTIME FILE
downtime_file=/usr/local/nagios/var/downtime.log

#COMMENT FILE
comment_file=/usr/local/nagios/var/comment.log

#LOCK FILE
lock_file=/tmp/nagios.lock

#STATE RETENTION OPTION
retain_state_information=1

#STATE RETENTION FILE
state_retention_file=/usr/local/nagios/var/status.sav

#AUTOMATIC STATE RETENTION UPDATE INTERVAL
retention_update_interval=30

#USE RETAINED STATE OPTION
use_retained_program_state=1

#SYSLOG LOGGING OPTION
use_syslog=1

#NOTIFICATION LOGGING OPTION
log_notifications=1

#SERVICE RETRY LOGGING OPTIONS
log_service_retries=1

#HOST CHECK RETRY LOGGING OPTION
log_host_retries=1

#EVENT HANDLER LOGGING OPTIONS
log_event_handlers=1

#INITIAL STATES LOGGING OPTION
log_initial_states=1

#EXTERNAL COMMAND LOGGING OPTION
log_external_commands=1

#PASSIVE SERVICE CHECK LOGGING OPTION
log_passive_service_checks=1

#GLOBAL HOST EVENT HANDLER OPTION
global_host_event_handler=log-host-event-to-db

#GLOBAL SERVICE EVENT HANDLER OPTION
global_service_event_handler=log-service-event-to-db

#INTER-CHECK SLEEP TIME
sleep_time=2

#INTER-CHECK DELAY METHOD
inter_check_delay_method=s

#SERVICE INTERLEAVE FACTOR
service_interleave_factor=s

#MAXIMUM CONCURRENT SERVICE CHECKS
max_concurrent_checks=20

#SERVICE REAPER FREQUENCY
service_reaper_frequency=10

#TIMING INTERVAL LENGTH
interval_length=60

#AGRESSIVE HOST CHECKING
use_aggressive_host_checking=0

#FLAP DETECTION OPTION
enable_flap_detection=0

#LOW SERVICE FLAP THRESHOLD
low_service_flap_threshold=25.0

#HIGH SERVICE FLAP THRESHOLD
high_service_flap_threshold=50.0

#LOW HOST FLAP THRESHOLD
low_host_flap_threshold=25.0

#HIGH HOST FLAP THRESHOLD
high_host_flap_threshold=50.0

#SOFT SERVICE DEPENDENCIES OPTION
soft_state_dependencies=0

#SERVICE TIMEOUT CHECK
service_check_timeout=60

#HOST CHECK TIMEOUT
host_check_timeout=60

#EVENT HANDLER TIMEOUT
event_handler_timeout=60

#NOTIFICATION TIMEOUT
notification_timeout=60

#OBSESSIVE COMPLUSIVE SERVICE PROCESSOR TIMEOUT
ocsp_timeout=5

#PERFORMANCE DATA PROCESSOR COMMAND TIMEOUT
perfdata_timeout=5

#OBSESS OVER SERVICES OPTION
obsess_over_services=1

#OBSESSIVE COMPLUSIVE SERVICE PROCESSOR COMMAND
ocsp_command=obsessive_service_handler

#PERFORMANCE DATA PROCESSING OPTION
process_performance_data=1

#ORPHANED SERVICE CHECK OPTION
check_for_orphaned_services=0

#SERVICE FRESHNESS CHECKING OPTION
check_service_freshness=0

#SERVICE FRESHNESS CHECKING INTERVAL
freshness_check_interval=60

#ILLEGAL OBJECTS NAME CHARACTERS
illegal_object_name_chars=`~!$%^&*"|'<>?,()=

#ILLEGAL MACRO OUTPUT CHARACTERS
illegal_macro_output_chars=`~$^&"|'<>

#ADMINISTRATOR EMAIL ADDRESS
admin_email=mikec at localhost.localdomain

#ADMINSITRATOR PAGER
admin_pager=pagemikec at localhost.localdomain


More information about the Users mailing list