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

Report kibana_settings to X-Pack Monitoring (#7664) #7943

Merged
merged 1 commit into from
Aug 13, 2018

Conversation

ycombinator
Copy link
Contributor

Resolves #7621.

Depends on elastic/kibana#21100.

X-Pack Monitoring of Kibana requires two types of documents in the .monitoring-kibana-* indices: kibana_stats and kibana_settings. We made Metricbeat's kibana/stats metricset index kibana_stats documents into .monitoring-kibana-* in #7525. This PR makes the same metricset index kibana_settings documents into .monitoring-kibana-*.

To test this PR

The idea is that metricbeat (specifically the kibana/stats metricset with xpack.enabled: true) will create exactly the same documents in .monitoring-kibana-* indices as Kibana's bulk uploader does today.

  1. Start up Elasticsearch (with the default Basic license is okay)

  2. Start up Kibana (with the default Basic license is okay), checked out from master.

  3. Enable Monitoring in Elasticsearch (via the cluster setting xpack.monitoring.collection.enabled: true). You can do this via Elasticsearch's Cluster Update Settings API or by clicking the "Turn on Monitoring" button in the Monitoring UI in Kibana.

  4. Let Kibana run for ~20 seconds so a few documents are indexed into .monitoring-kibana-*.

  5. Stop Kibana

  6. From .monitoring-kibana-*, retrieve a document for type = kibana_settings

  7. Delete the .monitoring-kibana-* indices.

  8. In kibana.yml, set xpack.monitoring.kibana.collection.enabled: false. This will ensure that Kibana is no longer directly shipping its monitoring metrics to Elasticsearch.

  9. Start up Kibana again, this time checked out from [Monitoring] Kibana settings api kibana#21100.

  10. Enable the kibana module in metricbeat: ./metricbeat modules enable kibana.

  11. In modules.d/kibana.yml, add the stats metricset and set xpack.enabled: true. Concretely, your modules.d/kibana.yml should look something like this:

    - module: kibana
       metricsets:
       - stats
       period: 10s
       hosts: ["localhost:5601"]
       #basepath: ""
       #username: "user"
       #password: "secret"
       xpack.enabled: true

    Additionally, if your Kibana URLs have a basepath prefix, say foo, make sure to un-comment the basepath setting in the kibana module YAML file and set it's value to "foo".

  12. Start metricbeat.

  13. Let metricbeat run for ~20 seconds so a few documents are indexed into .monitoring-kibana-*.

  14. Stop metricbeat

  15. From .monitoring-kibana-*, retrieve a document for type = kibana_settings.

  16. Using a tool such as http://www.jsondiff.com, compare the documents indexed by Kibana's with those indexed by metricbeat. Verify that their structures are identical (same fields, not necessarily same values), except for these known and expected differences:

    1. Only Metricbeat-indexed documents are expected to contain the fields @timestamp, beat, host, and metricset. These are "standard" fields added by beats and metricbeat and don't have an adverse impact since they are additive.
    2. Only Kibana-indexed documents are expected to contain the field source_node. This field is used for debugging purposes only and not actually consumed by either the Monitoring UI or Telemetry feature in Kibana.

(cherry picked from commit 2af5ab9)

Resolves elastic#7621.

Depends on elastic/kibana#21100.

X-Pack Monitoring of Kibana requires two types of documents in the `.monitoring-kibana-*` indices: `kibana_stats` and `kibana_settings`. We made Metricbeat's `kibana/stats` metricset index `kibana_stats` documents into `.monitoring-kibana-*` in elastic#7525. This PR makes the same metricset index `kibana_settings` documents into `.monitoring-kibana-*`.

(cherry picked from commit 2af5ab9)
@ycombinator ycombinator changed the base branch from master to 6.x August 10, 2018 16:53
@ruflin ruflin merged commit 9e9434e into elastic:6.x Aug 13, 2018
@ycombinator ycombinator deleted the backport_7664_6.x branch September 26, 2018 14:12
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.

2 participants