I'm configuring Stackdriver-agent in GCE VM to monitor Cassandra metrics. (based on GCP guide: https://cloud.google.com/monitoring/agent/plugins/cassandra)
I used the default setting of the link above, and they work fine. However, one metric I added doesn't work with the following error.
I tried gauge or counter for Type and Value or Count for Attribute. However, either of them doesn't work well.
Any suggestion, please.
- Error
Feb 19 23:14:08 pgxxxxxxx1 collectd[16917]: write_gcm: Server response (CollectdTimeseriesRequest) contains errors: { "payloadErrors": [ { "index": 161, "valueErrors": [ { "error": { "code": 3, "message": "Unsupported collectd id: plugin: \"cassandra\" type: \"gauge\" type_instance: \"cache_key_cache-hitrate\"" } } ] } ] }
Config (added KeyCache-Hitrate metrics to the original config in the guide)
Connection part:
<Connection> # When using non-standard Cassandra configurations, replace the below with #ServiceURL "service:jmx:rmi:///jndi/rmi://CASSANDRA_HOST:CASSANDRA_PORT/jmxrmi" ServiceURL "service:jmx:rmi:///jndi/rmi://localhost:7199/jmxrmi" InstancePrefix "cassandra" User "cassandra" Password "xxxxxxxx" Collect "cassandra_storageservice-load" Collect "cassandra_Cache_KeyCache-Hits" Collect "cassandra_Cache_KeyCache-HitRate" <===== Added line ... Collect "cassandra_DroppedMessage_MUTATION-Dropped" Collect "cassandra_DroppedMessage_READ-Dropped"
MBean part:
<MBean "cassandra_Cache_KeyCache-HitRate"> ObjectName "org.apache.cassandra.metrics:type=Cache,scope=KeyCache,name=HitRate" <Value> Type "gauge" InstancePrefix "cache_key_cache-hitrate" Table false Attribute "Value" </Value> </MBean>
My environment stackdriver-agent 5.5.2-379.sdl.stretch cassandra 3.11.1