08 Jul 2024
05:59 PM
- last edited on
12 Aug 2024
08:28 AM
by
Michal_Gebacki
Hi all,
Question about the metric tomcat.connectionPool.activeConnections, coming from the Tomcat Connection Pool extension : how come can it return negative values ?
Checking other connection pool activity metrics description, negative values could indicate that the value could not be retrieved. But it seems odd that these negative values are aggregated with others, thus making the aggregated value irrelevant.
If I change the aggregation value to "Max", the graphs does not show this nonsense anymore :
As I would like to exhibit the activity of the database connexions, having a MAX-type aggregation will not change much to me (thinking about it, might even be a better KPI), but I am still worried about these negative values.
The main reason is that, in case of the Extension not being able to retrieve the value, one would assume the only negative value to be returned would be "-1".
It is not the case here ; using the MIN-type aggregation, it plunges deeper, to a minimum of -8 :
What would those negative values mean, in termes of absolute value ?
Solved! Go to Solution.
08 Jul 2024 09:57 PM
The JMX data source won't make up a number or default to something like -1 if it can't collect something. If you see a number that is most likely simply what Tomcat is reporting. This comes from the Mbean Catalina:type=DataSource with the attribute numActive.
What you should check is during a period when you see this behavior, use something like JConsole to independently see what Tomcat is reporting for this MBean's attribute. If you see similar reporting there it is likely some issue with Tomcat and what it is reporting to Dynatrace.
I'd also suggest splitting by all of the available dimensions (e.g. name, class, context, and host) for this metric which may reveal something not obvious when only splitting by host.