Forum Discussion
iCall script not working
Hi Jason thnx a lot , now i`m getting this error on /var/ltm logs when i execute :
generate sys icall event change_priority
tmsh[19010]: 01420006:3: members: required brace is missing "{"
err scriptd[3868]: 014f0013:3: Script (/Common/pool_member1_down) generated this Tcl error: (script did not successfully complete: (Syntax Error: members: required brace is missing "{"
and when i manually put node down no errors on /var/ltm logs except that pool member monitor is down but no change on priority.
Thnx
ah..two things.
- Use tmsh::modify instead of exec, no need to leave the script to modify objects (this is an optimization, not a fix)
- Escape your braces:
tmsh::modify ltm pool TeststanbyNode members modify \{ 192.168.18.211:80 \{priority-group 20\}\}- ikkut23Oct 06, 2022
Altostratus
yeapp that did work ,
but still cant figure out with smth with alertd,when i mark the node down manually i can see on ltm log that
Pool /Common/TeststanbyNode member /Common/192.168.16.80:80 monitor status node down.
but lets say its not triggering the event
alert server1-down "Pool /Common/TeststanbyNode /Common/192.168.16.80:80 monitor status node down." {
exec command="tmsh generate sys icall event change_pga context { { name ip value 192.168.16.80 } {name port value 80} }" }can you double check ,and also idk if its worth mentioning but Big-IP version is 14.1.2.3.
ah also if i try and run "generate sys icall event .. " it works and script changes the pga.
Thnx
- oscarnetOct 06, 2022
Altocumulus
HI ikkut23:
I tested it a little bit The following is my config,
It can work normally, for your reference
# cat /config/user_alert.conf alert server1-down "Pool /Common/TeststanbyNode member /Common/node_10.1.20.13:80 monitor status down." { exec command="tmsh generate sys icall event change_pga context { { name ip value node_10.1.20.13 } {name port value 80} }" } # tmsh list sys icall script pool_member1_down sys icall script pool_member1_down { app-service none definition { foreach var { ip port } { set $var $EVENT::context($var) } tmsh::modify ltm pool TeststanbyNode members modify \{ $ip:$port \{priority-group 20\} \} } description none events none } # tmsh list sys icall handler triggered change_pga sys icall handler triggered change_pga { script pool_member1_down subscriptions { change_pga { event-name change_pga } } }have a good day!
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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