iCall
121 TopicsHow to check the support id.
Hi Guys, I am new for F5. Dome times users can able to access our clients network from outside. User provides us a support id. Now my query is how to check this support id in LTM and allow that URL so that user's can able to access the URL.Kindly help me to fix issue. Please tell me the steps. Regards Tan_Sal6.5KViews0likes12CommentsKnowledge sharing: Ways to trigger and schedule scripts on the F5 BIG-IP devices.
I think that it is interesting to share how on F5 different scripts can be run at different times and states. 1. You can use the cron job like on any linux device to run a script. As I have used this to restart the tomcat and httpd each night with "bigstart restart <name>" or "tmsh restart /sys service <name>" (https://support.f5.com/csp/article/K89999342), because of a bug till I upgade the devices (https://support.f5.com/csp/article/K25554628 ). https://support.f5.com/csp/article/K03108954 2.Newer versions of F5 also have anacron tool that can add some randomness to the timframe when a script is run and many F5 default scripts use this and not the crontab: https://support.f5.com/csp/article/K33730915 3.You can even trigger scripts on the F5 device if the state changes from active to standby or from standby to active by adding the scripts under /config/failover/<state>. For example if you have a bug for a critical process that causes a failover ( you can use the command show /sys ha-status all-properties to check for this https://support.f5.com/csp/article/K20060182 ) but the device does not reboot or fix the process you can run a script to when the device becomes standby to restart the process. https://support.f5.com/csp/article/K6008 4. You afcource can run scripts at the F5 start time (startup/bootup): https://support.f5.com/csp/article/K11948 5.The final thing thing I can think of is to run a script at the backround that monitors the log and for example when there is a specific message in /var/log/ltm to trigger a tcpdump (in some cases better than creating a rotating tcpdum to catch an issue as per https://support.f5.com/csp/article/K65251607 ). The script can be a bash script with "tail -f" command that is run on the backround or better use the F5 intergrated "icall" feature. Bash: https://www.thegeekstuff.com/2010/12/5-ways-to-execute-linux-command/ Icall: https://devcentral.f5.com/s/articles/what-is-icall-27404 https://devcentral.f5.com/s/articles/run-tcpdump-on-event 5. You can use utility "logger -p" to generate manually log messages in the F5 device's log for testing of your scripts as this is used also for SNMP custom alarm traps tests (for more about SNMP https://support.f5.com/csp/article/K3727 ) https://support.f5.com/csp/article/K86480148 6. You can also trigger scripts from an BIG-IQ device bt you still can't schedule them when to run: https://clouddocs.f5.com/training/community/big-iq-cloud-edition/html/class5/module1/lab6.html 7.Of course the final option is to use ansible or python SDK that uses the F5 rest-api to execute commands on the F5 devices. https://f5-sdk.readthedocs.io/en/latest/ 8. You can even use TCP expect and bash for automations using SSH connection but this is really old way to do things: https://devcentral.f5.com/s/articles/f5-automation-tcl-amp-bash-921 https://f5-sdk.readthedocs.io/en/latest/userguide/ltm_pools_members_code_example.html 9.F5 is well integrated with Ansible and it is better than REST-API Python SDK or TCL for me as even the declarative AS3 interface is supported: https://clouddocs.f5.com/products/orchestration/ansible/devel/ https://clouddocs.f5.com/products/orchestration/ansible/devel/ https://www.f5.com/partners/technology-alliances/ansible Imperative: https://support.f5.com/csp/article/K42420223 https://clouddocs.f5.com/products/orchestration/ansible/devel/usage/playbook_tutorial.html Declaritive: https://www.f5.com/company/blog/f5-as3-and-red-hat-ansible-automation https://clouddocs.f5.com/training/fas-ansible-workshop-101/3.0-as3-intro.html 10. For some automations without rest-api better use the F5 native cli scripts than bash with tmsh commands: https://clouddocs.f5.com/cli/tmsh-reference/v14/modules/cli/cli_script.html https://clouddocs.f5.com/api/tmsh/script__run.html2.5KViews1like2CommentsStep by Step Instructions for iCall
I have read several articles about iCall (& iStats) but I'm missing how to actually implement it. With iRules I put the script in the iRules editor and save. If I want to do an iCall that is triggered from within an iRule I'm not understanding where to put the iCall pieces. Is it files that I store in a special folder? Is it multiple files, eg. if I have a handler, script etc...? What I would like is a link or an explanation of how to get started, please.2.3KViews0likes3CommentsiCall for working as if LLCF (4EA Interface)
hello? My name is Muntae. Using iCall, the following LLCF operation is required, so please review whether it is possible to operate according to the work method I wrote. **When all interfaces are disabled, it is an environment where only one interface can be manually enabled. ** [Implementation Goal] - When interface 1.1 is down, 1.2, 2.1, 2.2 down at the same time - When interface 1.2 down, 1.1, 2.1, 2.2 down at the same time - When interface 2.1 down, 1.1, 1.2, 2.2 down at the same time - When interface 2.2 is down, 1.1, 1.2, 2.1 down at the same time - When interface 1.1 up, 1.2, 2.1, 2.2 up at the same time - When interface 1.2 up, 1.1, 2.1, 2.2 up at the same time - When interface 2.1 up, 1.1, 1.2, 2.2 up at the same time - When interface 2.2 up, 1.1, 1.2, 2.1 up at the same time [Working procedure] 1. Create /config/llcf.conf file [Attach the file for details] sys icall script /Common/interface_1_1_down { app-service none definition { exec tmsh modify net interface 1.2 disabled exec tmsh modify sys icall handler triggered interface_1_2_down script null exec tmsh modify net interface 2.1 disabled exec tmsh modify sys icall handler triggered interface_2_1_down script null exec tmsh modify net interface 2.2 disabled exec tmsh modify sys icall handler triggered interface_2_2_down script null } description none events none } sys icall script /Common/interface_1_1_up { app-service none definition { exec tmsh modify net interface 1.2 enabled exec sleep 5 exec tmsh modify sys icall handler triggered interface_1_2_down script interface_1_2_down exec tmsh modify net interface 2.1 enabled exec sleep 5 exec tmsh modify sys icall handler triggered interface_2_1_down script interface_2_1_down exec tmsh modify net interface 2.2 enabled exec sleep 5 exec tmsh modify sys icall handler triggered interface_2_2_down script interface_2_2_down } description none events none } sys icall script /Common/interface_1_2_down { app-service none definition { exec tmsh modify net interface 1.1 disabled exec tmsh modify sys icall handler triggered interface_1_1_down script null exec tmsh modify net interface 2.1 disabled exec tmsh modify sys icall handler triggered interface_2_1_down script null exec tmsh modify net interface 2.2 disabled exec tmsh modify sys icall handler triggered interface_2_2_down script null } description none events none } sys icall script /Common/interface_1_2_up { app-service none definition { exec tmsh modify net interface 1.1 enabled exec sleep 5 exec tmsh modify sys icall handler triggered interface_1_1_down script interface_1_1_down exec tmsh modify net interface 2.1 enabled exec sleep 5 exec tmsh modify sys icall handler triggered interface_2_1_down script interface_2_1_down exec tmsh modify net interface 2.2 enabled exec sleep 5 exec tmsh modify sys icall handler triggered interface_2_2_down script interface_2_2_down } description none events none } sys icall script /Common/interface_2_1_down { app-service none definition { exec tmsh modify net interface 2.2 disabled exec tmsh modify sys icall handler triggered interface_2_2_down script null exec tmsh modify net interface 1.1 disabled exec tmsh modify sys icall handler triggered interface_1_1_down script null exec tmsh modify net interface 1.2 disabled exec tmsh modify sys icall handler triggered interface_1_2_down script null } description none events none } sys icall script /Common/interface_2_1_up { app-service none definition { exec tmsh modify net interface 2.2 enabled exec sleep 5 exec tmsh modify sys icall handler triggered interface_2_2_down script interface_2_2_down exec tmsh modify net interface 1.1 enabled exec sleep 5 exec tmsh modify sys icall handler triggered interface_1_1_down script interface_1_1_down exec tmsh modify net interface 1.2 enabled exec sleep 5 exec tmsh modify sys icall handler triggered interface_1_2_down script interface_1_2_down } description none events none } sys icall script /Common/interface_2_2_down { app-service none definition { exec tmsh modify net interface 2.1 disabled exec tmsh modify sys icall handler triggered interface_2_2_down script null exec tmsh modify net interface 1.1 disabled exec tmsh modify sys icall handler triggered interface_1_1_down script null exec tmsh modify net interface 1.2 disabled exec tmsh modify sys icall handler triggered interface_1_2_down script null } description none events none } sys icall script /Common/interface_2_2_up { app-service none definition { exec tmsh modify net interface 2.1 enabled exec sleep 5 exec tmsh modify sys icall handler triggered interface_2_1_down script interface_2_1_down exec tmsh modify net interface 1.1 enabled exec sleep 5 exec tmsh modify sys icall handler triggered interface_1_1_down script interface_1_1_down exec tmsh modify net interface 1.2 enabled exec sleep 5 exec tmsh modify sys icall handler triggered interface_1_2_down script interface_1_2_down } description none events none } sys icall script /common/null { app-service none definition { } description none events none } 2. Create the /config/user_alert.conf file [Attach the file for details] alert interface_1_1_down "Link: 1.1 is DOWN" { exec command="tmsh generate sys icall event interface_1_2_down" exec command="tmsh generate sys icall event interface_2_1_down" exec command="tmsh generate sys icall event interface_2_2_down" } alert interface_1_2_down "Link: 1.2 is DOWN" { exec command="tmsh generate sys icall event interface_1_1_down" exec command="tmsh generate sys icall event interface_2_1_down" exec command="tmsh generate sys icall event interface_2_2_down" } alert interface_2_1_down "Link: 2.1 is DOWN" { exec command="tmsh generate sys icall event interface_1_1_down" exec command="tmsh generate sys icall event interface_1_2_down" exec command="tmsh generate sys icall event interface_2_2_down" } alert interface_2_2_down "Link: 2.2 is DOWN" { exec command="tmsh generate sys icall event interface_1_1_down" exec command="tmsh generate sys icall event interface_1_2_down" exec command="tmsh generate sys icall event interface_2_1_down" } alert interface_1_1_up "Link: 1.1 is UP" { exec command="tmsh generate sys icall event interface_1_2_up" exec command="tmsh generate sys icall event interface_2_1_up" exec command="tmsh generate sys icall event interface_2_2_up" } alert interface_1_2_up "Link: 1.2 is UP" { exec command="tmsh generate sys icall event interface_1_1_up" exec command="tmsh generate sys icall event interface_2_1_up" exec command="tmsh generate sys icall event interface_2_2_up" } alert interface_2_1_up "Link: 2.1 is UP" { exec command="tmsh generate sys icall event interface_1_1_up" exec command="tmsh generate sys icall event interface_1_2_up" exec command="tmsh generate sys icall event interface_2_2_up" } alert interface_2_2_up "Link: 2.2 is UP" { exec command="tmsh generate sys icall event interface_1_1_up" exec command="tmsh generate sys icall event interface_1_2_up" exec command="tmsh generate sys icall event interface_2_1_up" } 3. Merge script configuration: #tmsh load sys config merge file /config/llcf.conf 4. Apply settings: - #tmsh save sys config 5. Check to apply script settings: #list sys icall handler triggered interface 1.1 down #list sys icall handler triggered interface 1.2 down #list sys icall handler triggered interface 2.1 down #list sys icall handler triggered interface 2.2 down #list sys icall handler triggered interface 1.1 up #list sys icall handler triggered interface 1.2 up #list sys icall handler triggered interface 2.1 up #list sys icall handler triggered interface 2.2 upSolved1.5KViews1like5CommentsF5 iCall not working
Hi Team, My iCall is not working in my setup. i am taking help of various online article and now exhausted. Please help !!!!! ================================================= User -----------------VS (10.10.10.110) Pool Name PHP- member: lampio - 192.168.18.128:80 =============================================== Task: Create i call to check pool member is down and run packet capture. Step 1: Created the alert: =================================================================== [root@lab:Active:Standalone] config # cat user_alert.conf alert local-http-192-168-18-128-80-DOWN "Pool/common/PHP /common/192.168.18.128:80 monitor status down" { exec command="tmsh generate sys icall event tcpdump context { { name ip value 192.168.18.128 } { name port value 80 } { name vlan value servers } { name count value 20 } }" } ================================================================== Step 2: Setup the i call script ======================================================================= modify script pool_down_script { app-service none definition { exec tcpdump -ni servers -w /var/tmp/dhruv.pcap } description none events none ======================================================================= Step 3: Configure the handler ======================================== modify triggered pool_down { script pool_down_script subscriptions replace-all-with { tcp-dump { event-name tcp-dump } } } ======================================== When i manually pull down the pool member, nothing happens and below is the output. ======================================================================= root@(lab)(cfg-sync Standalone)(Active)(/Common)(tmos)# show sys icall ------------------------------------------------ Sys::iCall::Event Triggered Handler: pool_down ------------------------------------------------ Events matching filters0 Events causing handler to run0 Creation time11/14/19 02:11:08 Current statusactive Time since last status change11/14/19 02:11:08 =================================================================== Kindly help...!!Solved1.4KViews0likes6CommentsAutomated ASM Backup - working bash script now to automate or convert to iCall/tcl
Hi All, I have put together a BASH script that when run performs a backup of the ASM policies and copies them to a remote location. The script runs great and I have had it set as a Cron job in my lab setup to automate the backups. Unfortunately, the business does not want a script running as a Cron job on the F5. I have had it suggested to me to use iCall. I have seen only limited information regarding iCall that was written in a way that someone that has never seen iCall could understand. This got me far enough to understand that iCall runs tcl scripts, not bash scripts! The result being if I was to use iCall I would need to re-write the script completely. I am looking for 2 options here: A means to automate running a bash script on the F5. OR detailed information or getting started with iCall - Better yet, converting bash to tcl. To illustrate my issue, my bash script lives on the F5 and does the following: reads a counter value from a file curl command to the management interface and copies a list of ASM policy details to a txt file. greps the policy names from the original txt file to a new txt file. greps the policy IDs from the original txt file to a new txt file. sets a parameter with the current data and time as the value makes a localDirectory using the data and time parameter as the folder name (this ensures a known date of the backup - also ensures you can re-run and get a new folder on the same day if required) uses curl post and get commands to get the policies from the F5. curl upload-file command to copy files to remote smb location adjust the counter performs a cleanup of any files that were created locally. If I switch over to using iCall the above all needs to be done with tcl - I am not sure how much of that is supported. I have found that "echo" is replaced with "puts", is there a "curl", "cat", etc equivalent? Thanks in advanceSolved1.3KViews0likes6Commentsdownloading a ucs remotely without using bash?
I'm trying to create and download a ucs via icontrol so we can have on-demand backups however i've run into a roadblock - I can't seem to figure out how to download a ucs. Here's how I'm creating the ucs: curl -v -sk -u admin:password https://hostname.com/mgmt/tm/sys/ucs -H 'Content-Type: application/json' -X POST -d '{"command":"save","name":"blah.ucs"}' I can see in the UI that it's been created however I haven't found any documentation about how to actually download the ucs. Anyone have an idea about how to do this via curl or otherwise?Solved1.2KViews0likes5CommentsAn error has occurred while trying to process your request while selecting certificate
How to find the special character in the certificate. Getting the below error. Could not use GUI to see certificate details. Only tmos works. at iControl.ManagementKeyCertificateBindingStub.get_certificate_list_v2(ManagementKeyCertificateBindingStub.java:1760) at com.f5.model.security.PKIStore.getSSLCertificatesMap(PKIStore.java:82) ... 84 more Caused by: org.xml.sax.SAXParseException; lineNumber: 1109; columnNumber: 43; An invalid XML character (Unicode: 0x13) was found in the element content of the document. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177) I'm unable to narrow down the certificate which may be causing this. I guess, I've hit article - K47741472: The Configuration utility does not process SSL keys and certificates with names that include special characters1.2KViews0likes4CommentsWhere to place bash scripts on the appliance in order to survive platform upgrades?
Hi All, I have a bash script that is executed by an iCall script. I know iCall will survive an upgrade of the BIG-IP platform however I suspect that my bash script will need to be placed in to very specific location on the F5 appliance such as /tmp? I want to confirm where my bash script should live on the appliance so that when we upgrade the appliance, this script will copy across and continue to run without any manual intervention being required. Thanks ChrisSolved800Views0likes6CommentsBig-IQ snapshot management
Hello community, I have an interesting situation that I want to run by you guys and hopefully somebody/someone can give me a hand. We have in our environment 20 Big-IQ devices, handling nearly 500 devices (between LTMs, ASMs, DNSs and combination of them). Internally we have configured Big-IQs to trigger snapshots for all of them, the only difference we have is that we only keep snapshot files storaged in the Big-IQ is for ASMs. The rest of the modules keep their snapshots locally. Now, we want (need) to create a python script (basically because we make it run from a 3rd party solution that ssh into the Big-IQs and run that python script) to delete snapshots older than 30 days, for example. For that purpose, I have searched for several documentation regarding API for snapshot management on Big IQ , basically there are 2 API calls relevant for me: 1.- Snapshot checkup: GET /cm/<module>/tasks/snapshot-config/<id> 2.- Snapshot deletion: DELETE mgmt/cm/<module>/tasks/snapshot-config/<id> Now the values between <>, which are: 'module' and 'id', in our case module = asm and 'id' is for the snapshot we want to checkup and delete if meets the criteria. The thing here is that, we do not have any 'id' number, because the snapshots are created by several business units outside our team, where they log into the Big-IQ's GUI and deploy the snapshot manually. I have tried to send a GET request (via POSTMAN) using these variations (hoping some sort of response): GET /cm/<module>/tasks/snapshot-config/ GET /cm/<module>/tasks/snapshot-config/* But logically is expecting the 'id' value so it shoots back an error. NOTE: the 'id' is provided when you try the API call for snapshot creation: POST mgmt/cm/<module>/tasks/snapshot-config. That particular POST, only request the name of the snapshot as parameter and then provides the precious 'id' in return. So you can see my dilemma and where I am missing data. QUESTIONS: 1.- Is there any way to fetch the 'id' using any resource? 2.- where exactly is located the repository for these snapshots in the Big-IQ? I mean the Linux's bash prompt for each Big-IQ, I have searched and searched but I haven't found them... This would be a great peace of information. 3.- Is this the right approach? I found some information about 'restcurl' but I am not completely sure about this resource. Thanks.-764Views1like3Comments