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

Metricbeat Operations Counter visualizations for Mongo broken (6.5.3) #9715

Closed
EthanStrider opened this issue Dec 20, 2018 · 5 comments
Closed
Assignees
Labels
bug :Dashboards Metricbeat Metricbeat module Team:Integrations Label for the Integrations team

Comments

@EthanStrider
Copy link

EthanStrider commented Dec 20, 2018

Specifically, the opcounters bit has changed to ops.counters

mongodb.status.ops.counters.command
mongodb.status.ops.counters.getmore
mongodb.status.ops.counters.insert
mongodb.status.ops.counters.query
mongodb.status.ops.replicated.update
mongodb.status.ops.counters.command

{
  "type": "area",
  "params": {
    "scale": "linear",
    "seriesParams": [
      {
        "showCircles": true,
        "show": "true",
        "type": "area",
        "interpolate": "linear",
        "mode": "stacked",
        "drawLinesBetweenPoints": true,
        "valueAxis": "ValueAxis-1",
        "data": {
          "id": "1",
          "label": "Count"
        }
      }
    ],
    "yAxis": {},
    "smoothLines": false,
    "categoryAxes": [
      {
        "style": {},
        "scale": {
          "type": "linear"
        },
        "show": true,
        "title": {},
        "labels": {
          "truncate": 100,
          "show": true
        },
        "position": "bottom",
        "type": "category",
        "id": "CategoryAxis-1"
      }
    ],
    "legendPosition": "bottom",
    "addTimeMarker": false,
    "interpolate": "linear",
    "addLegend": true,
    "shareYAxis": true,
    "grid": {
      "style": {
        "color": "#eee"
      },
      "categoryLines": false
    },
    "mode": "stacked",
    "type": "area",
    "defaultYExtents": false,
    "setYExtents": false,
    "addTooltip": true,
    "valueAxes": [
      {
        "style": {},
        "scale": {
          "type": "linear",
          "mode": "normal"
        },
        "name": "LeftAxis-1",
        "show": true,
        "title": {
          "text": "Count"
        },
        "labels": {
          "filter": false,
          "rotate": 0,
          "truncate": 100,
          "show": true
        },
        "position": "left",
        "type": "value",
        "id": "ValueAxis-1"
      }
    ],
    "times": []
  },
  "aggs": [
    {
      "params": {
        "field": "mongodb.status.opcounters.command",
        "customLabel": "command"
      },
      "type": "avg",
      "enabled": true,
      "id": "1",
      "schema": "metric"
    },
    {
      "params": {
        "customInterval": "2h",
        "field": "@timestamp",
        "interval": "auto",
        "min_doc_count": 1,
        "extended_bounds": {}
      },
      "type": "date_histogram",
      "enabled": true,
      "id": "2",
      "schema": "segment"
    },
    {
      "params": {
        "field": "mongodb.status.opcounters.delete",
        "customLabel": "delete"
      },
      "type": "avg",
      "enabled": true,
      "id": "3",
      "schema": "metric"
    },
    {
      "params": {
        "field": "mongodb.status.opcounters.getmore",
        "customLabel": "getmore"
      },
      "type": "avg",
      "enabled": true,
      "id": "4",
      "schema": "metric"
    },
    {
      "params": {
        "field": "mongodb.status.opcounters.insert",
        "customLabel": "insert"
      },
      "type": "avg",
      "enabled": true,
      "id": "5",
      "schema": "metric"
    },
    {
      "params": {
        "field": "mongodb.status.opcounters.query",
        "customLabel": "query"
      },
      "type": "avg",
      "enabled": true,
      "id": "6",
      "schema": "metric"
    },
    {
      "params": {
        "field": "mongodb.status.opcounters_replicated.update",
        "customLabel": "update"
      },
      "type": "avg",
      "enabled": true,
      "id": "7",
      "schema": "metric"
    }
  ],
  "title": "Operation counters [Metricbeat MongoDB]"
}
@ruflin ruflin added module Metricbeat Metricbeat Team:Integrations Label for the Integrations team labels Dec 21, 2018
@ruflin
Copy link
Member

ruflin commented Dec 21, 2018

@EthanStrider Do you mean we changed the naming on our end or mongodb changed it?

If I understand this correct, the visualisation is not working anymore. Do you have a screenshot by chance?

Did you use this also with older versions and know if it was working there?

@EthanStrider
Copy link
Author

EthanStrider commented Dec 21, 2018

Yes, it was working in older versions, and we upgraded and noticed everything was broken.

Specifically, it was working in v6.3.1

@sayden
Copy link
Contributor

sayden commented Dec 26, 2018

It seems a dashboard problem, I have this running Mongo 4.0.4 and master branch or version 6.5.4 of Metricbeat. I can see the counters in Discover so I guess it's some bug in the visualization:

{
  "@timestamp": "2018-12-26T13:27:40.485Z",
  "@metadata": {
    "beat": "metricbeat",
    "type": "_doc",
    "version": "7.0.0"
  },
  "metricset": {
    "name": "status"
  },
  "service": {
    "address": "localhost:27017",
    "type": "mongodb"
  },
  "mongodb": {
    "status": {
    ...
      "ops": {
        "counters": {
          "command": 798,
          "insert": 0,
          "query": 1,
          "update": 0,
          "delete": 0,
          "getmore": 0
        },
        "replicated": {
          "getmore": 0,
          "command": 0,
          "insert": 0,
          "query": 0,
          "update": 0,
          "delete": 0
        },
        "latencies": {
          "reads": {
            "latency": 0,
            "count": 0
          },
          "writes": {
            "latency": 0,
            "count": 0
          },
          "commands": {
            "latency": 144393,
            "count": 790
          }
        }
      },
    ...
  "agent": {
    "type": "metricbeat",
    "hostname": "mcastro",
    "version": "7.0.0"
  },
  "host": {
    "name": "mcastro",
    "os": {
      "name": "Antergos Linux",
      "kernel": "4.19.12-arch1-1-ARCH",
      "platform": "antergos",
      "version": "",
      "family": ""
    },
    "id": "54f70115bae545cbac2b150f254472a0",
    "containerized": false,
    "architecture": "x86_64"
  },
  "event": {
    "duration": 2880986,
    "dataset": "mongodb.status",
    "module": "mongodb"
  }
}

image

But it seems it can't find the host key either because metricbeat is not saving it on metricset key but in a full host object. I don't see anything in Javascript console either.

I'll try to take a look

@ruflin
Copy link
Member

ruflin commented Dec 27, 2018

@sayden For the metricset.host, this is now service.address, but please don't change it in master as we are changing all dashboards to ECS hopefully with a script. If you test with 6.x you should see metricset.host.

@sayden
Copy link
Contributor

sayden commented Jan 8, 2019

Fixed and merged into master and 6.x. Thanks for reporting @EthanStrider 🙂

@sayden sayden closed this as completed Jan 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug :Dashboards Metricbeat Metricbeat module Team:Integrations Label for the Integrations team
Projects
None yet
Development

No branches or pull requests

3 participants