The new filetracker module (testers and ideas welcome!)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



More good news from Func-land,

Vito Laurenza had suggested a func module on IRC (#func on irc.freenode.net) to easily track file changes, and ... just to show you how easy Func is, wrote a really good one. I've tweaked it just a bit and checked it in. It works like this:

First, you use func itself to specify what files you want to track on your systems. Since func supports wildcarding, it's really simple to add a tracked file to all of your systems at once. You don't have to push *ANY* configuration files around. How cool is that?

# func "*" call filetracker track /etc/passwd 1 # let's see when new users get added, and which ones they are # func "dbservers*" call filetracker track /etc/foo # we're just interested in checksums on this file, not the actual data -- and only for certain boxes # func "webservers*" call filetracker track /tmp/bar # I'm interested to see if this directory changes too -- and only for some different boxes # func "*" call filetrack untrack /etc/bar # here's a file we don't want to track anymore.

(For those that want to know, which files are tracked are stored in /etc/func/modules/filetracker.conf -- and you can edit it yourself if you really want)

Now, that's pretty neat, but what can I do with it? Well, it's originally written for func-inventory. So, to see what has changed in func, along with every thing else func-inventory tracks, including packages, hardware, and services, just run one simple command. Can you guess what this command and all the complex arguments are? Easy. To inventory all of your func minions automatically, you don't even need any -- just run it, and maybe put it on cron.

# func-inventory

Now all the changes to any of the systems are tracked in git ... (the tree is in /var/lib/func/inventory) ... where you can browse all of the changes using gitk, gitweb, or just browse things with "ls", "tree", or "cat". Whatever you like. (And if you don't like git, as I mentioned before, just pass in --no-git and you can use it with some other version
control or just have the files there)

If anyone has any improvements to add to the file module, func-inventory, or wants to contribute their own module to func (see how easy it is... seriously), post to this list, or say hi on IRC. We'd love to have you aboard.

Thanks again Vito!

--Michael



[Index of Archives]     [Fedora Users]     [Linux Networking]     [Fedora Legacy List]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux