- Kibana Guide: other versions:
- What is Kibana?
- What’s new in 7.14
- Kibana concepts
- Quick start
- Set up
- Install Kibana
- Configure Kibana
- Alerting and action settings
- APM settings
- Banners settings
- Development tools settings
- Graph settings
- Fleet settings
- i18n settings
- Logging settings
- Logs settings
- Metrics settings
- Machine learning settings
- Monitoring settings
- Reporting settings
- Secure settings
- Search sessions settings
- Security settings
- Spaces settings
- Task Manager settings
- Telemetry settings
- URL drilldown settings
- Start and stop Kibana
- Access Kibana
- Securing access to Kibana
- Add data
- Upgrade Kibana
- Configure security
- Configure reporting
- Configure monitoring
- Production considerations
- Discover
- Dashboard
- Canvas
- Maps
- Build a map to compare metrics by country or region
- Track, visualize, and alert on assets in real time
- Map custom regions with reverse geocoding
- Heat map layer
- Tile layer
- Vector layer
- Plot big data
- Search geographic data
- Configure map settings
- Connect to Elastic Maps Service
- Import geospatial data
- Troubleshoot
- Reporting and sharing
- Machine learning
- Graph
- Alerting
- Observability
- APM
- Security
- Dev Tools
- Stack Monitoring
- Stack Management
- Fleet
- REST API
- Get features API
- Kibana spaces APIs
- Kibana role management APIs
- User session management APIs
- Saved objects APIs
- Index patterns APIs
- Alerting APIs
- Action and connector APIs
- Import and export dashboard APIs
- Logstash configuration management APIs
- Shorten URL
- Get Task Manager health
- Upgrade assistant APIs
- Kibana plugins
- Accessibility
- Release notes
- Developer guide
Kibana API
editKibana API
editIn addition to the APM specific API endpoints, Kibana provides its own REST API which you can use to automate certain aspects of configuring and deploying Kibana. An example is below.
Customize the APM index pattern
editAs an alternative to updating apm_oss.indexPattern
in your kibana.yml
configuration file,
you can use Kibana’s update object API to update the default APM index pattern on the fly.
The following example sets the default APM app index pattern to some-other-pattern-*
:
curl -X PUT "localhost:5601/api/saved_objects/index-pattern/apm_static_index_pattern_id" \ -H 'Content-Type: application/json' \ -H 'kbn-xsrf: true' \ -H 'Authorization: Basic ${YOUR_AUTH_TOKEN}' \ -d' { "attributes": { "title": "some-other-pattern-*", } }'
|
|
Your custom index pattern matcher. |
The API returns the following:
{ "id":"apm_static_index_pattern_id", "type":"index-pattern", "updated_at":"2020-07-06T22:55:59.555Z", "version":"WzYsMV0=", "attributes":{ "title":"some-other-pattern-*" } }
To view the new APM app index pattern, use the GET object API:
curl -X GET "localhost:5601/api/saved_objects/index-pattern/apm_static_index_pattern_id" \ -H 'kbn-xsrf: true' \ -H 'Authorization: Basic ${YOUR_AUTH_TOKEN}'
The API returns the following:
{ "id":"apm_static_index_pattern_id", "type":"index-pattern", "updated_at":"2020-07-06T22:55:59.555Z", "version":"WzYsMV0=", "attributes":{...} "fieldFormatMap":"{...} "fields":"[{...},{...},...] "sourceFilters":"[{\"value\":\"sourcemap.sourcemap\"}]", "timeFieldName":"@timestamp", "title":"some-other-pattern-*" }, ... }
More information on Kibana’s API is available in REST API.
On this page