Forum Discussion
Jeff_Morrison_4
Nimbostratus
Apr 05, 2006Logging to syslog from iRule
I am wanting to send HTTP information to my syslog-ng server. I have tried to add logging to my iRule but I don't see any information being sent to the Local0 files on the F5.
I would appreciate any help in setting up logging on a iRule.
Thanks!
- JRahm
Admin
logging will go to /var/log/ltm unless you've specified in your log statements for it to go elsewhere. - Jeff_Morrison_4
Nimbostratus
Yes I am aware that it go to the LTM file..I am just not seeing any information in the file. - JRahm
Admin
What does your rule look like? Perhaps your logging statements are never being called. - Jeff_Morrison_4
Nimbostratus
Copy of my iRule - Colin_Walker_12Historic F5 AccountAhh.
log local0. "Redirection to Error page"
- Jeff_Morrison_4
Nimbostratus
Thanks a lot for the help. Can you tell me how I would send ALL HTTP traffic to the LTM file so I can moitor it? - Colin_Walker_12Historic F5 AccountWell, first of all, I'm not sure you really want to pass all HTTP traffic to the LTM log, unless it's for a short period of testing or something to that effect.
when HTTP_REQUEST { log local0. "[IP::client_addr] - [clock format $time_now -format {%d/%m/%Y:%H:%M:%S}] [HTTP::request]" }
- Jeff_Morrison_4
Nimbostratus
Thanks Colin... - Colin_Walker_12Historic F5 AccountAdditionally, you can read more about the clock command, which is a default TCL command, here: Click here
- JRahm
Admin
I seem to remember unRuleY mentioning that you should be on 9.2 if you are going to use the clock command in production... just an FYI.
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects