User Guide

Welcome to the kibana-py user guide. This guide provides comprehensive documentation for using the Kibana Python client library.

Getting Started

If you’re new to kibana-py, start with these topics:

  • Authentication - Learn how to authenticate with Kibana

  • Dashboards - Manage dashboards as code with the new Dashboards HTTP API

  • Connectors - Create and manage connectors for alerting and automation

Core Features

Resource Management

  • Dashboards - The new (tech preview) Dashboards and Visualizations HTTP APIs

  • Alerting - Rule lifecycle: create, enable/disable, mute, snooze, and backfill

  • Data Views - Data views (index patterns) and runtime fields

  • Cases - Open and track issues with comments, alerts, and external incident systems

  • Connectors - Manage Kibana connectors for alerting and automation

  • Spaces - Organize resources with Kibana Spaces for multi-tenancy

  • Saved Objects - Import/export and legacy saved object management

  • Status Monitoring - Monitor Kibana health and operational statistics

  • Platform APIs - Tour of the remaining namespaces: security, SLOs, synthetics, streams, workflows, agent builder, APM, ML, and more

Advanced Topics

  • Error Handling - Handle exceptions and errors gracefully

  • Observability - Integrate OpenTelemetry for distributed tracing and log forwarding

  • Advanced Usage - Per-request configuration, async patterns, and performance optimization

Quick Reference

Basic Client Usage

from kibana import Kibana

# Initialize client
client = Kibana(
    "http://localhost:5601",
    api_key="your_api_key"
)

# Use the client
status = client.status.get_status()
print(f"Kibana status: {status.body['status']['overall']['level']}")

# Close the client
client.close()

Context Manager

with Kibana("http://localhost:5601", api_key="your_api_key") as client:
    status = client.status.get_status()
    print(status.body)

Async Client

import asyncio
from kibana import AsyncKibana

async def main():
    async with AsyncKibana("http://localhost:5601", api_key="your_api_key") as client:
        status = await client.status.get_status()
        print(status.body)

asyncio.run(main())

Next Steps

  • Explore the API Reference for detailed method documentation

  • Check out the Examples for practical code samples

  • Learn about Development if you want to contribute