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 collection of ES monitoring data is inconsistent for the license field #14541

Closed
chrisronline opened this issue Nov 15, 2019 · 3 comments · Fixed by #14591
Closed

Comments

@chrisronline
Copy link
Contributor

This was tested on the latest master of each product (ES and beats)

I have a CCS scenario setup with cluster A (prod) and cluster B (Monitoring). I have configured metricbeat to collect and ship monitoring data to cluster B. I have configured CCS from cluster A to cluster B.

This query:

POST Monitoring:.monitoring-es-7-2019.11.15/_search?filter_path=hits.hits._source.license
{
  "size": 1,
  "sort": [
    {
      "timestamp": {
        "order": "desc"
      }
    }
  ]
}

yields:

{
  "hits" : {
    "hits" : [
      {
        "_source" : {
          "license" : {
            "status" : "active",
            "uid" : "ac93a382-2cb3-4e03-b14b-ac1664ce456c",
            "type" : "basic",
            "issue_date" : "2019-11-15T14:39:30.697Z",
            "issue_date_in_millis" : 1573828770697,
            "max_nodes" : 1000,
            "issued_to" : "MonitoringCluster",
            "issuer" : "elasticsearch",
            "start_date_in_millis" : -1
          }
        }
      }
    ]
  }
}

Note that there is no expiry_date_in_millis field.

Then, this query:

POST Monitoring:.monitoring-es-7-mb-2019.11.15/_search?filter_path=hits.hits._source.license
{
  "size": 1,
  "sort": [
    {
      "timestamp": {
        "order": "desc"
      }
    }
  ]
}

yields:

{
  "hits" : {
    "hits" : [
      {
        "_source" : {
          "license" : {
            "max_nodes" : 1000,
            "issued_to" : "MonitoringCluster",
            "status" : "active",
            "issue_date_in_millis" : 1573828770697,
            "start_date_in_millis" : -1,
            "type" : "basic",
            "issuer" : "elasticsearch",
            "issue_date" : "2019-11-15T14:39:30.697Z",
            "expiry_date_in_millis" : 0,
            "cluster_needs_tls" : false,
            "id" : "ac93a382-2cb3-4e03-b14b-ac1664ce456c"
          }
        }
      }
    ]
  }
}

Note the addition of expiry_date_in_millis: 0

This is causing an issue in Kibana, as our check to see if a license can expire only checks for the presence of the expiry_date_in_millis field

cc @ycombinator

@elasticmachine
Copy link
Collaborator

Pinging @elastic/stack-monitoring (Stack monitoring)

@ycombinator
Copy link
Contributor

ycombinator commented Nov 18, 2019

Just tested and this is also happening on 7.x and 7.5 branches. But it's not happening on 7.4. This leads me to believe this regression was introduced by the change in #14378.

@chrisronline Given the impact of this change — Stack Monitoring UI incorrectly showing license as expired — I feel like this should be a blocker for 7.5.0, since it hasn't been released yet. WDYT?

@chrisronline
Copy link
Contributor Author

@ycombinator I agree. With this bug, any user on a Basic license is not able to use the Stack Monitoring. If a user attempts to load the UI, they will be redirected to a page that shows:
Screen Shot 2019-11-18 at 1 29 48 PM

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

Successfully merging a pull request may close this issue.

3 participants