Skip to content

Commit ed5c91e

Browse files
authored
Fixes solr JMX metrics to use all possible MBeans instead of only first (#223)
1 parent eef8c17 commit ed5c91e

File tree

1 file changed

+3
-3
lines changed
  • jmx-metrics/src/main/resources/target-systems

1 file changed

+3
-3
lines changed

jmx-metrics/src/main/resources/target-systems/solr.groovy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
* limitations under the License.
1515
*/
1616

17-
def beanSolrCoreSearcherNumDocs = otel.mbean("solr:dom1=core,dom2=*,category=SEARCHER,scope=searcher,name=numDocs")
17+
def beanSolrCoreSearcherNumDocs = otel.mbeans("solr:dom1=core,dom2=*,category=SEARCHER,scope=searcher,name=numDocs")
1818
otel.instrument(beanSolrCoreSearcherNumDocs, "solr.document.count", "The total number of indexed documents.", "{documents}",
1919
["core" : { mbean -> mbean.name().getKeyProperty("dom2") }],
2020
"Value", otel.&longUpDownCounterCallback)
2121

22-
def beanSolrCoreIndexSize = otel.mbean("solr:dom1=core,dom2=*,category=INDEX,name=sizeInBytes")
22+
def beanSolrCoreIndexSize = otel.mbeans("solr:dom1=core,dom2=*,category=INDEX,name=sizeInBytes")
2323
otel.instrument(beanSolrCoreIndexSize, "solr.index.size", "The total index size.", "by",
2424
["core" : { mbean -> mbean.name().getKeyProperty("dom2") }],
2525
"Value", otel.&longUpDownCounterCallback)
@@ -58,7 +58,7 @@ otel.instrument(beanSolrCoreTimeouts, "solr.request.timeout.count", "The number
5858
"handler" : { mbean -> mbean.name().getKeyProperty("scope") }],
5959
"Count", otel.&longCounterCallback)
6060

61-
def beanSolrCoreQueryResultsCache = otel.mbean("solr:dom1=core,dom2=*,category=CACHE,scope=*,name=queryResultCache")
61+
def beanSolrCoreQueryResultsCache = otel.mbeans("solr:dom1=core,dom2=*,category=CACHE,scope=*,name=queryResultCache")
6262
otel.instrument(beanSolrCoreQueryResultsCache, "solr.cache.eviction.count", "The number of evictions from a cache.", "{evictions}",
6363
["core" : { mbean -> mbean.name().getKeyProperty("dom2") },
6464
"cache" : { mbean -> mbean.name().getKeyProperty("scope") }],

0 commit comments

Comments
 (0)