I am new with Nagios, I am trying to configure it to monitor a windows machine. I have installed the suitable client on the windows machine.
I have been following all the instructions on the Nagios Documentation.
When I write the command (./nagios -v /opt/local/nagios-3.0/etc/objects/windows.cfg)
it gives me the following error
Reading configuration data…
Error in configuration file ‘/opt/local/nagios-3.0/etc/objects/windows.cfg’ - Line 25 (NULL value)
***> The name of the main configuration file looks suspicious…
Make sure you are specifying the name of the MAIN configuration file on
the command line and not the name of another configuration file. The
main configuration file is typically '/usr/local/nagios/etc/nagios.cfg'
***> 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.
Here is the line that the error is referring to
###############################################################################
###############################################################################
HOST DEFINITIONS
###############################################################################
###############################################################################
Define a host for the Windows machine we’ll be monitoring
Change the host_name, alias, and address to fit your situation
define host{ <<<<<<<<<Line 25
use windows-server1 ; Inherit default values from a template
host_name windows ; The name we’re giving to this host
alias My Windows Server ; A longer name associated with the host
address 10.237.160.19 ; IP address of the host
}