Bug#412691: netmrg: The monitor 'Script Options' field is ignored

2007-05-30 Thread Francois Gouget
On Sun, 27 May 2007, Uwe Steinmann wrote:
[...]
 Sorry for the long delay. It took me quite some time to figure out
 what's going on here.
 
 The documentation is bit scarce on this.
 It will work, if you specify the command as
 'local-netmrg-lmsensors.pl %parameters%'
 %parameters% will be replaced with 'temp1' in your case.

I have not tried this (NetMRG was temperamental enough that I prefer not 
to touch my config now that I got it to work well), but if I understand 
the above correctly, then the attached patch may help clarify this 
point.


-- 
Francois Gouget [EMAIL PROTECTED]  http://fgouget.free.fr/
   Cahn's Axiom: When all else fails, read the instructions.diff -ur netmrg-0.18.2.orig/README netmrg-0.18.2/README
--- netmrg-0.18.2.orig/README	2004-11-09 05:26:14.0 +0100
+++ netmrg-0.18.2/README	2007-05-30 10:25:24.0 +0200
@@ -1389,10 +1389,12 @@
 Edit
 
  * Name - An description used to identify the test.
- * Command - The program to execute for this test. If the value of
-   this field does not start with a slash, it is assumed that the
-   command  is located in the default NetMRG tests directory.
-   Commands are passed to a shell for execution by the gatherer.
+ * Command - The program to execute for this test and its
+   arguments. If the value of this field does not start with a
+   slash, it is assumed that the command  is located in the
+   default NetMRG tests directory. Commands are passed to a shell
+   for execution by the gatherer. Add %parameters% where you would
+   like NetMRG to add its parameters.
  * Data Type - The type of data gathered from the program.
   + Standard Out - Data from the program's standard output is
 returned. The program should output data on one line which
diff -ur netmrg-0.18.2.orig/share/doc/netmrg.sgml netmrg-0.18.2/share/doc/netmrg.sgml
--- netmrg-0.18.2.orig/share/doc/netmrg.sgml	2004-11-09 05:26:14.0 +0100
+++ netmrg-0.18.2/share/doc/netmrg.sgml	2007-05-30 10:25:46.0 +0200
@@ -1314,7 +1314,7 @@
 			refsect2titleEdit/title
 			itemizedlist
 			listitemparaguilabelName/guilabel - An description used to identify the test./para/listitem
-			listitemparaguilabelCommand/guilabel - The program to execute for this test.  If the value of this field does not start with a slash, it is assumed that the command is located in the default NetMRG tests directory.  Commands are passed to a shell for execution by the gatherer./para/listitem
+			listitemparaguilabelCommand/guilabel - The program to execute for this test and its arguments.  If the value of this field does not start with a slash, it is assumed that the command is located in the default NetMRG tests directory.  Commands are passed to a shell for execution by the gatherer. Add %parameters% where you would like NetMRG to add its parameters./para/listitem
 			listitemparaguilabelData Type/guilabel - The type of data gathered from the program.
 itemizedlist
 	listitemparaguilabelStandard Out/guilabel - Data from the program's standard output is returned.  The program should output data on one line which should be a numeric value or U to specify an unknown value./para/listitem
diff -ur netmrg-0.18.2.orig/share/doc/txt/netmrg.txt netmrg-0.18.2/share/doc/txt/netmrg.txt
--- netmrg-0.18.2.orig/share/doc/txt/netmrg.txt	2004-11-09 05:26:14.0 +0100
+++ netmrg-0.18.2/share/doc/txt/netmrg.txt	2007-05-30 10:25:36.0 +0200
@@ -1389,10 +1389,12 @@
 Edit
 
  * Name - An description used to identify the test.
- * Command - The program to execute for this test. If the value of
-   this field does not start with a slash, it is assumed that the
-   command  is located in the default NetMRG tests directory.
-   Commands are passed to a shell for execution by the gatherer.
+ * Command - The program to execute for this test and its
+   arguments. If the value of this field does not start with a
+   slash, it is assumed that the command  is located in the
+   default NetMRG tests directory. Commands are passed to a shell
+   for execution by the gatherer. Add %parameters% where you would
+   like NetMRG to add its parameters.
  * Data Type - The type of data gathered from the program.
   + Standard Out - Data from the program's standard output is
 returned. The program should output data on one line which


Bug#412691: netmrg: The monitor 'Script Options' field is ignored

2007-05-28 Thread Uwe Steinmann
On Tue, Feb 27, 2007 at 02:00:27PM +0100, Francois Gouget wrote:
 Package: netmrg
 Version: 0.18.2-14
 Severity: normal
 
 
 The documentation says:
 
   edit info about a monitor
 [...]
   + Script Options
 o Parameters  -  specifies  a string which will be
   appended  to  the script's parameters. Parameter
   expansions are honored in this field.
 
 So I created a Test script as follows:
Name: LMSensors
Command:  local-netmrg-lmsensors.pl
Data Type:Standard Out
For use with this device: Linux Box
 
 Then I created a monitor as follows:
Monitoring Type:  Script
Script Test:  LMSensors
Parameters:   temp1
Data Type:Gauge
Minimum Value:U
Maximum Value:U
Subdevice:Amboise - Hardware Monitors
 
 But netmrg-gatherer is running the following command:
 
 [L: 0064, C: 0512] [Dev: 0002] [Sub: 0017] [Mon: 0064] Sending
 '/usr/lib/netmrg/local-netmrg-lmsensors.pl' to shell.
 
 Instead of the expected '/usr/lib/netmrg/local-netmrg-lmsensors.pl
 temp1'.
Sorry for the long delay. It took me quite some time to figure out
what's going on here.

The documentation is bit scarce on this.
It will work, if you specify the command as
'local-netmrg-lmsensors.pl %parameters%'
%parameters% will be replaced with 'temp1' in your case.

  Uwe

-- 
  MMK GmbH, Fleyer Str. 196, 58097 Hagen
  [EMAIL PROTECTED]
  Tel: 02331 840446Fax: 02331 843920


signature.asc
Description: Digital signature


Bug#412691: netmrg: The monitor 'Script Options' field is ignored

2007-02-27 Thread Francois Gouget
Package: netmrg
Version: 0.18.2-14
Severity: normal


The documentation says:

  edit info about a monitor
[...]
  + Script Options
o Parameters  -  specifies  a string which will be
  appended  to  the script's parameters. Parameter
  expansions are honored in this field.

So I created a Test script as follows:
   Name: LMSensors
   Command:  local-netmrg-lmsensors.pl
   Data Type:Standard Out
   For use with this device: Linux Box

Then I created a monitor as follows:
   Monitoring Type:  Script
   Script Test:  LMSensors
   Parameters:   temp1
   Data Type:Gauge
   Minimum Value:U
   Maximum Value:U
   Subdevice:Amboise - Hardware Monitors

But netmrg-gatherer is running the following command:

[L: 0064, C: 0512] [Dev: 0002] [Sub: 0017] [Mon: 0064] Sending
'/usr/lib/netmrg/local-netmrg-lmsensors.pl' to shell.

Instead of the expected '/usr/lib/netmrg/local-netmrg-lmsensors.pl
temp1'.

-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17.8fg1
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages netmrg depends on:
ii  adduser3.102 Add and remove users and groups
ii  apache2-mpm-prefork [httpd 2.2.3-3.2 Traditional model for Apache HTTPD
ii  debconf [debconf-2.0]  1.5.11Debian configuration management sy
ii  libc6  2.3.6.ds1-11  GNU C Library: Shared libraries
ii  libgcc11:4.1.1-21GCC support library
ii  libmysqlclient15off5.0.32-3  mysql database client library
ii  libsnmp9   5.2.3-7   NET SNMP (Simple Network Managemen
ii  libssl0.9.80.9.8c-4  SSL shared libraries
ii  libstdc++6 4.1.1-21  The GNU Standard C++ Library v3
ii  libxml22.6.27.dfsg-1 GNOME XML library
ii  mysql-client-5.0 [mysql-cl 5.0.32-3  mysql database client binaries
ii  php4   6:4.4.4-8 server-side, HTML-embedded scripti
ii  php4-cli   6:4.4.4-8 command-line interpreter for the p
ii  php4-mysql 6:4.4.4-8 MySQL module for php4
ii  rrdtool1.2.15-0.3Time-series data storage and displ
ii  wwwconfig-common   0.0.48Debian web auto configuration
ii  zlib1g 1:1.2.3-13compression library - runtime

netmrg recommends no packages.

-- debconf information excluded


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]