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

[Monitoring] "Internal Monitoring" deprecation warning #72020

Merged
merged 20 commits into from
Jul 27, 2020

Conversation

igoristic
Copy link
Contributor

Resolves: #51718

Detecting the type of .monitoring-* indices in their cluster to assume which type of method of monitoring their using.

If they don't have any -mb- tags in their monitoring indices we show the following message:

It appears you are using "Internal Collection" for Stack Monitoring.
This method of monitoring will no longer be supported in the next major release (8.0.0).
Please follow the steps in setup mode to start monitoring with Metricbeat.

If for some reason they have both types, we instead show:

It appears you are using both Metricbeat and "Internal Collection" for Stack Monitoring.
only Metricbeat type monitoring will be supported in the next major release (8.0.0).
Please follow the steps in setup mode to migrate the rest of the monitoring to Metricbeat.

We don't show anything if they're on Cloud (for now)

@elasticmachine
Copy link
Contributor

Pinging @elastic/stack-monitoring (Team:Monitoring)

Copy link
Contributor

@chrisronline chrisronline left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! Nice work so far! Left a few notes

});
};

export const showInternalMonitoringToast = ({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, why did you decide to go with a toast instead of a EuiCallout at the top of the page?

Copy link
Contributor Author

@igoristic igoristic Jul 20, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's less invasive. Also I feel like EuiCallout is too close to the enter setup button which makes it appear as if they're somehow associated.


<EuiSpacer />
<EuiLink
href={`${ELASTIC_WEBSITE_URL}blog/external-collection-for-elastic-stack-monitoring-is-now-available-via-metricbeat`}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it!

@apmmachine
Copy link
Contributor

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #72020 updated]

  • Start Time: 2020-07-21T13:02:25.897+0000

  • Duration: 5 min 38 sec

_index.includes('-mb-')
).length;

counts.legacyIndicesCount = hits.length - counts.mbIndicesCount;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These counts seem off to me.

I added this debug code:
console.log(hits.map((h) => h._index));

which results in:

[ '.monitoring-kibana-7-2020.07.21',
  '.monitoring-kibana-7-2020.07.21',
  '.monitoring-kibana-7-2020.07.21',
  '.monitoring-kibana-7-2020.07.21',
  '.monitoring-kibana-7-2020.07.21',
  '.monitoring-kibana-7-2020.07.21',
  '.monitoring-kibana-7-2020.07.21',
  '.monitoring-kibana-7-2020.07.21',
  '.monitoring-kibana-7-2020.07.21',
  '.monitoring-kibana-7-2020.07.21',
  '.monitoring-kibana-7-2020.07.21',
  '.monitoring-kibana-7-2020.07.21',
  '.monitoring-kibana-7-2020.07.21',
  '.monitoring-kibana-7-2020.07.21',
  '.monitoring-kibana-7-2020.07.21' ]

Maybe you can just do a query like:

POST .monitoring-es-*/_search
{
  "size": 0,
  "aggs": {
    "types": {
      "terms": {
        "field": "_index",
        "size": 10
      }
    }
  }
}

@igoristic
Copy link
Contributor Author

@elasticmachine merge upstream

@igoristic
Copy link
Contributor Author

@elasticmachine merge upstream

@chrisronline
Copy link
Contributor

@igoristic It looks like the failing tests are from monitoring. Maybe something with these changes broke them?

@igoristic
Copy link
Contributor Author

@igoristic It looks like the failing tests are from monitoring. Maybe something with these changes broke them?

@chrisronline Thats what I thought, but I ran them locally and they all pass. Not sure what the problem is, since CI always shows a different failed test

@igoristic
Copy link
Contributor Author

@elasticmachine merge upstream

<p>
{i18n.translate('xpack.monitoring.internalAndMetricbeatMonitoringToast.description', {
defaultMessage: `It appears you are using both Metricbeat and "Legacy Collection" for Stack Monitoring.
only Metricbeat type monitoring will be supported in the next major release (8.0.0).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if we said: Monitoring will require Metricbeat collection in the next major version (8.0.0).

or maybe @gchaps can help here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about:

In 8.0.0, you must use Metricbeat to collect monitoring data.

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

async chunks size

id value diff baseline
monitoring 1.1MB +6.2KB 1.1MB

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Contributor

@chrisronline chrisronline left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Nice work!

@igoristic igoristic merged commit 9aa5e17 into elastic:master Jul 27, 2020
@igoristic igoristic deleted the internal-monitoring-deprecation branch July 27, 2020 15:16
@igoristic
Copy link
Contributor Author

Backport:
7.x: c630055

igoristic added a commit that referenced this pull request Jul 27, 2020
* Internal Monitoring deprecation

* Fixed type

* Added if cloud logic

* Fixed i18n test

* Addressed code review feedback

* Fixed types

* Changed query

* Added delay to fix a test

* Fixed tests

* Fixed text

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@bhavyarm
Copy link
Contributor

Also resolves this double alert issue -
Screen Shot 2020-07-27 at 4 55 05 PM

@sgrodzicki
Copy link
Contributor

Also resolves this double alert issue

@igoristic we would need to backport just the bugfix to make it work for 7.9

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

Successfully merging this pull request may close these issues.

[Monitoring] Introduce deprecation warning for shipping monitoring data to the production cluster
8 participants