18-Nov-2021 08:48
I have a request to create a script to delete the APM session(s) of a user ID. I can easily do this via the GUI and have found the commands to do it manually, however scripting is totally new to me (though I've programmed in the past). So, I have a few questions to help get an idea of how to approach this:
Questions:
My initial plan would be to base the script off of the sequence below:
1.) List the sessions IDs associated with a user ID:
sessiondump -allkeys | grep -i <username>
2.) (pull the session IDs, if any)
3.) Delete the session ID(s):
sessiondump --delete <SessionID>
Any advice to get started tackling this would be appreciated. We have a vender who I can probably reach out to for assistance, but I want to do some initial research first.
Thanks!
Solved! Go to Solution.
27-Nov-2021 04:44
going to take a stab at this although im not a very active scripter myself.
1 - no in general everything works without additions on newer versions
2 - that is really not possible to just answer with a yes or no in my opinion. there are many languages with different benefits and downsides. python is popular currently and you will probably find lots of help on that. so if you start form scratch, sure use it. if you have experience with another script language use that. if you can get help in another language use that. what you are looking to do isn't extremely complex, i believe in most script languages you can do it, it depends on what works best for you. don't worry to much about the best at this stage.
3 - again, no answer which will be the truth for everyone. it depends what suits you best. if you are the only one having to run it, local desktop is fine. if multiple people will have to then on a server. but you can also just run it on the bigip itself if that suits the situation.
27-Nov-2021 04:44
going to take a stab at this although im not a very active scripter myself.
1 - no in general everything works without additions on newer versions
2 - that is really not possible to just answer with a yes or no in my opinion. there are many languages with different benefits and downsides. python is popular currently and you will probably find lots of help on that. so if you start form scratch, sure use it. if you have experience with another script language use that. if you can get help in another language use that. what you are looking to do isn't extremely complex, i believe in most script languages you can do it, it depends on what works best for you. don't worry to much about the best at this stage.
3 - again, no answer which will be the truth for everyone. it depends what suits you best. if you are the only one having to run it, local desktop is fine. if multiple people will have to then on a server. but you can also just run it on the bigip itself if that suits the situation.
29-Nov-2021 09:25
Got it. Thanks for taking the time to reply - that does help clear things up some. 😀