Friday, September 25, 2009

Chef - the new puppet?

I just encountered Chef, which is a 'systems integration framework' like puppet that allows you to manage configuration and much more across many machines. I've been using puppet for quite a while and love it, although as stated here, I find the puppet Domain Specific Language (DSL) very restrictive. There have been so many times I have wanted to do something reasonably simple for a fully-fledged programming language, that has either been impossible, impractical, or completely un-intuitive to accomplish with puppet. No, I don't have an example - next time it happens I'll blog.

In any case, Chef seeks to address this problem by giving you full-strength ruby, and is written by some long-term members of the puppet community. Apparently puppet has made the decision to stay away from a full programming language, hence Chef. Puppet has the momentum at the moment but this may be worth watching.

Friday, September 4, 2009

Updating a debian package

I followed this HOWTO to create a debian package update. With a debian watch file it is quite easy to grab a new upstream version. To run the 'debuild' step you will need all the build dependencies installed - these are listed in the debian/control file in the package directory.
sudo apt-get build-dep package
will install all the build dependencies for a given package.

Monday, August 24, 2009

Using the new sourceforge shell interface

Sourceforge has changed their shell access procedure again. This time it is a little complicated and unintuitive. You need to create a shell (time limited) with:

ssh -t username,projectname@shell.sourceforge.net create

Then you can copy files to your website using:

scp index.html username@web.sourceforge.net:/home/groups/p/pr/projectname/htdocs/

Sunday, August 23, 2009

HOWTO configure zabbix to send emails with postfix

Under Admin|Media Types configure the email option as:

SMTP server: localhost
SMTP helo: myinternetdomain.com
SMTP email: zabbix@myinternetdomain.com

Add a user with email media notifications. It didn't seem to be enough to have this setting, I also had to add an Action. The triggers were an "AND" of:

(A) Trigger severity >= "High"
(B) Trigger value = "PROBLEM"

with the recovery option ticked this got me a PROBLEM email and a RECOVERY email for all triggers above "high". Without the PROBLEM condition I didn't get the recovery message I specified: instead I got two PROBLEM emails with different trigger status (what the?). Others have run into the same issue.

Install postfix and set:

myhostname = myinternetdomain.com
inet_interfaces = 127.0.0.1

You now have a postfix listening on localhost - you can test it with the 'sendmail' terminal command.

Trac error: Unsupported version control system "darcs"

I got this error after an OS upgrade:
Unsupported version control system "darcs": Can't find an appropriate component, maybe the corresponding plugin was not enabled?

To solve it I grabbed the latest darcs trac plugin:
darcs get http://darcs.arstecnica.it/trac-darcs
and installed it:
sudo python setup.py install

I then had to upgrade and resync each repository:
trac-admin /var/lib/trac/myrepo/ upgrade
trac-admin /var/lib/trac/myrepo/ resync

Thursday, August 20, 2009

What's wrong with Zabbix

I have been using Zabbix for monitoring for a while now, and have been really happy so far. Today I ran into some things that are really annoying:

  • You can't change the X-axis on any graph. It is always time. The time period can be adjusted using the little calendar app in the bottom left corner of the browser. I don't really like this approach. I'd like to also be able to specify time periods per screen, because what makes sense for one graph may not work for all the others.
  • You can't have a graph of one item (e.g disk-usage) across all hosts. Suck! I want to have a graph of OS versions on the y-axis and hostnames on the x-axis. Not possible!
  • net.tcp.listen[port] isn't supported on linux(?) - you will need to use net.tcp.port[,port] instead.

HOWTO: Monitor puppet with zabbix and do agent command testing/troubleshooting

This turned out to be really easy, but not obvious with the GUI. The GUI shows the proc.num syntax as:
proc.num[ <,user> <,state>]
but the manual has the real story:
proc.num[ <,user> <,state> <,cmdline>]

So you can use the cmdline to monitor something like this:

ruby /usr/sbin/puppetd -w 0
with:
proc.num[ruby,,,"/usr/sbin/puppetd"]

To troubleshoot agent monitoring strings, use the commandline on the box (quicker than clicking around in the GUI) like this:
zabbix_agent -t proc.num[ruby,,,"/usr/sbin/puppetd"]