Forum Discussion
lmwf1_55268
Nimbostratus
Feb 18, 2009create multiple log files for multiple web servers
How do you use irules to create multiple log files for multiple web servers?
For example, /var/log/ltm_web1, /var/log/ltm_web4, /var/log/ltm_web3, /var/log/ltm_web4
To make it a bit more...
lmwf1_55268
Nimbostratus
Feb 18, 2009For v9.4.2 and newer, will this send all logs to remote server for all vips?
I am still waiting for 3600 System v 9.4.5 to test this.
Thanks!
syslog include "
remote server
destination remote_server {
udp(\"10.4.0.1\" port (514));
};
destination d_vip1 {
udp(\"10.4.0.1\" port (514));
};
destination d_vip2 {
udp(\"10.4.0.1\" port (514));
};
destination d_vip3{
udp(\"10.4.0.1\" port (514));
};
local0.filters
local0.* /var/log/ltm
filter f_local0 {
facility(local0) and level(info..emerg);
};
Filter for local0 VIP1 messages
filter f_local0_vip1 {
facility(local0) and level(info..emerg) and match("vip1");
};
Filter for local0 VIP2 messages
filter f_local0_vip2 {
facility(local0) and level(info..emerg) and match("vip2");
};
Filter for local0 VIP3 messages
filter f_local0_vip3 {
facility(local0) and level(info..emerg) and match("vip3");
};
Destinations
Destination remote_server {
file(\"/var/log/ltm\" create_dirs(yes));
};
LTM log file for VIP1
destination d_vip1 {
file(\"/var/log/ltm_vip1\" create_dirs(yes));
};
LTM log file for VIP2
destination d_vip2 {
file(\"/var/log/ltm_vip2\" create_dirs(yes));
};
LTM log file for VIP3
destination d_vip3 {
file(\"/var/log/ltm_vip3\" create_dirs(yes));
};
Log statements
Default LTM log statement
log {
source(local);
filter(f_local0);
destination(remote_server);
};
VIP1 log statement
log {
source(local);
filter(f_local0_vip1);
destination(d_vip1);
};
VIP2 log statement
log {
source(local);
filter(f_local0_vip2);
destination(d_vip2);
};
VIP3 log statement
log {
source(local);
filter(f_local0_vip3);
destination(d_vip3);
};
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects