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

Fixes Solr JMX Metrics #223

Merged
merged 1 commit into from
Feb 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions jmx-metrics/src/main/resources/target-systems/solr.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
* limitations under the License.
*/

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

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

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