Forum Discussion
How to add a timestamp on iRule
I don't understand. Do you have multiple device groups and wish to sync the same iRule between them?
If you do I'd probably define the iRules in git and roll out the iRules using code and roll them out using a pipeline.
If you are using BigIPReport you could also get a list with MD5s from multiple devices using a simple Python script:
import requests
import hashlib
irules = requests.get('https://bigipreport.xip.se/json/irules.json').json()
for rule in [i for i in irules if i['name'] == 'rulename']:
print(hashlib.md5(rule['definition'].encode('utf-8')).hexdigest())
# Sample output:
# d03f96a58892859e80cbd2be39e04b0c
# d03f96a58892859e80cbd2be39e04b0c
# d03f96a58892859e80cbd2be39e04b0c
# d03f96a58892859e80cbd2be39e04b0c
# d03f96a58892859e80cbd2be39e04b0c
# a2716b3fd773640b7919b91bb7e7d421
Pair this with an alert using a Slack webhook or your monitoring system and it should work fine. I would not recommend this though as it requires manual intervention.
Kind regards,
Patrik
Ps. Disclaimer, I am one of the authors of BigIPReport Ds.
Hi Patrick, how are you? first of all thanks for your quick response 😀. To put you in context a little bit. I have an F5 LTM on AWS with an ASG with multiple instances. The cluster synchronizes in an active/active way. And I have an application where developers can generate iRules via REST API against the LTM. Now, what I need is to be able to validate that the irule received by one of the instances is replicated in the rest of the cluster instances. What had occurred to me is precisely, to insert a timestamp when creating/modifying the iRule and that allows me to have a version of it. Where you can also validate that timestamp that is the same throughout all the instances of the cluster. I don't know if maybe F5 LTM already has some mechanism to be able to do this in another way maybe?
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