Splunk Observability Cloud

Health check extension shows "Server not available" after adding smartagent/jmx receiver?

Mironiken
New Member

I am using Splunk Distribution of OpenTelemetry Collector in kubernetes. Current solution is working just fine. But after I added section for the smartagent/jmx receiver with groovy script inside, healthcheck starts to show "Server not available" status.  Groovy script works, logs includes several

2022-11-07T11:12:14.730Z error subproc/core.go:114 Get result, and sent:0 {"kind": "receiver", "name": "smartagent/jmx", "pipeline": "metrics", "monitorID": "smartagentjmx", "monitorType": "jmx", "runnerPID": 42}

(I just added stderr to script)

There are not any other warn/errors in logs. Kubernetes just kills pod cause healthcheck.  My jmx config:

smartagent/jmx:
type: jmx
host: 0.0.0.0
port: 9999
intervalSeconds: 2
groovyScript: |
def printErr = System.err.&println
ss = util.queryJMX("com.hazelcast:name=MAP_NAME,instance=*,type=IMap").first()
dims = [env_name: "NAME"]
output.sendDatapoint(util.makeGauge("hazelcast.map.size", ss.size, dims))
printErr("Get result, and sent:" + ss.size)

Tell me where and how to dig? 

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...