Forum Discussion
iCall for working as if LLCF (4EA Interface)
- Oct 04, 2022
Ok, just to make sure this worked, I modified for my local vmware fusion environment (updated above to add the correct enabled/disabled keywords) and it works just fine.
user_alert.conf as is on my system:
alert interface_1_1_down "Link: 1.1 is DOWN" { exec command="tmsh generate sys icall event interface_manager context { { name action value disabled } { name interface value 1.1 } }" } alert interface_1_3_down "Link: 1.3 is DOWN" { exec command="tmsh generate sys icall event interface_manager context { { name action value disabled } { name interface value 1.3 } }" } alert interface_1_1_up "Link: 1.1 is UP" { exec command="tmsh generate sys icall event interface_manager context { { name action value enabled } { name interface value 1.1 } }" } alert interface_1_3_up "Link: 1.3 is UP" { exec command="tmsh generate sys icall event interface_manager context { { name action value enabled } { name interface value 1.3 } }" }
bigip_script.conf appropriate objects as is on my system:
sys icall script interface_manager { app-service none definition { foreach var { action interface } { set $var $EVENT::context($var) } switch ${interface} { "1.1" { tmsh::modify /net interface 1.3 ${action} } "1.3" { tmsh::modify /net interface 1.1 ${action} } } } description none events none } sys icall handler triggered interface_manager { script interface_manager subscriptions { interface_manager { event-name interface_manager } } }
Hi muntae_kim, have you tested this and it works and you're asking if this is an agreeable solution, or are you asking if it will work as you've specified? I think you said "working solution" so if that's the case, it shouldn't be a problem. But there are ways to significantly reduce the complexity of what you've built. I haven't tested the below, so you'll want to study and test (and likely tweak) what I've written, but it should get you on your way (again...test in a lab!)
###
### begin user_alert.conf
###
alert interface_1_1_down "Link: 1.1 is DOWN" {
exec command="tmsh generate sys icall event interface_manager context { { name action value disabled } { name interface value 1.1 } }"
}
alert interface_1_2_down "Link: 1.2 is DOWN" {
exec command="tmsh generate sys icall event interface_manager context { { name action value disabled } { name interface value 1.2 } }"
}
alert interface_2_1_down "Link: 2.1 is DOWN" {
exec command="tmsh generate sys icall event interface_manager context { { name action value disabled } { name interface value 2.1 } }"
}
alert interface_2_2_down "Link: 2.2 is DOWN" {
exec command="tmsh generate sys icall event interface_manager context { { name action value disabled } { name interface value 2.2 } }"
}
alert interface_1_1_up "Link: 1.1 is UP" {
exec command="tmsh generate sys icall event interface_manager context { { name action value enabled } { name interface value 1.1 } }"
}
alert interface_1_2_up "Link: 1.2 is UP" {
exec command="tmsh generate sys icall event interface_manager context { { name action value enabled } { name interface value 1.2 } }"
}
alert interface_2_1_up "Link: 2.1 is UP" {
exec command="tmsh generate sys icall event interface_manager context { { name action value enabled } { name interface value 2.1 } }"
}
alert interface_2_2_up "Link: 2.2 is UP" {
exec command="tmsh generate sys icall event interface_manager context { { name action value enabled } { name interface value 2.2 } }"
}
###
### end user_alert.conf
###
###
### begin icall objects
###
sys icall script interface_manager {
app-service none
definition {
foreach var { action interface } {
set $var $EVENT::context($var)
}
switch ${interface} {
"1.1" {
tmsh::modify /net interface 1.2 ${action}
tmsh::modify /net interface 2.1 ${action}
tmsh::modify /net interface 2.2 ${action}
}
"1.2" {
tmsh::modify /net interface 1.1 ${action}
tmsh::modify /net interface 2.1 ${action}
tmsh::modify /net interface 2.2 ${action}
}
"2.1" {
tmsh::modify /net interface 1.1 ${action}
tmsh::modify /net interface 1.2 ${action}
tmsh::modify /net interface 2.2 ${action}
}
"2.2" {
tmsh::modify /net interface 1.1 ${action}
tmsh::modify /net interface 1.2 ${action}
tmsh::modify /net interface 2.1 ${action}
}
}
}
description none
events none
}
sys icall handler triggered interface_manager {
script interface_manager
subscriptions {
interface_manager {
event-name interface_manager
}
}
}
###
### end icall objects
###
- JRahmOct 04, 2022Admin
Ok, just to make sure this worked, I modified for my local vmware fusion environment (updated above to add the correct enabled/disabled keywords) and it works just fine.
user_alert.conf as is on my system:
alert interface_1_1_down "Link: 1.1 is DOWN" { exec command="tmsh generate sys icall event interface_manager context { { name action value disabled } { name interface value 1.1 } }" } alert interface_1_3_down "Link: 1.3 is DOWN" { exec command="tmsh generate sys icall event interface_manager context { { name action value disabled } { name interface value 1.3 } }" } alert interface_1_1_up "Link: 1.1 is UP" { exec command="tmsh generate sys icall event interface_manager context { { name action value enabled } { name interface value 1.1 } }" } alert interface_1_3_up "Link: 1.3 is UP" { exec command="tmsh generate sys icall event interface_manager context { { name action value enabled } { name interface value 1.3 } }" }
bigip_script.conf appropriate objects as is on my system:
sys icall script interface_manager { app-service none definition { foreach var { action interface } { set $var $EVENT::context($var) } switch ${interface} { "1.1" { tmsh::modify /net interface 1.3 ${action} } "1.3" { tmsh::modify /net interface 1.1 ${action} } } } description none events none } sys icall handler triggered interface_manager { script interface_manager subscriptions { interface_manager { event-name interface_manager } } }
- muntae_kimOct 11, 2022Cirrus
Thanks for the quick and accurate reply.
Recent Discussions
Related Content
* 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