I can't find the error in my .cfg file
Posted: Mon May 14, 2012 6:52 pm
Hey all, I'm creating a .cfg file so I can monitor services on my Windows file servers but I'm getting this when I test the file:
Processing object config file '/usr/local/nagios/etc/objects/WinServer_nrpe.cfg'...
Error: Unexpected start of object definition in file '/usr/local/nagios/etc/objects/WinServer_nrpe.cfg' on line 167. Make sure you close preceding objects before starting a new one.
Error processing object config files!
Here's my Service Definitions section:
###############################################################################
# SERVICE DEFINITIONS
###############################################################################
define service {
use generic-service
hostgroup winserver_nrpegroup
service_description CPU Check
check_command check_nrpe!checkCPU -a warn=100 crit=100 time=1 warn=95 crit=99 time=5 warn=90 crit=95 tim$
}
define service {
use generic-service
hostgroup winserver_nrpegroup
service_description Hard Disk Check
check_command check_nrpe!CheckDriveSize -a ShowAll MinWarnFree=10% MinCritFree=5% Drive=c:\
}
define service {
use generic-service
hostgroup winserver_nrpegroup
service_description Memory Check
check_command check_nrpe!CheckMEM -a MaxWarn=80% MaxCrit=90% ShowAll type=physical
}
define service {
use generic-service
hostgroup winserver_nrpegroup
service_description System Uptime
check_command check_nrpe!CheckUpTime -a MinWarn=1d MinCrit=12h
}
The bolded line is line 167. AND, if I comment out the last two service definitions in the file I get this:
Processing object config file '/usr/local/nagios/etc/objects/WinServer_nrpe.cfg'...
Error: Unexpected EOF in file '/usr/local/nagios/etc/objects/WinServer_nrpe.cfg' on line 180 - check for a missing closing bracket.
Error processing object config files!
I've gone through and confirmed that all brackets are there. I even went through and deleted and replaced all of the curly brackets in the entire file. A couple of times now. Anyone have any ideas on what's happening? As much as I hate to say it I copied a working .cfg file for my XP workstations to my Windows workstation and did a Cut and Paste so I wouldn't have to type everything and risk having an error stop me. I used WordPad for the cutting and pasting . Is it possible there's a format artifact in my file now that's causing me this grief? Any and all ideas, suggestions and recommendations are welcome.
Thanks,
Joe B
Processing object config file '/usr/local/nagios/etc/objects/WinServer_nrpe.cfg'...
Error: Unexpected start of object definition in file '/usr/local/nagios/etc/objects/WinServer_nrpe.cfg' on line 167. Make sure you close preceding objects before starting a new one.
Error processing object config files!
Here's my Service Definitions section:
###############################################################################
# SERVICE DEFINITIONS
###############################################################################
define service {
use generic-service
hostgroup winserver_nrpegroup
service_description CPU Check
check_command check_nrpe!checkCPU -a warn=100 crit=100 time=1 warn=95 crit=99 time=5 warn=90 crit=95 tim$
}
define service {
use generic-service
hostgroup winserver_nrpegroup
service_description Hard Disk Check
check_command check_nrpe!CheckDriveSize -a ShowAll MinWarnFree=10% MinCritFree=5% Drive=c:\
}
define service {
use generic-service
hostgroup winserver_nrpegroup
service_description Memory Check
check_command check_nrpe!CheckMEM -a MaxWarn=80% MaxCrit=90% ShowAll type=physical
}
define service {
use generic-service
hostgroup winserver_nrpegroup
service_description System Uptime
check_command check_nrpe!CheckUpTime -a MinWarn=1d MinCrit=12h
}
The bolded line is line 167. AND, if I comment out the last two service definitions in the file I get this:
Processing object config file '/usr/local/nagios/etc/objects/WinServer_nrpe.cfg'...
Error: Unexpected EOF in file '/usr/local/nagios/etc/objects/WinServer_nrpe.cfg' on line 180 - check for a missing closing bracket.
Error processing object config files!
I've gone through and confirmed that all brackets are there. I even went through and deleted and replaced all of the curly brackets in the entire file. A couple of times now. Anyone have any ideas on what's happening? As much as I hate to say it I copied a working .cfg file for my XP workstations to my Windows workstation and did a Cut and Paste so I wouldn't have to type everything and risk having an error stop me. I used WordPad for the cutting and pasting . Is it possible there's a format artifact in my file now that's causing me this grief? Any and all ideas, suggestions and recommendations are welcome.
Thanks,
Joe B