-1

We have a server running nagios at work. Been there forever I didn't set it up. I've been trying to add a new server to the monitoring page but when I try to stop and start the nagios service I get an error.

ERROR! Start aborted. Check your Nagios configuration.

I added a line in my nagios.cfg to use my /etc/nagios/objects/servers/servers.cfg

Then to test it out I added google with the following code.

define host{
  use linux-server
  host_name google.com
  alias google.com
  address www.google.com
}
define service{
  use generic-service
  host_name google.com
  service description PING
  check_command check_ping!100.0,20%!500.0,60%
}

This works fine and it shows up in my web interface along the other hosts as OK.

Now when I try to add one of our local windows 2012 test servers I am unable to even start the nagios service.

define host{
  use linux-server
  host_name myhostname
  alias myhostname
  address xxx.xx.xx.xx(has the real ip)
}
define service{
  use generic-service
  host_name myhostname
  service description PING
  check_command check_ping!100.0,20%!500.0,60%
}

Can anyone help me as to what is going wrong?

If I run /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg it says that I have no errors. If I run it against my servers.cfg file it says there's an error in line 1 which doesn't make sense to me since it works fine without the windows server added to the code.

If someone more experienced with these systems than me could give me some insight it would be a great help. Thanks.

maxhb
  • 8,554
  • 9
  • 29
  • 53

1 Answers1

0

The error seems to be that you have a windows machine "our local windows 2012 test servers" but your host definition is for a "linux-server".

Try using a windows-server definition.

em110905
  • 9
  • 2