Add icinga.cfg to autodiscovery?

117 views
Skip to first unread message

Andreas Falk

unread,
Nov 26, 2013, 3:14:10 AM11/26/13
to pynag-...@googlegroups.com
Hi,

I don't know if it is possible, or even in the scope of pynag rules.
But I started use it with an icinga test, so I did a little change in the guess_cfg_file function.

Really nothing fancy, just added two icinga.cfg to it.

/usr/local/src/pynag-0.7.0$ diff pynag/Parsers/__init__.py pynag/Parsers/__init__.py_org
85,86d84
<               '/etc/icinga/icinga.cfg',
<               '/usr/local/icinga/etc/icinga.cfg',

Perhaps it can be of some help to someone out there :)

--
Regards Falk

Andreas Falk

unread,
Nov 26, 2013, 3:18:08 AM11/26/13
to pynag-...@googlegroups.com
Humm,

I meant :)

/usr/local/src/pynag-0.7.0$ cat ~/patch.__init__.py
--- pynag/Parsers/__init__.py_org    2013-11-26 09:06:40.583744044 +0100
+++ pynag/Parsers/__init__.py    2013-11-26 09:12:31.897807970 +0100
@@ -82,6 +82,8 @@
                           '/nagios/etc/nagios/nagios.cfg',
                           './nagios.cfg',
                           './nagios/nagios.cfg',
+              '/etc/icinga/icinga.cfg',
+              '/usr/local/icinga/etc/icinga.cfg',
         )
         for file_path in possible_files:
             if os.path.isfile(file_path):

--
Regards Falk

Tommi

unread,
Nov 26, 2013, 4:05:53 AM11/26/13
to pynag-...@googlegroups.com

Andreas Falk

unread,
Nov 28, 2013, 1:23:52 PM11/28/13
to pynag-...@googlegroups.com
Hi,

Thx!
Reply all
Reply to author
Forward
0 new messages