Hi All ,
I am new to nagios configuration . I successfully installed nagios on one of
my linux server and now monitoring two hosts .
For monitoring of remote hosts , I created a new config file by renaming
localhost.cfg file under objects directory.
I renamed the entries "hostname" and "address" and other entries under "DEFINE
HOST" directive to point to the new server which I am planning to monitor . The
settings looks like this
define host{
use linux-server ; Name of host template
to use
; This host definition will inherit all variables
that are defined
; in (or inherited by) the linux-server host
template definition.
host_name node1
alias node1
address 192.168.122.167
}
define host{
use linux-server ; Name of host template
to use
; This host definition will inherit all
variables that are defined
; in (or inherited by) the linux-server host
template definition.
host_name node2
alias node2
address 192.168.122.218
}
Also modified "DEFINE SERVICE" directive to monitor few services on both the
remote hosts . Few of the settings looks like this
define service{
use local-service ; Name of service
template to use
host_name node1
service_description Current Users
check_command check_nrpe!check_users
}
define service{
use local-service ; Name of service
template to use
host_name node2
service_description Current Users
check_command check_nrpe!check_users
}
The checks are working fine . But my confusion here is in terms of scalabilty .
What if I want to monitor 100 servers and 5 services in each of the servers.
Does that mean I need to create 100 "define host" directives for each of these
servers . Also , monitoring 5 services means i have to create 5 "define
service" for each host , that means 500 "define service" directives.
If this is the case , then it will be really painful to configure and manage if
there are many servers to monitor.
Can't I use comma separated ip address and hosts like this
define host{
use linux-server ; Name of host template
to use
; This host definition will inherit all variables
that are defined
; in (or inherited by) the linux-server host
template definition.
host_name node1,node2
alias node1
address 192.168.122.167,192.168.122.218
}
define service{
use local-service ; Name of service
template to use
host_name node1,node2
service_description Current Users
check_command check_nrpe!check_users
}
. Will it work . Have not tried yet. What you people suggest should be the
approach if somebody is planning to monitor more than 50 servers.
Any help will be highly appreciated
Thanks in Advance
Zaman
------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric
Ries, the creator of the Lean Startup Methodology on "Lean Startup
Secrets Revealed." This video shows you how to validate your ideas,
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
Nagios-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting
any issue.
::: Messages without supporting info will risk being sent to /dev/null