Re: [Nagios-users] A newbie configuration question
On Wed, Dec 29, 2010 at 10:52:45PM +, Jim Avery wrote: On 29 December 2010 18:36, stan st...@panix.com wrote: I am trying to rationalize a couple of Nagios configurations that have 2different histories, and they seem more different than I think they should be. So, first I want to get the big picture n my head, and decide what seems to be a sensible configuration to support going forward. Basicly I have in mind some thing like this. 1. Define hosts in a file 2. Define services in a file 3, Define commands in a file 4. Aggregate hosts in groups of similar types in a hostgroups file 5. Aggregate services in groups of similar types in a servicegroups file Now, where I start to get confused here is that the service definitions seem to have a filed for one or more hostnames. Why is this? Services are often quite agnostic as to what kind of host they relate to. Take for example FTP. Various host types will accept an FTP connection but the service definition for them will always be pretty much the same. Thanks for the thoguhtful reply. I am still confused by why the service def's have a filed for hostname. As you point out, services don't necisarily relate to hosts. They are functions provided, or statuses of a machine. and I would think thta servicegroups would be where the assoctation betwen the service, and thehosts that you want to check for that service wouldbe. Am I missing something? -- Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl ___ 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
Re: [Nagios-users] A newbie configuration question
On 30 December 2010 12:44, stan st...@panix.com wrote: I am still confused by why the service def's have a filed for hostname. As you point out, services don't necisarily relate to hosts. They are functions provided, or statuses of a machine. and I would think thta servicegroups would be where the assoctation betwen the service, and thehosts that you want to check for that service wouldbe. Am I missing something? Oh, I see. No, I don't think you are missing anything. I read somewhere (probably Wolfgang Barth's excellent book) that in Nagios each service should be taken to be the combination of both the service_description *and* the host_name. Certainly in Nagios it is not possible to have a service which exists without a host. If you look at the objects.cache file (probably under /usr/local/nagios/var/) then you will see how Nagios stores each service definition. Even if you have defined services based on a hostgroup, Nagios will actually internally regard each service on each host as a separate entity - every service will have an entry for both host_name and service_description. The inbuilt service/host dependency and the host parent/child relationships are important for Nagios in determining when it should notify - in particular it won't notify for a service if the host is down and usually won't notify for a host if the parent host is down. The logic Nagios uses for determining dependencies and reachability make Nagios a very powerful tool for ensuring you only receive notifications for those hosts and services which are actually causing the problem, not all the hosts and services which are down as a result of the underlying problem. I agree with you it can be a little counter-intuitive at times. In particular if you only have one service (for example ping) associated with a host, it's not always obvious whether it would be appropriate to acknowledge the service or the host when the ping fails. -- Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl ___ 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
Re: [Nagios-users] A newbie configuration question
On Thu, Dec 30, 2010 at 01:30:45PM +, Jim Avery wrote: On 30 December 2010 12:44, stan st...@panix.com wrote: I am still confused by why the service def's have a filed for hostname. As you point out, services don't necisarily relate to hosts. They are functions provided, or statuses of a machine. and I would think thta servicegroups would be where the assoctation betwen the service, and thehosts that you want to check for that service wouldbe. Am I missing something? Oh, I see. No, I don't think you are missing anything. OK, I thoguht I had a handle on tnis, but now I am confised again. I wanted to create a config directory for services, just like I have for hosts. In this direcotry I intended to have a file defining each service I want to check. then one level up in the directory tree, I was going to create a hostgrous file and a servicegroups file, and I was going to define which hosts provide which service, and which service is provided by which hosts. However, looking at the doc, it appears that hostname is mandontory in a service definition. Is there a way I can work around this, to get the hosts/services symetry that I am trying to acheive? -- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? -- Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl ___ 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
Re: [Nagios-users] A newbie configuration question
On Thu, Dec 30, 2010 at 12:27:02PM -0500, stan wrote: On Thu, Dec 30, 2010 at 01:30:45PM +, Jim Avery wrote: On 30 December 2010 12:44, stan st...@panix.com wrote: I am still confused by why the service def's have a filed for hostname. As you point out, services don't necisarily relate to hosts. They are functions provided, or statuses of a machine. and I would think thta servicegroups would be where the assoctation betwen the service, and thehosts that you want to check for that service wouldbe. Am I missing something? Oh, I see. No, I don't think you are missing anything. OK, I thoguht I had a handle on tnis, but now I am confised again. I wanted to create a config directory for services, just like I have for hosts. In this direcotry I intended to have a file defining each service I want to check. then one level up in the directory tree, I was going to create a hostgrous file and a servicegroups file, and I was going to define which hosts provide which service, and which service is provided by which hosts. However, looking at the doc, it appears that hostname is mandontory in a service definition. Is there a way I can work around this, to get the hosts/services symetry that I am trying to acheive? Maybe I just figured this out. Can I build my service definition files as incomplete defs, and then use the resultant template in the servicegroup file, where I will fill in the approriate members? -- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? -- Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl ___ 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
Re: [Nagios-users] A newbie configuration question
On 30 December 2010 17:50, stan st...@panix.com wrote: Can I build my service definition files as incomplete defs, and then use the resultant template in the servicegroup file, where I will fill in the approriate members? I don't think it works like that. Personally I don't bother with servicegroups hardly at all. I use hostgroups to group various kinds of host together. I then use the hostgroup in the service definition to apply that service type to all the hosts in the group. These concepts are explained in.. http://nagios.sourceforge.net/docs/3_0/objecttricks.html I also recommend the book Nagios by Wolfgang Barth (pub. No Starch Press) as he has a quite readable way of introducing a lot of the concepts you need to understand when designing a Nagios configuration. You'll find that in Nagios there are usually about six ways to achieve roughly the same thing. Which one is 'best' will depend on what you want to do and your own preference. hth, Jim -- Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl ___ 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
[Nagios-users] A newbie configuration question
I am trying to rationalize a couple of Nagios configurations that have 2different histories, and they seem more different than I think they should be. So, first I want to get the big picture n my head, and decide what seems to be a sensible configuration to support going forward. Basicly I have in mind some thing like this. 1. Define hosts in a file 2. Define services in a file 3, Define commands in a file 4. Aggregate hosts in groups of similar types in a hostgroups file 5. Aggregate services in groups of similar types in a servicegroups file Now, where I start to get confused here is that the service definitions seem to have a filed for one or more hostnames. Why is this? -- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? -- Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl ___ 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
Re: [Nagios-users] A newbie configuration question
On 29 December 2010 18:36, stan st...@panix.com wrote: I am trying to rationalize a couple of Nagios configurations that have 2different histories, and they seem more different than I think they should be. So, first I want to get the big picture n my head, and decide what seems to be a sensible configuration to support going forward. Basicly I have in mind some thing like this. 1. Define hosts in a file 2. Define services in a file 3, Define commands in a file 4. Aggregate hosts in groups of similar types in a hostgroups file 5. Aggregate services in groups of similar types in a servicegroups file Now, where I start to get confused here is that the service definitions seem to have a filed for one or more hostnames. Why is this? Services are often quite agnostic as to what kind of host they relate to. Take for example FTP. Various host types will accept an FTP connection but the service definition for them will always be pretty much the same. I do pretty much what you have described there, but have a sub-directory for each host type. For example, my servers-unix directory will contain a hosts.cfg with the hosts definitions in it, but also users.cfg for checks on numbers of logged on users, disks.cfg for filesystem disk space checks, cpu.cfg for cpu% checks and so on. I have a services directory for general-purpose services whichare used for lots of different host types - things like FTP as I mentioned before, but also ping, telnet, http and a few others. I'm not saying this is what you should do, but it (kind of usually!) works for me. I also have a templates directory where I put most of my templates. To be honest mine needs a good tidy-up though, as I've been rather inconsistent in how I decide what goes in the template and what in the object definition. -- Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl ___ 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