Re: [Nagios-users] hostgroup with no members - Enhancement
Original Message Subject: Re: [Nagios-users] hostgroup with no members - Enhancement From: Max Schubert m...@webwizarddesign.com To: Andreas Ericsson a...@op5.se, Nagios Users List nagios-users@lists.sourceforge.net Date: 2010-11-29 15:07 Thank you, Andreas - I actually really enjoy writing tests and understand their value - will see if I can put a few in place using tap over the next week or so and update the patch with them. considering the tests in t-tap - adding such a new config option breaks them. at least in test_timeperiods.c and test_nagios_config.c the variable needs to be added. int allow_empty_hostgroup_assignment; (sorry, I'm too lazy for git now) kind regards, Michael On 11/29/10, Andreas Ericssona...@op5.se wrote: On 11/29/2010 09:20 AM, Andreas Ericsson wrote: This looks nice. It's in my compile and test queue right now, so assuming it works out ok it'll be committed before the week is out. And now it's out there. More testing would be much appreciated though, but considering the patch is fairly well written I have few qualms about it. Cheers, and thanks again. -- Andreas Ericsson andreas.erics...@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 Considering the successes of the wars on alcohol, poverty, drugs and terror, I think we should give some serious thought to declaring war on peace. -- Increase Visibility of Your 3D Game App Earn a Chance To Win $500! Tap into the largest installed PC base get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev ___ 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 -- DI (FH) Michael Friedrich Vienna University Computer Center Universitaetsstrasse 7 A-1010 Vienna, Austria email: michael.friedr...@univie.ac.at phone: +43 1 4277 14359 fax:+43 1 4277 14338 web:http://www.univie.ac.at/zid http://www.aco.net Icinga Core IDOUtils Developer http://www.icinga.org -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ 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] hostgroup with no members - Enhancement
On 12/17/10 4:02 PM, Ton Voon wrote: I didn't really follow this thread earlier, so bear with me with the questions: Does this have to be implemented as another variable? Why can't you always allow an empty hostgroup? (In the interests of keeping it simple) I agree with Ton. Why not adding servicegroups and contactgroups while we are there? -- Mathieu -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ 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] hostgroup with no members - Enhancement
On 11/29/2010 04:27 AM, Max Schubert wrote: Hi, Long overdue and anxiously waited on by at least 3 people :), here is the patch, diffed against the CVS HEAD (as of tonight) revision of Nagios, with a documentation patch for configmain.html as well (as requested by Andreas): The option is now named allow_empty_hostgroup_assignment Thanks to Dan Whittenberg and Michael Friedrich for their input on the option name and the patch itself - thanks to my managers at Comcast (a great place to work as a developer) Eric Scholz and Mike Fischer for allowing the team I am on to contribute code back to the community, and thanks to the team I am on for their hard work and dedication with our distributed Nagios set up and the many other projects we are involved with. Andreas, please let me know if you'd like any further modifications or documentation for the patch beyond what is provided. https://github.com/netoisstools/Nagios-3-Patches/blob/master/CVS-HEAD-201011292220/201011281330-allow_empty_hostgroup_assignment.patch This looks nice. It's in my compile and test queue right now, so assuming it works out ok it'll be committed before the week is out. -- Andreas Ericsson andreas.erics...@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 Considering the successes of the wars on alcohol, poverty, drugs and terror, I think we should give some serious thought to declaring war on peace. -- Increase Visibility of Your 3D Game App Earn a Chance To Win $500! Tap into the largest installed PC base get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev ___ 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] hostgroup with no members - Enhancement
Thank you, Andreas - I actually really enjoy writing tests and understand their value - will see if I can put a few in place using tap over the next week or so and update the patch with them. On 11/29/10, Andreas Ericsson a...@op5.se wrote: On 11/29/2010 09:20 AM, Andreas Ericsson wrote: This looks nice. It's in my compile and test queue right now, so assuming it works out ok it'll be committed before the week is out. And now it's out there. More testing would be much appreciated though, but considering the patch is fairly well written I have few qualms about it. Cheers, and thanks again. -- Andreas Ericsson andreas.erics...@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 Considering the successes of the wars on alcohol, poverty, drugs and terror, I think we should give some serious thought to declaring war on peace. -- Increase Visibility of Your 3D Game App Earn a Chance To Win $500! Tap into the largest installed PC base get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev ___ 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] hostgroup with no members - Enhancement
Hi, Long overdue and anxiously waited on by at least 3 people :), here is the patch, diffed against the CVS HEAD (as of tonight) revision of Nagios, with a documentation patch for configmain.html as well (as requested by Andreas): The option is now named allow_empty_hostgroup_assignment Thanks to Dan Whittenberg and Michael Friedrich for their input on the option name and the patch itself - thanks to my managers at Comcast (a great place to work as a developer) Eric Scholz and Mike Fischer for allowing the team I am on to contribute code back to the community, and thanks to the team I am on for their hard work and dedication with our distributed Nagios set up and the many other projects we are involved with. Andreas, please let me know if you'd like any further modifications or documentation for the patch beyond what is provided. https://github.com/netoisstools/Nagios-3-Patches/blob/master/CVS-HEAD-201011292220/201011281330-allow_empty_hostgroup_assignment.patch - Max -- Increase Visibility of Your 3D Game App Earn a Chance To Win $500! Tap into the largest installed PC base get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev ___ 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] hostgroup with no members - Enhancement
On 11/18/2010 09:19 PM, Daniel Wittenberg wrote: I was curious if we were able to make any progress on getting this patch included? That depends on you, more or less. I'm just waiting for a rerolled one that's tested with latest CVS head and has the necessary documentation amendments. -- Andreas Ericsson andreas.erics...@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 Considering the successes of the wars on alcohol, poverty, drugs and terror, I think we should give some serious thought to declaring war on peace. -- Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today http://p.sf.net/sfu/msIE9-sfdev2dev ___ 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] hostgroup with no members - Enhancement
I'll check with the original author of the patch...I re-rolled it already against head and tested great, been a lifesaver. I sent the updates to him so he could post and move forward with so if he's not had time I'll see about submitting directly. Dan -Original Message- From: Andreas Ericsson [mailto:a...@op5.se] Sent: Friday, November 19, 2010 3:17 AM To: Nagios Users List Cc: Daniel Wittenberg Subject: Re: [Nagios-users] hostgroup with no members - Enhancement On 11/18/2010 09:19 PM, Daniel Wittenberg wrote: I was curious if we were able to make any progress on getting this patch included? That depends on you, more or less. I'm just waiting for a rerolled one that's tested with latest CVS head and has the necessary documentation amendments. -- Andreas Ericsson andreas.erics...@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 Considering the successes of the wars on alcohol, poverty, drugs and terror, I think we should give some serious thought to declaring war on peace. -- Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today http://p.sf.net/sfu/msIE9-sfdev2dev ___ 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] hostgroup with no members - Enhancement
Will try to get this done this weekend - sorry all, it is an irony to be working for a company that allows us to release code from work to open source and be so busy at the job that I rarely have time to do so :). My apologies for the delay - and thanks for your input, help, and feedback on the patch, Dan. Glad you find it useful. - Max On Fri, Nov 19, 2010 at 10:40 AM, Daniel Wittenberg daniel.wittenberg.r...@statefarm.com wrote: I'll check with the original author of the patch...I re-rolled it already against head and tested great, been a lifesaver. I sent the updates to him so he could post and move forward with so if he's not had time I'll see about submitting directly. -- Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today http://p.sf.net/sfu/msIE9-sfdev2dev ___ 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] hostgroup with no members - Enhancement
I was curious if we were able to make any progress on getting this patch included? Thanks! Dan -Original Message- From: Max Schubert [mailto:m...@webwizarddesign.com] Sent: Wednesday, November 03, 2010 7:04 AM To: Andreas Ericsson; Nagios Users List Subject: Re: [Nagios-users] hostgroup with no members - Enhancement Will do my best to do this this week - if I don't get to it this week I will forget about it for sure, all the patches our team has done to make Nagios (some very very specific to our env) work for us will be available on our team github account; will do my best to get that updated this week as well and post that url along with the patch / docs to this list or I will forget to do that for another few months too. Max On 11/3/10, Andreas Ericsson a...@op5.se wrote: On 11/02/2010 04:54 PM, Max Schubert wrote: allow_empty_hostgroups = 1 I'll take this, but rename the option to something more mnemonic, as empty hostgroups are already allowed and it's a bit ambiguous what it means. Any chance you could re-roll the patch against latest CVS head and include a brief documentation update? Name the var allow_empty_hostgroups in the docs so I can find it when I sed it in. If you want any special attributions (company or person thanks, beyond the addition of your name to the THANKS file and your name and email in the commit log message), let me know. -- Andreas Ericsson andreas.erics...@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 Considering the successes of the wars on alcohol, poverty, drugs and terror, I think we should give some serious thought to declaring war on peace. -- Achieve Improved Network Security with IP and DNS Reputation. Defend against bad network traffic, including botnets, malware, phishing sites, and compromised hosts - saving your company time, money, and embarrassment. Learn More! http://p.sf.net/sfu/hpdev2dev-nov ___ 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 -- Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today http://p.sf.net/sfu/msIE9-sfdev2dev ___ 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] hostgroup with no members - Enhancement
On 11/02/2010 04:54 PM, Max Schubert wrote: allow_empty_hostgroups = 1 I'll take this, but rename the option to something more mnemonic, as empty hostgroups are already allowed and it's a bit ambiguous what it means. Any chance you could re-roll the patch against latest CVS head and include a brief documentation update? Name the var allow_empty_hostgroups in the docs so I can find it when I sed it in. If you want any special attributions (company or person thanks, beyond the addition of your name to the THANKS file and your name and email in the commit log message), let me know. -- Andreas Ericsson andreas.erics...@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 Considering the successes of the wars on alcohol, poverty, drugs and terror, I think we should give some serious thought to declaring war on peace. -- Achieve Improved Network Security with IP and DNS Reputation. Defend against bad network traffic, including botnets, malware, phishing sites, and compromised hosts - saving your company time, money, and embarrassment. Learn More! http://p.sf.net/sfu/hpdev2dev-nov ___ 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] hostgroup with no members - Enhancement
Will do my best to do this this week - if I don't get to it this week I will forget about it for sure, all the patches our team has done to make Nagios (some very very specific to our env) work for us will be available on our team github account; will do my best to get that updated this week as well and post that url along with the patch / docs to this list or I will forget to do that for another few months too. Max On 11/3/10, Andreas Ericsson a...@op5.se wrote: On 11/02/2010 04:54 PM, Max Schubert wrote: allow_empty_hostgroups = 1 I'll take this, but rename the option to something more mnemonic, as empty hostgroups are already allowed and it's a bit ambiguous what it means. Any chance you could re-roll the patch against latest CVS head and include a brief documentation update? Name the var allow_empty_hostgroups in the docs so I can find it when I sed it in. If you want any special attributions (company or person thanks, beyond the addition of your name to the THANKS file and your name and email in the commit log message), let me know. -- Andreas Ericsson andreas.erics...@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 Considering the successes of the wars on alcohol, poverty, drugs and terror, I think we should give some serious thought to declaring war on peace. -- Achieve Improved Network Security with IP and DNS Reputation. Defend against bad network traffic, including botnets, malware, phishing sites, and compromised hosts - saving your company time, money, and embarrassment. Learn More! http://p.sf.net/sfu/hpdev2dev-nov ___ 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] hostgroup with no members - Enhancement
On 11/01/2010 08:57 PM, Daniel Wittenberg wrote: I'd like to be able to create a hostgroup with no members assigned, but doesn't appear to work. Empty hostgroups work just fine. The check that says this is so starts at line 12516 in xdata/xodtemplate.c as of latest CVS/git. It's been like that for a while now. The reason being is that I'm generating the host configs using a third-party tool, and it puts in that host file which hostgroups a host belong to. This works great, but there has to be at least 1 member in the hostgroup for it not to complain. It would be nice if I could just put the hostgroups out there blank and then let the host definition completely populate what's in there. Right now I have 1 fake host that is in every group, so I have one host with hundreds of service checks that will fail , just rather messy. So what you *really* want is some way of assigning services to hosts from within the service. That's an entirely different thing. You could add register 0 to the fake host definition. Not sure if that would work, but it's possible that it does. Does that sound reasonable, another way to do this I've missed? The hopefully-up-and-coming way of handling this is to use service sets, a feature I've been thinking of for quite some time now. It can be safely implemented without altering the object structure version, which is quite nice, and will mean you can assign a set of services to a host from within the definition of that host. The idea is to, in the long run, use service sets to create full host types that can be shared among community members. Would that satisfy your needs? -- Andreas Ericsson andreas.erics...@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 Considering the successes of the wars on alcohol, poverty, drugs and terror, I think we should give some serious thought to declaring war on peace. -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ 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] hostgroup with no members - Enhancement
Ok, so this was a basic test, I have a GENERIC_PING check and it had the fake host in there and was working fine, as soon as I removed it (so no members defined): Error: Could not expand hostgroups and/or hosts specified in service (config file '/etc/nagios/objects/services/GENERIC_PING.cfg', starting on line 1) # cat /etc/nagios/objects/services/GENERIC_PING.cfg define service{ service_description GENERIC_PING display_nameGeneric ping, typically used for parent hosts hostgroup_name GENERIC_PING use generic-service check_command check_ping!100.0,20%!500.0,60% } define hostgroup{ hostgroup_name GENERIC_PING alias GENERIC_PING } So is this a different problem then what you were looking at maybe ? Dan -Original Message- From: Andreas Ericsson [mailto:a...@op5.se] Sent: Tuesday, November 02, 2010 2:34 AM To: Nagios Users List Cc: Daniel Wittenberg Subject: Re: [Nagios-users] hostgroup with no members - Enhancement On 11/01/2010 08:57 PM, Daniel Wittenberg wrote: I'd like to be able to create a hostgroup with no members assigned, but doesn't appear to work. Empty hostgroups work just fine. The check that says this is so starts at line 12516 in xdata/xodtemplate.c as of latest CVS/git. It's been like that for a while now. The reason being is that I'm generating the host configs using a third-party tool, and it puts in that host file which hostgroups a host belong to. This works great, but there has to be at least 1 member in the hostgroup for it not to complain. It would be nice if I could just put the hostgroups out there blank and then let the host definition completely populate what's in there. Right now I have 1 fake host that is in every group, so I have one host with hundreds of service checks that will fail , just rather messy. So what you *really* want is some way of assigning services to hosts from within the service. That's an entirely different thing. You could add register 0 to the fake host definition. Not sure if that would work, but it's possible that it does. Does that sound reasonable, another way to do this I've missed? The hopefully-up-and-coming way of handling this is to use service sets, a feature I've been thinking of for quite some time now. It can be safely implemented without altering the object structure version, which is quite nice, and will mean you can assign a set of services to a host from within the definition of that host. The idea is to, in the long run, use service sets to create full host types that can be shared among community members. Would that satisfy your needs? -- Andreas Ericsson andreas.erics...@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 Considering the successes of the wars on alcohol, poverty, drugs and terror, I think we should give some serious thought to declaring war on peace. -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ 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] hostgroup with no members - Enhancement
Well, we're running 3.2.3, and if I don't have at least 1 member of a hostgroup it throws a fit during the test. Maybe there's something else I have to change, but last we tried it would not work. And no, I don't really want to assign hosts within the service. The way we have it now works great, because everything about a host is in one file, easy to add, delete, update. The only issue we've had is the empty hostgroup. I'll try it again today, I think last I tried was at 3.2.1 so maybe it's changed since then. Either way I'll report back on how it goes. However, your description of services sets sounds pretty interesting and sounds like it would accomplish the same thing. I don't suppose you have any pseudo-examples of what you're thinking? Dan -Original Message- From: Andreas Ericsson [mailto:a...@op5.se] Sent: Tuesday, November 02, 2010 2:34 AM To: Nagios Users List Cc: Daniel Wittenberg Subject: Re: [Nagios-users] hostgroup with no members - Enhancement On 11/01/2010 08:57 PM, Daniel Wittenberg wrote: I'd like to be able to create a hostgroup with no members assigned, but doesn't appear to work. Empty hostgroups work just fine. The check that says this is so starts at line 12516 in xdata/xodtemplate.c as of latest CVS/git. It's been like that for a while now. The reason being is that I'm generating the host configs using a third-party tool, and it puts in that host file which hostgroups a host belong to. This works great, but there has to be at least 1 member in the hostgroup for it not to complain. It would be nice if I could just put the hostgroups out there blank and then let the host definition completely populate what's in there. Right now I have 1 fake host that is in every group, so I have one host with hundreds of service checks that will fail , just rather messy. So what you *really* want is some way of assigning services to hosts from within the service. That's an entirely different thing. You could add register 0 to the fake host definition. Not sure if that would work, but it's possible that it does. Does that sound reasonable, another way to do this I've missed? The hopefully-up-and-coming way of handling this is to use service sets, a feature I've been thinking of for quite some time now. It can be safely implemented without altering the object structure version, which is quite nice, and will mean you can assign a set of services to a host from within the definition of that host. The idea is to, in the long run, use service sets to create full host types that can be shared among community members. Would that satisfy your needs? -- Andreas Ericsson andreas.erics...@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 Considering the successes of the wars on alcohol, poverty, drugs and terror, I think we should give some serious thought to declaring war on peace. -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ 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] hostgroup with no members - Enhancement
On 11/02/2010 02:59 PM, Daniel Wittenberg wrote: Ok, so this was a basic test, I have a GENERIC_PING check and it had the fake host in there and was working fine, as soon as I removed it (so no members defined): Error: Could not expand hostgroups and/or hosts specified in service (config file '/etc/nagios/objects/services/GENERIC_PING.cfg', starting on line 1) # cat /etc/nagios/objects/services/GENERIC_PING.cfg define service{ service_description GENERIC_PING display_nameGeneric ping, typically used for parent hosts hostgroup_name GENERIC_PING use generic-service check_command check_ping!100.0,20%!500.0,60% } define hostgroup{ hostgroup_name GENERIC_PING alias GENERIC_PING } So is this a different problem then what you were looking at maybe ? Yes. That's not just an empty hostgroup, but an empty hostgroup to which services are assigned. That's supposed to be an error. What's the reason for using empty hostgroups to assign services to? -- Andreas Ericsson andreas.erics...@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 Considering the successes of the wars on alcohol, poverty, drugs and terror, I think we should give some serious thought to declaring war on peace. -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ 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] hostgroup with no members - Enhancement
Basically because all the backend files are controlled via puppet, to a number of nagios servers, but the actual host assignments are controlled by third-party package. So, the base configs about all the services are pushed to every server, and then the other tool determines the best balance of devices per nagios server. If that makes sense. So instead of maintaining service and hostgroup configs constantly across all the servers, I can push out one set of configs, and if there's a host pushed to that server which needs those configs, they are there and ready to go. That help? Dan -Original Message- From: Andreas Ericsson [mailto:a...@op5.se] Sent: Tuesday, November 02, 2010 9:10 AM To: Daniel Wittenberg Cc: Nagios Users List Subject: Re: [Nagios-users] hostgroup with no members - Enhancement On 11/02/2010 02:59 PM, Daniel Wittenberg wrote: Ok, so this was a basic test, I have a GENERIC_PING check and it had the fake host in there and was working fine, as soon as I removed it (so no members defined): Error: Could not expand hostgroups and/or hosts specified in service (config file '/etc/nagios/objects/services/GENERIC_PING.cfg', starting on line 1) # cat /etc/nagios/objects/services/GENERIC_PING.cfg define service{ service_description GENERIC_PING display_nameGeneric ping, typically used for parent hosts hostgroup_name GENERIC_PING use generic-service check_command check_ping!100.0,20%!500.0,60% } define hostgroup{ hostgroup_name GENERIC_PING alias GENERIC_PING } So is this a different problem then what you were looking at maybe ? Yes. That's not just an empty hostgroup, but an empty hostgroup to which services are assigned. That's supposed to be an error. What's the reason for using empty hostgroups to assign services to? -- Andreas Ericsson andreas.erics...@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 Considering the successes of the wars on alcohol, poverty, drugs and terror, I think we should give some serious thought to declaring war on peace. -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ 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] hostgroup with no members - Enhancement
On 11/02/2010 03:16 PM, Daniel Wittenberg wrote: Basically because all the backend files are controlled via puppet, to a number of nagios servers, but the actual host assignments are controlled by third-party package. So, the base configs about all the services are pushed to every server, and then the other tool determines the best balance of devices per nagios server. If that makes sense. So instead of maintaining service and hostgroup configs constantly across all the servers, I can push out one set of configs, and if there's a host pushed to that server which needs those configs, they are there and ready to go. That help? Yup. Fixing Nagios to handle this is a bit off my todo-list right now though, but as an autofix, have the init-script run a repair-script to sed out the offending services or hostgroups on the offending systems. I'd let Nagios do the heavy lifting if I was you and just surround each hostgroup with ##HGBEGIN_lalala define hostgroup { hostgroup_name lalala } ##HGEND_lalala to make sed'ing a bit easier. -- Andreas Ericsson andreas.erics...@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 Considering the successes of the wars on alcohol, poverty, drugs and terror, I think we should give some serious thought to declaring war on peace. -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ 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] hostgroup with no members - Enhancement
Maybe it could just be considered a warning and not a fatal error? I can ignore warnings :) Dan -Original Message- From: Andreas Ericsson [mailto:a...@op5.se] Sent: Tuesday, November 02, 2010 9:43 AM To: Daniel Wittenberg Cc: Nagios Users List Subject: Re: [Nagios-users] hostgroup with no members - Enhancement On 11/02/2010 03:16 PM, Daniel Wittenberg wrote: Basically because all the backend files are controlled via puppet, to a number of nagios servers, but the actual host assignments are controlled by third-party package. So, the base configs about all the services are pushed to every server, and then the other tool determines the best balance of devices per nagios server. If that makes sense. So instead of maintaining service and hostgroup configs constantly across all the servers, I can push out one set of configs, and if there's a host pushed to that server which needs those configs, they are there and ready to go. That help? Yup. Fixing Nagios to handle this is a bit off my todo-list right now though, but as an autofix, have the init-script run a repair-script to sed out the offending services or hostgroups on the offending systems. I'd let Nagios do the heavy lifting if I was you and just surround each hostgroup with ##HGBEGIN_lalala define hostgroup { hostgroup_name lalala } ##HGEND_lalala to make sed'ing a bit easier. -- Andreas Ericsson andreas.erics...@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 Considering the successes of the wars on alcohol, poverty, drugs and terror, I think we should give some serious thought to declaring war on peace. -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ 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] hostgroup with no members - Enhancement
On 11/02/2010 03:56 PM, Daniel Wittenberg wrote: Maybe it could just be considered a warning and not a fatal error? I can ignore warnings :) Yes and no. The code returns NULL for non-existing hostgroups referenced (which should remain an error) and NULL for existing hostgroups without member hosts. It needs to be changed to return an int and pass the data back as an out-argument, and I simply don't have time to do that just now. So yes, it could be considered an error, and no that won't happen in the foreseeable future unless someone else sends me a patch for it. I'd be delighted to apply such a patch if someone did though, and especially if it was configurable from nagios.cfg whether empty hostgroups referenced from services was an error or just a warning, with error enabled by default. The patch must not change the object layouts as defined in include/objects.h. Backwards compatibility is kinda boring to cater to, but it's necessary for projects as large as Nagios. -- Andreas Ericsson andreas.erics...@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 Considering the successes of the wars on alcohol, poverty, drugs and terror, I think we should give some serious thought to declaring war on peace. -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ 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] hostgroup with no members - Enhancement
Hi, I would also like to be able to create empty hostgroups with services assigned. The reason for this is that I've setup a nagios installation for a customer where a host is only member to one hostgroup to inherit services from other hostgroups, like all-windows-citrix-server and for a few special servertypes I would like to prepare the chain with hostgroup and services so that when the servers are ready to be monitored everything is prepared and the servers only needs to be added to the apropriate hostgroup. Best regards, Fredrik Barrud On 2 nov 2010, at 15.09, Andreas Ericsson a...@op5.se wrote: On 11/02/2010 02:59 PM, Daniel Wittenberg wrote: Ok, so this was a basic test, I have a GENERIC_PING check and it had the fake host in there and was working fine, as soon as I removed it (so no members defined): Error: Could not expand hostgroups and/or hosts specified in service (config file '/etc/nagios/objects/services/GENERIC_PING.cfg', starting on line 1) # cat /etc/nagios/objects/services/GENERIC_PING.cfg define service{ service_description GENERIC_PING display_nameGeneric ping, typically used for parent hosts hostgroup_name GENERIC_PING use generic-service check_command check_ping!100.0,20%!500.0,60% } define hostgroup{ hostgroup_name GENERIC_PING alias GENERIC_PING } So is this a different problem then what you were looking at maybe ? Yes. That's not just an empty hostgroup, but an empty hostgroup to which services are assigned. That's supposed to be an error. What's the reason for using empty hostgroups to assign services to? -- Andreas Ericsson andreas.erics...@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 Considering the successes of the wars on alcohol, poverty, drugs and terror, I think we should give some serious thought to declaring war on peace. -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ 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 -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ 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] hostgroup with no members - Enhancement
On Tue, Nov 2, 2010 at 10:52 AM, Fredrik Barrud fred...@barrud.se wrote: Hi, I would also like to be able to create empty hostgroups with services assigned. The reason for this is that I've setup a nagios installation for a customer where a host is only member to one hostgroup to inherit services from other hostgroups, like all-windows-citrix-server and for a few special servertypes I would like to prepare the chain with hostgroup and services so that when the servers are ready to be monitored everything is prepared and the servers only needs to be added to the apropriate hostgroup. We have a local patch to turn the error into a warning, patched against 3.2.0 - we needed this because we have customers who can use host - hostgroup - N related services mappings but we do not control their configs, we only define the global service sets - so we could not have this be fatal and fail everyone's changes just because one customer stopped using the mapping. We have been using this patch in production for a year without issues. To apply: 1) Put patch in top level source directory 2) patch -p0 name-of-patch - Max 20101026171548-allow_empty_hostgroups.patch Description: Binary data -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev___ 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] hostgroup with no members - Enhancement
To activate the downgrade from error to warning, put allow_empty_hostgroups = 1 in your nagios.cfg after compiling Nagios with the patch in place. - Max -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ 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] hostgroup with no members - Enhancement
On 02.11.2010 16:50, Max Schubert wrote: We have a local patch to turn the error into a warning, patched against 3.2.0 - we needed this because we have customers who can use host - hostgroup - N related services mappings but we do not control their configs, we only define the global service sets - so we could not have this be fatal and fail everyone's changes just because one customer stopped using the mapping. We have been using this patch in production for a year without issues. Nice thanks :) Kind regards, Michael -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ 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] hostgroup with no members - Enhancement
On 11/02/2010 04:54 PM, Max Schubert wrote: To activate the downgrade from error to warning, put allow_empty_hostgroups = 1 in your nagios.cfg after compiling Nagios with the patch in place. Neato. I'll apply and push it out tomorrow. -- Andreas Ericsson andreas.erics...@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 Considering the successes of the wars on alcohol, poverty, drugs and terror, I think we should give some serious thought to declaring war on peace. -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ 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] hostgroup with no members - Enhancement
Very cool, look forward to using it! Dan -Original Message- From: Andreas Ericsson [mailto:a...@op5.se] Sent: Tuesday, November 02, 2010 12:56 PM To: Nagios Users List Subject: Re: [Nagios-users] hostgroup with no members - Enhancement On 11/02/2010 04:54 PM, Max Schubert wrote: To activate the downgrade from error to warning, put allow_empty_hostgroups = 1 in your nagios.cfg after compiling Nagios with the patch in place. Neato. I'll apply and push it out tomorrow. -- Andreas Ericsson andreas.erics...@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 Considering the successes of the wars on alcohol, poverty, drugs and terror, I think we should give some serious thought to declaring war on peace. -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ 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 -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ 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] hostgroup with no members - Enhancement
I'd like to be able to create a hostgroup with no members assigned, but doesn't appear to work. The reason being is that I'm generating the host configs using a third-party tool, and it puts in that host file which hostgroups a host belong to. This works great, but there has to be at least 1 member in the hostgroup for it not to complain. It would be nice if I could just put the hostgroups out there blank and then let the host definition completely populate what's in there. Right now I have 1 fake host that is in every group, so I have one host with hundreds of service checks that will fail , just rather messy. Does that sound reasonable, another way to do this I've missed? Thanks! Dan -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev___ 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] hostgroup with no members - Enhancement
On 1 November 2010 20:57, Daniel Wittenberg daniel.wittenberg.r...@statefarm.com wrote: It would be nice if I could just put the hostgroups out there blank and then let the host definition completely populate what’s in there. Right now I have 1 fake host that is in every group, so I have one host with hundreds of service checks that will fail , just rather messy. I've got the same problem. To assign service check on host I create an hostgroup on every service to check (example: host_raid, host_http), and to assign that service check on an host I simply ad that host on corresponding hostgroup -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ 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