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

Expose Kibana settings needed by Monitoring via HTTP API #20903

Closed
ycombinator opened this issue Jul 17, 2018 · 1 comment
Closed

Expose Kibana settings needed by Monitoring via HTTP API #20903

ycombinator opened this issue Jul 17, 2018 · 1 comment
Labels
Team:Monitoring Stack Monitoring team

Comments

@ycombinator
Copy link
Contributor

ycombinator commented Jul 17, 2018

In the same vein as #20577, Kibana should provide an HTTP API that exposes Kibana settings currently used by Kibana X-Pack Monitoring. I believe the only such setting today is the admin email address.

Use case

Metricbeat — concretely the settings metricset in the kibana module — will call this API periodically and ship the results in the right format to .kibana-monitoring-6-* indices. This will help make progress towards completing the larger feature of using Metricbeat to monitoring Kibana (and eventually the rest of the Elastic stack).

Important note

This API is likely a temporary solution until the Kibana Alerting feature is built. Once that is shipped and driving the Cluster Alerts feature in Monitoring, we will no longer need to index kibana_settings documents into .kibana-monitoring-6* indices. At that point this API (and the corresponding metricset in metricbeat) can be removed. As such it is probably best to not document this API for external/public use.

@ycombinator ycombinator added the Team:Monitoring Stack Monitoring team label Jul 17, 2018
@ycombinator
Copy link
Contributor Author

ycombinator commented Jul 17, 2018

Proposal for API

I looked at a sample document from .kibana-monitoring-6-* with type = kibana_settings. Here's what it looks like:

{
  "cluster_uuid":"u5ii0pnQRka_P0gimfmthg",
  "timestamp":"2018-07-03T17:17:02.356Z",
  "interval_ms":10000,
  "type":"kibana_settings",
  "source_node":{
    "uuid":"Txan2CYoQeCvDfkBm4lpRw",
    "host":"127.0.0.1",
    "transport_address":"127.0.0.1:9300",
    "ip":"127.0.0.1",
    "name":"Txan2CY",
    "timestamp":"2018-07-03T17:17:02.356Z"
  },
  "kibana_settings":{
    "xpack":{
      "default_admin_email":"jane@doe.com"
    },
    "kibana":{
      "uuid":"5b2de169-2785-441b-ae8c-186a1936b17d",
      "name":"Janes-MBP-2",
      "index":".kibana",
      "host":"localhost",
      "transport_address":"localhost:5601",
      "version":"7.0.0-alpha1",
      "snapshot":false,
      "status":"green"
    }
  }
}

Based on the information within it, here's my proposal for a minimal Kibana settings HTTP API.

URL

GET /api/settings

(This mirrors the GET /api/stats API URL built in #20577).

Response structure

{
  "cluster_uuid":"u5ii0pnQRka_P0gimfmthg",
  "settings":{
    "xpack":{
      "default_admin_email":"jane@doe.com"
    },
    "kibana":{
      "uuid":"5b2de169-2785-441b-ae8c-186a1936b17d",
      "name":"Janes-MBP-2",
      "index":".kibana",
      "host":"localhost",
      "transport_address":"localhost:5601",
      "version":"7.0.0-alpha1",
      "snapshot":false,
      "status":"green"
    }
  }
}

WDYT?

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

No branches or pull requests

1 participant