Forum Discussion
Is it possible to use an iRule to read from and return the F5's log files?
Hi Samyool,
you can't read locally stored file streams using iRules. The required TCL commands to open and read such are disabled by the developers.
The only chance I see for you, is to open a [SIDEBAND] connection to the REST-API, execute a tail /var/log/ltm command via the /mgmt/tm/util/bash endpoint, parse the REST response and finally display the output on your debugging page.
API Request:
POST /mgmt/tm/util/bash HTTP/1.1
Host: yourbox.domain.de
Content-Type: application/json
Authorization: Basic YourBase64Creds
content-length: 56
Connection: close
{"command":"run","utilCmdArgs":"-c 'tail -n 50 /var/log/ltm'"}
Note: Let me know if you need further assitence to implement such a [SIDEBAND] connection to query REST within iRules.
Cheers, Kai
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