Forum Discussion

M_Chris_177125's avatar
M_Chris_177125
Icon for Nimbostratus rankNimbostratus
Dec 03, 2014

How to Read the LTM Log via API Call?

I am trying to find a way to read the /var/log/ltm logfile via an API or TMSH call? I am not an admin so I only have operator privileges however I can view the logs via the GUI under System->Logs->Local Traffic. I can direct link to this page and scrape the log that way but there is now way for me to use a range and that page only seems to show the current days transactions.

So I am looking for a configurable API call or TMSH call to do this. I have tried the "tmsh show log ltm" command but I get the following:

svc-hpoo-tm@()(cfg-sync Changes Pending)(/S1-green-P:Active)(/Common)(tmos) show log ltm
Syntax Error: "log" unexpected argument

Any idea why I am receiving that error? Thoughts on how to fix that?

Please let me know if anyone has any ideas.

Thanks, Chris

3 Replies

  • A real example:

     

    root@(lbxxx)(cfg-sync In Sync)(Active)(/Common)(tmos) show sys log ltm lines 2

     

    Sys::Log

     

    ltm 11-24 04:02:06 warning lbxxx tmm[16080]: Warning, connections equals limit 195.1.2.182:35878 -> 12.2.2.2:162, proto UDP, VS /Common/ncx-snmptrap-vip: Connection limit reached.

     

    ltm 11-24 04:02:07 warning lbxxx tmm1[16080]: Warning, connections equals limit 195.1.2.179:40156 -> 12.2.2.2:162, proto UDP, VS /Common/ncx-snmptrap-vip: Connection limit reached. root@(lbxxx)(cfg-sync In Sync)(Active)(/Common)(tmos)

     

  • Verify on System ›› Logs : Configuration : Options

     

    if "Application editor" has logs access, default value is Deny.

     

    Change to Allow and try again to access logs