wikiwi / stackdriver-agent

Stackdrivers Agent in a Docker Container.
MIT License
13 stars 14 forks source link

Logging on CoreOS (GCE with Containers Instance Group) produces errors/warnings #5

Open JanMikes opened 4 years ago

JanMikes commented 4 years ago

Hello,

We are using managed instance groups on Google Compute Engine with containers, os is powered by coreOS so stackdriver monitoring agent can not be installed directly to the host.
This way i have discovered your docker image and have tried it.

For me it seems that it sends metrics correctly to the stackdriver, but it produces a lot of warning/error output, like this:

[2019-09-24 10:07:58] write_gcm: Server response (CollectdTimeseriesRequest) contains errors:
{
  "payloadErrors": [
    {
      "index": 4,
      "error": {
        "code": 3,
        "message": "Expected 4 labels. Found 0. Mismatched labels for payload [values {\n  data_source_name: \"read\"\n  data_source_type: DERIVE\n  value {\n    int64_value: 0\n  }\n}\nvalues {\n  data_source_name: \"write\"\n  data_source_type: DERIVE\n  value {\n    int64_value: 1458176\n  }\n}\nstart_time {\n  seconds: 1569319197\n  nanos: 586014582\n}\nend_time {\n  seconds: 1569319617\n  nanos: 572968679\n}\nplugin: \"processes\"\nplugin_instance: \"all\"\ntype: \"disk_octets\"\n] on resource [type: \"gce_instance\"\nlabels {\n  key: \"instance_id\"\n  value: \"2178816110945768016\"\n}\nlabels {\n  key: \"zone\"\n  value: \"europe-west1-c\"\n}\n] for project 796672424361"
      }
    },
    {
      "index": 145,
      "error": {
        "code": 3,
        "message": "Expected 4 labels. Found 0. Mismatched labels for payload [values {\n  data_source_n
[2019-09-24 10:07:59] write_gcm: Server response (CollectdTimeseriesRequest) contains errors:
{
  "payloadErrors": [
    {
      "index": 4,
      "error": {
        "code": 3,
        "message": "Expected 4 labels. Found 0. Mismatched labels for payload [values {\n  data_source_name: \"read\"\n  data_source_type: DERIVE\n  value {\n    int64_value: 0\n  }\n}\nvalues {\n  data_source_name: \"write\"\n  data_source_type: DERIVE\n  value {\n    int64_value: 1544192\n  }\n}\nstart_time {\n  seconds: 1569319197\n  nanos: 586014582\n}\nend_time {\n  seconds: 1569319677\n  nanos: 571233591\n}\nplugin: \"processes\"\nplugin_instance: \"all\"\ntype: \"disk_octets\"\n] on resource [type: \"gce_instance\"\nlabels {\n  key: \"instance_id\"\n  value: \"2178816110945768016\"\n}\nlabels {\n  key: \"zone\"\n  value: \"europe-west1-c\"\n}\n] for project 796672424361"
      }
    }
  ]
}

I have started the container with this command

sudo docker run -e MONITOR_HOST=true -v /proc:/mnt/proc:ro --privileged wikiwi/stackdriver-agent

Do you have any idea how to fix this?