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

Elastic agent monitoring logs/metrics doesn't have elastic.agent.* fields #21864

Closed
jen-huang opened this issue Oct 15, 2020 · 1 comment · Fixed by #21994
Closed

Elastic agent monitoring logs/metrics doesn't have elastic.agent.* fields #21864

jen-huang opened this issue Oct 15, 2020 · 1 comment · Fixed by #21994
Assignees
Labels

Comments

@jen-huang
Copy link

jen-huang commented Oct 15, 2020

  • Version: 7.10 BC2
  • Operating System: macOS
  • Steps to Reproduce:

Using Kibana main from source and enrolling an agent into Fleet's Default policy (with no modifications), observe that the new elastic.agent.* fields added in #21543 is not present on agent monitoring logs and metrics.

Example agent log document
{
  "_index": ".ds-logs-elastic.agent.metricbeat-default-000001",
  "_id": "7yWzLXUBvUnvvQmqzhbS",
  "_version": 1,
  "_score": null,
  "_source": {
    "@timestamp": "2020-10-15T19:19:19.017Z",
    "agent": {
      "type": "filebeat",
      "version": "7.10.0",
      "hostname": "jens-mbp.lan",
      "ephemeral_id": "e0d9ef91-840c-4894-a89f-0f77f949eec6",
      "id": "84550472-23f7-49d3-9a1b-27333f5a69bc",
      "name": "jens-mbp.lan"
    },
    "container": {
      "id": "elastic-agent-7.10.0-darwin-x86_64"
    },
    "log.level": "debug",
    "log.origin": {
      "file.line": 160,
      "file.name": "memqueue/ackloop.go"
    },
    "message": "ackloop: receive ack [255: 0, 34]",
    "input": {
      "type": "log"
    },
    "data_stream": {
      "namespace": "default",
      "type": "logs",
      "dataset": "elastic.agent.metricbeat"
    },
    "event": {
      "dataset": "elastic.agent.metricbeat"
    },
    "ecs": {
      "version": "1.6.0"
    },
    "host": {
      "name": "jens-mbp.lan",
      "mac": ["REDACTED"],
      "hostname": "jens-mbp.lan",
      "architecture": "x86_64",
      "os": {
        "name": "Mac OS X",
        "kernel": "18.7.0",
        "build": "18G2022",
        "platform": "darwin",
        "version": "10.14.6",
        "family": "darwin"
      },
      "id": "88769239-A9C7-5D8C-8907-ADA0E530270F",
      "ip": ["REDACTED"]
    },
    "log.logger": "publisher",
    "log": {
      "offset": 2029125,
      "file": {
        "path": "/Users/jen/Projects/elastic/elastic-agent-7.10.0-darwin-x86_64/data/elastic-agent-81dc89/logs/default/metricbeat-json.log"
      }
    },
    "ecs.version": "1.5.0"
  },
  "fields": {
    "@timestamp": [
      "2020-10-15T19:19:19.017Z"
    ]
  },
  "sort": [
    1602789559017
  ]
}
Example agent metrics document
{
  "_index": ".ds-metrics-elastic.agent.metricbeat-default-000001",
  "_id": "iyW1LXUBvUnvvQmqeBrk",
  "_score": 1,
  "_source": {
    "@timestamp": "2020-10-15T19:21:08.088Z",
    "host": {
      "name": "jens-mbp.lan",
      "mac": ["REDACTED"],
      "hostname": "jens-mbp.lan",
      "architecture": "x86_64",
      "os": {
        "kernel": "18.7.0",
        "build": "18G2022",
        "platform": "darwin",
        "version": "10.14.6",
        "family": "darwin",
        "name": "Mac OS X"
      },
      "id": "88769239-A9C7-5D8C-8907-ADA0E530270F",
      "ip": ["REDACTED"]
    },
    "agent": {
      "id": "1ba472c0-e052-42b2-a65d-094a8f088d61",
      "name": "jens-mbp.lan",
      "type": "metricbeat",
      "version": "7.10.0",
      "hostname": "jens-mbp.lan",
      "ephemeral_id": "494cb464-e3de-4fd2-be24-6cef1bf624b4"
    },
    "service": {
      "name": "beat",
      "address": "http://unix/stats",
      "type": "beat"
    },
    "event": {
      "dataset": "elastic.agent.metricbeat",
      "module": "beat",
      "duration": 1983563
    },
    "metricset": {
      "name": "stats",
      "period": 10000
    },
    "beat": {
      "id": "b6cee87b-c4bb-4dec-8746-ff2cd8a08f12",
      "type": "metricbeat",
      "stats": {
        "uptime": {
          "ms": 2664389
        },
        "runtime": {
          "goroutines": 100
        },
        "libbeat": {
          "output": {
            "type": "elasticsearch",
            "events": {
              "dropped": 0,
              "duplicates": 0,
              "failed": 0,
              "toomany": 0,
              "total": 9388,
              "acked": 9388,
              "active": 0,
              "batches": 266
            },
            "read": {
              "errors": 0,
              "bytes": 175048
            },
            "write": {
              "bytes": 16406533,
              "errors": 0
            }
          }
        }
      }
    },
    "data_stream": {
      "type": "metrics",
      "dataset": "elastic.agent.metricbeat",
      "namespace": "default"
    },
    "ecs": {
      "version": "1.6.0"
    }
  },
  "fields": {
    "@timestamp": [
      "2020-10-15T19:21:08.088Z"
    ]
  }
}

Note that the elastic.agent.* fields are present for non-agent monitoring data, for example in system metrics:

Example system.network metric doc
{
  "_index": ".ds-metrics-system.network-default-000001",
  "_id": "kiW3LXUBvUnvvQmqwB8O",
  "_version": 1,
  "_score": null,
  "_source": {
    "@timestamp": "2020-10-15T19:23:37.393Z",
    "metricset": {
      "period": 10000,
      "name": "network"
    },
    "event": {
      "dataset": "system.network",
      "module": "system",
      "duration": 8961898
    },
    "agent": {
      "type": "metricbeat",
      "version": "7.10.0",
      "hostname": "jens-mbp.lan",
      "ephemeral_id": "21bfafa7-96aa-4243-ac41-cbb6b54721cc",
      "id": "b6cee87b-c4bb-4dec-8746-ff2cd8a08f12",
      "name": "jens-mbp.lan"
    },
    "ecs": {
      "version": "1.6.0"
    },
    "host": {
      "hostname": "jens-mbp.lan",
      "architecture": "x86_64",
      "os": {
        "platform": "darwin",
        "version": "10.14.6",
        "family": "darwin",
        "name": "Mac OS X",
        "kernel": "18.7.0",
        "build": "18G2022"
      },
      "id": "88769239-A9C7-5D8C-8907-ADA0E530270F",
      "ip": ["REDACTED"],
      "name": "jens-mbp.lan",
      "mac": ["REDACTED"]
    },
    "service": {
      "type": "system"
    },
    "system": {
      "network": {
        "in": {
          "errors": 0,
          "dropped": 0,
          "bytes": 2031290455,
          "packets": 21582161
        },
        "out": {
          "bytes": 2031290455,
          "errors": 0,
          "dropped": 0,
          "packets": 21582161
        },
        "name": "lo0"
      }
    },
    "data_stream": {
      "dataset": "system.network",
      "namespace": "default",
      "type": "metrics"
    },
    "elastic": {
      "agent": {
        "snapshot": false,
        "version": "7.10.0",
        "id": "ba93853d-ec0d-4518-b608-c032f9682ece"
      }
    }
  },
  "fields": {
    "@timestamp": [
      "2020-10-15T19:23:37.393Z"
    ]
  },
  "sort": [
    1602789817393
  ]
}
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ingest-management (Team:Ingest Management)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants