Blob Blame History Raw
From ef4f4f7c1276a55d0171bde4bc3693b63e12b24f Mon Sep 17 00:00:00 2001
From: Yanis Guenane <yguenane@gmail.com>
Date: Sat, 7 Sep 2013 17:24:34 -0400
Subject: [PATCH] Fix NagiosCfg lense so /etc/nagios/nrpe.cfg is parsed by Nrpe
 and not NagiosCfg

Currently NagiosCfg lense is in charge of parsing all files under /etc/nagios/*.cfg
but /etc/nagios/commands.cfg. /etc/nagios/nrpe.cfg should be also added as an exception
since it needs to be parsed by the Nrpe lense. This issue currently causes the following
error : "Lenses @NagiosCfg and @Nrpe could be used to load this file"

(cherry picked from commit 7efe87199ec254a5cfd2c34968220c4dc4e05643)
---
 lenses/nagioscfg.aug | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lenses/nagioscfg.aug b/lenses/nagioscfg.aug
index a2180f6..31220c4 100644
--- a/lenses/nagioscfg.aug
+++ b/lenses/nagioscfg.aug
@@ -68,6 +68,7 @@ let filter = incl "/etc/nagios3/*.cfg"
 	   . incl "/etc/icinga/*.cfg"
 	   . excl "/etc/nagios3/commands.cfg"
 	   . excl "/etc/nagios/commands.cfg"
+	   . excl "/etc/nagios/nrpe.cfg"
 	   . incl "/etc/icinga/commands.cfg"
 
 let xfm = transform lns filter