Cannot query memory usage JMX


OpenNMS cannot query “memory usage”.

Any ideas?

minion : 26.1.0
opennms version 28.1.1

Should throw an exception in web.log. what does it say?

Caused by: org.apache.commons.jexl2.JexlException: org.opennms.netmgt.measurements.impl.JEXLExpressionEngine.applyExpressions@119![2,20]: ‘((freemem / totalmem) * 100);’ divide error

2022-01-04 16:58:58,333 WARN [qtp272945536-17274522] o.o.n.m.i.NewtsFetchStrategy: Requested step size 115046 is too small. Using 300000.
2022-01-04 16:58:58,380 ERROR [qtp272945536-17274522] o.o.w.r.v.MeasurementsRestService: An error occurred while evaluating an expression: Failed to evaluate expression with label ‘percentfree’.
org.opennms.netmgt.measurements.api.exceptions.ExpressionException: Failed to evaluate expression with label ‘percentfree’.

One of these values is coming back zero, so the divide operation fails. I’d check those metrics with jconsole, or hawtio, or something and see if we’re collecting valid metrics?

I would suggest making sure your Minion and Core servers are at least the same major version. You mentioned core at 28 and minion at 26. Upgrading the minion to 28 is best (though may not specifically fix this issue)

Thanks! Yes, we have talked about it and guessed that it should work after a update.