Random Project

Error while adding export home in command.cfg

Worked on Nagios alerts for space issues on servers.

When i am going to add below line in command.cfg on nagios server

command_line export HOME=/home/nagios && $USER1$/check_svn

below error is coming while compile the nagios.cfg file

Reading configuration data…
Read main config file okay…
Processing object config file ‘/etc/nagios/objects/commands.cfg’…
Error: Unexpected token or statement in file ‘/etc/nagios/objects/commands.cfg’ on line 26.
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.