Source: zabbix
Severity: wishlist
Tags: patch

The Zabbix components (agent, proxy and server) allow for their
configuration files to have Include= directives, which can work with
directories of configuration file snippets.  This is currently not
enabled by default in the package.  I suggest that it should be, at
least for the agent, so that packages of applications where monitoring
makes sense could just ship a file in /etc/zabbix/zabbix_agent.conf.d/
containing a set of relevant UserParameter= bits.  This would make it
that much easier to deploy a package on a large set of servers and
monitor it.  There would still be a need for human intervention in
registering the "item" into a host template on the web interface, but
that only needs to happen once, not once per agent.

Please find attached a patch implementing that.

Thanks (and thanks a lot for maintaining Zabbix :-)

Roland.

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 3.0.0-2-686-pae (SMP w/1 CPU core)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
diff --git a/debian/changelog b/debian/changelog
index aab5d68..6315a8b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+zabbix (1:1.8.7-1+lld) UNRELEASED; urgency=low
+
+  * Added Include=/etc/zabbix/zabbix_agent.conf.d/ directive to
+    zabbix-agent to allow packages to provide configuration snippets.
+
+ -- Roland Mas <lola...@debian.org>  Thu, 15 Dec 2011 14:43:32 +0100
+
 zabbix (1:1.8.7-1) unstable; urgency=low
 
   * New upstream release.
diff --git a/debian/zabbix-agent.dirs b/debian/zabbix-agent.dirs
index cb2ba82..02265c1 100644
--- a/debian/zabbix-agent.dirs
+++ b/debian/zabbix-agent.dirs
@@ -1,6 +1,7 @@
 usr/bin
 usr/sbin
 etc/zabbix
+etc/zabbix/zabbix_agentd.conf.d
 etc/logrotate.d
 usr/share/zabbix-agent
 var/log/zabbix-agent
diff --git a/misc/conf/zabbix_agent.conf b/misc/conf/zabbix_agent.conf
index 1274de2..d3b7d11 100644
--- a/misc/conf/zabbix_agent.conf
+++ b/misc/conf/zabbix_agent.conf
@@ -37,7 +37,7 @@ Server=127.0.0.1
 # Include=
 
 # Include=/etc/zabbix/zabbix_agentd.userparams.conf
-# Include=/etc/zabbix/zabbix_agentd/
+Include=/etc/zabbix/zabbix_agent.conf.d/
 
 ####### USER-DEFINED MONITORED PARAMETERS #######
 
@@ -55,6 +55,7 @@ Server=127.0.0.1
 #	Format: UserParameter=<key>,<shell command>
 #	Note that shell command must not return empty string or EOL only.
 #	Example: UserParameter=system.test,who|wc -l
+#	See also files under /etc/zabbix/zabbix_agent.conf.d/
 #UserParameter=system.test,who|wc -l
 ### Set of parameters for monitoring MySQL server (v3.23.42 and later)
 ### Change -u<username> and add -p<password> if required
diff --git a/misc/conf/zabbix_agentd.conf b/misc/conf/zabbix_agentd.conf
index 86ad1a1..b386c24 100644
--- a/misc/conf/zabbix_agentd.conf
+++ b/misc/conf/zabbix_agentd.conf
@@ -219,7 +219,7 @@ Hostname=Zabbix server
 # Include=
 
 # Include=/etc/zabbix/zabbix_agentd.userparams.conf
-# Include=/etc/zabbix/zabbix_agentd/
+Include=/etc/zabbix/zabbix_agent.conf.d/
 
 ####### USER-DEFINED MONITORED PARAMETERS #######
 
@@ -237,7 +237,7 @@ Hostname=Zabbix server
 #	User-defined parameter to monitor. There can be several user-defined parameters.
 #	Format: UserParameter=<key>,<shell command>
 #	Note that shell command must not return empty string or EOL only.
-#	See 'zabbix_agentd' directory for examples.
+#	See also files under /etc/zabbix/zabbix_agent.conf.d/
 #
 # Mandatory: no
 # Default:

Reply via email to