[Q] template based wildcard object configuration
GONG Wei
wgong at smu.edu.sg
Wed Feb 5 16:54:30 CET 2003
Hi all,
I was trying nagios 1.0, md5 checksum (9f95388c59b34c06745870fd2012388e
nagios-1.0.tar.gz), on Linux Redhat 7.2.
Things went smoothly, but I couldn't get wildcard template object config
work. I was trying the sample as shown in
http://nagios.sourceforge.net/docs/1_0/templatetricks.html#hostgroup. So
basically I have a config file etc/hostgroup_all-ap.cfg which is listed in
the main nagios.cfg file. The content of this hostgroup_all-ap.cfg is
listed below:
=========================
<general template stuff ...>
define service{
use generic-service
hostgroup_name all-ap
service_description AP_Management
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 3
retry_check_interval 1
contact_groups citops
notification_interval 120
notification_period 24x7
notification_options w,u,c,r
check_command check_http
}
define hostgroup{
hostgroup_name all-ap
alias All Wireless AP
contact_groups citnet
members *
}
define host{
use generic-host
host_name 1200-RAF-04-04
alias AP1200 (Raffles level 4, 4th)
address 202.161.56.104
}
define host{
use generic-host
host_name 352e-MM-03-01
alias AP352E (MM level 3, 1st)
address 202.161.56.48
}
=========================
The nagios was configured as:
./configure \
--with-mail=/bin/mail \
--with-init-dir=/etc/rc.d/init.d \
--with-gd-lib=/usr/lib \
--with-gd-inc=/usr/include \
--with-perlcache
Before I type "make all", the summary screen looks something like this:
External Data Routines:
------------------------
Status data: Default (text file)
Object data: Template-based (text file)
Comment data: Default (text file)
Downtime data: Default (text file)
Retention data: Default (text file)
Peformance data: Default (external commands)
Extended info data: Template-based (text file)
Hope I didn't bore you with all the unnecessary details. Anyway what I
intend to achieve is something like this:
A. there will be a hostgroup called all-ap, which should contains all
wireless AP
B. each wireless AP will be added individually, and will be named as
1200-xxxx or 352e-xxxxx depends on its model. No other hosts will be named
in this way.
C. it would be good if any newly added AP could be automatically included
into the all-ap hostgroup as long as their name conforms to the above
mentioned convention.
D. to certain extent I actually couldn't afford a blind "*" in production
environment since we need to monitor more than wireless AP. Unless this "*"
only refers to hosts defined in the same file as the hostgroup definition.
Regards
==========
Gong Wei (+65 68220120, wgong at smu.edu.sg)
Office of CIT, SMU
free Thawte Personal Email Cert: http://www.thawte.com/
GnuPG key: http://www.keyserver.net/en/
Standard Disclaimer:
The contents of this Email and any attachments are confidential and
may be privileged or otherwise protected from disclosure. Unauthorized use,
review, distribution and copying of this Email and any attachments herein
are prohibited. If this Email has been transmitted to you in error or you
are not the addressee indicated in this Email, please delete it immediately
and notify the sender.
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
More information about the Users
mailing list