[collectd] Wish for tcpconns ListeningPorts privileged

Sebastian Harl sh at tokkee.org
Wed Jun 22 09:58:46 CEST 2011


Hi again ;-)

On Wed, Jun 22, 2011 at 04:58:24PM +1000, Trent W. Buck wrote:
> I'm using tcpconns to look at e.g. the number of open SSH and HTTP
> connections.
> 
> It's really useful that it auto-detects which ports are in use, rather
> than me having to list them.  It means if a new service is added to a
> machine (especially a customer machine which I monitor, but don't
> directly control), collectd will automatically pick up on it.
> 
> Unfortunately, my users are in the habit of also running ssh -L and -X
> and NFS, and these basically get random ports, which leads to an
> explosion of annoying extra graphs.
> 
> It would be nice if I could set ListeningPorts to "privileged", which
> would make it work as "true" for ports 1024 and below, and like
> "false" for ports 1025 and above.

Ack! Something like that would be a useful feature. However, I would go
for adding an option "PortRange <min> <max>", as that would be more
flexible (and could possible be used several times to specify multiple
ranges).

Would you mind adding a note to the [roadmap] in the wiki?

[roadmap] <http://collectd.org/wiki/index.php/Roadmap>

> In the meantime I haven't thought of a workaround, but I was thinking
> I could possibly just have a hourly cron job that does something like
> 
>     rm -rf /var/lib/collectd/rrd/*/tcpconns-[^1]???*-local
> 
> Or maybe I'll just turn tcpconns off and use stuff like curl-json to
> test the availability of services from the client side...

You could use the filter-chain mechanism (see [filter-conf], [chains])
to filter out those values by using a regex similar to the one you
specified above to remove the files.

This also brought up the idea to add support for numeric comparison
operators to the [regex-match] ;-)

[filter-conf] <http://collectd.org/documentation/manpages/collectd.conf.5.shtml#filter_configuration>
[chains] <http://collectd.org/wiki/index.php/Chains>

[regex-match] <http://collectd.org/wiki/index.php/Match:RegEx>

HTH,
Sebastian

PS: Thanks a lot for your verbose feedback! Very much appreciated :-)

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20110622/2fc2830b/attachment.pgp>


More information about the collectd mailing list