Archive for March, 2010

Nagios: check_ldap on Solaris

March 29th, 2010 1 comment

A personal note about how to get check_ldap (Nagios’s plugins) on Solaris, you simply need to edit the configure file itself to remove -llber from the line LIBS=”-lldap -llber $LIBS”. You also need to execute the following commands:

perl -i -pe ‘s/-lldap -llber/-lldap/g’ **/*Makefile


Categories: Monitoring Tags:

varnish: Send a client always on the same backend

March 9th, 2010 No comments

I’m now very close to migrate from akamai to varnish at work. However, since we doesn’t have session replications on the application server, I was required to send a client always on the same backend, even if the user is not authentified. In a first try, we thought about use a cookie, valued by the name of the server, and write some VCL to define the backend based on the cookie value.

However, thanks to the varnish developper (through the channel) phk pointed me they’re working on a director method to implements this behavior. While this feature is not yet available on a release, it’s present in the trunk (I’m using r4602).

Here the source code:

if (vs->criteria == c_client) {
* Hash the client IP# ascii representation, rather than
* rely on the raw IP# being a good hash distributor, since
* experience shows this not to be the case.
* We do not hash the port number, to make everybody behind
* a given NAT gateway fetch from the same backend.
SHA256_Update(&ctx, sp->addr, strlen(sp->addr));
SHA256_Final(sign, &ctx);
hp = sign;

Here how to define your director:

director rtl client {
{ .backend = www1rtl; .weight = 1; }
{ .backend = www2rtl; .weight = 1; }

Categories: Sysadmin Tags: