On 12/31/10 8:01 AM, "Erlend Leganger" <erlend.legan...@gmail.com> wrote: > On 30 December 2010 23:41, Nick Anderson <n...@cmdln.org> wrote: >> That design pattern could be used to make an http call back to some >> centralized location and record information in a database or even just >> use http put to drop it into a file, similiar to how you are using the >> nfs server, that would free you from the need to have that one nfs >> server mounted everywhere. > > Heh, you learn something new every day... I configured my Apache > server and made a PUT handler as described in [1], then I can use curl > on the client to upload files: > > curl --request PUT --upload-file heartbeat.txt > -Hheartbeatfile:$(hostname)-heartbeat.txt > http://localhost/cgi-bin/put-heartbeat.pl > > The -Hheartbeatfile stuff is something I invented to pass a file name > to the CGI-script. > > Now suddenly this became a solution that can be deployed across WAN > links and is as scalable as the target web server - nice! > > Thanks, > Erlend > > [1]: http://www.apacheweek.com/features/put
This is great stuff! If you go a couple steps further, store the contents in a database and add additional 'host manifest' type details like packages and CPU/RAM/etc which dmidecode can harvest, you've created a self-updating inventory system. We use something similarly grown in-house, and have cfengine run our agent nightly, reporting back over HTTP to the centralized inventory system. Past places solved the problem in other ways, but I've never liked any as well as this HTTP-based solution. With all 'normal' hosts reporting in, the Django-based UI we've built allows junior admins to check on a 'stale host' page and follow a wiki to debug common problems relating to cfengine and host deployment. This took us from a 'I wonder if cfengine is running?' position to a place where we know all 'bad' hosts at a glance. Django also allows customization, so enabling things like tagging to mark certain hosts as 'known-stale' is easy. -- "America is a melting pot. You know, where those on the bottom get burned, and the scum rises to the top." -- Utah Phillips _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine