Error Could Not Expand Hostgroups And/or Hosts Specified In Service
Contents |
instructions: Windows Mac Red Hat Linux Ubuntu Click URL instructions: Right-click on ad, choose "Copy Link", then paste here → (This may not be possible with some types of ads) More information about our error: could not find any host matching nagios ad policies X You seem to have CSS turned off. Please don't fill nagios error could not find any hostgroup matching 'windows-servers' out this field. You seem to have CSS turned off. Please don't fill out this field. Briefly describe the problem could not expand members specified in hostgroup (required): Upload screenshot of ad (required): Select a file, or drag & drop file here. ✔ ✘ Please provide the ad click URL, if possible: Home Browse Nagios Core Mailing Lists Nagios Core could not find any hostgroup matching nagios Nagios network monitoring software is enterprise server monitoring Brought to you by: egalstad, swilkerson Summary Files Reviews Support Wiki Mailing Lists Donate SVN CVS Git ▾ Nagios BPI Nagios Core Nagios Core Docs Nagios V-Shell NDOUtils NRDP NRPE NSCA NSTI nagios-announce nagios-checkins nagios-devel nagios-devteam nagios-drama nagios-project nagios-users nagios-users-br nagios-users-ru [Nagios-devel] Empty hostgroups ok, but not if services defined? [Nagios-devel] Empty hostgroups ok, but not if services defined?
Nagios Hostgroup
From: Marcus Fleige
instructions: Windows Mac Red Hat Linux Ubuntu Click URL instructions: Right-click on ad, choose "Copy Link", then paste here → (This may not be possible with some types of ads) More information about our ad policies X You seem to have CSS turned off. Please don't fill out this field. You seem to have CSS turned off. Please don't fill out this field. Briefly describe the problem (required): Upload screenshot of ad (required): Select a file, https://sourceforge.net/p/nagios/mailman/message/18950202/ or drag & drop file here. ✔ ✘ Please provide the ad click URL, if possible: Home Browse Nagios Core Mailing Lists Nagios Core Nagios network monitoring software is enterprise server monitoring Brought to you by: egalstad, swilkerson Summary Files Reviews Support Wiki Mailing Lists Donate SVN CVS Git ▾ Nagios BPI Nagios Core https://sourceforge.net/p/nagios/mailman/message/23439091/ Nagios Core Docs Nagios V-Shell NDOUtils NRDP NRPE NSCA NSTI nagios-announce nagios-checkins nagios-devel nagios-devteam nagios-drama nagios-project nagios-users nagios-users-br nagios-users-ru Re: [Nagios-users] hostgroup expansion and regex Re: [Nagios-users] hostgroup expansion and regex From: Terry
trying to add a couple of hostgroups. https://www.mail-archive.com/nagios-users@lists.sourceforge.net/msg30783.html The way I have things organized is /etc/nagios/conf.d/ contains individual files for each host and /etc/nagios/objects contains hostgroup definitions used to define common https://dev.icinga.org/issues/3961 services to be monitored. I've got all the objects/*.cfg files included in nagios.cfg: cfg_file=/etc/nagios/objects/commands.cfg cfg_file=/etc/nagios/objects/contacts.cfg cfg_file=/etc/nagios/objects/timeperiods.cfg cfg_file=/etc/nagios/objects/templates.cfg cfg_file=/etc/nagios/objects/localhost.cfg cfg_file=/etc/nagios/objects/windows.cfg cfg_file=/etc/nagios/objects/linux.cfg cfg_file=/etc/nagios/objects/switch.cfg cfg_file=/etc/nagios/objects/printer.cfg cfg_file=/etc/nagios/objects/router.cfg #cfg_file=/etc/nagios/objects/winhttp.cfg could not #cfg_file=/etc/nagios/objects/twiki.cfg #cfg_file=/etc/nagios/objects/bugzilla.cfg cfg_file=/etc/nagios/objects/mysql.cfg cfg_file=/etc/nagios/objects/exchange.cfg Sample host definition: #/etc/nagios/conf.d/mailsrv.cfg define host{ use windows-server ; Inherit default values from a template host_name mailsrv ; The name we're giving to this host alias mailsrv.domain.com ; A longer name associated with the host hostgroups windows-servers,exchange-servers address 10.239.1.16 ; IP address of the could not find host parents cisco-3560g } Sample hostgroup definition: #/etc/nagios/objects/exchange.cfg define hostgroup{ hostgroup_name exchange-servers alias Exchange Servers } define service{ use generic-service hostgroup_name exchange-servers service_description Exchange Information Store check_command check_nt!SERVICESTATE!-d SHOWALL -l MSExchangeIS } define service{ use generic-service hostgroup_name exchange-servers service_description Exchange Management check_command check_nt!SERVICESTATE!-d SHOWALL -l MSExchangeMGMT } define service{ use generic-service hostgroup_name exchange-servers service_description Exchange MTA Stacks check_command check_nt!SERVICESTATE!-d SHOWALL -l MSExchangeMTA } define service{ use generic-service hostgroup_name exchange-servers service_description Exchange Routing Engine check_command check_nt!SERVICESTATE!-d SHOWALL -l RESvc } define service{ use generic-service hostgroup_name exchange-servers service_description Exchange System Attendant check_command check_nt!SERVICESTATE!-d SHOWALL -l MSExchangeSA } define service{ use generic-service hostgroup_name exchange-servers service_description IIS Admin Service check_command check_nt!SERVICESTATE!-d SHOWALL -l IISADMIN } This seems to work fine. However, I have three hostgroup files that do not work and I can't suss out why. They're all fairly identical, single-service hostgroups, two are chec
New issues w/o target version open issues grouped by status Bug #3961 Services with no host mappings are not accepted Added by viranch over 3 years ago. Updated over 3 years ago. Status:ResolvedStart date:04/12/2013Priority:NormalDue date:Assignee:dnsmichi% Done:100%Category:ConfigurationTarget version:Icinga 1.x - 1.10 Icinga Version:1.8.4 OS Version:CentOS release 6.2 (Final) Description dummy config: define hostgroup { hostgroup_name grpA } define hostgroup { hostgroup_name grpB } define host { host_name foo hostgroup grpA,grpB } define service { hostgroup_name grpA,!grpB } this fails with the error: "Could not expand hostgroups and/or hosts specified in service" although services with no host mappings should be accepted (and simply ignored). however, the error does not happen if I have a service assigned to an empty hostgroup: define hostgroup { hostgroup_name grpC } define service { hostgroup_name grpC } // above config is fine for icinga attaching patch for a possible fix. patch.diff (13.5 KB) viranch, 04/12/2013 03:53 PM patch2.diff - note: this patch is inclusive of the patch for this bug report (because they are over-lapping). (15.2 KB) viranch, 04/18/2013 04:14 PM Associated revisions Revision 347c3285 Added by Michael Friedrich over 3 years ago core: fix services with no host mappings are not accepted (Viranch Metha) added a test config, verified patch working.added to THANKS and AUTHORS, preserving full kudos. fixes #3961 History #1 Updated by dnsmichi over 3 years ago by host mapping, you mean "grpA,!grpB" would create an empty value (no match) as foo is assigned to both hostgroups, right? #2 Updated by viranch over 3 years ago yes, grpA would add foo and !grpB will discard it back, resulting in empty value (no match) as you said - which is okay and should not result in an error IMO. #3 Updated by dnsmichi over 3 years ago ok, sounds logical, though it must be tested properly in order not break with other stuff. i might reschedule that for an 1.9.1 if there's no time left for 1.9 - thanks for the patch. #4 Updated by viranch over 3 years ago JFYI a short explanation of t