kb-dashboard-lint
Linting rules for Kibana dashboard YAML configurations.
Overview
This package provides a configurable linting system that flags potentially problematic
dashboard configurations based on best practices and style guidelines. It works with
validated Pydantic models from kb-dashboard-core.
Installation
pip install kb-dashboard-lint
Or with uv:
uv add kb-dashboard-lint
Usage
CLI
# Check dashboards in a directory
kb-dashboard-lint check --input-dir ./inputs
# Check a single file
kb-dashboard-lint check --input-file dashboard.yaml
# Use custom configuration
kb-dashboard-lint check --config .dashboard-lint.yaml
# Only fail on errors (not warnings)
kb-dashboard-lint check --severity-threshold error
Programmatic API
from kb_dashboard_lint import check_dashboards
from kb_dashboard_core import load
# Load dashboards
dashboards = load('inputs/')
# Run linting
violations = check_dashboards(dashboards)
for violation in violations:
print(f"{violation.severity}: {violation.rule_id} - {violation.message}")
Built-in Rules
Dashboard Rules
| Rule ID | Description | Default |
|---|---|---|
collapsible-minimum-kibana-version |
Dashboards using section panels should declare minimum_kibana_version: "9.1.0" or newer |
warning |
dashboard-dataset-filter |
Dashboard should have a data_stream.dataset filter |
warning |
dashboard-missing-description |
Dashboards should have a description for discoverability | info |
datatable-at-bottom |
Data table panels should be positioned at the bottom of the dashboard | info |
esql-minimum-kibana-version |
Dashboards using ES|QL panels should declare a compatible minimum_kibana_version |
warning |
markdown-at-top |
Markdown panels with navigation content should be at the top of the dashboard | info |
metric-excessive-count |
Dashboards should not have excessive metric panels (style guide recommends 0-4) | info |
Panel Rules
| Rule ID | Description | Default |
|---|---|---|
markdown-header-height |
Markdown panels with headers must have height >= 3 | warning |
panel-min-width |
Panels should have minimum width for readability | warning |
panel-description-recommended |
Panels should have descriptions for accessibility | info |
panel-title-redundant-prefix |
Panel titles should not start with redundant prefixes like "Chart of" | info |
Chart Rules
| Rule ID | Description | Default |
|---|---|---|
gauge-goal-without-max |
Gauge charts with goals should define maximum values | warning |
metric-multiple-metrics-width |
Metric panels with multiple metrics should have adequate width | warning |
metric-redundant-label |
Metric primary label matching title should use hide_title: true |
warning |
narrow-xy-chart-side-legend |
Narrow XY charts should use bottom legends instead of side legends | warning |
panel-height-for-content |
Panels should have minimum height for their chart type | warning |
esql-field-escaping |
ES|QL field names with numeric suffixes need backtick escaping | warning |
esql-group-by-syntax |
ES|QL uses BY within STATS, not GROUP BY | warning |
esql-missing-sort-after-bucket |
ES|QL time series queries with BUCKET should end with SORT for proper ordering | warning |
esql-sql-syntax |
ES|QL queries should not use SQL syntax | warning |
esql-ts-metrics-min-version |
FROM metrics-* should use TS metrics-* on Kibana/Elasticsearch 9.2+ |
warning |
datatable-row-density |
Large datatables should consider compact density | info |
dimension-missing-label |
Dimensions should have explicit labels | info |
esql-dimension-missing-label |
ES|QL datatable dimensions should have explicit labels | info |
esql-dynamic-time-bucket |
ES|QL queries should use dynamic time bucketing | info |
esql-metric-missing-label |
ES|QL datatable metrics should have explicit labels | info |
esql-missing-limit |
ES|QL queries with SORT DESC should have explicit LIMIT for top-N results | info |
esql-where-clause |
ES|QL queries should include a WHERE clause | info |
pie-chart-dimension-count |
Pie charts with multiple dimensions may be hard to read | info |
pie-missing-limit |
Pie charts should limit slices shown (recommend 5-10 categories) | info |
Configuration
Create a .dashboard-lint.yaml file:
extends: default
rules:
markdown-header-height:
severity: error
esql-where-clause:
enabled: false
Development
# Install dependencies
just install
# Run CI checks
just ci
# Run tests
just test
License
MIT
Metadata
Release files for kb-dashboard-lint 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| kb_dashboard_lint-0.4.1.tar.gz | 36.5 kB | Without provenance | Details for kb_dashboard_lint-0.4.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kb_dashboard_lint-0.4.1-py3-none-any.whl | Python 3 | none | any | Details for kb_dashboard_lint-0.4.1-py3-none-any.whl |
Total release size: 104.3 kB
Release files / kb_dashboard_lint-0.4.1.tar.gz
| Download URL | kb_dashboard_lint-0.4.1.tar.gz |
|---|---|
| Size | 36.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1817971a38e1ebf1ff837b2ed66cfdde2aa57487b5b95447ab020e9c56378643
|
|
BLAKE2b-256 checksum How to use checksums |
7e2aeb3895dcf8028b0a1f9b3a62436bccb9b52eb7b7218313483a4b8515c200
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / kb_dashboard_lint-0.4.1-py3-none-any.whl
| Download URL | kb_dashboard_lint-0.4.1-py3-none-any.whl |
|---|---|
| Size | 67.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8cf3b3129f1ae174f37d6c9a55be895ed1afe255e07cbc7ba6289793f527bb3b
|
|
BLAKE2b-256 checksum How to use checksums |
914bfd6b1e9b4405ead7cec9e61e2804d6a8c490c8f8efa394c83a234cd1b384
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for kb-dashboard-lint 0.4.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.