Syslog-ng messages to bash script

June 22nd, 2009

I am falling more and more in love with syslog-ng. After some trial and error I’ve finally configured to parse messages and send them to zabbix for statistics logging. Sounds cool uh? Well it is.

Of course the posibilities are endless when you think about it. For me it is just sake to get performance messages from our application into zabbix to get triggered about problems.

Read further to found out how I did it
Read more…

, , ,

Find evil hidden iframe’s

June 19th, 2009
find / -type f -name '*.htm' -exec egrep -H '<iframe src="(.*?)visibility: hidden' {} \;

And change .htm with every extension you suspect (php, html, js)

,

Apache + SVN + LDAP

June 6th, 2009

Just because I always forget:

<VirtualHost 192.168.1.34:7000>
    <Location />

        DAV svn
        SVNPath /data/svn

        SVNReposName    "Subversion"
        AuthName        "Authenticate for Subversion"

        AuthType Basic
        AuthBasicProvider ldap
        AuthzLDAPAuthoritative on
        AuthLDAPUrl ldap://192.168.1.33/dc=kerneldump,dc=org?uid
        Require ldap-group cn=svnusers,ou=Group,dc=kerneldump,dc=org
        AuthLDAPGroupAttribute memberUid
        AuthLDAPGroupAttributeIsDN off
        Order deny,allow
        Allow from all

    CustomLog /var/log/httpd/svn_access_log combined
    ErrorLog  /var/log/httpd/svn_error_log
  </Location>
</VirtualHost>

Put this in an configuration file like mysvn.conf and include it in your httpd.conf file. This creates an virtualhost on port 7000 with immediately in the root the subversion repository. Of course you need to configure your LDAP configuration. Or need to use basic authentication.

For security purposes not every LDAP user is allowed, you need to be member of the svnusers group.

, , ,

Syslog-ng and MySQL

June 4th, 2009

Just a quick note about Syslog-NG with an mysql backend.

# UDP Syslog Port Listener
source s_udp {
    udp(
        ip('192.168.0.1')
        port(514)
    );
};

# MySQL Destination
destination d_mysql {
    sql(
        type(mysql)
        host("server") username("syslog") password("syslog")
        database("syslog")
        table("logs")
        table("messages_${R_YEAR}${R_MONTH}${R_DAY}")
        columns("datetime", "host", "program", "pid", "message", "facility", "priority")
        values("$R_DATE", "$HOST", "$PROGRAM", "$PID", "$MSGONLY", "$FACILITY", "$LEVEL")
        indexes("datetime", "host", "program", "pid", "message", "facility", "priority")
    );
};

# Log the source to the destination, pretty straightforward
log {
    source(s_udp);
    destination(d_mysql);
};

As you can see it is a pretty easy configuration which turned out working great without any crappy connections like fifo’s. Besides that it creates a new table per day (it will create tables automatically), and thanks to the table per day tables stay fast enough for some more advanced features.

, ,

Time Machine Unsupported Volumes

May 27th, 2009

Open up a terminal session and enable NAS support for Time Machine: defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

See: http://www.naschenweng.info/2008/07/15/os-x-time-machine-backup-to-synology-ds1

,

system-config-cluster no fonts

May 13th, 2009

Just a quick note cause I’m able to constantly forget. When you see the following message when starting system-config-cluster:
No fonts found; this probably means that the fontconfig
library is not correctly configured. You may need to
edit the fonts.conf configuration file. More information
about fontconfig can be found in the fontconfig(3) manual
page and on http://fontconfig.org

Install the following package:
dejavu-lgc-fonts

, , ,

Toppie! ??? Toppie?

May 8th, 2009

Het komt weer terug. Radio, TV, en over een tijdje vast weer internet. Ik hoor het overal, en word er nu al moe van. Waar komt het vandaan. Wie heeft het bedacht. Ooit was er Jop (de Bus [sbs6]) die ermee kwam. Er kwam een commercieel succes voor hem. Een leuke eendagsvlieg en het was over.

Maar het is dus terug. Ik waarschuw; het is terug en heftiger dan ooit

, ,

Twitter

April 24th, 2009

Started twittering. Follow me @ http://twitter.com/kerneldump

,

Sometimes

April 15th, 2009

it feels like hanging on to the past because I don’t want to go forward…

Vaarwel Paul

March 30th, 2009

Wohin ich geh’? Ich geh’, ich wandre in die Berge.
Ich suche ruhe für mein einsam Herz.

“Oom” Paul

24-03-1931 – 25-03-2009

Een korte, kleine emotionele uitvaart. Een mooi moment, gekerft voor eeuwig, in mijn hart. Vaarwel Paul, fijn dat jij er was.

Ook al was het geen familie. Kende ik je amper, heb ik toch herinneringen. Laatste was een paar jaar geleden op jouw plekje, in Luxemburg. Een ruimte van rust een man die je niet kan vergeten. Een plek in mijn hart.