Details
-
Bug
-
Resolution: Fixed
-
Major
-
3.22.0
Description
When calling the prometheus metrics endpoint /service/metrics/prometheus it is expected that this will be zero-cost CPU such that it simply returns precalculated values.
It seems that there may be some analytics or other calculations performed at runtime that could scale in cost depending on the enviroment.
For example each time the endpoint is called, a select is performed to count all records in the asset table per repository:
2020-06-10 14:37:05,899-0500 DEBUG [qtp1842354020-50] admin org.sonatype.nexus.internal.orient.DatabaseManagerImpl - Opened database: component -> com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx@298e0ce0
2020-06-10 14:37:05,900-0500 DEBUG [qtp1842354020-50] admin org.sonatype.nexus.orient.entity.EntityHook - Unregistering OLiveQueryHook
2020-06-10 14:37:05,901-0500 DEBUG [qtp1842354020-50] admin org.sonatype.nexus.repository.storage.AssetEntityAdapter - Counting assets with query: select count
from asset where (bucket=[54]:0), parameters: null
2020-06-10 14:37:05,902-0500 DEBUG [qtp1842354020-50] admin org.sonatype.nexus.orient.entity.EntityHook - Unregistering OLiveQueryHook
2020-06-10 14:37:05,903-0500 DEBUG [qtp1842354020-50] admin org.sonatype.nexus.internal.orient.DatabaseManagerImpl - Opened database: component -> com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx@d5786b9
2020-06-10 14:37:05,904-0500 DEBUG [qtp1842354020-50] admin org.sonatype.nexus.orient.entity.EntityHook - Unregistering OLiveQueryHook
2020-06-10 14:37:05,905-0500 DEBUG [qtp1842354020-50] admin org.sonatype.nexus.repository.storage.AssetEntityAdapter - Counting assets with query: select count
from asset where (bucket=[53]:0), parameters: null
2020-06-10 14:37:05,906-0500 DEBUG [qtp1842354020-50] admin org.sonatype.nexus.orient.entity.EntityHook - Unregistering OLiveQueryHook
If this is the case, it would be beneficial for most monitoring to have at least two endpoints - one that is as close to zero-cost as possible, and one that has additional metrics as required - as many systems, especially cloud-hosted, may call the basic monitoring endpoint frequently as to provide a suitably granular level of monitoring and alerts.
For example, Cloudwatch can now manage prometheus metrics.
Attachments
Issue Links
- is related to
-
NEXUS-24090 create a how to monitor Nexus Repository performance guide
-
- New
-