[collectd] df plugin - excluding LVM snapshots

Trent W. Buck twb-mailman-collectd at cyber.com.au
Mon Sep 12 07:07:25 CEST 2011


In collectd 4.8, I want the df plugin to graph all ext4 filesystems,
but omit any that are LVM snapshots.  Alternatively, I want to omit
any that are mounted under /mnt.

Is there a way to do this without specifying a whitelist explicitly?

AFAICT I can say "give me all ext4 filesystems" or "give me all
filesytems that aren't (IgnoreSelected=true) /mnt/foo", but not "give
me all ext4 filesystems that aren't /mnt/foo".

FWIW, the reason I'm asking for ext4 specifically, is to avoid
graphing pseudofilesystems:

    rootfs / rootfs rw 0 0
    none /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
    none /proc proc rw,nosuid,nodev,noexec,relatime 0 0
    none /dev devtmpfs rw,relatime,size=8209308k,nr_inodes=2052327,mode=755 0 0
    none /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
    none /sys/fs/fuse/connections fusectl rw,relatime 0 0
    none /sys/kernel/debug debugfs rw,relatime 0 0
    none /sys/kernel/security securityfs rw,relatime 0 0
    none /dev/shm tmpfs rw,nosuid,nodev,relatime 0 0
    none /var/run tmpfs rw,nosuid,relatime,mode=755 0 0
    none /var/lock tmpfs rw,nosuid,nodev,noexec,relatime 0 0
    none /lib/init/rw tmpfs rw,nosuid,relatime,mode=755 0 0
    cgroup /var/cgroup cgroup rw,relatime,net_cls,freezer,devices,memory,cpuacct,cpu,ns,cpuset 0 0
    /dev/md0 /boot ext2 ro,sync,nosuid,nodev,noexec,noatime,errors=continue 0 0
    rpc_pipefs /var/lib/nfs/rpc_pipefs rpc_pipefs rw,relatime 0 0
    nfsd /proc/fs/nfsd nfsd rw,relatime 0 0
    tmpfs /tmp tmpfs rw,relatime 0 0

I suppose what I should do is blacklist pseudofilesystems:

    IgnoreSelected true
    MountPoint /mnt/foo
    FSType rootfs
    FSType sysfs
    FSType proc
    FSType devtmpfs
    FSType devpts
    FSType fusectl
    FSType debugfs
    FSType securityfs
    FSType tmpfs
    FSType cgroup
    FSType rpc_pipefs
    FSType nfsd



More information about the collectd mailing list