Forum Discussion
samstep
Cirrocumulus
Apr 29, 2008write to syslog using iControl?
Hi all,
I have searched through iControl documentation however was unable to find an answer to my question:
How do I write stuff to the box's syslog using iControl?
Is there a call anywhere like this: iControl.Syslog("local0","My text to appear in syslog")????
3 Replies
- Mohamed_Lrhazi1Historic F5 AccountIt does not seem like you there is a way to execute arbitrary commands on the bigIP via icontrol, if there was, then you would run the logger command to inject messages into syslog.
Outside of iControl, maybe you can use SSH to remotely execute the logger commands.
Mohamed. - That is correct, at this time there is no way to issue commands on the BIG-IP. We've abstracted system commands through the APIs for security reasons and have not yet had a request to support syslog messages directly through the API.
If you need to update the syslog remotely, then you could, as Mohamed suggested, remotely issue a command over SSH.
Another option could be to create a dummy iRule with the log message in the RULE_INIT event. By adding the iRule, the RULE_INIT will get triggered and then you can delete the iRule when you are finished. The LocalLB::Rule interface contains the methods and a simple rule like thiswhen RULE_INIT { log local0. "LOG SOMETHING HERE" }
would work.
Now, you probably wouldn't want to do this every second as that would cause some overhead on the system, but if it's a infrequent event, then this approach shouldn't cause any issues.
-Joe - samstep
Cirrocumulus
Joe, thanks for the iRule workaround to my problem.
I am surprised that nobody has asked F5 to support syslog messages directly through the iControl API.
iControl application developers need to log actions of their applications, so it makes sense to use the box's built-in syslog service for many reasons including security, convenience of keeping everything in one place, usage of only one protocol(SOAP) to talk to the box, etc...
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
