Hello thanks for your reply, let me clear that i have posted this messge today only once,
now get back to the point, I have found that we can add multiple host in hosts.cfg from below nagios FAQ, http://www.nagios.org/faqs/viewfaq.php?faq_id=146&expand=false&showdesc=false Title: Can I specify multiple addresses for a host? FAQ ID: F0146 Submitted By: Ethan Galstad Last Updated: 02/25/2003 Description: User would like to specify multiple addresses for a single host in their configuration file. This is often useful for devices that have multiple interfaces (routers, multi-homed hosts, etc.). Solution: Yes, you can define multiple address for a host. In fact, you can add anything you want for a host address. You can specify an IP address, MAC address, GPS coordinates, etc. Nagios does not directly interpret a host's address (or addresses), so you can do pretty much anything you want. Nagios simply passes this address to plugins and external commands via the $HOSTADDRESS$ macro. You'll have to make sure that you host check command (and possibly service checks, etc.) can understand the format of your host's address in order to check it though. If you want to specify multiple IP addresses for a host, you might use something like this in the address directive of the host definition: 192.168.1.1,192.168.1.2 Nagios is designed to treat hosts (as well as services) in an abstract manner. Here's one valid example of a "host" you could monitor... Let's say you have a cat named Nightmare. Nightmare wears an RFID tag on his collar (claw attacks in the middle of the night have left you emotionally scarred and you want to track him). The asset number stored in that RFID tag is what we'll use as cat's "address". How do we check the status of the host (i.e. is the rascal still moving)? Hmmm... Well, we could create a host check command that sent out a radio-controlled Lego Mindstorm with an RFID locater that either a) prodded the cat or b) dangled some catnip in the air when it was in close proximity to the little devil. If the cat meowed, pounced, or just moved we could safely say the cat was still in good shape. And you thought you could only monitor network devices... Quoting Giles Coochey <[EMAIL PROTECTED]>: > Firstly, and I've seen this a couple of times in the last few days with > different users - simply re-posting the same question just a few hours > after the original post isn't likely to get you results. And it is > generally considered bad netiquette. > > I seldom complain, but having had this feeling of deja-vu the second > time round in the last few days I thought I'd mention it. My guess is > that many people on the mailing list increasingly ignore people who > double post questions when they don't get a reply. > > > > > > Hello, > > > > can i have multiple host(for exa: 192.168.10.0/24 or 192.168.10.1- > > 192.168.10.255) in address field in hosts.cfg file ? > > > > my hosts.cfg file is as per below > > > > define host{ > > use generic-host ; > > Name of host > > template to use > > > > host_name LAN > > contact_groups GNFC-Admin > > alias Workstation > > address > > 192.168.10.63,192.168.10.71,192.168.10.92 > > check_command check-host-alive > > max_check_attempts 10 > > notification_interval 120 > > notification_period 24x7 > > notification_options d,u,r > > } > > > > but it giving error like "1163068098] SERVICE ALERT: > > LAN;SMTP;UNKNOWN;HARD;1;check_smtp: Invalid hostname/address > > - 192.168.10.63,192.168.10.71,192.168.10.92" > > > > "Invalid hostname/address" is the clue here... Oh and look, it > references your comma separated address entry... Surely that means... > > Seems to me that Nagios is giving you a straight answer to your > question. The syntax is not correct, you must have a single IP address > defined for a host. A host is a container for a single host (I believe > there are plugins available to define a second IP for the same host, but > that isn't what you are looking for). > > > or is their any facility in nagios to auto-detect new > > inserted devices ? > > > > Not built in, but www.nagiosexchange.org is your friend. > > I came across this after thirty seconds of searching (considerably > shorter than it took me to write this reply): > > http://www.nagiosexchange.org/Configuration.20.0.html?&tx_netnagext_pi1[ > p_view]=277 > > It might be what you're looking for. > > > ______________________________________________________________________ > This email has been scanned by the MessageLabs Email Security System. > For more information please visit http://www.messagelabs.com/email > ______________________________________________________________________ > ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/ ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Nagios-users mailing list Nagios-users@lists.sourceforge.net 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