Forum Discussion
nbel_66078
Nimbostratus
Oct 19, 2009getting ltm status active/standby
Hi
I'm trying to find a solution in order to avoid LTM redundant pair to both execute an Irule that log VS client connection information to our syslog.
The fact is when a client connect to the VS with the following associated Irule both LTM send the same message to our syslog... (probably due to the connection mirroring option).
So I wonder if there is a solution to obtain the ltm status in order to make the logging only from the active ltm ?
fyi we are using v10 LTM
if [?getstatuscommand?] = 1 then ...
when RULE_INIT {
Activate logging on internal network syslog ?
set ::log_debug 1
}
when CLIENT_ACCEPTED {
log -noname 192.168.12.12:514 local0.info "Client [IP::remote_addr]:[TCP::remote_port] connected to Virtual Server: [virtual] ([IP::local_addr]:[TCP::local_port])"
if {$::log_debug==1}{
log -noname 192.168.13.13:514 local0.info "Client [IP::remote_addr]:[TCP::remote_port] connected to Virtual Server: [virtual] ([IP::local_addr]:[TCP::local_port])"
}
}
endif
- hoolio
Cirrostratus
The iRule shouldn't run on the standby unit. Are you seeing a problem where it is running? - nbel_66078
Nimbostratus
i'm surprised too but the fact is that i've got on my syslog server always the same couple of message for the same event: one from the active ltm and the other from the standby ltm. The only problem is these redundant messages are polluting the log file.. - nbel_66078
Nimbostratus
Just for information, i've made a test and remove the Connection Mirror in the VS settings and so only the active ltm send messages to the syslog. But we would like to use the connection mirror function, so if you have an idea to identify the active/standby ltm in a irule ... or maybe an other way to avoid sending duplicate message to the syslog - hoolio
Cirrostratus
That makes a bit more sense. I'm not sure if there is a way to determine whether the current unit the iRule is running on is active though. I suppose you could use a shell script which runs ps1 to get the current state and updates a datagroup or an iRule with a global variable--but I'm not sure that's the cleanest solution. - Mike_62859
Nimbostratus
Ah, I know this post is pretty old at this point, but I'm seeing the same behaviour with 11.2HF3, and I'm wondering if anyone ever found a resolution for this problem? - Michael_Yates
Nimbostratus
Hi Mike, - pete_71470
Cirrostratus
We've submitted an RFE and the bugid to track is ID370181. "It is supposed to have commands showing a device status in traffic group when it processes mirrored traffic".- Eric_Chen_12394Historic F5 Account
In case other folks are looking for this: https://clouddocs.f5.com/api/irules/HA__status.html
 
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