If you have the chance, it would be much appreciated to get feedback on the quality of the examples.
Also i have the feeling that many new coders go directly to the Parsers module and miss what is in the Model module, please let me know if that was the case for you :)
$ git show 7d7652c8b7f7e212efba42a964d18575c6b633e1
commit 7d7652c8b7f7e212efba42a964d18575c6b633e1
Date: Mon Jul 30 11:22:14 2012 +0000
/usr/local/nagios/etc/ added to paths where nagios.cfg might be found (Thanks Abhinav Upadhyay)
diff --git a/pynag/Parsers/__init__.py b/pynag/Parsers/__init__.py
index 4d9f8df..787ec33 100644
--- a/pynag/Parsers/__init__.py
+++ b/pynag/Parsers/__init__.py
@@ -38,7 +38,7 @@ class config:
# If nagios.cfg is not set, lets do some minor autodiscover.
if self.cfg_file is None:
- possible_files = ('/etc/nagios/nagios.cfg','/etc/nagios3/nagios.cfg','/usr/local/nagios/nagios.cfg','/nagios/etc/nagios/nagios.cfg')
+ possible_files = ('/etc/nagios/nagios.cfg','/etc/nagios3/nagios.cfg','/usr/local/nagios/etc/nagios.cfg','/nagios/etc/nagios/nagios.cfg')
for file in possible_files:
if os.path.isfile(file):
self.cfg_file = file