Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: allow to exclude specific attribute patterns inside a composite attribute #961

Open
ecerulm opened this issue May 28, 2024 · 3 comments

Comments

@ecerulm
Copy link

ecerulm commented May 28, 2024

Taking Tableau JMX as example, it has a tableau.health.jmx:name=vizqlservice bean with a composite attribute called PerformanceMetrics this attribute has hundreds of attribute inside like ActiveSessions, SessionsInFlightCount, etc.. There is really a lot of them.

Let's say that I want to filter all those that are *P90, *P75, *P25, etc..

I believe this filtering cannot be done today in jmxexporter itself. It allows to exclude based on the attribute name PerformanceMetrics but not on the attributes inside the composite attribute (AFAIK).

Here is the config.yaml that I'm using

cat jmxexporter_vizqlserver1_config.yaml 
---
jmxUrl: service:jmx:rmi:///jndi/rmi://127.0.0.1:8893/jmxrmi
includeObjectNames:
        - "java.lang:type=Memory,*"
        - "tableau.health.jmx:*"
excludeObjectNameAttributes:
        "java.lang:type=Memory":
                - NonHeapMemoryUsage
                - Verbose
                - ObjectPendingFinalizationCount
        "tableau.health.jmx:name=vizqlservice":
                - "PerformanceMetrics,SessionsSharableIdleTimeP99"

If there is any way to address the attributes inside a composite attribute from excludeObjectNameAttributes in current release it's not clear to me how to do it, some maybe it would be good to include an example in the docs.

@dhoard
Copy link
Collaborator

dhoard commented May 28, 2024

@ecerulm the current functionality expects a simple case-sensitive attribute name.

excludeObjectNameAttributes:
        "java.lang:type=Memory":
                - NonHeapMemoryUsage
                - Verbose
                - ObjectPendingFinalizationCount

I added NonHeapMemoryUsage, Verbose, and ObjectPendingFinalizationCount to the ExcludeObjectNameAttributesTest test as an example.


For your scenario, can you provide a full dump of the MBean ObjectName and attributes?

@ecerulm
Copy link
Author

ecerulm commented May 28, 2024

@dhoard ,

The full MBean ObjectName is in the OP

tableau.health.jmx:name=vizqlservice

that MBean has a single attribute called PerformanceMetrics which is a composite attribute

Here is a jmxterm that shows the bean and composite attribute:

 java --add-exports jdk.jconsole/sun.tools.jconsole=ALL-UNNAMED -jar jmxterm-1.0.4-uber.jar -v verbose
Delete /home/ubuntu/.jmxterm_history if you encounter error right after launching me.
Welcome to JMX terminal. Type "help" for available commands
$>open service:jmx:rmi:///jndi/rmi://127.0.0.1:8750/jmxrmi
#Connection to service:jmx:rmi:///jndi/rmi://127.0.0.1:8750/jmxrmi is opened
$>bean tableau.health.jmx:name=vizqlservice
#bean is set to tableau.health.jmx:name=vizqlservice
>info
#mbean = tableau.health.jmx:name=vizqlservice
#class name = com.tableausoftware.health.performancecounter.jmx.JMXMonitoringView
# attributes
  %0   - PerformanceMetrics (javax.management.openmbean.CompositeData, r)
# operations
  %0   - javax.management.openmbean.CompositeData getPerformanceMetrics()
#there's no notifications
$>get PerformanceMetrics
#mbean = tableau.health.jmx:name=vizqlservice:
PerformanceMetrics = { 
  ActiveSessions = 0;
  Bootstraps = 0;
  BootstrapsDeferred = 0;
  BootstrapsDeferredThenPerformed = 0;
  DataserverInserters = 0;
  DataserverLockedSessions = 0;
  DataserverTempTables = 0;
  DataserverTuples = 0;
  DataserverUnlockedSessions = 0;
  ExternalAbstractQueryCacheHits = 0;
  ExternalAbstractQueryCacheMisses = 0;
  ExternalLogicalQueryCacheHits = 0;
  ExternalLogicalQueryCacheMisses = 0;
  ExternalMetadataCacheHits = 0;
  ExternalMetadataCacheMisses = 0;
  ExternalNativeQueryCacheHits = 0;
  ExternalNativeQueryCacheMisses = 0;
  ExternalQueryCacheLoadTimeouts = 0;
  ExternalWorkbookAttributesCacheHits = 0;
  ExternalWorkbookAttributesCacheMisses = 0;
  GetDomCacheHits = 0;
  GetDomCacheMisses = 0;
  IdleSessionsIdleCount = 0;
  IdleSessionsInFlightCount = 0;
  IdleSessionsInMemoryCount = 0;
  IdleSessionsModifiedCount = 0;
  IdleSessionsPrivateCount = 0;
  IdleSessionsReadOnlyCount = 0;
  IdleSessionsSharableCount = 0;
  IdleSessionsSharedCount = 0;
  ImageCacheHits = 0;
  ImageCacheMisses = 0;
  InProcessAbstractQueryCacheHits = 0;
  InProcessAbstractQueryCacheMisses = 0;
  InProcessLogicalQueryCacheHits = 0;
  InProcessLogicalQueryCacheMisses = 0;
  InProcessMetadataCacheHits = 0;
  InProcessMetadataCacheMisses = 0;
  InProcessNativeQueryCacheHits = 0;
  InProcessNativeQueryCacheMisses = 0;
  InQueueAssociateExtractWithSession = 0;
  InQueueRecordViewStats = 0;
  IsDrainingAndWontAcceptNewSessions = 0;
  IsHigheMemUseAndWontAcceptNewSessions = 0;
  MappedImageCacheDrops = 0;
  MappedImageCacheHits = 0;
  MappedImageCacheMisses = 0;
  MappedImageCacheStores = 0;
  MetricsManagerItemsInQueue = 2;
  MetricsMonitorContextsClosed = 348;
  MetricsMonitorContextsCreated = 358;
  MetricsMonitorRequestContextsClosed = 5;
  MetricsMonitorRequestContextsCreated = 8;
  MetricsMonitorScopesClosed = 238;
  MetricsMonitorScopesOpened = 248;
  ProtocolGroupInstanceCount = 0;
  ProtocolInstanceCount = 0;
  QueryCacheAbstractQueryTryStoreCalls = 0;
  QueryCacheLogicalQueryTryStoreCalls = 0;
  QueryCacheMetadataTryStoreCalls = 0;
  QueryCacheNativeQueryTryStoreCalls = 0;
  RedisConnectionPoolBlockedRequests = 0;
  RedisPubsubPlaceholderSize = 0;
  RedisPubsubSavedMessages = 0;
  RedisPubsubWastedMessages = 323;
  RedisRecoveryServiceStoreFails = 0;
  RedisRecoveryServiceStoreSuccesses = 0;
  ResponseCacheInvalidatorEntries = 0;
  ResponseCacheInvalidatorTotalKeySizeBytes = 0;
  SceneModelCacheHits = 0;
  SceneModelCacheMisses = 0;
  ServerBootstrapResponseCacheDropFails = 0;
  ServerBootstrapResponseCacheDropSuccesses = 0;
  ServerBootstrapResponseCacheHits = 0;
  ServerBootstrapResponseCacheMisses = 0;
  ServerBootstrapResponseCacheStoreFails = 0;
  ServerBootstrapResponseCacheStoreSuccesses = 0;
  SessionSharedDataInstanceCount = 0;
  SessionsIdleAgeMax = 0;
  SessionsIdleAgeMin = 0;
  SessionsIdleAgeP01 = 0;
  SessionsIdleAgeP05 = 0;
  SessionsIdleAgeP10 = 0;
  SessionsIdleAgeP25 = 0;
  SessionsIdleAgeP50 = 0;
  SessionsIdleAgeP75 = 0;
  SessionsIdleAgeP90 = 0;
  SessionsIdleAgeP95 = 0;
  SessionsIdleAgeP99 = 0;
  SessionsIdleCount = 0;
  SessionsIdleIdleTimeMax = 0;
  SessionsIdleIdleTimeMin = 0;
  SessionsIdleIdleTimeP01 = 0;
  SessionsIdleIdleTimeP05 = 0;
  SessionsIdleIdleTimeP10 = 0;
  SessionsIdleIdleTimeP25 = 0;
  SessionsIdleIdleTimeP50 = 0;
  SessionsIdleIdleTimeP75 = 0;
  SessionsIdleIdleTimeP90 = 0;
  SessionsIdleIdleTimeP95 = 0;
  SessionsIdleIdleTimeP99 = 0;
  SessionsInFlight = 0;
  SessionsInFlightAgeMax = 0;
  SessionsInFlightAgeMin = 0;
  SessionsInFlightAgeP01 = 0;
  SessionsInFlightAgeP05 = 0;
  SessionsInFlightAgeP10 = 0;
  SessionsInFlightAgeP25 = 0;
  SessionsInFlightAgeP50 = 0;
  SessionsInFlightAgeP75 = 0;
  SessionsInFlightAgeP90 = 0;
  SessionsInFlightAgeP95 = 0;
  SessionsInFlightAgeP99 = 0;
  SessionsInFlightCount = 0;
  SessionsInFlightIdleTimeMax = 0;
  SessionsInFlightIdleTimeMin = 0;
  SessionsInFlightIdleTimeP01 = 0;
  SessionsInFlightIdleTimeP05 = 0;
  SessionsInFlightIdleTimeP10 = 0;
  SessionsInFlightIdleTimeP25 = 0;
  SessionsInFlightIdleTimeP50 = 0;
  SessionsInFlightIdleTimeP75 = 0;
  SessionsInFlightIdleTimeP90 = 0;
  SessionsInFlightIdleTimeP95 = 0;
  SessionsInFlightIdleTimeP99 = 0;
  SessionsInMemory = 0;
  SessionsInMemoryAgeMax = 0;
  SessionsInMemoryAgeMin = 0;
  SessionsInMemoryAgeP01 = 0;
  SessionsInMemoryAgeP05 = 0;
  SessionsInMemoryAgeP10 = 0;
  SessionsInMemoryAgeP25 = 0;
  SessionsInMemoryAgeP50 = 0;
  SessionsInMemoryAgeP75 = 0;
  SessionsInMemoryAgeP90 = 0;
  SessionsInMemoryAgeP95 = 0;
  SessionsInMemoryAgeP99 = 0;
  SessionsInMemoryCount = 0;
  SessionsInMemoryIdleTimeMax = 0;
  SessionsInMemoryIdleTimeMin = 0;
  SessionsInMemoryIdleTimeP01 = 0;
  SessionsInMemoryIdleTimeP05 = 0;
  SessionsInMemoryIdleTimeP10 = 0;
  SessionsInMemoryIdleTimeP25 = 0;
  SessionsInMemoryIdleTimeP50 = 0;
  SessionsInMemoryIdleTimeP75 = 0;
  SessionsInMemoryIdleTimeP90 = 0;
  SessionsInMemoryIdleTimeP95 = 0;
  SessionsInMemoryIdleTimeP99 = 0;
  SessionsModifiedAgeMax = 0;
  SessionsModifiedAgeMin = 0;
  SessionsModifiedAgeP01 = 0;
  SessionsModifiedAgeP05 = 0;
  SessionsModifiedAgeP10 = 0;
  SessionsModifiedAgeP25 = 0;
  SessionsModifiedAgeP50 = 0;
  SessionsModifiedAgeP75 = 0;
  SessionsModifiedAgeP90 = 0;
  SessionsModifiedAgeP95 = 0;
  SessionsModifiedAgeP99 = 0;
  SessionsModifiedCount = 0;
  SessionsModifiedIdleTimeMax = 0;
  SessionsModifiedIdleTimeMin = 0;
  SessionsModifiedIdleTimeP01 = 0;
  SessionsModifiedIdleTimeP05 = 0;
  SessionsModifiedIdleTimeP10 = 0;
  SessionsModifiedIdleTimeP25 = 0;
  SessionsModifiedIdleTimeP50 = 0;
  SessionsModifiedIdleTimeP75 = 0;
  SessionsModifiedIdleTimeP90 = 0;
  SessionsModifiedIdleTimeP95 = 0;
  SessionsModifiedIdleTimeP99 = 0;
  SessionsPrivateAgeMax = 0;
  SessionsPrivateAgeMin = 0;
  SessionsPrivateAgeP01 = 0;
  SessionsPrivateAgeP05 = 0;
  SessionsPrivateAgeP10 = 0;
  SessionsPrivateAgeP25 = 0;
  SessionsPrivateAgeP50 = 0;
  SessionsPrivateAgeP75 = 0;
  SessionsPrivateAgeP90 = 0;
  SessionsPrivateAgeP95 = 0;
  SessionsPrivateAgeP99 = 0;
  SessionsPrivateCount = 0;
  SessionsPrivateIdleTimeMax = 0;
  SessionsPrivateIdleTimeMin = 0;
  SessionsPrivateIdleTimeP01 = 0;
  SessionsPrivateIdleTimeP05 = 0;
  SessionsPrivateIdleTimeP10 = 0;
  SessionsPrivateIdleTimeP25 = 0;
  SessionsPrivateIdleTimeP50 = 0;
  SessionsPrivateIdleTimeP75 = 0;
  SessionsPrivateIdleTimeP90 = 0;
  SessionsPrivateIdleTimeP95 = 0;
  SessionsPrivateIdleTimeP99 = 0;
  SessionsReadOnlyAgeMax = 0;
  SessionsReadOnlyAgeMin = 0;
  SessionsReadOnlyAgeP01 = 0;
  SessionsReadOnlyAgeP05 = 0;
  SessionsReadOnlyAgeP10 = 0;
  SessionsReadOnlyAgeP25 = 0;
  SessionsReadOnlyAgeP50 = 0;
  SessionsReadOnlyAgeP75 = 0;
  SessionsReadOnlyAgeP90 = 0;
  SessionsReadOnlyAgeP95 = 0;
  SessionsReadOnlyAgeP99 = 0;
  SessionsReadOnlyCount = 0;
  SessionsReadOnlyIdleTimeMax = 0;
  SessionsReadOnlyIdleTimeMin = 0;
  SessionsReadOnlyIdleTimeP01 = 0;
  SessionsReadOnlyIdleTimeP05 = 0;
  SessionsReadOnlyIdleTimeP10 = 0;
  SessionsReadOnlyIdleTimeP25 = 0;
  SessionsReadOnlyIdleTimeP50 = 0;
  SessionsReadOnlyIdleTimeP75 = 0;
  SessionsReadOnlyIdleTimeP90 = 0;
  SessionsReadOnlyIdleTimeP95 = 0;
  SessionsReadOnlyIdleTimeP99 = 0;
  SessionsSharableAgeMax = 0;
  SessionsSharableAgeMin = 0;
  SessionsSharableAgeP01 = 0;
  SessionsSharableAgeP05 = 0;
  SessionsSharableAgeP10 = 0;
  SessionsSharableAgeP25 = 0;
  SessionsSharableAgeP50 = 0;
  SessionsSharableAgeP75 = 0;
  SessionsSharableAgeP90 = 0;
  SessionsSharableAgeP95 = 0;
  SessionsSharableAgeP99 = 0;
  SessionsSharableCount = 0;
  SessionsSharableIdleTimeMax = 0;
  SessionsSharableIdleTimeMin = 0;
  SessionsSharableIdleTimeP01 = 0;
  SessionsSharableIdleTimeP05 = 0;
  SessionsSharableIdleTimeP10 = 0;
  SessionsSharableIdleTimeP25 = 0;
  SessionsSharableIdleTimeP50 = 0;
  SessionsSharableIdleTimeP75 = 0;
  SessionsSharableIdleTimeP90 = 0;
  SessionsSharableIdleTimeP95 = 0;
  SessionsSharableIdleTimeP99 = 0;
  SessionsSharedAgeMax = 0;
  SessionsSharedAgeMin = 0;
  SessionsSharedAgeP01 = 0;
  SessionsSharedAgeP05 = 0;
  SessionsSharedAgeP10 = 0;
  SessionsSharedAgeP25 = 0;
  SessionsSharedAgeP50 = 0;
  SessionsSharedAgeP75 = 0;
  SessionsSharedAgeP90 = 0;
  SessionsSharedAgeP95 = 0;
  SessionsSharedAgeP99 = 0;
  SessionsSharedCount = 0;
  SessionsSharedIdleTimeMax = 0;
  SessionsSharedIdleTimeMin = 0;
  SessionsSharedIdleTimeP01 = 0;
  SessionsSharedIdleTimeP05 = 0;
  SessionsSharedIdleTimeP10 = 0;
  SessionsSharedIdleTimeP25 = 0;
  SessionsSharedIdleTimeP50 = 0;
  SessionsSharedIdleTimeP75 = 0;
  SessionsSharedIdleTimeP90 = 0;
  SessionsSharedIdleTimeP95 = 0;
  SessionsSharedIdleTimeP99 = 0;
  SharedSessionsCacheSyncInvalidationMisses = 0;
  SharedSessionsCacheSyncInvalidations = 0;
  SharedSessionsFullMatchWithStaleData = 0;
  SharedSessionsFullPossibleCandidateHits = 0;
  SharedSessionsFullSharedHits = 0;
  SharedSessionsLoadWorkbookTotalHits = 0;
  SharedSessionsPartialPossibleCandidateHits = 0;
  SharedSessionsPartialSharedHits = 0;
  SharedSessionsPossibleCandidateInserts = 0;
  SharedSessionsTransitionsToPrivateSessionData = 0;
  StickySessionExternalCacheHits = 0;
  TLogEventsErrorCount = 0;
  TLogEventsFatalCount = 0;
  TLogEventsWarningCount = 0;
  TotalRecoveryAttempts = 0;
  VisualModelCacheHits = 0;
  VisualModelCacheMisses = 0;
  VisualModelCachePartialHits = 0;
  WorkbookAttributesParseCacheHits = 0;
  WorkbookAttributesParseCacheMisses = 0;
  WorkbookPersistenceRecoveryServiceStoreFails = 0;
  WorkbookPersistenceRecoveryServiceStoreSuccesses = 0;
 };

As you can see the PerformanceMetrics composite attribute has 285 "simple" attributes inside. I'm only interested in a couple of those, I can filter those in the scraping side (I believe) but I was interested on filtering it already at the jmxexporter side.

@dhoard
Copy link
Collaborator

dhoard commented May 28, 2024

@ecerulm thanks for the details information!

excludeObjectNameAttributes was only implemented for simple attribute values. More work will be needed to support composite attributes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants