Hi Scott, On Thu, Sep 02, 2010 at 05:58:40PM -0700, Scott M. Likens wrote: > Wanting to collect and alert based on the queue size in exim, so I > setup a plugin that calls this, > > echo "PUTVAL `hostname -f`/exim/queue_count N:`/usr/sbin/exim -bpc`" > > I added queue_count to types.db which maybe bad, but I copied 'counter'...
Not bad by itself (that's basically the way it's intended), but some short hints: * Instead of modifying an existing types.db, I'd add an additional custom types.db and use the "TypesDB" config option in collectd.conf to tell collectd to use both. That'll make updates easier. * You could as well have used "counter". Adding a new type which is an exact copy of an existing type does not make any difference to collectd -- that's for the user's convenience only ;-) > I have an existing Threshold setup working with cpu/etc, so I just > wanted to drop this into the Threshold block like, > > <Plugin Threshold> > <Plugin "exec"> > <Type "queue_count"> > WarningMin 0.00 > WarningMax 10.0 > FailureMin 0.00 > FailureMax 20.0 > DataSource "value" > </Type> > </Plugin> > </Threshold> > <Plugin exec> > Exec "nobody" "/etc/exim/collectd_mailq.sh" > </Plugin> > > What am I missing here? I would love to know as I have a graph that > has stats... it counts beautifully... but I don't have Thresholds > working :( collectd identifies a plugin by the identifier assigned to a dataset. In case of the exec plugin's PUTVAL command, this is the first option passed to "PUTVAL". So, in your case (identifier = <FQDN>/exim/ queue_count), the plugin is called "exim". The name of the plugin which actually dispatches the value (i.e. the name of the shared object) does not matter to collectd at all. While this might sound a bit confusing, this is (imho) the only reasonable way to handle this -- else, e.g., all values received and submitted by the network plugin would be assigned to the network plugin. See the collectd-exec(5) manpage for more details about the identifier. 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
signature.asc
Description: Digital signature
_______________________________________________ collectd mailing list [email protected] http://mailman.verplant.org/listinfo/collectd
