Forum Discussion
Kai_Wilke
Mar 08, 2017MVP
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