Layer7 API Management

 View Only
  • 1.  Scheduled Tasks in Audit Log

    Posted May 26, 2016 08:27 AM

    Is it possible to configure a policy used for a scheduled task so that it's visible in the Audit Logs? Especially when developing such a policy it would be very helpful to write audit details for testing purposes...

     

    Thanks

    Peter



  • 2.  Re: Scheduled Tasks in Audit Log

    Broadcom Employee
    Posted May 31, 2016 12:09 AM

    Hi Peter,

    I'm not sure if I understand what you want, but you can always call a gateway service by curl command,

    for example,

    curl http://localhost:8080/<servicename>

     

    put it in cron table then you have the scheduled task.

     

    Another way is that, since from gateway 9.0, you can manage scheduled task -- from menu Task -> Manage scheduled tasks

    https://docops.ca.com/display/GATEWAY92/Manage+Scheduled+Tasks

     

    After setup scheduled task for this service, then you can write audit detail to audit log in the service.

     

    Regards,

    Mark



  • 3.  Re: Scheduled Tasks in Audit Log

    Posted Jun 01, 2016 04:15 AM

    Hi Mark

     

    We're on API Gateway version 9.0, so creating scheduled tasks is no problem. Myscheduled tasks are executed but they don't appear in the audit log. The cluster-wide property "audit.messageThreshold" is set to INFO and the "Add Audit Details" assertions writes audit log entries with level INFO also...

     

    Is there a possibility to see the scheduled  tasks in the audit logs?



  • 4.  Re: Scheduled Tasks in Audit Log
    Best Answer

    Broadcom Employee
    Posted Jun 02, 2016 02:34 AM

    You're right, for scheduled task policies, save the audit to database seems not working for INFO level.

    Here are some workarounds,

    1. change the Level of audit detail assertion to WARNING

    2. save to ssg log, or custom logger, you can use any level that higher than the logger's threshold

     

    You may open a support ticket to see if it's a bug or by design.



  • 5.  Re: Scheduled Tasks in Audit Log

    Posted Jun 03, 2016 05:41 AM

    Thanks for this workaround, it works!

    Advice for others: Make sure to change the "audit type" in the audit filter section to "System" as scheduled tasks are not logged as messages like normal policies!