Re: [collectd] collectd exec and perl

2010-10-28 Thread Florian Forster
Hi,

On Thu, Oct 28, 2010 at 12:07:03PM +0200, Mariusz Gronczewski wrote:
> if u use "interval" you have to use actual time instead of "N:" (at
> least it didn't want to work otherwise for me)

no, you should be able to mix "interval=" and "N:" as you wish.

> If it still dont work, turn off input buffering
> $| = 1;

If you use "N:", you *have* to disable output buffering. Please see [0]
for details.

Regards,
—octo

[0] 
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x0C705A15
http://octo.it/


signature.asc
Description: Digital signature
___
collectd mailing list
collectd@verplant.org
http://mailman.verplant.org/listinfo/collectd


Re: [collectd] collectd exec and perl

2010-10-28 Thread Mariusz Gronczewski
Hi,

if u use "interval" you have to use actual time instead of "N:" (at
least it didn't want to work otherwise for me)

If it still dont work, turn off input buffering
$| = 1;

Regards
Mariusz

2010/10/28 Suraj :
> Hi,
> I'm facing the following issue with executing an exec plugin that is a perl
> script. The script is quite bare bones and just prints out a PUTVAL. An
> identical shell script ends up creating the RRD but the same with a perl
> script does not work:
> To illustrate the problem, here is some setup information:
> types.db:
> 
> svc                     failures:COUNTER:0:9223372036854775807
>
> The following setup does not work when using a perl exec plugin:
>   collectd.conf:
>   ---
>   LoadPlugin exec
>   
>           Exec "foo" "/usr/local/bin/collectd_test.pl"
>   
>   collectd_test.pl:
>   --
>   #! /usr/bin/perl
>   while (1) {
>         print 'PUTVAL sometest/exec-magicpl/svc-service interval=60 N:40' .
> "\n";
>         sleep 60
>   }
> Whereas, the following works when using a shell script:
>   collectd.conf:
>   ---
>   LoadPlugin exec
>   
>           Exec "foo" "/usr/local/bin/collectd_test.sh"
>   
>   collectd_test.sh
>   ---
>   #! /bin/bash
>   while [ true ]; do
>           echo 'PUTVAL sometest/exec-magicshell/svc-service interval=60
> N:40'
>           sleep 60
>   done
> In the shell based setup, when collectd -C /etc/collectd/collectd.conf -f is
> run directly, I can see the "0 Success" message (I presume from the rrdtool
> plugin or perhaps the plain-text-protocol-interpreter?). Whereas, with the
> perl based plugin, the rrd does not get created.
> The log does not have anything though the loglevel is in debug mode.
> What am I doing wrong here and how can I get perl based plugins to work?
> thanks,
>   -Suraj
>
> ___
> collectd mailing list
> collectd@verplant.org
> http://mailman.verplant.org/listinfo/collectd
>
>

___
collectd mailing list
collectd@verplant.org
http://mailman.verplant.org/listinfo/collectd


[collectd] collectd exec and perl

2010-10-27 Thread Suraj
Hi,

I'm facing the following issue with executing an exec plugin that is a perl
script. The script is quite bare bones and just prints out a PUTVAL. An
identical shell script ends up creating the RRD but the same with a perl
script does not work:

To illustrate the problem, here is some setup information:

types.db:

svc failures:COUNTER:0:9223372036854775807


The following setup does not work when using a perl exec plugin:

  collectd.conf:
  ---
  LoadPlugin exec
  
  Exec "foo" "/usr/local/bin/collectd_test.pl"
  

  collectd_test.pl:
  --

  #! /usr/bin/perl

  while (1) {
print 'PUTVAL sometest/exec-magicpl/svc-service interval=60 N:40' .
"\n";
sleep 60
  }

Whereas, the following works when using a shell script:

  collectd.conf:
  ---
  LoadPlugin exec
  
  Exec "foo" "/usr/local/bin/collectd_test.sh"
  

  collectd_test.sh
  ---
  #! /bin/bash
  while [ true ]; do
  echo 'PUTVAL sometest/exec-magicshell/svc-service interval=60
N:40'
  sleep 60
  done

In the shell based setup, when collectd -C /etc/collectd/collectd.conf -f is
run directly, I can see the "0 Success" message (I presume from the rrdtool
plugin or perhaps the plain-text-protocol-interpreter?). Whereas, with the
perl based plugin, the rrd does not get created.

The log does not have anything though the loglevel is in debug mode.

What am I doing wrong here and how can I get perl based plugins to work?

thanks,

  -Suraj
___
collectd mailing list
collectd@verplant.org
http://mailman.verplant.org/listinfo/collectd