Forum Discussion
hooleylist
Mar 16, 2009Cirrostratus
You would need to log from the iRule to a valid syslog-ng facility (local0. - local7). What you'd normally do is configure a custom syslog-ng filter and destination so that if the log string from the iRule matches the filter, the log statement would be written to the destination.
Here is an example of logging any statement sent to local0.info containing a string "logging" to a remote syslog server. You could modify this to use a custom local file using the destination you've created in your last post.
http://devcentral.f5.com/wiki/default.aspx/iRules/LogHttpTcpUdpToSyslogng.html
local0.info send logging entries to remote syslog server
filter f_local0.info {
facility(local0) and level(info) and match("logging");
};
destination can be a hostname or IP address
destination d_logging {
tcp("syslog.myhost.com" port (5000));
};
log {
source(local);
filter(f_local0.info);
destination(d_logging);
};
Aaron