@intentius/chant-lexicon-grafana 0.98.0 → 0.99.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -5
- package/dist/actions/grafana.d.ts +24 -0
- package/dist/actions/grafana.d.ts.map +1 -0
- package/dist/actions/index.d.ts +2 -0
- package/dist/actions/index.d.ts.map +1 -0
- package/dist/alerting-build.d.ts +128 -0
- package/dist/alerting-build.d.ts.map +1 -0
- package/dist/alerting.d.ts +273 -0
- package/dist/alerting.d.ts.map +1 -0
- package/dist/api/apply.d.ts +156 -0
- package/dist/api/apply.d.ts.map +1 -0
- package/dist/api/bind.d.ts +32 -0
- package/dist/api/bind.d.ts.map +1 -0
- package/dist/api/client.d.ts +76 -0
- package/dist/api/client.d.ts.map +1 -0
- package/dist/api/converge.d.ts +33 -0
- package/dist/api/converge.d.ts.map +1 -0
- package/dist/api/dashboards.d.ts +102 -0
- package/dist/api/dashboards.d.ts.map +1 -0
- package/dist/api/datasources.d.ts +26 -0
- package/dist/api/datasources.d.ts.map +1 -0
- package/dist/api/fake-grafana-writes.d.ts +41 -0
- package/dist/api/fake-grafana-writes.d.ts.map +1 -0
- package/dist/api/fake-grafana.d.ts +61 -0
- package/dist/api/fake-grafana.d.ts.map +1 -0
- package/dist/api/folders.d.ts +110 -0
- package/dist/api/folders.d.ts.map +1 -0
- package/dist/api/library-panels.d.ts +52 -0
- package/dist/api/library-panels.d.ts.map +1 -0
- package/dist/build.d.ts +30 -2
- package/dist/build.d.ts.map +1 -1
- package/dist/catalog.d.ts +1 -1
- package/dist/catalog.d.ts.map +1 -1
- package/dist/codegen/docs.d.ts.map +1 -1
- package/dist/codegen/schema-types.d.ts +3 -3
- package/dist/codegen/schema-types.d.ts.map +1 -1
- package/dist/composites/agent-dashboard.d.ts.map +1 -1
- package/dist/composites/catalog.d.ts.map +1 -1
- package/dist/composites/index.d.ts +4 -2
- package/dist/composites/index.d.ts.map +1 -1
- package/dist/composites/red-dashboard.d.ts +21 -2
- package/dist/composites/red-dashboard.d.ts.map +1 -1
- package/dist/composites/shared.d.ts +7 -0
- package/dist/composites/shared.d.ts.map +1 -1
- package/dist/composites/slo-alert-rules.d.ts +92 -0
- package/dist/composites/slo-alert-rules.d.ts.map +1 -0
- package/dist/config.d.ts +111 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/contact-point-secrets.d.ts +17 -0
- package/dist/contact-point-secrets.d.ts.map +1 -0
- package/dist/dashboard.d.ts +16 -2
- package/dist/dashboard.d.ts.map +1 -1
- package/dist/datasource-refs.d.ts +95 -0
- package/dist/datasource-refs.d.ts.map +1 -0
- package/dist/datasource.d.ts +29 -0
- package/dist/datasource.d.ts.map +1 -1
- package/dist/deep-observe-hooks.d.ts +64 -0
- package/dist/deep-observe-hooks.d.ts.map +1 -0
- package/dist/deep-observe.d.ts +42 -0
- package/dist/deep-observe.d.ts.map +1 -0
- package/dist/describe-resources.d.ts +49 -0
- package/dist/describe-resources.d.ts.map +1 -0
- package/dist/detect.d.ts +28 -1
- package/dist/detect.d.ts.map +1 -1
- package/dist/export-resources.d.ts +38 -0
- package/dist/export-resources.d.ts.map +1 -0
- package/dist/import/alerting.d.ts +40 -0
- package/dist/import/alerting.d.ts.map +1 -0
- package/dist/import/edits.d.ts +47 -0
- package/dist/import/edits.d.ts.map +1 -0
- package/dist/import/embedded.d.ts +14 -0
- package/dist/import/embedded.d.ts.map +1 -0
- package/dist/import/generator.d.ts +60 -0
- package/dist/import/generator.d.ts.map +1 -0
- package/dist/import/live-export.d.ts +108 -0
- package/dist/import/live-export.d.ts.map +1 -0
- package/dist/import/mappings.d.ts +83 -0
- package/dist/import/mappings.d.ts.map +1 -0
- package/dist/import/model.d.ts +98 -0
- package/dist/import/model.d.ts.map +1 -0
- package/dist/import/normalize-alerting.d.ts +26 -0
- package/dist/import/normalize-alerting.d.ts.map +1 -0
- package/dist/import/normalize.d.ts +74 -0
- package/dist/import/normalize.d.ts.map +1 -0
- package/dist/import/parser.d.ts +110 -0
- package/dist/import/parser.d.ts.map +1 -0
- package/dist/import/report.d.ts +26 -0
- package/dist/import/report.d.ts.map +1 -0
- package/dist/import/testdata/fixtures.d.ts +35 -0
- package/dist/import/testdata/fixtures.d.ts.map +1 -0
- package/dist/import/v2.d.ts +72 -0
- package/dist/import/v2.d.ts.map +1 -0
- package/dist/index.d.ts +26 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/integrity.json +18 -10
- package/dist/k8s.d.ts +107 -0
- package/dist/k8s.d.ts.map +1 -0
- package/dist/lint/audit-catalog.d.ts +2 -1
- package/dist/lint/audit-catalog.d.ts.map +1 -1
- package/dist/lint/post-synth/graf101.d.ts +2 -2
- package/dist/lint/post-synth/graf102.d.ts +1 -1
- package/dist/lint/post-synth/graf107.d.ts +1 -1
- package/dist/lint/post-synth/graf108.d.ts +8 -0
- package/dist/lint/post-synth/graf108.d.ts.map +1 -0
- package/dist/lint/post-synth/graf109.d.ts +8 -0
- package/dist/lint/post-synth/graf109.d.ts.map +1 -0
- package/dist/lint/post-synth/graf111.d.ts +8 -0
- package/dist/lint/post-synth/graf111.d.ts.map +1 -0
- package/dist/lint/post-synth/graf112.d.ts +8 -0
- package/dist/lint/post-synth/graf112.d.ts.map +1 -0
- package/dist/lint/post-synth/graf113.d.ts +8 -0
- package/dist/lint/post-synth/graf113.d.ts.map +1 -0
- package/dist/lint/post-synth/graf114.d.ts +8 -0
- package/dist/lint/post-synth/graf114.d.ts.map +1 -0
- package/dist/lint/post-synth/graf115.d.ts +8 -0
- package/dist/lint/post-synth/graf115.d.ts.map +1 -0
- package/dist/lint/post-synth/grafana-helpers.d.ts +7 -5
- package/dist/lint/post-synth/grafana-helpers.d.ts.map +1 -1
- package/dist/lint/post-synth/index.d.ts.map +1 -1
- package/dist/lint/rules/literal-secret.d.ts +7 -3
- package/dist/lint/rules/literal-secret.d.ts.map +1 -1
- package/dist/lsp/hover.d.ts.map +1 -1
- package/dist/manifest.json +1 -1
- package/dist/members.d.ts +27 -0
- package/dist/members.d.ts.map +1 -0
- package/dist/meta.json +135 -0
- package/dist/okf/index.md +36 -2
- package/dist/okf/rules/GRAF002.md +3 -2
- package/dist/okf/rules/GRAF101.md +3 -2
- package/dist/okf/rules/GRAF102.md +1 -0
- package/dist/okf/rules/GRAF108.md +11 -0
- package/dist/okf/rules/GRAF109.md +15 -0
- package/dist/okf/rules/GRAF111.md +11 -0
- package/dist/okf/rules/GRAF112.md +16 -0
- package/dist/okf/rules/GRAF113.md +16 -0
- package/dist/okf/rules/GRAF114.md +11 -0
- package/dist/okf/rules/GRAF115.md +11 -0
- package/dist/okf/types/AlertListPanel.md +9 -0
- package/dist/okf/types/AlertQuery.md +9 -0
- package/dist/okf/types/AlertRule.md +9 -0
- package/dist/okf/types/AlertRuleGroup.md +9 -0
- package/dist/okf/types/BarChartPanel.md +9 -0
- package/dist/okf/types/BarGaugePanel.md +9 -0
- package/dist/okf/types/CanvasPanel.md +9 -0
- package/dist/okf/types/ClassicConditionsExpression.md +9 -0
- package/dist/okf/types/ContactPoint.md +14 -0
- package/dist/okf/types/Dashboard.md +1 -0
- package/dist/okf/types/Datasource.md +3 -2
- package/dist/okf/types/ExternalDatasource.md +15 -0
- package/dist/okf/types/FlameGraphPanel.md +9 -0
- package/dist/okf/types/GeomapPanel.md +9 -0
- package/dist/okf/types/HistogramPanel.md +9 -0
- package/dist/okf/types/MathExpression.md +9 -0
- package/dist/okf/types/MuteTiming.md +13 -0
- package/dist/okf/types/NodeGraphPanel.md +9 -0
- package/dist/okf/types/NotificationPolicy.md +9 -0
- package/dist/okf/types/NotificationTemplate.md +9 -0
- package/dist/okf/types/PieChartPanel.md +9 -0
- package/dist/okf/types/ReduceExpression.md +9 -0
- package/dist/okf/types/ResampleExpression.md +9 -0
- package/dist/okf/types/SqlExpression.md +9 -0
- package/dist/okf/types/StateTimelinePanel.md +9 -0
- package/dist/okf/types/StatusHistoryPanel.md +9 -0
- package/dist/okf/types/ThresholdExpression.md +9 -0
- package/dist/okf/types/TrendPanel.md +9 -0
- package/dist/okf/types/XYChartPanel.md +9 -0
- package/dist/op/activities/grafana-apply.d.ts +75 -0
- package/dist/op/activities/grafana-apply.d.ts.map +1 -0
- package/dist/op/activities/index.d.ts +9 -0
- package/dist/op/activities/index.d.ts.map +1 -0
- package/dist/op/builders.d.ts +24 -0
- package/dist/op/builders.d.ts.map +1 -0
- package/dist/ownership.d.ts +67 -0
- package/dist/ownership.d.ts.map +1 -0
- package/dist/panel-options.d.ts +65 -0
- package/dist/panel-options.d.ts.map +1 -0
- package/dist/panels.d.ts +46 -9
- package/dist/panels.d.ts.map +1 -1
- package/dist/pin.d.ts +29 -7
- package/dist/pin.d.ts.map +1 -1
- package/dist/plugin.d.ts.map +1 -1
- package/dist/promql-check.d.ts +51 -0
- package/dist/promql-check.d.ts.map +1 -0
- package/dist/query.d.ts +9 -8
- package/dist/query.d.ts.map +1 -1
- package/dist/rules/graf101.ts +3 -3
- package/dist/rules/graf102.ts +1 -1
- package/dist/rules/graf107.ts +1 -1
- package/dist/rules/graf108.ts +17 -0
- package/dist/rules/graf109.ts +17 -0
- package/dist/rules/graf111.ts +17 -0
- package/dist/rules/graf112.ts +17 -0
- package/dist/rules/graf113.ts +17 -0
- package/dist/rules/graf114.ts +17 -0
- package/dist/rules/graf115.ts +17 -0
- package/dist/rules/grafana-helpers.ts +15 -8
- package/dist/rules/literal-secret.ts +60 -6
- package/dist/schema/barchart.gen.d.ts +198 -0
- package/dist/schema/barchart.gen.d.ts.map +1 -0
- package/dist/schema/bargauge.gen.d.ts +97 -0
- package/dist/schema/bargauge.gen.d.ts.map +1 -0
- package/dist/schema/canvas.gen.d.ts +152 -0
- package/dist/schema/canvas.gen.d.ts.map +1 -0
- package/dist/schema/dashboard.gen.d.ts +196 -21
- package/dist/schema/dashboard.gen.d.ts.map +1 -1
- package/dist/schema/expr.gen.d.ts +606 -0
- package/dist/schema/expr.gen.d.ts.map +1 -0
- package/dist/schema/gauge.gen.d.ts.map +1 -1
- package/dist/schema/geomap.gen.d.ts +100 -0
- package/dist/schema/geomap.gen.d.ts.map +1 -0
- package/dist/schema/heatmap.gen.d.ts.map +1 -1
- package/dist/schema/histogram.gen.d.ts +132 -0
- package/dist/schema/histogram.gen.d.ts.map +1 -0
- package/dist/schema/index.d.ts +12 -0
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/logs.gen.d.ts +1 -0
- package/dist/schema/logs.gen.d.ts.map +1 -1
- package/dist/schema/loki.gen.d.ts.map +1 -1
- package/dist/schema/nodegraph.gen.d.ts +49 -0
- package/dist/schema/nodegraph.gen.d.ts.map +1 -0
- package/dist/schema/piechart.gen.d.ts +127 -0
- package/dist/schema/piechart.gen.d.ts.map +1 -0
- package/dist/schema/prometheus.gen.d.ts.map +1 -1
- package/dist/schema/stat.gen.d.ts.map +1 -1
- package/dist/schema/statetimeline.gen.d.ts +124 -0
- package/dist/schema/statetimeline.gen.d.ts.map +1 -0
- package/dist/schema/statushistory.gen.d.ts +114 -0
- package/dist/schema/statushistory.gen.d.ts.map +1 -0
- package/dist/schema/table.gen.d.ts +22 -3
- package/dist/schema/table.gen.d.ts.map +1 -1
- package/dist/schema/tempo.gen.d.ts.map +1 -1
- package/dist/schema/text.gen.d.ts.map +1 -1
- package/dist/schema/timeseries.gen.d.ts +5 -1
- package/dist/schema/timeseries.gen.d.ts.map +1 -1
- package/dist/schema/trend.gen.d.ts +180 -0
- package/dist/schema/trend.gen.d.ts.map +1 -0
- package/dist/schema/xychart.gen.d.ts +145 -0
- package/dist/schema/xychart.gen.d.ts.map +1 -0
- package/dist/schema-validate.d.ts +30 -4
- package/dist/schema-validate.d.ts.map +1 -1
- package/dist/serializer.d.ts +11 -3
- package/dist/serializer.d.ts.map +1 -1
- package/dist/skill-defs.d.ts.map +1 -1
- package/dist/skills/chant-grafana-alerting.md +49 -0
- package/dist/skills/chant-grafana-provisioning.md +3 -3
- package/dist/skills/chant-grafana.md +12 -6
- package/dist/spec/fetch-units-cli.d.ts +3 -0
- package/dist/spec/fetch-units-cli.d.ts.map +1 -0
- package/dist/spec/overlay.d.ts +43 -0
- package/dist/spec/overlay.d.ts.map +1 -0
- package/dist/spec/schemas.d.ts +13 -7
- package/dist/spec/schemas.d.ts.map +1 -1
- package/dist/spec/units.d.ts +35 -0
- package/dist/spec/units.d.ts.map +1 -0
- package/dist/spec/units.gen.d.ts +2 -0
- package/dist/spec/units.gen.d.ts.map +1 -0
- package/dist/transformations.d.ts +459 -0
- package/dist/transformations.d.ts.map +1 -0
- package/dist/util.d.ts +6 -0
- package/dist/util.d.ts.map +1 -1
- package/dist/validate-alerting.d.ts +65 -0
- package/dist/validate-alerting.d.ts.map +1 -0
- package/dist/validate-output.d.ts +49 -9
- package/dist/validate-output.d.ts.map +1 -1
- package/dist/validate.d.ts.map +1 -1
- package/dist/variables.d.ts +7 -2
- package/dist/variables.d.ts.map +1 -1
- package/package.json +12 -4
- package/src/actions/actions.test.ts +24 -0
- package/src/actions/grafana.ts +40 -0
- package/src/actions/index.ts +1 -0
- package/src/alerting-build.ts +376 -0
- package/src/alerting.e2e.test.ts +212 -0
- package/src/alerting.test.ts +272 -0
- package/src/alerting.ts +435 -0
- package/src/api/apply.test.ts +238 -0
- package/src/api/apply.ts +384 -0
- package/src/api/bind.ts +58 -0
- package/src/api/client.ts +148 -0
- package/src/api/converge.ts +63 -0
- package/src/api/dashboards.ts +247 -0
- package/src/api/datasources.ts +33 -0
- package/src/api/fake-grafana-writes.ts +201 -0
- package/src/api/fake-grafana.ts +186 -0
- package/src/api/folders.ts +265 -0
- package/src/api/library-panels.ts +101 -0
- package/src/build.test.ts +210 -5
- package/src/build.ts +180 -43
- package/src/catalog.ts +86 -2
- package/src/codegen/docs.ts +42 -9
- package/src/codegen/schema-types.ts +16 -6
- package/src/composites/agent-dashboard.ts +6 -3
- package/src/composites/catalog.test.ts +2 -2
- package/src/composites/catalog.ts +82 -0
- package/src/composites/composites.test.ts +73 -9
- package/src/composites/index.ts +4 -2
- package/src/composites/queries.e2e.test.ts +374 -0
- package/src/composites/red-dashboard.ts +83 -12
- package/src/composites/shared.ts +11 -0
- package/src/composites/slo-alert-rules.ts +149 -0
- package/src/config.test.ts +61 -0
- package/src/config.ts +138 -0
- package/src/contact-point-secrets.ts +63 -0
- package/src/dashboard.ts +16 -2
- package/src/datasource-refs.test.ts +56 -0
- package/src/datasource-refs.ts +189 -0
- package/src/datasource.ts +52 -0
- package/src/deep-observe-hooks.ts +252 -0
- package/src/deep-observe.test.ts +265 -0
- package/src/deep-observe.ts +164 -0
- package/src/describe-resources.test.ts +255 -0
- package/src/describe-resources.ts +209 -0
- package/src/detect.ts +79 -2
- package/src/export-resources.test.ts +129 -0
- package/src/export-resources.ts +84 -0
- package/src/generated/lexicon-grafana.json +135 -0
- package/src/import/alerting-roundtrip.test.ts +161 -0
- package/src/import/alerting.ts +500 -0
- package/src/import/edits.ts +95 -0
- package/src/import/embedded.test.ts +45 -0
- package/src/import/embedded.ts +47 -0
- package/src/import/generated-types.e2e.test.ts +118 -0
- package/src/import/generator.test.ts +210 -0
- package/src/import/generator.ts +462 -0
- package/src/import/live-export.ts +264 -0
- package/src/import/mappings.ts +264 -0
- package/src/import/model.ts +110 -0
- package/src/import/normalize-alerting.ts +101 -0
- package/src/import/normalize.test.ts +117 -0
- package/src/import/normalize.ts +364 -0
- package/src/import/parser.test.ts +440 -0
- package/src/import/parser.ts +1236 -0
- package/src/import/report.ts +62 -0
- package/src/import/roundtrip.test.ts +468 -0
- package/src/import/testdata/fixtures.ts +129 -0
- package/src/import/v2.test.ts +292 -0
- package/src/import/v2.ts +803 -0
- package/src/import.e2e.test.ts +31 -84
- package/src/import.test.ts +9 -3
- package/src/index.ts +190 -5
- package/src/k8s.test.ts +98 -0
- package/src/k8s.ts +197 -0
- package/src/lint/audit-catalog.ts +60 -3
- package/src/lint/core-lint.test.ts +43 -0
- package/src/lint/post-synth/graf101.ts +3 -3
- package/src/lint/post-synth/graf102.ts +1 -1
- package/src/lint/post-synth/graf107.ts +1 -1
- package/src/lint/post-synth/graf108.ts +17 -0
- package/src/lint/post-synth/graf109.ts +17 -0
- package/src/lint/post-synth/graf111.ts +17 -0
- package/src/lint/post-synth/graf112.ts +17 -0
- package/src/lint/post-synth/graf113.ts +17 -0
- package/src/lint/post-synth/graf114.ts +17 -0
- package/src/lint/post-synth/graf115.ts +17 -0
- package/src/lint/post-synth/grafana-helpers.ts +15 -8
- package/src/lint/post-synth/index.ts +14 -0
- package/src/lint/post-synth/post-synth.test.ts +235 -11
- package/src/lint/rules/literal-secret.ts +60 -6
- package/src/lint/rules/rules.test.ts +27 -0
- package/src/lsp/completions.test.ts +5 -0
- package/src/lsp/hover.test.ts +7 -0
- package/src/lsp/hover.ts +8 -1
- package/src/members.ts +68 -0
- package/src/observe.e2e.test.ts +255 -0
- package/src/op/activities/grafana-apply.e2e.test.ts +175 -0
- package/src/op/activities/grafana-apply.test.ts +229 -0
- package/src/op/activities/grafana-apply.ts +171 -0
- package/src/op/activities/index.ts +8 -0
- package/src/op/builders.test.ts +40 -0
- package/src/op/builders.ts +34 -0
- package/src/ownership.ts +103 -0
- package/src/panel-options.ts +66 -0
- package/src/panels.test.ts +51 -0
- package/src/panels.ts +148 -10
- package/src/pin.ts +57 -6
- package/src/plugin.test.ts +5 -2
- package/src/plugin.ts +66 -0
- package/src/promql-check.test.ts +108 -0
- package/src/promql-check.ts +189 -0
- package/src/query.ts +13 -8
- package/src/schema/barchart.gen.ts +221 -0
- package/src/schema/bargauge.gen.ts +111 -0
- package/src/schema/canvas.gen.ts +176 -0
- package/src/schema/dashboard.gen.ts +206 -22
- package/src/schema/expr.gen.ts +618 -0
- package/src/schema/gauge.gen.ts +2 -1
- package/src/schema/geomap.gen.ts +112 -0
- package/src/schema/heatmap.gen.ts +2 -1
- package/src/schema/histogram.gen.ts +151 -0
- package/src/schema/index.ts +12 -0
- package/src/schema/logs.gen.ts +3 -1
- package/src/schema/loki.gen.ts +2 -1
- package/src/schema/nodegraph.gen.ts +58 -0
- package/src/schema/piechart.gen.ts +146 -0
- package/src/schema/prometheus.gen.ts +2 -1
- package/src/schema/stat.gen.ts +2 -1
- package/src/schema/statetimeline.gen.ts +143 -0
- package/src/schema/statushistory.gen.ts +132 -0
- package/src/schema/table.gen.ts +27 -4
- package/src/schema/tempo.gen.ts +2 -1
- package/src/schema/text.gen.ts +2 -1
- package/src/schema/timeseries.gen.ts +7 -2
- package/src/schema/trend.gen.ts +208 -0
- package/src/schema/xychart.gen.ts +167 -0
- package/src/schema-overlay.test.ts +282 -0
- package/src/schema-validate.ts +141 -50
- package/src/schema.test.ts +4 -2
- package/src/serializer.test.ts +13 -1
- package/src/serializer.ts +11 -3
- package/src/skill-defs.ts +17 -0
- package/src/skills/chant-grafana-alerting.md +49 -0
- package/src/skills/chant-grafana-provisioning.md +3 -3
- package/src/skills/chant-grafana.md +12 -6
- package/src/spec/fetch-cli.ts +3 -3
- package/src/spec/fetch-units-cli.ts +37 -0
- package/src/spec/overlay/canvas.overlay.json +142 -0
- package/src/spec/overlay/dashboard.overlay.json +378 -0
- package/src/spec/overlay/expr.overlay.json +14 -0
- package/src/spec/overlay/geomap.overlay.json +35 -0
- package/src/spec/overlay/logs.overlay.json +14 -0
- package/src/spec/overlay/nodegraph.overlay.json +31 -0
- package/src/spec/overlay/piechart.overlay.json +17 -0
- package/src/spec/overlay/table.overlay.json +84 -0
- package/src/spec/overlay/timeseries.overlay.json +21 -0
- package/src/spec/overlay/trend.overlay.json +17 -0
- package/src/spec/overlay/xychart.overlay.json +16 -0
- package/src/spec/overlay.ts +105 -0
- package/src/spec/schemas/barchart.jsonschema.json +419 -0
- package/src/spec/schemas/bargauge.jsonschema.json +224 -0
- package/src/spec/schemas/canvas.jsonschema.json +356 -0
- package/src/spec/schemas/dashboardv2.jsonschema.json +3387 -0
- package/src/spec/schemas/expr.jsonschema.json +987 -0
- package/src/spec/schemas/geomap.jsonschema.json +220 -0
- package/src/spec/schemas/histogram.jsonschema.json +308 -0
- package/src/spec/schemas/nodegraph.jsonschema.json +77 -0
- package/src/spec/schemas/piechart.jsonschema.json +275 -0
- package/src/spec/schemas/statetimeline.jsonschema.json +324 -0
- package/src/spec/schemas/statushistory.jsonschema.json +292 -0
- package/src/spec/schemas/trend.jsonschema.json +449 -0
- package/src/spec/schemas/xychart.jsonschema.json +428 -0
- package/src/spec/schemas.ts +22 -10
- package/src/spec/units.gen.ts +281 -0
- package/src/spec/units.ts +77 -0
- package/src/transformations.test.ts +65 -0
- package/src/transformations.ts +574 -0
- package/src/util.ts +8 -0
- package/src/validate-alerting.test.ts +255 -0
- package/src/validate-alerting.ts +428 -0
- package/src/validate-output.ts +332 -101
- package/src/validate.ts +14 -0
- package/src/variables.ts +7 -2
package/README.md
CHANGED
|
@@ -20,16 +20,17 @@ export { prometheus, rate, requests, overview };
|
|
|
20
20
|
| Kind | Classes |
|
|
21
21
|
|---|---|
|
|
22
22
|
| dashboards | `Dashboard`, `Row`, `DashboardProvider` |
|
|
23
|
-
| panels | `TimeSeriesPanel`, `StatPanel`, `GaugePanel`, `TablePanel`, `LogsPanel`, `TracesPanel`, `HeatmapPanel`, `TextPanel` |
|
|
23
|
+
| panels | `TimeSeriesPanel`, `StatPanel`, `GaugePanel`, `TablePanel`, `LogsPanel`, `TracesPanel`, `HeatmapPanel`, `TextPanel`, `BarChartPanel`, `BarGaugePanel`, `PieChartPanel`, `StateTimelinePanel`, `StatusHistoryPanel`, `HistogramPanel`, `NodeGraphPanel`, `XYChartPanel`, `TrendPanel`, `CanvasPanel`, `GeomapPanel`, `FlameGraphPanel`, `AlertListPanel` |
|
|
24
24
|
| queries | `PromQuery` (PromQL), `TempoQuery` (TraceQL), `LokiQuery` (LogQL) |
|
|
25
25
|
| variables | `QueryVariable`, `CustomVariable`, `IntervalVariable`, `DatasourceVariable`, `ConstantVariable`, `TextboxVariable` |
|
|
26
26
|
| datasources | `Datasource`, generic in its plugin type |
|
|
27
|
+
| alerting | `AlertRuleGroup`, `AlertRule`, `AlertQuery`, the expressions `ReduceExpression`, `MathExpression`, `ThresholdExpression`, `ResampleExpression`, `ClassicConditionsExpression`, `SqlExpression`, and `ContactPoint`, `NotificationPolicy`, `MuteTiming`, `NotificationTemplate`, written to `provisioning/alerting/chant.yaml` |
|
|
27
28
|
|
|
28
|
-
Panel options, field config and query fields are generated from Grafana's JSON Schemas as published by `grafana/grafana-foundation-sdk`, vendored in `src/spec/schemas
|
|
29
|
+
Panel options, field config and query fields are generated from Grafana's JSON Schemas as published by `grafana/grafana-foundation-sdk`, vendored in `src/spec/schemas/`, pinned by commit and digest in `GRAFANA_SCHEMA_PIN`, and corrected against Grafana's CUE by a checked-in overlay in `src/spec/overlay/`. They track Grafana 12.4 and 13.x. `definePanel` and `defineQuery` add plugins chant doesn't ship.
|
|
29
30
|
|
|
30
31
|
## Dashboards from other declarations
|
|
31
32
|
|
|
32
|
-
`RedDashboard`, `SloDashboard` and `AgentDashboard` build a dashboard from a declaration in another lexicon: rate, errors and duration per service from an otel `SpanMetricsConnector`; SLI, error budget and burn rate per alert window from a prometheus `Slo`; latency, errors and tokens per model and tool from the otel GenAI preset. Metric names are read from the declaration, so renaming a namespace or an SLO moves the panel queries.
|
|
33
|
+
`RedDashboard`, `SloDashboard` and `AgentDashboard` build a dashboard from a declaration in another lexicon: rate, errors and duration per service from an otel `SpanMetricsConnector`; SLI, error budget and burn rate per alert window from a prometheus `Slo`; latency, errors and tokens per model and tool from the otel GenAI preset. Metric names are read from the declaration, so renaming a namespace or an SLO moves the panel queries. `SloAlertRules` turns the same `Slo` into Grafana-managed burn-rate alert rules.
|
|
33
34
|
|
|
34
35
|
```ts
|
|
35
36
|
export const services = RedDashboard({ spanMetrics: spans, datasource: prometheus });
|
|
@@ -37,14 +38,23 @@ export const checkoutSlo = SloDashboard({ slo: checkout, datasource: prometheus
|
|
|
37
38
|
export const agents = AgentDashboard({ genAi: genAiMetrics(), datasource: prometheus });
|
|
38
39
|
```
|
|
39
40
|
|
|
41
|
+
## Importing existing dashboards
|
|
42
|
+
|
|
43
|
+
`chant import dashboard.json --output src` turns dashboard JSON exported from Grafana (with or without "Export for sharing externally") into this lexicon's TypeScript, in a directory named after the dashboard's uid: variables, one module per row with its panels and their queries, and the `Dashboard`. Panel ids, positions and refIds are kept, datasources named by uid become `ExternalDatasource`s, and `__inputs` datasources become `DatasourceVariable`s of the same name. A panel or datasource type chant has no class for is declared with `definePanel` or `defineQuery`. What the lexicon cannot express yet (annotations, library panels, ad hoc variables) is printed as a warning. A v2 dashboard is reported and not imported (#2947). `chant build` on the result gives back the same dashboard: the round-trip tests in `src/import/roundtrip.test.ts` hold Grafana 12.4.11 and 13.2.2 UI exports, community dashboards from grafana.com such as Node Exporter Full, and the examples' output to that. Datasource and dashboard provisioning files import too.
|
|
44
|
+
|
|
45
|
+
## Drift and live export
|
|
46
|
+
|
|
47
|
+
With `grafana.profiles.<env>` in `chant.config.ts` (a URL, and a service account token named by its environment variable), or `GRAFANA_URL` and `GRAFANA_TOKEN`, `chant lifecycle diff <env> --live` reads each declared dashboard and datasource from Grafana 12.4 or 13.x over `/apis/dashboard.grafana.app` (Grafana 11 over `/api/dashboards/uid`) and reports a dashboard edited in the UI as drift, at the path it was declared under (`panels[0].panels[1].title: Errors → 5xx`). The stored dashboard is read back through the importer, so what the build fills in (ids, grid positions, refIds) and what Grafana adds (the built-in annotation) is not reported. A dashboard is `owned` when one of the project's providers loaded it or its labels carry `app.kubernetes.io/managed-by: chant`. `chant import --from <env>` writes the environment's dashboards and datasources as TypeScript, through the same generator as `chant import`. The e2e in `src/observe.e2e.test.ts` runs both against Grafana 12.4.11 and 13.2.2.
|
|
48
|
+
|
|
40
49
|
## Checks
|
|
41
50
|
|
|
42
|
-
GRAF001 and GRAF002 run on source (uid and variable-name syntax, literal secrets).
|
|
51
|
+
GRAF001 and GRAF002 run on source (uid and variable-name syntax, literal secrets). The GRAF1xx checks run after a build: undeclared or mistyped datasources, undeclared variables, duplicate uids and ids, panels off the grid or overlapping, uids Grafana rejects, validation against the pinned dashboard, panel and query schemas (an unknown key is a warning), a PromQL syntax check on every query sent to a Prometheus (GRAF108), dashboard providers that load a dashboard twice or not into its declared folder (GRAF109), and a check that every panel unit is one Grafana knows or a custom `suffix:`/`prefix:`-style unit (GRAF115).
|
|
43
52
|
|
|
44
|
-
GRAF101 and GRAF102 compare dashboards with the datasources declared in the same build root (chant #1939); keep them together.
|
|
53
|
+
GRAF101 and GRAF102 compare dashboards with the datasources declared in the same build root (chant #1939); keep them together, and declare a datasource that already exists in Grafana with `ExternalDatasource`, which the checks count and the build never provisions.
|
|
45
54
|
|
|
46
55
|
## Plain-data API
|
|
47
56
|
|
|
48
57
|
- `buildGrafana(entities)` and `grafanaFiles(entities)` render every file by path, for embedding in another lexicon's output (a ConfigMap, a volume).
|
|
58
|
+
- `GrafanaConfigMaps` and `grafanaVolumes` from `@intentius/chant-lexicon-grafana/k8s` deliver dashboards and provisioning to Kubernetes as ConfigMaps labelled for the Grafana Helm chart's sidecar (`grafana_dashboard`, `grafana_datasource`), or mounted into a plain Grafana Deployment.
|
|
49
59
|
- `renderDashboard(dashboard)` and `dashboardJson(dashboard)` render one dashboard.
|
|
50
60
|
- `validateGrafanaOutput({ dashboards, datasources })` and `validateDashboardSchema(json)` run the checks without a build.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Grafana RBAC actions chant's live paths call, for a custom role on the
|
|
3
|
+
* service account whose token a `grafana.profiles.<env>` entry names. The
|
|
4
|
+
* basic Editor role covers all of them; these are for a narrower role.
|
|
5
|
+
*
|
|
6
|
+
* - `Observe`: `chant lifecycle diff --live` and `chant import --from`
|
|
7
|
+
* (#2946), which read dashboards, folders and datasources.
|
|
8
|
+
* - `Apply`: the API applier (#2948), which also reads what it writes to
|
|
9
|
+
* compare, and writes folders, library panels and dashboards.
|
|
10
|
+
* - `Prune`: the applier with `prune`, which deletes dashboards and folders
|
|
11
|
+
* (never library panels or datasources).
|
|
12
|
+
*
|
|
13
|
+
* Grant them on `folders:*` and `dashboards:*` scopes, or on the folders
|
|
14
|
+
* chant writes to.
|
|
15
|
+
*/
|
|
16
|
+
export declare const GrafanaActions: {
|
|
17
|
+
readonly Observe: readonly ["dashboards:read", "folders:read", "datasources:read"];
|
|
18
|
+
readonly Apply: readonly ["dashboards:read", "dashboards:create", "dashboards:write", "folders:read", "folders:create", "folders:write", "library.panels:read", "library.panels:create", "library.panels:write"];
|
|
19
|
+
readonly Prune: readonly ["dashboards:read", "dashboards:delete", "folders:read", "folders:delete"];
|
|
20
|
+
};
|
|
21
|
+
export type GrafanaAccessLevel = keyof typeof GrafanaActions;
|
|
22
|
+
/** The actions for one or more access levels, deduplicated, in first-seen order. */
|
|
23
|
+
export declare function grafanaActionsFor(...levels: GrafanaAccessLevel[]): string[];
|
|
24
|
+
//# sourceMappingURL=grafana.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grafana.d.ts","sourceRoot":"","sources":["../../src/actions/grafana.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,cAAc;;;;CAcjB,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,MAAM,OAAO,cAAc,CAAC;AAK7D,oFAAoF;AACpF,wBAAgB,iBAAiB,CAAC,GAAG,MAAM,EAAE,kBAAkB,EAAE,GAAG,MAAM,EAAE,CAE3E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,KAAK,kBAAkB,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* From alerting entities to Grafana's alerting provisioning file,
|
|
3
|
+
* `provisioning/alerting/chant.yaml`.
|
|
4
|
+
*
|
|
5
|
+
* The file is what Grafana's file provisioner reads
|
|
6
|
+
* (`pkg/services/provisioning/alerting`, the same at v12.4.11 and v13.2.2)
|
|
7
|
+
* and what `GET /api/v1/provisioning/*\/export` writes: `apiVersion: 1`
|
|
8
|
+
* and the lists `groups`, `contactPoints`, `policies`, `muteTimes` and
|
|
9
|
+
* `templates`. Mount `provisioning/` at `/etc/grafana/provisioning`, as for
|
|
10
|
+
* datasources and dashboards.
|
|
11
|
+
*
|
|
12
|
+
* Plain functions, so a test or another lexicon can render the same file
|
|
13
|
+
* with `alertingYaml()` without a build.
|
|
14
|
+
*/
|
|
15
|
+
import type { Declarable } from "@intentius/chant/declarable";
|
|
16
|
+
import { type AlertDuration, type AlertRuleData, type AlertRuleEntity, type AlertRuleGroupEntity, type ContactPointEntity, type MuteTimingEntity, type NotificationPolicyEntity, type NotificationTemplateEntity, type RelativeTimeRange } from "./alerting.js";
|
|
17
|
+
/** Where the alerting provisioning file goes, relative to the build output directory. */
|
|
18
|
+
export declare const ALERTING_FILE = "provisioning/alerting/chant.yaml";
|
|
19
|
+
/** The time range a query reads when neither it nor its rule sets one: the last 10 minutes, Grafana's editor default. */
|
|
20
|
+
export declare const DEFAULT_RELATIVE_TIME_RANGE: {
|
|
21
|
+
readonly from: 600;
|
|
22
|
+
readonly to: 0;
|
|
23
|
+
};
|
|
24
|
+
/** A rule group's evaluation interval when it sets none. */
|
|
25
|
+
export declare const DEFAULT_GROUP_INTERVAL = "1m";
|
|
26
|
+
type Json = Record<string, unknown>;
|
|
27
|
+
/** One entry of a rule's `data` in the file. */
|
|
28
|
+
export interface ProvisionedAlertQuery {
|
|
29
|
+
refId: string;
|
|
30
|
+
queryType?: string;
|
|
31
|
+
relativeTimeRange?: {
|
|
32
|
+
from: number;
|
|
33
|
+
to: number;
|
|
34
|
+
};
|
|
35
|
+
datasourceUid: string;
|
|
36
|
+
model: Json;
|
|
37
|
+
}
|
|
38
|
+
export interface ProvisionedAlertRule {
|
|
39
|
+
uid: string;
|
|
40
|
+
title: string;
|
|
41
|
+
condition?: string;
|
|
42
|
+
data: ProvisionedAlertQuery[];
|
|
43
|
+
dashboardUid?: string;
|
|
44
|
+
panelId?: number;
|
|
45
|
+
noDataState?: string;
|
|
46
|
+
execErrState?: string;
|
|
47
|
+
for?: string;
|
|
48
|
+
keepFiringFor?: string;
|
|
49
|
+
missing_series_evals_to_resolve?: number;
|
|
50
|
+
annotations?: Record<string, string>;
|
|
51
|
+
labels?: Record<string, string>;
|
|
52
|
+
isPaused?: boolean;
|
|
53
|
+
notification_settings?: Json;
|
|
54
|
+
record?: Json;
|
|
55
|
+
}
|
|
56
|
+
export interface ProvisionedRuleGroup {
|
|
57
|
+
orgId?: number;
|
|
58
|
+
name: string;
|
|
59
|
+
folder: string;
|
|
60
|
+
interval: string;
|
|
61
|
+
rules: ProvisionedAlertRule[];
|
|
62
|
+
}
|
|
63
|
+
export interface ProvisionedContactPoint {
|
|
64
|
+
orgId?: number;
|
|
65
|
+
name: string;
|
|
66
|
+
receivers: Array<{
|
|
67
|
+
uid: string;
|
|
68
|
+
type: string;
|
|
69
|
+
settings: Json;
|
|
70
|
+
disableResolveMessage?: boolean;
|
|
71
|
+
}>;
|
|
72
|
+
}
|
|
73
|
+
export interface ProvisionedMuteTiming {
|
|
74
|
+
orgId?: number;
|
|
75
|
+
name: string;
|
|
76
|
+
time_intervals: Json[];
|
|
77
|
+
}
|
|
78
|
+
export interface ProvisionedTemplate {
|
|
79
|
+
orgId?: number;
|
|
80
|
+
name: string;
|
|
81
|
+
template: string;
|
|
82
|
+
}
|
|
83
|
+
/** The alerting provisioning file, parsed. */
|
|
84
|
+
export interface AlertingFile {
|
|
85
|
+
apiVersion: 1;
|
|
86
|
+
groups?: ProvisionedRuleGroup[];
|
|
87
|
+
contactPoints?: ProvisionedContactPoint[];
|
|
88
|
+
policies?: Json[];
|
|
89
|
+
muteTimes?: ProvisionedMuteTiming[];
|
|
90
|
+
templates?: ProvisionedTemplate[];
|
|
91
|
+
}
|
|
92
|
+
/** The keys an alerting provisioning file can hold, from `AlertingFileV1`. */
|
|
93
|
+
export declare const ALERTING_FILE_KEYS: readonly ["apiVersion", "groups", "deleteRules", "contactPoints", "deleteContactPoints", "policies", "resetPolicies", "muteTimes", "deleteMuteTimes", "templates", "deleteTemplates"];
|
|
94
|
+
/** A duration as whole seconds: a number is taken as seconds, a string as a Prometheus duration. */
|
|
95
|
+
export declare function durationSeconds(value: AlertDuration, what: string): number;
|
|
96
|
+
/** One entry of `data`, as the file holds it. */
|
|
97
|
+
export declare function alertQueryJson(item: AlertRuleData, index: number, ruleRange: RelativeTimeRange | undefined, rule: string): ProvisionedAlertQuery;
|
|
98
|
+
/** One rule as the file holds it. */
|
|
99
|
+
export declare function alertRuleJson(rule: AlertRuleEntity): ProvisionedAlertRule;
|
|
100
|
+
/** One rule group as the file holds it. */
|
|
101
|
+
export declare function ruleGroupJson(group: AlertRuleGroupEntity): ProvisionedRuleGroup;
|
|
102
|
+
/** One contact point as the file holds it. A receiver without a uid gets one from the name and the integration type. */
|
|
103
|
+
export declare function contactPointJson(cp: ContactPointEntity): ProvisionedContactPoint;
|
|
104
|
+
/** One organisation's policy tree as the file holds it. */
|
|
105
|
+
export declare function notificationPolicyJson(policy: NotificationPolicyEntity): Json;
|
|
106
|
+
export declare function muteTimingJson(t: MuteTimingEntity): ProvisionedMuteTiming;
|
|
107
|
+
export declare function notificationTemplateJson(t: NotificationTemplateEntity): ProvisionedTemplate;
|
|
108
|
+
/** The alerting provisioning file as YAML text. */
|
|
109
|
+
export declare function alertingYaml(file: AlertingFile): string;
|
|
110
|
+
/** Summary of the alerting a build provisions, for the build index. */
|
|
111
|
+
export interface AlertingIndex {
|
|
112
|
+
ruleGroups: Array<{
|
|
113
|
+
name: string;
|
|
114
|
+
folder: string;
|
|
115
|
+
rules: number;
|
|
116
|
+
}>;
|
|
117
|
+
contactPoints: string[];
|
|
118
|
+
policies: number;
|
|
119
|
+
muteTimings: string[];
|
|
120
|
+
templates: string[];
|
|
121
|
+
}
|
|
122
|
+
/** The alerting provisioning file for the alerting entities among these, or undefined when there are none. */
|
|
123
|
+
export declare function buildAlerting(entities: Iterable<Declarable>): {
|
|
124
|
+
file: AlertingFile;
|
|
125
|
+
index: AlertingIndex;
|
|
126
|
+
} | undefined;
|
|
127
|
+
export {};
|
|
128
|
+
//# sourceMappingURL=alerting-build.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alerting-build.d.ts","sourceRoot":"","sources":["../src/alerting-build.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAE9D,OAAO,EASL,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAE/B,KAAK,iBAAiB,EACvB,MAAM,YAAY,CAAC;AAQpB,yFAAyF;AACzF,eAAO,MAAM,aAAa,qCAAqC,CAAC;AAEhE,yHAAyH;AACzH,eAAO,MAAM,2BAA2B;;;CAAgC,CAAC;AAEzE,4DAA4D;AAC5D,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAE3C,KAAK,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEpC,gDAAgD;AAChD,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IACjD,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,IAAI,CAAC;CACb;AAED,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,E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;IAC5B,UAAU,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACnE,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,8GAA8G;AAC9G,wBAAgB,aAAa,CAAC,QAAQ,EAAE,QAAQ,CAAC,UAAU,CAAC,GAAG;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,KAAK,EAAE,aAAa,CAAA;CAAE,GAAG,SAAS,CA4BtH"}
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Grafana-managed alerting: rule groups, their rules, queries and
|
|
3
|
+
* server-side expressions, contact points, the notification policy tree,
|
|
4
|
+
* mute timings and notification templates.
|
|
5
|
+
*
|
|
6
|
+
* Everything here is written to Grafana's alerting file provisioning
|
|
7
|
+
* format, `provisioning/alerting/chant.yaml` (see `alerting-build.ts`). The
|
|
8
|
+
* shapes follow the file format as Grafana reads it
|
|
9
|
+
* (`pkg/services/provisioning/alerting/*_types.go`, identical at v12.4.11
|
|
10
|
+
* and v13.2.2), so a key here is the key in the file. Server-side
|
|
11
|
+
* expressions are typed from the vendored `expr` schema (see `src/pin.ts`).
|
|
12
|
+
*
|
|
13
|
+
* Resources: `AlertRuleGroup`, `ContactPoint`, `NotificationPolicy`,
|
|
14
|
+
* `MuteTiming`, `NotificationTemplate`. Property-kind (they live inside a
|
|
15
|
+
* rule group): `AlertRule`, `AlertQuery` and the expression classes.
|
|
16
|
+
*/
|
|
17
|
+
import type { Declarable } from "@intentius/chant/declarable";
|
|
18
|
+
import type { TimePeriodConfig } from "@intentius/chant-lexicon-prometheus/model";
|
|
19
|
+
import type { MatchOp } from "@intentius/chant-lexicon-prometheus/matchers";
|
|
20
|
+
import type { DatasourceInput, QueryEntity } from "./query.js";
|
|
21
|
+
import type { DashboardEntity } from "./dashboard.js";
|
|
22
|
+
import type { TypeClassicConditions, TypeMath, TypeReduce, TypeResample, TypeSql, TypeThreshold } from "./schema/expr.gen.js";
|
|
23
|
+
/** The datasource uid Grafana gives server-side expressions. */
|
|
24
|
+
export declare const EXPRESSION_DATASOURCE_UID = "__expr__";
|
|
25
|
+
/** A Prometheus-style duration (`30s`, `5m`, `1h`), or a number of seconds. */
|
|
26
|
+
export type AlertDuration = string | number;
|
|
27
|
+
/** How far back a query reads, relative to the evaluation time. */
|
|
28
|
+
export interface RelativeTimeRange {
|
|
29
|
+
/** How far back the range starts, e.g. `10m` or `600` (seconds). */
|
|
30
|
+
from: AlertDuration;
|
|
31
|
+
/** How far back it ends. Defaults to 0: the evaluation time. */
|
|
32
|
+
to?: AlertDuration;
|
|
33
|
+
}
|
|
34
|
+
export interface AlertQueryProps {
|
|
35
|
+
/**
|
|
36
|
+
* The datasource the query runs on: a `Datasource`, an `ExternalDatasource`,
|
|
37
|
+
* a `{ type, uid }` ref, or a bare uid string when its plugin type is not
|
|
38
|
+
* known (the checks cannot tell what it is then).
|
|
39
|
+
*/
|
|
40
|
+
datasource?: DatasourceInput | string;
|
|
41
|
+
/** A typed query (`PromQuery`, `LokiQuery`, ...) whose model and datasource are used. Set this or `model`. */
|
|
42
|
+
query?: QueryEntity;
|
|
43
|
+
/** The query model exactly as Grafana stores it. Written as it is. */
|
|
44
|
+
model?: Record<string, unknown>;
|
|
45
|
+
/** Defaults to the query's position in `data`: A, B, C, ... */
|
|
46
|
+
refId?: string;
|
|
47
|
+
queryType?: string;
|
|
48
|
+
/** Defaults to the rule's `relativeTimeRange`. */
|
|
49
|
+
relativeTimeRange?: RelativeTimeRange;
|
|
50
|
+
}
|
|
51
|
+
export interface AlertQueryEntity extends Declarable {
|
|
52
|
+
readonly props: AlertQueryProps;
|
|
53
|
+
}
|
|
54
|
+
export declare const ALERT_QUERY_TYPE = "Grafana::AlertQuery";
|
|
55
|
+
/**
|
|
56
|
+
* One datasource query of an alert rule. A typed query (`PromQuery`) can go
|
|
57
|
+
* straight into a rule's `data`; `AlertQuery` is for a query model of any
|
|
58
|
+
* plugin, or to give a typed query its own time range or refId.
|
|
59
|
+
*/
|
|
60
|
+
export declare const AlertQuery: new (props: AlertQueryProps) => AlertQueryEntity;
|
|
61
|
+
export declare function isAlertQueryEntity(value: unknown): value is AlertQueryEntity;
|
|
62
|
+
/** Fields of an expression model the builder writes itself. */
|
|
63
|
+
type Managed = "type" | "datasource" | "refId";
|
|
64
|
+
/** Every expression takes its refId (defaulting to its position) and an optional time range. */
|
|
65
|
+
interface ExpressionCommon {
|
|
66
|
+
refId?: string;
|
|
67
|
+
relativeTimeRange?: RelativeTimeRange;
|
|
68
|
+
}
|
|
69
|
+
export type ReduceExpressionProps = Omit<TypeReduce, Managed> & ExpressionCommon;
|
|
70
|
+
export type MathExpressionProps = Omit<TypeMath, Managed> & ExpressionCommon;
|
|
71
|
+
export type ThresholdExpressionProps = Omit<TypeThreshold, Managed> & ExpressionCommon;
|
|
72
|
+
export type ResampleExpressionProps = Omit<TypeResample, Managed> & ExpressionCommon;
|
|
73
|
+
export type ClassicConditionsExpressionProps = Omit<TypeClassicConditions, Managed> & ExpressionCommon;
|
|
74
|
+
export type SqlExpressionProps = Omit<TypeSql, Managed> & ExpressionCommon;
|
|
75
|
+
export type ExpressionKind = "reduce" | "math" | "threshold" | "resample" | "classic_conditions" | "sql";
|
|
76
|
+
export declare const EXPRESSION_TYPE_PREFIX = "Grafana::Expression::";
|
|
77
|
+
export interface ExpressionEntity<P = Record<string, unknown>> extends Declarable {
|
|
78
|
+
readonly props: P;
|
|
79
|
+
/** The expression's `type` in the model. */
|
|
80
|
+
readonly expressionKind: ExpressionKind;
|
|
81
|
+
}
|
|
82
|
+
/** Reduce a series to one number per series: `expression` is a refId (`A` or `$A`). */
|
|
83
|
+
export declare const ReduceExpression: new (props: ReduceExpressionProps) => ExpressionEntity<ReduceExpressionProps>;
|
|
84
|
+
/** Arithmetic and logic over results by refId: `$A / $B`, `$A > 0.05 && $B > 0.05`. */
|
|
85
|
+
export declare const MathExpression: new (props: MathExpressionProps) => ExpressionEntity<MathExpressionProps>;
|
|
86
|
+
/** Compare a result with a threshold; an `unloadEvaluator` adds a recovery threshold. */
|
|
87
|
+
export declare const ThresholdExpression: new (props: ThresholdExpressionProps) => ExpressionEntity<ThresholdExpressionProps>;
|
|
88
|
+
/** Resample a time series to a fixed `window`. */
|
|
89
|
+
export declare const ResampleExpression: new (props: ResampleExpressionProps) => ExpressionEntity<ResampleExpressionProps>;
|
|
90
|
+
/** Grafana's legacy classic conditions: reducers, evaluators and and/or across queries. */
|
|
91
|
+
export declare const ClassicConditionsExpression: new (props: ClassicConditionsExpressionProps) => ExpressionEntity<ClassicConditionsExpressionProps>;
|
|
92
|
+
/** A SQL query over the other results (Grafana's SQL expressions). */
|
|
93
|
+
export declare const SqlExpression: new (props: SqlExpressionProps) => ExpressionEntity<SqlExpressionProps>;
|
|
94
|
+
export declare function isExpressionEntity(value: unknown): value is ExpressionEntity;
|
|
95
|
+
/** One entry of a rule's `data`: a typed query, an `AlertQuery`, or an expression. */
|
|
96
|
+
export type AlertRuleData = QueryEntity<any, any> | AlertQueryEntity | ExpressionEntity<any>;
|
|
97
|
+
export type NoDataState = "NoData" | "Alerting" | "OK" | "KeepLast";
|
|
98
|
+
export type ExecErrState = "Error" | "Alerting" | "OK" | "KeepLast";
|
|
99
|
+
/** Per-rule routing: send this rule's alerts to a contact point directly, instead of through the policy tree. */
|
|
100
|
+
export interface AlertRuleNotificationSettings {
|
|
101
|
+
receiver: ContactPointEntity | string;
|
|
102
|
+
group_by?: string[];
|
|
103
|
+
group_wait?: string;
|
|
104
|
+
group_interval?: string;
|
|
105
|
+
repeat_interval?: string;
|
|
106
|
+
mute_time_intervals?: Array<MuteTimingEntity | string>;
|
|
107
|
+
active_time_intervals?: Array<MuteTimingEntity | string>;
|
|
108
|
+
}
|
|
109
|
+
/** What makes a rule a recording rule: the metric it writes and the refId it writes from. */
|
|
110
|
+
export interface AlertRuleRecord {
|
|
111
|
+
metric: string;
|
|
112
|
+
/** The refId whose result is recorded. */
|
|
113
|
+
from: string;
|
|
114
|
+
/** Where the metric is written (a Prometheus datasource with remote write). */
|
|
115
|
+
targetDatasourceUid?: string;
|
|
116
|
+
}
|
|
117
|
+
export interface AlertRuleProps {
|
|
118
|
+
title: string;
|
|
119
|
+
/**
|
|
120
|
+
* Stable id: letters, digits, `-` and `_`, at most 40 characters. Grafana
|
|
121
|
+
* refuses a rule without one. Defaults to the title as a uid.
|
|
122
|
+
*/
|
|
123
|
+
uid?: string;
|
|
124
|
+
/** Queries and expressions, in the order Grafana evaluates them. */
|
|
125
|
+
data: AlertRuleData[];
|
|
126
|
+
/** The refId whose result decides whether the rule fires. Defaults to the last entry of `data`. Recording rules have none. */
|
|
127
|
+
condition?: string;
|
|
128
|
+
/** Default time range of every query in `data` that sets none. Defaults to the last 10 minutes, as Grafana's editor does. */
|
|
129
|
+
relativeTimeRange?: RelativeTimeRange;
|
|
130
|
+
/** How long the condition must hold before the alert fires. */
|
|
131
|
+
for?: string;
|
|
132
|
+
/** How long the alert keeps firing after the condition stops holding. */
|
|
133
|
+
keepFiringFor?: string;
|
|
134
|
+
/** What a query with no data does (Grafana's default: `NoData`). */
|
|
135
|
+
noDataState?: NoDataState;
|
|
136
|
+
/** What a query error does (Grafana's default: `Error`). */
|
|
137
|
+
execErrState?: ExecErrState;
|
|
138
|
+
/** Evaluations a series may be missing before its alert resolves. */
|
|
139
|
+
missing_series_evals_to_resolve?: number;
|
|
140
|
+
labels?: Record<string, string>;
|
|
141
|
+
annotations?: Record<string, string>;
|
|
142
|
+
isPaused?: boolean;
|
|
143
|
+
/** The dashboard (and `panelId`) the rule is linked to. */
|
|
144
|
+
dashboardUid?: DashboardEntity | string;
|
|
145
|
+
panelId?: number;
|
|
146
|
+
notification_settings?: AlertRuleNotificationSettings;
|
|
147
|
+
record?: AlertRuleRecord;
|
|
148
|
+
}
|
|
149
|
+
export interface AlertRuleEntity extends Declarable {
|
|
150
|
+
readonly props: AlertRuleProps;
|
|
151
|
+
}
|
|
152
|
+
export declare const ALERT_RULE_TYPE = "Grafana::AlertRule";
|
|
153
|
+
/** A Grafana-managed alert or recording rule, inside an `AlertRuleGroup`. */
|
|
154
|
+
export declare const AlertRule: new (props: AlertRuleProps) => AlertRuleEntity;
|
|
155
|
+
export declare function isAlertRuleEntity(value: unknown): value is AlertRuleEntity;
|
|
156
|
+
export interface AlertRuleGroupProps {
|
|
157
|
+
/** The group's name, unique within its folder. */
|
|
158
|
+
name: string;
|
|
159
|
+
/** The folder the rules are stored in, by title; Grafana creates it when missing. */
|
|
160
|
+
folder: string;
|
|
161
|
+
/** How often every rule in the group is evaluated, a multiple of 10s. Defaults to `1m`. */
|
|
162
|
+
interval?: string;
|
|
163
|
+
orgId?: number;
|
|
164
|
+
rules: AlertRuleEntity[];
|
|
165
|
+
}
|
|
166
|
+
export interface AlertRuleGroupEntity extends Declarable {
|
|
167
|
+
readonly props: AlertRuleGroupProps;
|
|
168
|
+
}
|
|
169
|
+
export declare const ALERT_RULE_GROUP_TYPE = "Grafana::AlertRuleGroup";
|
|
170
|
+
/** A group of Grafana-managed rules, evaluated together at one interval. */
|
|
171
|
+
export declare const AlertRuleGroup: new (props: AlertRuleGroupProps) => AlertRuleGroupEntity;
|
|
172
|
+
export declare function isAlertRuleGroupEntity(value: unknown): value is AlertRuleGroupEntity;
|
|
173
|
+
/** The integrations Grafana 12.4 and 13.2 offer (`GET /api/alert-notifiers`). Any other plugin id is accepted as a string. */
|
|
174
|
+
export type ContactPointIntegrationType = "dingding" | "discord" | "email" | "googlechat" | "jira" | "kafka" | "line" | "mqtt" | "oncall" | "opsgenie" | "pagerduty" | "prometheus-alertmanager" | "pushover" | "sensugo" | "slack" | "sns" | "teams" | "telegram" | "threema" | "victorops" | "webex" | "webhook" | "wechat" | "wecom";
|
|
175
|
+
/** One integration of a contact point. */
|
|
176
|
+
export interface ContactPointReceiver {
|
|
177
|
+
/** Stable id, at most 40 characters. Defaults to the contact point's name and the integration type as a uid. */
|
|
178
|
+
uid?: string;
|
|
179
|
+
type: ContactPointIntegrationType | (string & {});
|
|
180
|
+
/**
|
|
181
|
+
* The integration's settings. Write secrets (webhook URLs, tokens,
|
|
182
|
+
* passwords) as `$__env{NAME}` or `$__file{/path}`: Grafana expands them
|
|
183
|
+
* when it reads the file, and GRAF002 flags a literal.
|
|
184
|
+
*/
|
|
185
|
+
settings: Record<string, unknown>;
|
|
186
|
+
disableResolveMessage?: boolean;
|
|
187
|
+
}
|
|
188
|
+
export interface ContactPointProps {
|
|
189
|
+
/** The name policies and rules route to. */
|
|
190
|
+
name: string;
|
|
191
|
+
orgId?: number;
|
|
192
|
+
receivers: ContactPointReceiver[];
|
|
193
|
+
}
|
|
194
|
+
export interface ContactPointEntity extends Declarable {
|
|
195
|
+
readonly props: ContactPointProps;
|
|
196
|
+
}
|
|
197
|
+
export declare const CONTACT_POINT_TYPE = "Grafana::ContactPoint";
|
|
198
|
+
/** A contact point: one or more integrations alerts are sent to, under one name. */
|
|
199
|
+
export declare const ContactPoint: new (props: ContactPointProps) => ContactPointEntity;
|
|
200
|
+
export declare function isContactPointEntity(value: unknown): value is ContactPointEntity;
|
|
201
|
+
export interface MuteTimingProps {
|
|
202
|
+
/** The name policies and rules refer to. */
|
|
203
|
+
name: string;
|
|
204
|
+
orgId?: number;
|
|
205
|
+
/** When it applies: each period's fields left out match everything. */
|
|
206
|
+
time_intervals: TimePeriodConfig[];
|
|
207
|
+
}
|
|
208
|
+
export interface MuteTimingEntity extends Declarable {
|
|
209
|
+
readonly props: MuteTimingProps;
|
|
210
|
+
}
|
|
211
|
+
export declare const MUTE_TIMING_TYPE = "Grafana::MuteTiming";
|
|
212
|
+
/** A named time interval, for a policy's or rule's `mute_time_intervals` or `active_time_intervals`. */
|
|
213
|
+
export declare const MuteTiming: new (props: MuteTimingProps) => MuteTimingEntity;
|
|
214
|
+
export declare function isMuteTimingEntity(value: unknown): value is MuteTimingEntity;
|
|
215
|
+
export interface NotificationTemplateProps {
|
|
216
|
+
/** The template group's name. */
|
|
217
|
+
name: string;
|
|
218
|
+
orgId?: number;
|
|
219
|
+
/** Go template text, usually one or more `{{ define "..." }}` blocks. */
|
|
220
|
+
template: string;
|
|
221
|
+
}
|
|
222
|
+
export interface NotificationTemplateEntity extends Declarable {
|
|
223
|
+
readonly props: NotificationTemplateProps;
|
|
224
|
+
}
|
|
225
|
+
export declare const NOTIFICATION_TEMPLATE_TYPE = "Grafana::NotificationTemplate";
|
|
226
|
+
/** A notification template group, usable from contact point settings. */
|
|
227
|
+
export declare const NotificationTemplate: new (props: NotificationTemplateProps) => NotificationTemplateEntity;
|
|
228
|
+
export declare function isNotificationTemplateEntity(value: unknown): value is NotificationTemplateEntity;
|
|
229
|
+
/** A label matcher as Grafana stores it: `["severity", "=", "page"]`. */
|
|
230
|
+
export type ObjectMatcher = [string, MatchOp, string];
|
|
231
|
+
/** Routing settings shared by the root policy and its child routes. */
|
|
232
|
+
interface PolicySettings {
|
|
233
|
+
/** Group alerts by these labels; `["..."]` groups by every label. */
|
|
234
|
+
group_by?: string[];
|
|
235
|
+
group_wait?: string;
|
|
236
|
+
group_interval?: string;
|
|
237
|
+
repeat_interval?: string;
|
|
238
|
+
mute_time_intervals?: Array<MuteTimingEntity | string>;
|
|
239
|
+
active_time_intervals?: Array<MuteTimingEntity | string>;
|
|
240
|
+
routes?: PolicyRoute[];
|
|
241
|
+
}
|
|
242
|
+
/** A child route of the policy tree. */
|
|
243
|
+
export interface PolicyRoute extends PolicySettings {
|
|
244
|
+
/** Defaults to the parent's receiver. */
|
|
245
|
+
receiver?: ContactPointEntity | string;
|
|
246
|
+
/** Matchers as `[label, op, value]`, the form Grafana writes. */
|
|
247
|
+
object_matchers?: ObjectMatcher[];
|
|
248
|
+
/** Matchers in Alertmanager's syntax, e.g. `severity="page"`. */
|
|
249
|
+
matchers?: string[];
|
|
250
|
+
/** @deprecated Alertmanager's old equality matchers; use `object_matchers`. */
|
|
251
|
+
match?: Record<string, string>;
|
|
252
|
+
/** @deprecated Alertmanager's old regex matchers; use `object_matchers`. */
|
|
253
|
+
match_re?: Record<string, string>;
|
|
254
|
+
/** Keep matching sibling routes after this one matches. */
|
|
255
|
+
continue?: boolean;
|
|
256
|
+
}
|
|
257
|
+
export interface NotificationPolicyProps extends PolicySettings {
|
|
258
|
+
orgId?: number;
|
|
259
|
+
/** The contact point every alert goes to unless a route sends it elsewhere. */
|
|
260
|
+
receiver: ContactPointEntity | string;
|
|
261
|
+
}
|
|
262
|
+
export interface NotificationPolicyEntity extends Declarable {
|
|
263
|
+
readonly props: NotificationPolicyProps;
|
|
264
|
+
}
|
|
265
|
+
export declare const NOTIFICATION_POLICY_TYPE = "Grafana::NotificationPolicy";
|
|
266
|
+
/**
|
|
267
|
+
* An organisation's notification policy tree, from its root. Provisioning it
|
|
268
|
+
* replaces the whole tree, so there is one per organisation.
|
|
269
|
+
*/
|
|
270
|
+
export declare const NotificationPolicy: new (props: NotificationPolicyProps) => NotificationPolicyEntity;
|
|
271
|
+
export declare function isNotificationPolicyEntity(value: unknown): value is NotificationPolicyEntity;
|
|
272
|
+
export {};
|
|
273
|
+
//# sourceMappingURL=alerting.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alerting.d.ts","sourceRoot":"","sources":["../src/alerting.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAClF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,8CAA8C,CAAC;AAC5E,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC5D,OAAO,KA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