Get logs using REST API

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Get logs using REST API

sabhinandan
Hi Yan,

If sth happens at agent we want to see agent logs at our end (GUI), I was just looking for some REST api which can give me the logs.
When I tried below URl, it is returning me the html.
http://localhost:8080/console/agents/tailLog/192.168.12.159?maxLine=500

Could you please let me know, if I need to pass any other parameter to get the logs in string format.

Thanks,
~AbhiNandan

Reply | Threaded
Open this post in threaded view
|

Re: Get logs using REST API

frenchyan
Administrator
At this time there is no REST api at the console level to get the log file (although there is one if you talk to an agent directly: http://linkedin.github.io/glu/docs/latest/html/agent.html#tail-list-directory-content but this is less convenient as you need to do security yourself).

That being said, you can certainly use the link from the console. The catch is if the path is a directory it will return html code and if it is a file it will return the content.

I am adding a ticket to add the proper rest api: https://github.com/linkedin/glu/issues/216

Yan


Reply | Threaded
Open this post in threaded view
|

Re: Get logs using REST API

oldgluuser
current issue link is here: https://github.com/pongasoft/glu/issues/216