Error Could Not Expand Members Specified In Hostgroup
This board serves as an open discussion and support collaboration point for Nagios XI. NOTE: Nagios XI customers should use the Customer Support forum to obtain expedited support. Topic locked 7 posts • Page 1 of 1 Created Host Groups But nagios regex Getting Configuration Error by Ben.Patrick » Fri Mar 11, 2011 9:16 am Looking for some could not expand hostgroups and/or hosts specified in service pointers in the right direction please.I've been creating a batch of meaningful host groups so that I can group relevant hosts together for nagios host groups reporting purposes.After spending the time typing all the groups into the Nagios XI interface, when I try to apply configuration it fails. The Log shows this message Error: Could not expand members specified in hostgroup (config file '/usr/local/nagios/etc/hostgroups.cfg', starting on line 216)I have looked into the /usr/local/nagios/etc/hostgroups.cfg file and it only shows the hostgroups from the current active config in NagiosXI and not the version in the Core.Could it be that Nagios is limited by size of field or certain characters in the field? A sample hostgroup name is:Production - Plant Equipment - Threading LineI also have hostgroups embedded in other hostgroups to form a tree of about three levels.Any help would be appreciated, thanks in advance.Ben Ben.Patrick Posts: 10Joined: Thu Mar 10, 2011 5:26 am Top Re: Created Host Groups But Getting Configuration Error by admin » Fri Mar 11, 2011 7:56 pm Hi Ben -In order to see the offending statements, you'd have to go to the admin section of the XI interface and select the "Config snapshots" option. The latest error snapshot will contain the config file with the problems. If Nagios XI detects a config problem when you try to restart it, it rolls back to the last known good config files. That's why you don't see it in the current file. Ethan GalstadPresident admin Site Admin Posts: 256Joined: Mon Oct 12, 2009 8:21 am Top Re: Created Host Groups But Getting Configuration Error by Ben.Patrick » Sat Mar 12, 2011 8:27 am Thanks for the reply. Went through the snapshot and it was erroring out anytime I had a hostgroup with hostgroup members. Removed all the hostgroup members and the snapshot successfully applied.I've now gone back in to add the hostgroup members and it still errors out. The message is:Error: Could not expand members specified in hostgroup (config file '/usr/local/nagios/etc/hostgroups.cfg', starting on line 54)Line 54 contains the following string:define hostgroup { hostgroup_name Location - Bellshill - Plant - Coat And Mark alias Location - Bellshill - Plant - Coat And Mark hostgroup_members Production - Plant Equipment - Co
package in Lenny uses cfg_dir pointing at /etc/nagios3/conf.d. The directory is pre-populated with the following: contacts_nagios2.cfg extinfo_nagios2.cfg generic-host_nagios2.cfg generic-service_nagios2.cfg host-gateway_nagios3.cfg hostgroups_nagios2.cfg localhost_nagios2.cfg services_nagios2.cfg timeperiods_nagios2.cfg I made a new cfg for my gecko server, gecko.cfg, and added it alongside localhost in hostgroups_nagios2.cfg, but when I tried to restart, nagios says: Error: https://support.nagios.com/forum/viewtopic.php?t=1842&p=7716 Could not find any host matching 'gecko' (config file '/etc/nagios3/conf.d/hostgroups_nagios2.cfg', starting on line 18) Error: Could not expand members specified in hostgroup (config file '/etc/nagios3/conf.d/hostgroups_nagios2.cfg', starting on line 18) I worked around the issue by removing gecko from the hostgroup members and instead https://www.mail-archive.com/nagios-users@lists.sourceforge.net/msg30480.html adding a hostgroups entry to the gecko host definition. I believe the object definitions are correct because the gecko entry with an HTTP service is now active. What would prevent me from adding gecko to members of the hostgroup? services_nagios2.cfg: ... define service { hostgroup_name http-servers service_description HTTP check_command check_http use generic-service notification_interval 0 } ... hostgroups_nagios2.cfg: ... define hostgroup { hostgroup_name http-servers alias HTTP servers # works/original members localhost # broken # members localhost,gecko } ... gecko.cfg: define host{ use generic-host host_name gecko.domain.tld alias gecko address nnn.nnn.nnn.nnn # added when hostgroup.members didn't work hostgroups http-servers } localhost_nagios2.cfg: define host{ use generic-host host_name localhost alias localhost address 127.0.0.1 } # a few non-hostgroup service definitions follow ... ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Commu
not expand member hosts specified in hostgroup (config file'/usr/local/nagios/etc/hostgroup.cfg', line 1).The first line of my http://nagios-users.narkive.com/g5aKoBLz/could-not-expand-member-hosts-specified-in-hostgroup hostgroup.cfg file is:define hostgroup{But the word "define" is in https://www.reddit.com/r/nagios/comments/31x6l4/issue_with_nagios_configs/ "yellow" because of a bad minupulation with VI!!!I think it's could be the problem, but i don't know how to solve it !!David StrappazonMOTOR PRESSE FRANCEService Informatique***@motorpresse.fr Marc Powell 2004-02-19 08:38:19 UTC PermalinkRaw Message ________________________________From: could not David Strappazon [mailto:***@motorpresse.fr]Sent: Thursday, February 19, 2004 10:12 AMTo: nagios-***@lists.sourceforge.netSubject: [Nagios-users] could not expand member hosts specified inhostgroup....I have got this error when running /usr/local/nagios/bin/nagios -vnagios.cfg:Could not expand member hosts specified in hostgroup (config file'/usr/local/nagios/etc/hostgroup.cfg', line 1).The first line of my hostgroup.cfg file is:define could not expand hostgroup{But the word "define" is in "yellow" because of a bad minupulation withVI !!!I think it's could be the problem, but i don't know how to solve it !!-----------------I'm sure that's not the case. Vi syntax highighting is a function of viand is not embedded within the file itself. It's probably just the lastthing you searched for. The real problem is that nagios has been unableto parse your hostgroup definition properly, either because it containsno members or some expansion is failing (wildcards maybe). If you couldpost your entire hostgroup definition, including any external referencesthat it might make, that would be helpful.--Marc Marc Powell 2004-02-19 09:04:54 UTC PermalinkRaw Message On Thursday, February 19, 2004 10:44 AM, David Strappazon shared withPost by David Strappazondefine hostgroup{hostgroup_name INFORMATIQUEalias pc duservice informatiquePost by David St
»reddit.comnagioscommentsWant to join? Log in or sign up in seconds.|Englishlimit my search to /r/nagiosuse the following search parameters to narrow your results:subreddit:subredditfind submissions in "subreddit"author:usernamefind submissions by "username"site:example.comfind submissions from "example.com"url:textsearch for "text" in urlselftext:textsearch for "text" in self post contentsself:yes (or self:no)include (or exclude) self postsnsfw:yes (or nsfw:no)include (or exclude) results marked as NSFWe.g. subreddit:aww site:imgur.com dogsee the search faq for details.advanced search: by author, subreddit...this post was submitted on 08 Apr 20151 point (60% upvoted)shortlink: remember mereset passwordloginSubmit a new linkSubmit a new text postnagiossubscribeunsubscribe1,046 readers~5 users here nowcreated by mpierrea community for 6 yearsmessage the moderatorsMODERATORSmpierredavethebarbmikeoquinnoldlinuxguylp86nomadismydjabout moderation team »discussions in /r/nagios<>X1 points · 8 comments Host down by default1 points · 2 comments check_smart.pl - MegaRAID and regex?4 points · 6 comments Nagios Learning Material2 points · 1 comment check_linux_stats.pl does not work with user nagios1 points NConf setup on FAN1 points · 3 comments Disable all host and service notifications for a specific host