infra-integrations-sdk icon indicating copy to clipboard operation
infra-integrations-sdk copied to clipboard

JMX: handle commented lines

Open varas opened this issue 3 years ago • 0 comments

Description

JMX server endpoint may return "Java comment" lines like # An error report file with more information is saved as:.

In this case JMX will return an error like error: invalid character '#' looking for beginning of value.

It'd be great to handle this case properly and log this as a warning.

Ideally an integration execution instance should be able to keep fetching the rest of the requested data/queries defined.

Nice to haves

  1. A JMX server error may report several lines. Current jmx package is limited to read just 1 line. It'd be great to get the whole error message logged as a single entry.

  2. Circuit breaker. Whenever several queries fail in a row (in this case we are handling "java comment" lines, but this could be extrapolated to other errors), the jmx package client (let's call it that way, although API is a set of awful global functions sharing global state) should prevent next queries to be submitted and log an error instead. This will avoid worsening the JMX endpoint scenario, as it already returned N errors in a row.

varas avatar Aug 03 '21 12:08 varas