elastic / support-diagnostics

Support diagnostics utility for elasticsearch and logstash
Other
290 stars 150 forks source link

[Enhancement] Fetch cluster logs in json format #626

Closed psanz-estc closed 11 months ago

psanz-estc commented 1 year ago

Looking at the current code, we are only collecting .log files:

  logs:
    elastic: "ls -alt {{LOGPATH}} | grep '{{CLUSTERNAME}}.log' | awk '{print $9}'"

For customers with only json output enabled, the logs collection fails...

Would it be possible to try to fetch json files?

Thanks

RogierSchuring commented 1 year ago

Would be even better if the log filename and type could be derived from the log4j.properties file. Just a thought ;)

razorworks commented 1 year ago

Looking at the current code, we are only collecting .log files:

  logs:
    elastic: "ls -alt {{LOGPATH}} | grep '{{CLUSTERNAME}}.log' | awk '{print $9}'"

For customers with only json output enabled, the logs collection fails...

Would it be possible to try to fetch json files?

Thanks

We are facing the same issue.

Would be even better if the log filename and type could be derived from the log4j.properties file. Just a thought ;)

This would be awesome. :smile: