Hi,

On Fri, Mar 12, 2010 at 12:10:12PM -0800, James Armstrong wrote:
> Sebastian Harl wrote:
> > On Wed, Mar 10, 2010 at 10:47:39AM -0800, James Armstrong wrote:
> >> Sebastian Harl wrote:
> I've gotten the database communicating on the unix socket, but the rrd
> file is filled with no data ("nan.")
> 
> When I run the query manually on the socket, I get output, but it takes
> 72 seconds to run:

Well, I suppose, you're running collectd using a 10 seconds interval,
right? So, if your query takes 72 seconds to run, the RRD files will not
be updated for that amount of time (on the next interval, another query
will not be started in parallel, if the old one is still running). Now,
the problem is that RRDtool expects a new value every 20 seconds (by
default) and will consider a data-point to be undefined if a value
"times out". "COUNTER" needs (at least) two consecutive updates to
calculate a value, so you'll end up with no values in your RRD file at
all.

> This data is not being collected.  Is "counter" the right type for this?

"COUNTER" is right for continuously increasing values (like the total
number of network packets as reported by, e.g., Linux). RRDtool will
then store the rate at which the value changes (i.e., basically the
difference between two consecutive values, which is why it needs two
updates to calculate one value).

If you've got a time-varying value that goes up and down and / or you're
interested in the actual value, use GAUGE (e.g., when storing
temperatures).

Anyway, to really fix your issue, you'll have to use an interval greater
than 72 seconds for the "postgresql" plugin. Currently, this is not
possible without changing the global interval, though. As a work around
(for now), you could setup two instances of collectd -- one handling
"postgresql" and the other one handling all other plugins.

HTH,
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

Attachment: signature.asc
Description: Digital signature

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

Reply via email to