Hi,

I encountered a minor problem in the Nagios configuration validation
done by the arbiter :

# python /usr/local/shinken/bin/shinken-arbiter -v
-c /usr/local/shinken/etc/nagios.cfg
-c /usr/local/shinken/etc/shinken-specific.cfg

...
File
"/usr/local/lib/python2.6/dist-packages/Shinken-0.4-py2.6.egg/shinken/item.py", 
line 597, in linkify_templates
    err = "ERROR: the template '%s' defined for '%s' is unkown" % (tpl,
i.get_name())
  File
"/usr/local/lib/python2.6/dist-packages/Shinken-0.4-py2.6.egg/shinken/service.py",
 line 303, in get_name
    return self.service_description
AttributeError: service_description
        

In fact, when using inheritance, a service may not have already a
service_description attribute if inheritance have not been yet computed
(service_description is optional and can be inherited).


So a little quick fix to get_name() method in service.py

300c300,303
<             return self.service_description
---
>             if hasattr(self, 'service_description'):
>                 return self.service_description
>             else:
>                 return "SERVICE-DESCRIPTION-NOT-YET-COMPUTED"


Regards,

Laurent



------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Shinken-devel mailing list
Shinken-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/shinken-devel

Reply via email to