James Valente | 1 Nov 08:58 2007
Picon

tcpconns plugin spews error about missing /proc/net/tcp6


The tcpconns module tries to read the following two files.

   conn_read_file ("/proc/net/tcp");
   conn_read_file ("/proc/net/tcp6");

My Fedora system does not have the tcp6 file available, and so, the 
following error is reported every 10 seconds to syslog.

   collectd[PID]: tcpconns plugin: fopen (/proc/net/tcp6) failed:
   No such file or directory

Perhaps a missing tcp6 file should be a warning, rather than an error?

   ERROR ("tcpconns plugin: fopen (%s) failed: %s",

--

-- 
----------------------------------------------------------------
antispam signature key:  a0b7b92f29276f726b2741205caf799c
----------------------------------------------------------------

James Valente | 1 Nov 09:51 2007
Picon

collection.cgi reports error when processing TIME_WAIT data


When invoking the collection.cgi script, I receive the following error 
output for each directory of "tcpconns-[portnum]-local" data.

    [Wed Oct 31 21:51:04 2007] collection.cgi: RRDs::graph:
    invalid rpn expression in: TIME_WAIT_avg,UN,0,TIME_WAIT_avg,IF
    at /usr/local/lighttpd/htdocs/cgi-bin/collection.cgi line 2446

The line number refers to the "if" line of code in the 
"meta_graph_generic_stack" sub of the collection.cgi script.  (I point 
this out, because my version of collection.cgi is slightly different 
after I added a couple of "use lib [directory]" lines.

   RRDs::graph ( <at> cmd);
   if (my $errmsg = RRDs::error ())           # line 2446
   {
     confess ("RRDs::graph: $errmsg");
   }

There appears to be something wrong within the tcpconns TIMW_WAIT RRD 
files themselves.  After shutting down the collectd daemon, I then 
deleted all TIME_WAIT files.

    rm tcpconns-*/*TIME_WAIT*

I then re-invoked the collection.cgi script successfully, with a graph 
resulting -- albeit without any TIME_WAIT data.

I have uploaded an "rrdtool dump" version of my TIME_WAIT RRD data file 
to the following web site.  There, you will find a complete, gzip 
(Continue reading)

Florian Forster | 1 Nov 10:10 2007

Re: tcpconns plugin spews error about missing /proc/net/tcp6

Hi James,

On Thu, Nov 01, 2007 at 12:58:31AM -0700, James Valente wrote:
> collectd[PID]: tcpconns plugin: fopen (/proc/net/tcp6) failed: No such
> file or directory

oh, that sucks.. I've fixed the plugin to only complain if both,
/proc/net/tcp _and_ /proc/net/tcp6 are missing.

Thanks for the bugreport :)
-octo
--

-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
Sebastian Harl | 1 Nov 14:12 2007

Re: collectd: how to solve the -fPIC problem on amd64

Hi Milan,

On Wed, Oct 31, 2007 at 08:31:10PM +0100, Milan Krcmar wrote:
> recently, I've moved our main network router from Fedora i386 to a new
> amd64 machine and Etch. By a very nice accident I found the collectd
> package, sometheing I would else have to write by my own. It solves my
> need for rrd statistics of kernel's network queuing disciplines.

Very nice :-)

> I've been searching through Fedora's packages at first to know how
> "they" solve this. Whenever somebody fills in a bug that she is not able
> to build a dependent shared library on amd64, the Fedora team updates
> the dependency package simply recompiling the static library with -fPIC.
> Something you've failed with in Debian's bug tracking system (as it
> breaks Debian's "policies").

There are bugs against iptables-dev (and nut-dev, which suffers from the same
problem) - I did not have the time to write a clean patch for those packages
yet and the maintainers did not respond so far, so, unfortunately, there is
currently no way to build those plugins on amd64 Debian (unless you recompile
those packages yourself).

I did not file a bug against iproute-dev yet, but I've talked to the
maintainer and he promised to incorporate a patch as soon as I provide one.
I'm going to write that patch some time during the weekend.

> (1)
> 
> I tried to patch the iproute-dev package (which contains libnetlink.a)
(Continue reading)

Iain Lea | 1 Nov 14:10 2007
Picon

Feedback: 4.2.0 - rpm, config, collection.cgi, usuability

We have been using a patched 3.10 collectd for a while and it works well.

There is now a requirement to graph some application data on our systems
so the perl and/or exec plugins look like they are whats needed so I
took a look at the 4.2.0 release. My feedback:

- fixed collectd.spec file to work with new plugins and collection.conf

  http://iainlea.dyndns.org/software/collectd/4.2.0/collectd.spec

- generated 4.2.0 rpms available here:

  http://iainlea.dyndns.org/software/collectd/4.2.0/collectd-4.2.0-1.fc6.src.rpm 
  http://iainlea.dyndns.org/software/collectd/4.2.0/collectd-4.2.0-1.fc6.i386.rpm 
  http://iainlea.dyndns.org/software/collectd/4.2.0/collectd-apache-4.2.0-1.fc6.i386.rpm 
  http://iainlea.dyndns.org/software/collectd/4.2.0/collectd-email-4.2.0-1.fc6.i386.rpm 
  http://iainlea.dyndns.org/software/collectd/4.2.0/collectd-mysql-4.2.0-1.fc6.i386.rpm 
  http://iainlea.dyndns.org/software/collectd/4.2.0/collectd-sensors-4.2.0-1.fc6.i386.rpm 

- edited collectd.conf file to have a reasonable set of default plugins.
It also has a problem in that the directory paths are non-standard i.e,
  #BaseDir     "/usr/var/lib/collectd"
  #PIDFile     "/usr/var/run/collectd.pid"
Should be:
  #BaseDir     "/var/lib/collectd"
  #PIDFile     "/var/run/collectd.pid"

  http://iainlea.dyndns.org/software/collectd/4.2.0/collectd.conf

- edited collection.conf file to have a reasonable default paths i.e,
(Continue reading)

Florian Forster | 1 Nov 23:08 2007

Re: Feedback: 4.2.0 - rpm, config, collection.cgi, usuability

Hi Iain,

thank you very much for your feedback :) One can hardly ever have enough
of that ;)

On Thu, Nov 01, 2007 at 02:10:14PM +0100, Iain Lea wrote:
> - fixed collectd.spec file to work with new plugins and collection.conf
>   http://iainlea.dyndns.org/software/collectd/4.2.0/collectd.spec

Cool, thanks ;) I have two short questions, though:
1) Why do you depend on `perl-Regexp-Common'? Is that needed to build
   the `perl' plugin?
2) Is including
   `/usr/lib/perl5/5.8.8/i386-linux-thread-multi/perllocal.pod' in the
   package usual? Name and location kind of indicate it's a list of
   installed Perl modules or something..?

> - generated 4.2.0 rpms available here:

Thanks again :) Do you mind if I pull them and put them on the download
page?

> - edited collectd.conf file to have a reasonable set of default
>   plugins. It also has a problem in that the directory paths are
>   non-standard

The plugins are activated/deactivated (i. e. commented in/out) depending
on whether they were built or not. The paths are set according to the
`prefix' argument given to the configure script. Putting the actual
`localstatedir' there is not that easy because it often has the form
(Continue reading)

James Valente | 2 Nov 01:13 2007
Picon

Re: collection.cgi reports error when processing TIME_WAIT data


After further investigation, I have identified the source of the 
problem.  Apparently, rrdtool reports an error when a DEF name starting 
with the capital letters "TIME" is used in a CDEF.  This is because 
"TIME" is a special function when used in a CDEF (see the Time section 
of the rrdgraph_rpm man page).  (I am using rrdtool 1.2.12).

As a result, the use of TIME_WAIT_avg by collectd in the CDEF causes the 
following error.

    invalid rpn expression in: TIME_WAIT_avg,UN,0,TIME_WAIT_avg,IF

Solution is to rename the variable to something other than TIME_WAIT.

James Valente wrote:
> 
> When invoking the collection.cgi script, I receive the following error 
> output for each directory of "tcpconns-[portnum]-local" data.
> 
>    [Wed Oct 31 21:51:04 2007] collection.cgi: RRDs::graph:
>    invalid rpn expression in: TIME_WAIT_avg,UN,0,TIME_WAIT_avg,IF
>    at /usr/local/lighttpd/htdocs/cgi-bin/collection.cgi line 2446
> 
> The line number refers to the "if" line of code in the 
> "meta_graph_generic_stack" sub of the collection.cgi script.  (I point 
> this out, because my version of collection.cgi is slightly different 
> after I added a couple of "use lib [directory]" lines.
> 
>   RRDs::graph ( <at> cmd);
>   if (my $errmsg = RRDs::error ())           # line 2446
(Continue reading)

James Valente | 2 Nov 07:30 2007
Picon

unable to get exec plugin to work


Collectd:    4.2.0
Fedora Core: 1

I am unable to get my 'exec' plugin script to work.  Below is the 
section of my collectd.conf pertaining to the exec plugin, as well as 
the script I am trying to run (a clone of 'load').

I see the output to the /tmp/loadavg.out file, when I execute it 
manually, and so I am assuming that collectd is receiving the STDOUT 
data as well.  However, when I check the rrd directory, I do not see and 
directories or rrd files pertaining to the data captured.

The script is owned by "jamesv" user, and it is executable by "jamesv" user.

-----------------------------------------------------------------
/usr/local/collectd/etc/collectd.conf
-----------------------------------------------------------------

LoadPlugin exec

<Plugin exec>
         Exec "jamesv" "/usr/local/collectd/bin/loadavg.sh"
</Plugin>

-----------------------------------------------------------------
/usr/local/collectd/bin/loadavg.sh
-----------------------------------------------------------------
#!/bin/bash

(Continue reading)

Florian Forster | 2 Nov 10:20 2007

Re: unable to get exec plugin to work

Hi James,

On Thu, Nov 01, 2007 at 11:30:59PM -0700, James Valente wrote:
>     echo "${HOST}/${PLUGIN}/ld-one N:$MIN_01"
>     echo "${HOST}/${PLUGIN}/ld-ten N:$MIN_05"
>     echo "${HOST}/${PLUGIN}/ld-fifteen N:$MIN_15"

did you define a type `ld' in the `types.db'? It's usually installed in
${pkglibdir} and lists the types known to the daemon. Without a correct
definition there collectd doesn't know how to create the RRD files.

I'd suggest to use the already defined `load' type though:
  echo "${HOST}/${PLUGIN}/load N:${MIN_01}:${MIN_05}:${MIN_15}

Regards,
-octo
--

-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
Florian Forster | 2 Nov 10:22 2007

Re: collection.cgi reports error when processing TIME_WAIT data

Hi James,

On Thu, Nov 01, 2007 at 05:13:18PM -0700, James Valente wrote:
> Apparently, rrdtool reports an error when a DEF name starting with the
> capital letters "TIME" is used in a CDEF.

> (I am using rrdtool 1.2.12).

okay, this makes sense to some degree. Weird that it works with my
machines, though. I have librrd 1.2.15-0.3 (from Debian Etch) or later
(whatever it is that's currently in Debian Lenny or Sid).

Regards,
-octo
--

-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/

Gmane