From f41b91ae32d98ee0fbbb96659c778e44218fee81 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Mon, 11 Feb 2008 12:35:02 +0100 Subject: [PATCH] exec plugin: Disabled the `NagiosExec' option. All references to this option have been removed from the manpages, too. --- src/collectd-exec.pod | 14 ++++++++------ src/collectd.conf.pod | 9 +++------ src/exec.c | 7 ++++++- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/src/collectd-exec.pod b/src/collectd-exec.pod index 32c3863d..fe2fd630 100644 --- a/src/collectd-exec.pod +++ b/src/collectd-exec.pod @@ -11,22 +11,20 @@ collectd-exec - Documentation of collectd's C Exec "myuser:mygroup" "myprog" Exec "otheruser" "/path/to/another/binary" "arg0" "arg1" NotificationExec "user" "/usr/lib/collectd/exec/handle_notification" - NagiosExec "nagios:nagios" "/usr/lib/nagios/plugins/check_something" =head1 DESCRIPTION -The C forks of an executable either to receive values, to dispatch -notifications to the outside world or to be able to use Nagios plugins. The -syntax of the configuration is explained in L but summarized -in the above synopsis. +The C forks of an executable either to receive values or to +dispatch notifications to the outside world. The syntax of the configuration is +explained in L but summarized in the above synopsis. If you want/need better performance or more functionality you should take a long look at the C, L. =head1 EXECUTABLE TYPES -There are currently three types of executables that can be executed by the +There are currently two types of executables that can be executed by the C: =over 4 @@ -57,6 +55,8 @@ run at once if multiple notifications are received. See L below for a description of the data passed to these programs. +=begin comment + =item C The executable is treated as a Nagios plugin. That means that the first line @@ -68,6 +68,8 @@ For information on how to write Nagios plugins please refer to the Nagios documentation. If a plugin works with Nagios but not with collectd please complain on the collectd mailing list instead. +=end comment + =back =head1 EXEC DATA FORMAT diff --git a/src/collectd.conf.pod b/src/collectd.conf.pod index 09661eb6..7e05bdbe 100644 --- a/src/collectd.conf.pod +++ b/src/collectd.conf.pod @@ -299,8 +299,6 @@ output that is expected from it. =item B I[:[I]] I [IargE> [IargE> ...]] -=item B I[:[I]] I [IargE> [IargE> ...]] - Execute the executable I as user I. If the user name is followed by a colon and a group name, the effective group is set to that group. The real group and saved-set group will be set to the default group of that @@ -317,10 +315,9 @@ program. Please note that due to the configuration parsing numbers and boolean values may be changed. If you want to be absolutely sure that something is passed as-is please enclose it in quotes. -The B, B, and B statements change the -semantics of the programs executed, i.Ee. the data passed to them and the -response expected from them. This is documented in great detail in -L. +The B and B statements change the semantics of the +programs executed, i.Ee. the data passed to them and the response +expected from them. This is documented in great detail in L. =back diff --git a/src/exec.c b/src/exec.c index d5a8d0fd..ced03f29 100644 --- a/src/exec.c +++ b/src/exec.c @@ -128,9 +128,12 @@ static int exec_config_exec (oconfig_item_t *ci) /* {{{ */ } memset (pl, '\0', sizeof (program_list_t)); +#if 0 if (strcasecmp ("NagiosExec", ci->key) == 0) pl->flags |= PL_NAGIOS_PLUGIN; - else if (strcasecmp ("NotificationExec", ci->key) == 0) + else +#endif + if (strcasecmp ("NotificationExec", ci->key) == 0) pl->flags |= PL_NOTIF_ACTION; else pl->flags |= PL_NORMAL; @@ -253,7 +256,9 @@ static int exec_config (oconfig_item_t *ci) /* {{{ */ { oconfig_item_t *child = ci->children + i; if ((strcasecmp ("Exec", child->key) == 0) +#if 0 || (strcasecmp ("NagiosExec", child->key) == 0) +#endif || (strcasecmp ("NotificationExec", child->key) == 0)) exec_config_exec (child); else -- 2.11.0