'ObjectRelations' has no attribute 'hostgroup_subgroups'

17 views
Skip to first unread message

Felipe Cecagno

unread,
Sep 21, 2012, 12:28:19 PM9/21/12
to pynag-...@googlegroups.com
Hello there,

This is my first post to this mailing list, I tried to find something related to this issue googling and looking for other topics here, but couldn't find anything.

I just installed pynag from the lastest tag (pynag-0.4.6-1), and I'm getting this error:

$ pynag list
Traceback (most recent call last):
  File "/usr/local/bin/pynag", line 523, in <module>
    parse_arguments()
  File "/usr/local/bin/pynag", line 59, in parse_arguments
    list_objects()
  File "/usr/local/bin/pynag", line 251, in list_objects
    objects = search_objects(search_statements=where_statement)
  File "/usr/local/bin/pynag", line 132, in search_objects
    objects += pynag.Model.ObjectDefinition.objects.filter(**conditions)
  File "/usr/local/lib/python2.6/dist-packages/pynag/Model/__init__.py", line 442, in filter
    for i in self.all:
  File "/usr/local/lib/python2.6/dist-packages/pynag/Model/__init__.py", line 305, in get_all
    self.reload_cache()
  File "/usr/local/lib/python2.6/dist-packages/pynag/Model/__init__.py", line 345, in reload_cache
    ObjectRelations.resolve_hostgroups()
  File "/usr/local/lib/python2.6/dist-packages/pynag/Model/__init__.py", line 269, in resolve_hostgroups
    ObjectRelations.hostgroup_subgroups[group] = subgroups
AttributeError: type object 'ObjectRelations' has no attribute 'hostgroup_subgroups'

My nagios installation is on /usr/local/nagios. Any ideas?

Best regards,

Felipe Cecagno

Páll Sigurðsson

unread,
Sep 21, 2012, 1:51:53 PM9/21/12
to pynag-...@googlegroups.com
Hi Felipe,

Can you please try latest from git master ? (latest commit as of today is d18d458e936d621fa9f522fcae2e53c4d568c702)

There is a patch for bug in pynag list in configuration where hostgroups are nested with hostgroup_members tag. Might fix your situation.

Kind regards,
Pall Sigurdsson

Felipe Cecagno

unread,
Sep 21, 2012, 1:58:36 PM9/21/12
to pynag-...@googlegroups.com
Nice, thank you Pall, it worked!

Best regards,

--
   
Felipe Cecagno
Reply all
Reply to author
Forward
0 new messages