Absolute Nagios beginner - help!
Posted: Fri Jul 24, 2015 11:22 am
Good afternoon - please speak slowly and clearly - I never touched VI before today!
I have successfully managed to install Nagios Core on a Linux server.
I have also been able to install the NSClient on two Windows servers running 2008R2 and can see it running as a service in both cases.
I have edited windows cfg and because I have two Windows servers, I have assumed (probably incorrectly) that I need two "define host" sections, which I have set up thus:
define host{
use windows-server ; Inherit default values from a template
host_name MYFIRSTSERVERID ; The name we're giving to this host
alias ; A longer name associated with (there is no alias for this server)
address 99.99.99.99 ; IP address of the host
}
define host{
use windows-server ; Inherit default values from a template
host_name MYSECONDSERVERID; The name we're giving to this host
alias ; A longer name associated with the host (there is no alias for this server either)
address 88.88.88.88 ; IP address of the host
}
I'm not sure if both these should be included in the same set of curly brackets?
Also, I have a "define hostgroup" section, which I'm pretty sure I don't need, and which I'd like to comment out.
I would have thought that the best way to do this would have been to put #s in front of each line, but VI doesn't appear to like that.
Anyway, when I try to verify the configuration file with:
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
I get:
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Error: Invalid hostgroup object directive 'st{'.
Error: Could not add object property in file '/usr/local/nagios/etc/objects/windows.cfg' on line 51.
Error processing object config files!
Line 51 being the "define hostgroup" line.
Sorry if these questions appear really basic, but it seems that the office Nagios expert is someone who has NEVER used Linux before. That's me, that is!
All advice gratefully received and a good weekend to all!
Pete
I have successfully managed to install Nagios Core on a Linux server.
I have also been able to install the NSClient on two Windows servers running 2008R2 and can see it running as a service in both cases.
I have edited windows cfg and because I have two Windows servers, I have assumed (probably incorrectly) that I need two "define host" sections, which I have set up thus:
define host{
use windows-server ; Inherit default values from a template
host_name MYFIRSTSERVERID ; The name we're giving to this host
alias ; A longer name associated with (there is no alias for this server)
address 99.99.99.99 ; IP address of the host
}
define host{
use windows-server ; Inherit default values from a template
host_name MYSECONDSERVERID; The name we're giving to this host
alias ; A longer name associated with the host (there is no alias for this server either)
address 88.88.88.88 ; IP address of the host
}
I'm not sure if both these should be included in the same set of curly brackets?
Also, I have a "define hostgroup" section, which I'm pretty sure I don't need, and which I'd like to comment out.
I would have thought that the best way to do this would have been to put #s in front of each line, but VI doesn't appear to like that.
Anyway, when I try to verify the configuration file with:
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
I get:
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Error: Invalid hostgroup object directive 'st{'.
Error: Could not add object property in file '/usr/local/nagios/etc/objects/windows.cfg' on line 51.
Error processing object config files!
Line 51 being the "define hostgroup" line.
Sorry if these questions appear really basic, but it seems that the office Nagios expert is someone who has NEVER used Linux before. That's me, that is!
All advice gratefully received and a good weekend to all!
Pete