Can we download foreman logs i.e, production.log through Foreman api's or foreman GUI

I have requirement that I don’t have shell access of foreman server & I want to download the foreman logs for the debug purposes. I’m only communicating with Foreman through foreman api. How I can do the same?

Thanks in advance!!

AFAIK there’s no possibility like this. We show just some recent Smart Proxy logs in the application, but we don’t expose any Foreman specific logs. What is the usecase? Logs can contain potentially sensitive information, so we keep them available just for Foreman admins instead of users.

It may be easier to configure logging to send to systemd’s journald and then configure journald to send logs to another server. I don’t know if that’s feasible in your setup.

I need it for OPS debugging. I’m working on a page from where OPS can download these logs as I have limited access to foreman server.

That’s great suggestion @ekohl . I will look into my set up for feasibility.