[Nagiosplug-help] Error in parsing command.cfg
Subhendu Ghosh
sghosh at sghosh.org
Mon Jun 2 17:03:03 CEST 2003
On 2 Jun 2003, Peter Peltonen wrote:
>
> Hi, I have the following RPMs installed on a RH72 system:
>
> nagios-1.0-0.dag.rh73
> nagios-plugins-1.3.0-1
>
> I added line
>
> --<snip>--
> cfg_file=/etc/nagios/command.cfg
> --</snip>--
>
> to /etc/nagios/nagios.cfg to get the plugins working. I also removed the
> cfg_file directive referring to the checkcommands.cfg.
>
> But when trying to start Nagios I see the following error in logs:
>
> --<snip>--
> Error: Unexpected token or statement in file '/etc/nagios/command.cfg'
> on line 33.
> --</snip>--
>
> I haven't touched the command.cfg and the line 33 reads:
>
> --<snip>--
> command[notify-by-email]=/bin/printf "$OUTPUT$" | /bin/mail -s \
> '$SERVICESTATE$ alert for $HOSTALIAS$/$SERVICEDESC$' $CONTACTEMAIL$
> --</snip>--
>
> printf is in /usr/bin on my system, but changing the path does not help.
>
> Are my nagios and plugins versions incompatible or what gives?
>
> Regards,
> Peter
>
>
take a look at the format of check_commands.cfg - if that was in the
template format, then nagios is expecting template format cfgs.
you can use convertcfg to conver the command.cfg from the plugins into the
template format.
convertcfg is a contrib program in the nagios source distribution. I'm
not sure it is included in your rpm.
--
-sg
More information about the Help
mailing list