Łukasz Mierzwa | 4 Mar 14:58 2008

quick and dirty patch

Hi,

I'm using collectd but I don't like cpu graphs spread over few files, I got to 
monitor machines with different count of cpus and creating templates that 
shows all cpu usage for every kind of machine is more work than it needs to 
be, so I made this quick patch so collectd will create only one cpu graph.
Also would it be possible to implement DERIVE to data types? Now it's only 
counter and gauge.

Anyone found something better than drraw to create graphs/templates/dashboards 
from rrd files?

Łukasz Mierzwa
Attachment (collectd_one_cpu.patch): text/x-diff, 2357 bytes
Sebastian Harl | 4 Mar 15:09 2008

Re: quick and dirty patch

Hi,

On Tue, Mar 04, 2008 at 02:58:14PM +0100, ??ukasz Mierzwa wrote:
> I'm using collectd but I don't like cpu graphs spread over few files,
> I got to monitor machines with different count of cpus and creating
> templates that shows all cpu usage for every kind of machine is more
> work than it needs to be, so I made this quick patch so collectd will
> create only one cpu graph.

No. collectd does not generate any graphs. It generates rrd files which
in turn might be used to generate graphs from. Whatever frontend you're
using to generate the graphs should take care of displaying different
values in one image. If it does not currently support this feature,
please bug its developers to add support for it.

Cheers,
Sebastian

--

-- 
Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/

Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety.         -- Benjamin Franklin

Florian Forster | 4 Mar 15:16 2008

collectd 4.2.5 available

Hi everybody,

I've just packed and uploaded version 4.2.5. The changes are as follows
(copied from the ChangeLog):

2008-03-04, Version 4.2.5
 * apache plugin: Improved initialization and error messages.
 * exec plugin: Set supplementary group IDs.
 * network plugin:
   + Create separate threads for reading from the socket and parsing and
     dispatching incoming packets. Versions prior to this may have
     problems in high-load situations, where the socket receive buffers
     overflows, resulting in gaps in the data.
   + Use `memcpy' when constructing/parsing a package to avoid alignment
     problems on weird architectures, such as Sparc.
   + Translate doubles to/from the x86 byte representation to ensure
     cross-platform compatibility.
 * ping plugin: Correct the handling of the `TTL' setting.
 * rrdtool plugin: Ensure correct handling of the `RRATimespan' option.
 * swap plugin: Reapply a patch for Solaris.
 * tcpconns plugin: Portability improvements.

A new patch release for 4.3 will follow soon.

Regards,
-octo
--

-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
(Continue reading)

Florian Forster | 4 Mar 15:54 2008

Re: quick and dirty patch

Hi Łukasz,

On Tue, Mar 04, 2008 at 02:58:14PM +0100, Łukasz Mierzwa wrote:
> [...] I made this quick patch so collectd will create only one cpu
> graph.

I understand that putting all these files into one graph for all CPUs is
a lot of work and I don't have code that does that either. But I can't
accept the patch as it is, because it'd break backwards compatibility.

If you add a option, such as
  MergedCPUs <no>|<only>|<both>
where
  `no'   means: don't combine CPUs (default)
  `only' means: collect only the combined data
  `both' means: collect the combined data in addition to the per-CPU
                data
this would not break backwards compatibility and I could add it to the
daemon.

> Also would it be possible to implement DERIVE to data types? Now it's
> only counter and gauge.

Sure, shouldn't be too hard to implement. You'd have to touch numerous
places, though. To find them, I'd use something like:
  $ grep -l 'DS_TYPE_COUNTER\|DS_TYPE_GAUGE' src/*.c

Regards,
-octo
--

-- 
(Continue reading)

Sebastian Harl | 4 Mar 16:11 2008

Re: quick and dirty patch

Hi again,

On Tue, Mar 04, 2008 at 03:09:10PM +0100, Sebastian Harl wrote:
> On Tue, Mar 04, 2008 at 02:58:14PM +0100, ??ukasz Mierzwa wrote:
> > I'm using collectd but I don't like cpu graphs spread over few files,
> > I got to monitor machines with different count of cpus and creating
> > templates that shows all cpu usage for every kind of machine is more
> > work than it needs to be, so I made this quick patch so collectd will
> > create only one cpu graph.
> 
> No. collectd does not generate any graphs. It generates rrd files which
> in turn might be used to generate graphs from. Whatever frontend you're
> using to generate the graphs should take care of displaying different
> values in one image. If it does not currently support this feature,
> please bug its developers to add support for it.

Sorry, I guess I misunderstood your patch. I was just skimming through
it and had to think about some discussion which already took place a
couple of times. See Florian's response for something that makes
sense... ;-)

Cheers,
Sebastian

--

-- 
Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/

Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety.         -- Benjamin Franklin

(Continue reading)

Luke Heberling | 4 Mar 18:49 2008

Re: quick and dirty patch

Lukasz Mierzwa wrote:
> Hi,
>
> I'm using collectd but I don't like cpu graphs spread over few files, 
> I got to
> monitor machines with different count of cpus and creating templates that
> shows all cpu usage for every kind of machine is more work than it 
> needs to
> be, so I made this quick patch so collectd will create only one cpu graph.
> Also would it be possible to implement DERIVE to data types? Now it's 
> only
> counter and gauge.
>
> Anyone found something better than drraw to create 
> graphs/templates/dashboards
> from rrd files?
Not me.  Drraw is far and away my favorite.
BTW, it definitely supports creating a graph from multiple files. Just 
add as
many as you need to the same graph or template.  I've attached two templates
that I use, one for single-core and one for dual-core.

Code=Hide
Start=
End=
Template=1193242968.17577
RCS=Describe%20your%20change%28s%29%20here%20before%20saving..
USERSAID=Save%20Template
(Continue reading)

Dieter Bloms | 5 Mar 11:51 2008
Picon

configure threshold for load plugin

Hi,

I tried to configure a threshold for the load plugin to execute a little
perlscript, which set an event for me.

My config looks like this:

--snip--
myserver:~ # cat /etc/collectd.conf
Mode        "local"
Hostname    "myserver"
BaseDir     "/var/lib/collectd"
PIDFile     "/tmp/collectd.pid"
PluginDir   "/usr/lib/collectd"
TypesDB     "/usr/lib/collectd/types.db"
LoadPlugin exec
LoadPlugin load
LoadPlugin logfile
<Threshold>
  <Plugin "load">
    <Type "load">
      Instance "1m"
      WarningMax    0.50
      FailureMax    1.00
    </Type>
  </Plugin>
</Threshold>

<Plugin exec>
  NotificationExec nobody "/usr/local/bin/collectd_notification.pl"
(Continue reading)

Florian Forster | 5 Mar 12:00 2008

Re: configure threshold for load plugin

Hi Dieter,

On Wed, Mar 05, 2008 at 11:51:39AM +0100, Dieter Bloms wrote:
> My config looks like this:
> 
> --snip--
>     <Type "load">
>       Instance "1m"

the problem here is that there is no instance named `1m'. If you remove
the `Instance'-line your config should start working.

What you're trying to do is to have the values apply only to one
_data source_ which is not (yet?) supported. Also, the data sources of
the load/load data set are called `shortterm', `midterm', and
`longterm'.

Regards,
-octo
--

-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
Dieter Bloms | 5 Mar 13:18 2008
Picon

Re: configure threshold for load plugin

Hallo Florian,

On Wed, Mar 05, Florian Forster wrote:

> the problem here is that there is no instance named `1m'. If you remove
> the `Instance'-line your config should start working.

ok. now my program is executed.

I've configured:

<Threshold>
  <Plugin "load">
    <Type "load">
      WarningMax    0.50
      FailureMax    1.00
    </Type>
  </Plugin>
</Threshold>

and now I get messages like:

Host myserver, plugin load type load: Data source "longterm" is currently
0.290000. That is below the failure threshold of 1.000000.

I though with FailureMax 1.00 I get an event, if the load is higher than
1.00 and not lower.
Should I use FailureMin for this ?

Btw.: I use collectd-4.3.1
(Continue reading)

Florian Forster | 5 Mar 14:17 2008

Re: configure threshold for load plugin

Hi again,

On Wed, Mar 05, 2008 at 01:18:38PM +0100, Dieter Bloms wrote:
> and now I get messages like:
> 
> Host myserver, plugin load type load: Data source "longterm" is
> currently 0.290000. That is below the failure threshold of 1.000000.
> 
> I though with FailureMax 1.00 I get an event, if the load is higher
> than 1.00 and not lower.
> Should I use FailureMin for this ?

no, the way you did this was exactly right. However, there is an error
when parsing the configuration. Could you give the attached patch a try
and tell me if that worked for you?

Also, while looking for the problem I've found another bug that prevents
inverted logic to work correctly. This issue is fixed by the patch, too.

Regards,
-octo
--

-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
Attachment (threshols-fix-4.3.1.diff): text/x-diff, 1274 bytes

Gmane