Signs of Triviality

Opinions, mostly my own, on the importance of being and other things.
[homepage] [index] [] [@jschauma] [RSS]

clogger(1) - A Campfire Logger

November 15, 2013

Happy People
Dancing ChatOps is all the rage, I'm told. Never one to let a good, full bandwagon go by, I finally embraced my inner bot and wrote a trivial little tool called clogger(1).

clogger(1) implements a simple logging/messaging interface analogous to the common logger(1) command. However, instead of logging messages to syslog(3), clogger(1) will write the message to Campfire.

The idea is to allow processes on your hosts to have alerts or notifications delivered to Campfire without requiring them to implement the Campfire API, get Campfire access credentials, possibly get HTTP proxy credentials, figure out how to safely distribute all these credentials etc. etc.

Note that clogger(1) is specifically and intentionally not interactive and does not respond to (or even see) any messages in any campfire rooms. I'm not that ChatOpsy after all.

clogger(1) is setuid to the "campfire-logger" service account to allow it to read the configuration file. In order to ensure the messages delivered to the campfire room(s) are tracked back to the process and host that sent it, clogger(1) will prefix the messages delivered to the Campfire room(s) with the (real) username of the user invoking the command and short hostname of the host it was invoked on.

Example invocations:

$ clogger -r 1234 'Good news, everybody!'
$ clogger -r 1234 -r 5678 <logfile
$ hfrob | tail -10 | clogger -r 123
$ clogger -r 1234 $(uptime)

Please see the manual page for details.

You can get clogger(1) at

November 15, 2013

[Ask yourself two questions...] [Index] [NSA infiltrates Grindr]