我已按照here
的说明添加了JVM Monitoring插件。一切正常,我可以,但是现在我想添加更多的JMX指标。例如MemoryPool专用计数器
所以我已将此配置添加到/opt/stackdriver/collectd/etc/collectd.d/jvm-sun-hotspot.conf
<MBean "jvm_localhost_MemoryPool">
objectname "java.lang:type=MemoryPool,name=*"
InstanceFrom "name"
<Value>
Type "gauge"
InstancePrefix "memorypool-usage_used"
Table false
Attribute "Usage.used"
</Value>
</MBean>
和
Collect "jvm_localhost_MemoryPool"
在Connection
部分
它似乎是有效的收集配置,但是当它发送到Stackdriver / Google Cloud Monitoring时,它会被拒绝。
012 {#012 "index": 261,#012 "valueErrors": [#012 {#012 "error": {#012 "code": 3,#012 "message": "Unsupported
collectd id: plugin: \"jvm\" type: \"gauge\" type_instance: \"memorypool-usagecommitted\""#012 }#012 }#012 ]#012 },#012 {#012
"index": 262,#012 "message": "Unsupported collectd id: plug
in: \"jvm\" type: \"gauge\" type_instance: \"memorypool-usageinit\""#012 }#012 }#012 ]#012 },#012 {#012 "index": 263,#012
"valueErrors": [#012 {#012 "error": {#012 "code": 3,#012 "message": "Unsupported collectd id: plugin: \"jvm\" type: \"gau
ge\" type_instance: \"memorypool-usagemax\""#012 }#012 }#012 ]#012 },#012 {#012 "index": 264,#012 "valueErrors": [#012
{#012 "error": {#012 "code": 3,#012 "message": "Unsupported
根据我的理解,现在需要将其添加为自定义指标,但是this document建议将其自动创建。 确实,当我查看builtin jvm metrics的列表时,看不到它们如何映射到收集配置中的现有配置上。
例如os-open_fd_count
如何映射到os/open_files
?
查看Google custom collectd implementation发送的实际api请求会很有帮助,但是我看不到增加日志记录的方法。
我可以从this post看到我想查看的可能是自定义指标,但是如何在收集的配置中做到这一点?
我尝试过
InstancePrefix "custom.googleapis.com/memorypool-usage"
但仍然没有喜悦。
有人做过这件事吗,或者可以提供关于我做错事情的任何建议?