[collectd] How to store MySQL statistics?

Jan Huijsmans bofh at koffie.nu
Tue Dec 20 18:31:42 CET 2005


On Tue, Dec 20, 2005 at 05:35:24PM +0100, Florian Forster wrote:
> On Tue, Dec 20, 2005 at 05:14:49PM +0100, Niki Waibel wrote:
> That's by the way the conversion I've used in the `df' plugin to
> convert mountpoints into `instance' names:
>   if mountpoint == `/'
>   then
>     instance = `root'
>   else
>     instance = mountpoint
>     remove leading slash
>     replace all slashes with underscores
>   end if

I would prefer to use 1 method for all / replacements, as it helps
with processing the rrd files lateron. (in graph generation)

> Are there people who use underscores in mountpoints? Is there a better
> character than underscore? UNIX leaves one with pretty liberal
> restrictions on filenames ;) We could play BHFH (`H' like hacker ;) and
> use `*' as a seperator. That's hardly ever used in a path ;)

Personally, I prefer not to use them, but on the previous job they used them
very often, as a space is an invalid character.

There I started to use the double underscore as replacement for the slash,
after a short period of using root for / and var, home etc. etc. for the rest
of the filesystems. A uniform replacement of the / had proven to be more 
practical then the old naming convention. To be honest, I didn't switch to
the double underscore due to finding some in directory names, but because
I was using mrtg that time and it crashed on a filename with only 1 _ (yep

I currently have a shell/perl script for the df monitor. When it helps a bit,
I could send it. (or even post it here, as it's not that big)


Jan Huijsmans              bofh at koffie.nu

... cannot activate /dev/brain, no response from main coffee server

More information about the Collectd mailing list