Best practice for config files
Posted: Tue Jul 31, 2012 1:05 pm
ok I had some help from the board with some initial things and now I'm running but ready to roll this out to more servers and just wanted some help/direction as to the best way to go about it. I have 3 windows servers which are in one windows config, a host-group, all separate IP's and things are working perfect.
I have added a test remote linux server with a public IP, NRPE and monitoring some basics like load, processes and there working perfect. That box is under one config (linux-remote). My next step is to monitor my tomcat servers (I have 5) which are behind a loadbalancer. The LB has some 1-1 virtual services so from the nagios server I can issue;
/usr/lib/nagios/plugins/check_nrpe -H n.tc1.domain.com -p 5667
NRPE v2.12 is what get's returned.
I can do the same for 5668 which goes to server 2 (all the servers are listening on 5666 and the LB is switching). Now finally the question(s).
I don't think I can define a port at the host level can I? Basically I want a tomcat.cfg with something like this;
define host{
use linux-remote
host_name tc1
address 1.1.1.1
port 5667
}
By doing that I can then just define;
define service{
use generic-service,srv-pnp
host_name tc1
service_description Server Load
check_command check_nrpe!check_load
}
A basic service. I know I can define the port in the service, but then if I had 25 servers behind the LB, I would have 25 * number of services which would be HUGE config wise. So I was looking to make a hostgroup of each group and give them one service but not sure if it's possible.
That is the basic set of what I want. If I can't and need to define each service port, should I still keep under one file, or make a file for each server?
Thanks
I have added a test remote linux server with a public IP, NRPE and monitoring some basics like load, processes and there working perfect. That box is under one config (linux-remote). My next step is to monitor my tomcat servers (I have 5) which are behind a loadbalancer. The LB has some 1-1 virtual services so from the nagios server I can issue;
/usr/lib/nagios/plugins/check_nrpe -H n.tc1.domain.com -p 5667
NRPE v2.12 is what get's returned.
I can do the same for 5668 which goes to server 2 (all the servers are listening on 5666 and the LB is switching). Now finally the question(s).
I don't think I can define a port at the host level can I? Basically I want a tomcat.cfg with something like this;
define host{
use linux-remote
host_name tc1
address 1.1.1.1
port 5667
}
By doing that I can then just define;
define service{
use generic-service,srv-pnp
host_name tc1
service_description Server Load
check_command check_nrpe!check_load
}
A basic service. I know I can define the port in the service, but then if I had 25 servers behind the LB, I would have 25 * number of services which would be HUGE config wise. So I was looking to make a hostgroup of each group and give them one service but not sure if it's possible.
That is the basic set of what I want. If I can't and need to define each service port, should I still keep under one file, or make a file for each server?
Thanks