The Prometheus data model only has float values (this makes the highly compact storage possible), so the exporter has no way to represent "Good", "Bad", or "lily-of-the-valley" without further help from you.
Can you write a pair of mapping rules for the exporter that match on the possible beanPropertyValue and set a fixed metric value of 1 or 0? /MR On Fri, Mar 5, 2021, 18:28 Rip Jal <[email protected]> wrote: > This looks like to be an issue > > I have activemq Mbean which has attribute currentStatus whose value is > returned as Good. > Exact MbeanObject is > "org.apache.activemq:type=Broker,brokerName=myBroker01,service=Health" > Looks like in JMXCollector.Receiver.recordBean,it is only storing value if > it is a number or Boolean else it is ignoring and returning from there and > then. > Below is the code snippet from JMXCollector > if (beanValue instanceof Number) { value = ((Number) > beanValue).doubleValue() * matchedRule.valueFactor; } else if (beanValue > instanceof Boolean) { value = (Boolean) beanValue ? 1 : 0; } else { > LOGGER.fine("Ignoring unsupported bean: " + beanName + attrName + ": " + > beanValue); return; } > > Is there any reason to do so ?Is jmx_exporter not expected to be returning > string ? > > If there is any alternative to get this metric out? > > -- > You received this message because you are subscribed to the Google Groups > "Prometheus Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/prometheus-users/1d46ce80-8787-4bfa-8ec8-6e36f6a688e9n%40googlegroups.com > <https://groups.google.com/d/msgid/prometheus-users/1d46ce80-8787-4bfa-8ec8-6e36f6a688e9n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/CAMV%3D_gYBFUCNeK6v3eg-gBp902GWp7OH2Zi-n-KjOO0KmUZxYw%40mail.gmail.com.

