@intentius/chant-lexicon-prometheus 0.96.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.
Files changed (237) hide show
  1. package/README.md +58 -0
  2. package/dist/alertmanager.d.ts +81 -0
  3. package/dist/alertmanager.d.ts.map +1 -0
  4. package/dist/build.d.ts +33 -0
  5. package/dist/build.d.ts.map +1 -0
  6. package/dist/catalog.d.ts +17 -0
  7. package/dist/catalog.d.ts.map +1 -0
  8. package/dist/codegen/docs-cli.d.ts +3 -0
  9. package/dist/codegen/docs-cli.d.ts.map +1 -0
  10. package/dist/codegen/docs.d.ts +9 -0
  11. package/dist/codegen/docs.d.ts.map +1 -0
  12. package/dist/codegen/generate-cli.d.ts +3 -0
  13. package/dist/codegen/generate-cli.d.ts.map +1 -0
  14. package/dist/codegen/generate.d.ts +19 -0
  15. package/dist/codegen/generate.d.ts.map +1 -0
  16. package/dist/codegen/package.d.ts +7 -0
  17. package/dist/codegen/package.d.ts.map +1 -0
  18. package/dist/composites/catalog.d.ts +3 -0
  19. package/dist/composites/catalog.d.ts.map +1 -0
  20. package/dist/composites/index.d.ts +6 -0
  21. package/dist/composites/index.d.ts.map +1 -0
  22. package/dist/composites/slo.d.ts +205 -0
  23. package/dist/composites/slo.d.ts.map +1 -0
  24. package/dist/detect.d.ts +2 -0
  25. package/dist/detect.d.ts.map +1 -0
  26. package/dist/duration.d.ts +16 -0
  27. package/dist/duration.d.ts.map +1 -0
  28. package/dist/index.d.ts +14 -0
  29. package/dist/index.d.ts.map +1 -0
  30. package/dist/init-templates.d.ts +13 -0
  31. package/dist/init-templates.d.ts.map +1 -0
  32. package/dist/integrity.json +33 -0
  33. package/dist/lint/audit-catalog.d.ts +13 -0
  34. package/dist/lint/audit-catalog.d.ts.map +1 -0
  35. package/dist/lint/post-synth/index.d.ts +3 -0
  36. package/dist/lint/post-synth/index.d.ts.map +1 -0
  37. package/dist/lint/post-synth/prom-helpers.d.ts +33 -0
  38. package/dist/lint/post-synth/prom-helpers.d.ts.map +1 -0
  39. package/dist/lint/post-synth/prom101.d.ts +8 -0
  40. package/dist/lint/post-synth/prom101.d.ts.map +1 -0
  41. package/dist/lint/post-synth/prom102.d.ts +8 -0
  42. package/dist/lint/post-synth/prom102.d.ts.map +1 -0
  43. package/dist/lint/post-synth/prom103.d.ts +8 -0
  44. package/dist/lint/post-synth/prom103.d.ts.map +1 -0
  45. package/dist/lint/post-synth/prom104.d.ts +8 -0
  46. package/dist/lint/post-synth/prom104.d.ts.map +1 -0
  47. package/dist/lint/post-synth/prom105.d.ts +8 -0
  48. package/dist/lint/post-synth/prom105.d.ts.map +1 -0
  49. package/dist/lint/post-synth/prom106.d.ts +8 -0
  50. package/dist/lint/post-synth/prom106.d.ts.map +1 -0
  51. package/dist/lint/post-synth/prom107.d.ts +8 -0
  52. package/dist/lint/post-synth/prom107.d.ts.map +1 -0
  53. package/dist/lint/post-synth/prom201.d.ts +8 -0
  54. package/dist/lint/post-synth/prom201.d.ts.map +1 -0
  55. package/dist/lint/post-synth/prom202.d.ts +8 -0
  56. package/dist/lint/post-synth/prom202.d.ts.map +1 -0
  57. package/dist/lint/post-synth/prom203.d.ts +8 -0
  58. package/dist/lint/post-synth/prom203.d.ts.map +1 -0
  59. package/dist/lint/post-synth/prom204.d.ts +8 -0
  60. package/dist/lint/post-synth/prom204.d.ts.map +1 -0
  61. package/dist/lint/post-synth/prom205.d.ts +8 -0
  62. package/dist/lint/post-synth/prom205.d.ts.map +1 -0
  63. package/dist/lint/post-synth/prom206.d.ts +8 -0
  64. package/dist/lint/post-synth/prom206.d.ts.map +1 -0
  65. package/dist/lint/post-synth/prom207.d.ts +8 -0
  66. package/dist/lint/post-synth/prom207.d.ts.map +1 -0
  67. package/dist/lint/post-synth/prom208.d.ts +8 -0
  68. package/dist/lint/post-synth/prom208.d.ts.map +1 -0
  69. package/dist/lint/post-synth/prom209.d.ts +8 -0
  70. package/dist/lint/post-synth/prom209.d.ts.map +1 -0
  71. package/dist/lint/rules/index.d.ts +7 -0
  72. package/dist/lint/rules/index.d.ts.map +1 -0
  73. package/dist/lint/rules/literal-credential.d.ts +18 -0
  74. package/dist/lint/rules/literal-credential.d.ts.map +1 -0
  75. package/dist/lint/rules/prom-ast.d.ts +14 -0
  76. package/dist/lint/rules/prom-ast.d.ts.map +1 -0
  77. package/dist/lint/rules/promql-literal.d.ts +11 -0
  78. package/dist/lint/rules/promql-literal.d.ts.map +1 -0
  79. package/dist/lint/rules/slo-literal.d.ts +13 -0
  80. package/dist/lint/rules/slo-literal.d.ts.map +1 -0
  81. package/dist/lsp/completions.d.ts +4 -0
  82. package/dist/lsp/completions.d.ts.map +1 -0
  83. package/dist/lsp/hover.d.ts +4 -0
  84. package/dist/lsp/hover.d.ts.map +1 -0
  85. package/dist/manifest.json +8 -0
  86. package/dist/matchers.d.ts +29 -0
  87. package/dist/matchers.d.ts.map +1 -0
  88. package/dist/meta.json +32 -0
  89. package/dist/model.d.ts +262 -0
  90. package/dist/model.d.ts.map +1 -0
  91. package/dist/okf/index.md +34 -0
  92. package/dist/okf/rules/PROM001.md +16 -0
  93. package/dist/okf/rules/PROM002.md +15 -0
  94. package/dist/okf/rules/PROM003.md +11 -0
  95. package/dist/okf/rules/PROM101.md +11 -0
  96. package/dist/okf/rules/PROM102.md +11 -0
  97. package/dist/okf/rules/PROM103.md +11 -0
  98. package/dist/okf/rules/PROM104.md +11 -0
  99. package/dist/okf/rules/PROM105.md +11 -0
  100. package/dist/okf/rules/PROM106.md +11 -0
  101. package/dist/okf/rules/PROM107.md +11 -0
  102. package/dist/okf/rules/PROM201.md +11 -0
  103. package/dist/okf/rules/PROM202.md +11 -0
  104. package/dist/okf/rules/PROM203.md +11 -0
  105. package/dist/okf/rules/PROM204.md +11 -0
  106. package/dist/okf/rules/PROM205.md +11 -0
  107. package/dist/okf/rules/PROM206.md +11 -0
  108. package/dist/okf/rules/PROM207.md +11 -0
  109. package/dist/okf/rules/PROM208.md +11 -0
  110. package/dist/okf/rules/PROM209.md +11 -0
  111. package/dist/okf/types/AlertmanagerSettings.md +13 -0
  112. package/dist/okf/types/InhibitRule.md +9 -0
  113. package/dist/okf/types/Receiver.md +13 -0
  114. package/dist/okf/types/Route.md +9 -0
  115. package/dist/okf/types/RuleGroup.md +13 -0
  116. package/dist/okf/types/TimeInterval.md +9 -0
  117. package/dist/package-cli.d.ts +3 -0
  118. package/dist/package-cli.d.ts.map +1 -0
  119. package/dist/pin.d.ts +20 -0
  120. package/dist/pin.d.ts.map +1 -0
  121. package/dist/plugin.d.ts +10 -0
  122. package/dist/plugin.d.ts.map +1 -0
  123. package/dist/promql.d.ts +25 -0
  124. package/dist/promql.d.ts.map +1 -0
  125. package/dist/rule-eval.d.ts +67 -0
  126. package/dist/rule-eval.d.ts.map +1 -0
  127. package/dist/rules/literal-credential.ts +84 -0
  128. package/dist/rules/prom-ast.ts +30 -0
  129. package/dist/rules/prom-helpers.ts +89 -0
  130. package/dist/rules/prom101.ts +17 -0
  131. package/dist/rules/prom102.ts +17 -0
  132. package/dist/rules/prom103.ts +17 -0
  133. package/dist/rules/prom104.ts +17 -0
  134. package/dist/rules/prom105.ts +17 -0
  135. package/dist/rules/prom106.ts +17 -0
  136. package/dist/rules/prom107.ts +17 -0
  137. package/dist/rules/prom201.ts +17 -0
  138. package/dist/rules/prom202.ts +17 -0
  139. package/dist/rules/prom203.ts +17 -0
  140. package/dist/rules/prom204.ts +17 -0
  141. package/dist/rules/prom205.ts +17 -0
  142. package/dist/rules/prom206.ts +17 -0
  143. package/dist/rules/prom207.ts +17 -0
  144. package/dist/rules/prom208.ts +17 -0
  145. package/dist/rules/prom209.ts +17 -0
  146. package/dist/rules/promql-literal.ts +55 -0
  147. package/dist/rules/slo-literal.ts +81 -0
  148. package/dist/rules.d.ts +59 -0
  149. package/dist/rules.d.ts.map +1 -0
  150. package/dist/serializer.d.ts +27 -0
  151. package/dist/serializer.d.ts.map +1 -0
  152. package/dist/skill-defs.d.ts +3 -0
  153. package/dist/skill-defs.d.ts.map +1 -0
  154. package/dist/skills/chant-prometheus-alertmanager.md +58 -0
  155. package/dist/skills/chant-prometheus-kubernetes.md +48 -0
  156. package/dist/skills/chant-prometheus.md +91 -0
  157. package/dist/tools.d.ts +30 -0
  158. package/dist/tools.d.ts.map +1 -0
  159. package/dist/types/index.d.ts +3 -0
  160. package/dist/validate-cli.d.ts +3 -0
  161. package/dist/validate-cli.d.ts.map +1 -0
  162. package/dist/validate-config.d.ts +35 -0
  163. package/dist/validate-config.d.ts.map +1 -0
  164. package/dist/validate.d.ts +11 -0
  165. package/dist/validate.d.ts.map +1 -0
  166. package/package.json +77 -0
  167. package/src/alertmanager.ts +143 -0
  168. package/src/build.ts +199 -0
  169. package/src/catalog.ts +65 -0
  170. package/src/codegen/docs-cli.ts +4 -0
  171. package/src/codegen/docs.ts +104 -0
  172. package/src/codegen/generate-cli.ts +8 -0
  173. package/src/codegen/generate.ts +49 -0
  174. package/src/codegen/package.ts +41 -0
  175. package/src/composites/catalog.test.ts +37 -0
  176. package/src/composites/catalog.ts +65 -0
  177. package/src/composites/composites.test.ts +256 -0
  178. package/src/composites/index.ts +23 -0
  179. package/src/composites/slo-burn.test.ts +289 -0
  180. package/src/composites/slo.ts +471 -0
  181. package/src/detect.ts +12 -0
  182. package/src/duration.ts +51 -0
  183. package/src/generated/lexicon-prometheus.json +32 -0
  184. package/src/index.ts +97 -0
  185. package/src/init-templates.test.ts +29 -0
  186. package/src/init-templates.ts +76 -0
  187. package/src/lint/audit-catalog.ts +123 -0
  188. package/src/lint/post-synth/index.ts +37 -0
  189. package/src/lint/post-synth/post-synth.test.ts +256 -0
  190. package/src/lint/post-synth/prom-helpers.ts +89 -0
  191. package/src/lint/post-synth/prom101.ts +17 -0
  192. package/src/lint/post-synth/prom102.ts +17 -0
  193. package/src/lint/post-synth/prom103.ts +17 -0
  194. package/src/lint/post-synth/prom104.ts +17 -0
  195. package/src/lint/post-synth/prom105.ts +17 -0
  196. package/src/lint/post-synth/prom106.ts +17 -0
  197. package/src/lint/post-synth/prom107.ts +17 -0
  198. package/src/lint/post-synth/prom201.ts +17 -0
  199. package/src/lint/post-synth/prom202.ts +17 -0
  200. package/src/lint/post-synth/prom203.ts +17 -0
  201. package/src/lint/post-synth/prom204.ts +17 -0
  202. package/src/lint/post-synth/prom205.ts +17 -0
  203. package/src/lint/post-synth/prom206.ts +17 -0
  204. package/src/lint/post-synth/prom207.ts +17 -0
  205. package/src/lint/post-synth/prom208.ts +17 -0
  206. package/src/lint/post-synth/prom209.ts +17 -0
  207. package/src/lint/rules/index.ts +11 -0
  208. package/src/lint/rules/literal-credential.ts +84 -0
  209. package/src/lint/rules/prom-ast.ts +30 -0
  210. package/src/lint/rules/promql-literal.ts +55 -0
  211. package/src/lint/rules/rules.test.ts +114 -0
  212. package/src/lint/rules/slo-literal.ts +81 -0
  213. package/src/lsp/completions.test.ts +23 -0
  214. package/src/lsp/completions.ts +15 -0
  215. package/src/lsp/hover.test.ts +27 -0
  216. package/src/lsp/hover.ts +26 -0
  217. package/src/matchers.ts +132 -0
  218. package/src/model.test.ts +104 -0
  219. package/src/model.ts +290 -0
  220. package/src/package-cli.ts +17 -0
  221. package/src/pin.ts +13 -0
  222. package/src/plugin.test.ts +73 -0
  223. package/src/plugin.ts +129 -0
  224. package/src/promql.ts +46 -0
  225. package/src/rule-eval.ts +397 -0
  226. package/src/rules.ts +127 -0
  227. package/src/serializer.test.ts +179 -0
  228. package/src/serializer.ts +55 -0
  229. package/src/skill-defs.ts +43 -0
  230. package/src/skills/chant-prometheus-alertmanager.md +58 -0
  231. package/src/skills/chant-prometheus-kubernetes.md +48 -0
  232. package/src/skills/chant-prometheus.md +91 -0
  233. package/src/tools.test.ts +119 -0
  234. package/src/tools.ts +70 -0
  235. package/src/validate-cli.ts +7 -0
  236. package/src/validate-config.ts +400 -0
  237. package/src/validate.ts +66 -0
@@ -0,0 +1,262 @@
1
+ /**
2
+ * The plain-data model of a Prometheus rule file and an Alertmanager config.
3
+ *
4
+ * Everything else in this lexicon reads or writes these shapes: the serializer
5
+ * builds them from declared entities, the YAML emitter prints them, the checks
6
+ * validate them, and other lexicons (the k8s `PrometheusRule`, the SLO
7
+ * composite, Grafana panels) read them. They are exactly the files' own
8
+ * layouts, so a parsed rule file or `alertmanager.yml` already is one and
9
+ * needs no conversion.
10
+ *
11
+ * Field names keep the files' snake_case (`keep_firing_for`, `group_wait`),
12
+ * so a declaration reads the same as the file it produces and the upstream
13
+ * docs apply word for word.
14
+ */
15
+ /** Labels or annotations: string keys to string values. */
16
+ export type LabelSet = Record<string, string>;
17
+ /** A recording rule: evaluates `expr` and stores the result as the series `record`. */
18
+ export interface RecordingRuleConfig {
19
+ /** The metric name the result is stored under, e.g. `job:http_requests:rate5m`. */
20
+ record: string;
21
+ /** The PromQL expression. */
22
+ expr: string;
23
+ /** Labels added to the stored series. */
24
+ labels?: LabelSet;
25
+ }
26
+ /** An alerting rule: fires while `expr` returns anything, after `for`. */
27
+ export interface AlertingRuleConfig {
28
+ /** The alert name, the `alertname` label on every alert it fires. */
29
+ alert: string;
30
+ /** The PromQL expression. Every series it returns is one alert. */
31
+ expr: string;
32
+ /** How long the expression must hold before the alert fires, e.g. `5m`. */
33
+ for?: string;
34
+ /** How long the alert keeps firing after the expression stops returning it. */
35
+ keep_firing_for?: string;
36
+ /** Labels added to the alert. Alertmanager routes on these; set `severity`. */
37
+ labels?: LabelSet;
38
+ /** Annotations added to the alert, e.g. `summary`, `description`, `runbook_url`. */
39
+ annotations?: LabelSet;
40
+ }
41
+ export type RuleConfig = RecordingRuleConfig | AlertingRuleConfig;
42
+ /** One entry under `groups:` in a rule file, and one entry in a `PrometheusRule`'s `spec.groups`. */
43
+ export interface RuleGroupConfig {
44
+ name: string;
45
+ /** How often the group is evaluated. Defaults to the global `evaluation_interval`. */
46
+ interval?: string;
47
+ /** Evaluate the group this far in the past, for late-arriving data. */
48
+ query_offset?: string;
49
+ /** Cap on alerts (alerting rules) or series (recording rules) a rule may produce; 0 is no limit. */
50
+ limit?: number;
51
+ /** Labels added to every rule in the group. A rule's own labels win. */
52
+ labels?: LabelSet;
53
+ rules: RuleConfig[];
54
+ }
55
+ /** A whole rule file, the YAML `rule_files:` points at and `promtool check rules` reads. */
56
+ export interface RuleFileConfig {
57
+ groups: RuleGroupConfig[];
58
+ }
59
+ export declare function isRecordingRuleConfig(rule: unknown): rule is RecordingRuleConfig;
60
+ export declare function isAlertingRuleConfig(rule: unknown): rule is AlertingRuleConfig;
61
+ /** The rule's name: `record` for a recording rule, `alert` for an alerting rule. */
62
+ export declare function ruleName(rule: RuleConfig): string;
63
+ /** HTTP client settings shared by the receivers that make HTTP calls. */
64
+ export interface HttpClientConfig {
65
+ basic_auth?: {
66
+ username?: string;
67
+ username_file?: string;
68
+ password?: string;
69
+ password_file?: string;
70
+ };
71
+ authorization?: {
72
+ type?: string;
73
+ credentials?: string;
74
+ credentials_file?: string;
75
+ };
76
+ bearer_token?: string;
77
+ bearer_token_file?: string;
78
+ oauth2?: Record<string, unknown>;
79
+ proxy_url?: string;
80
+ follow_redirects?: boolean;
81
+ enable_http2?: boolean;
82
+ tls_config?: {
83
+ ca_file?: string;
84
+ cert_file?: string;
85
+ key_file?: string;
86
+ server_name?: string;
87
+ insecure_skip_verify?: boolean;
88
+ min_version?: string;
89
+ };
90
+ }
91
+ interface NotifierBase {
92
+ /** Whether to notify about resolved alerts too. */
93
+ send_resolved?: boolean;
94
+ }
95
+ export interface WebhookConfig extends NotifierBase {
96
+ /** Where alerts are POSTed. Set this or `url_file`. */
97
+ url?: string;
98
+ url_file?: string;
99
+ http_config?: HttpClientConfig;
100
+ /** Most alerts per message; 0 sends them all. */
101
+ max_alerts?: number;
102
+ timeout?: string;
103
+ }
104
+ export interface EmailConfig extends NotifierBase {
105
+ to: string;
106
+ from?: string;
107
+ /** `host:port` of the SMTP server. Falls back to `global.smtp_smarthost`. */
108
+ smarthost?: string;
109
+ hello?: string;
110
+ auth_username?: string;
111
+ auth_password?: string;
112
+ auth_password_file?: string;
113
+ auth_secret?: string;
114
+ auth_secret_file?: string;
115
+ auth_identity?: string;
116
+ require_tls?: boolean;
117
+ tls_config?: HttpClientConfig["tls_config"];
118
+ html?: string;
119
+ text?: string;
120
+ headers?: Record<string, string>;
121
+ }
122
+ export interface SlackConfig extends NotifierBase {
123
+ /** The incoming-webhook URL. It is a credential: prefer `api_url_file`. */
124
+ api_url?: string;
125
+ api_url_file?: string;
126
+ channel?: string;
127
+ username?: string;
128
+ color?: string;
129
+ title?: string;
130
+ title_link?: string;
131
+ pretext?: string;
132
+ text?: string;
133
+ footer?: string;
134
+ fallback?: string;
135
+ icon_emoji?: string;
136
+ icon_url?: string;
137
+ link_names?: boolean;
138
+ short_fields?: boolean;
139
+ mrkdwn_in?: string[];
140
+ fields?: Array<{
141
+ title: string;
142
+ value: string;
143
+ short?: boolean;
144
+ }>;
145
+ actions?: Array<Record<string, unknown>>;
146
+ http_config?: HttpClientConfig;
147
+ }
148
+ export interface PagerDutyConfig extends NotifierBase {
149
+ /** Events API v2 integration key. A credential: prefer `routing_key_file`. */
150
+ routing_key?: string;
151
+ routing_key_file?: string;
152
+ /** Events API v1 integration key. A credential: prefer `service_key_file`. */
153
+ service_key?: string;
154
+ service_key_file?: string;
155
+ url?: string;
156
+ client?: string;
157
+ client_url?: string;
158
+ description?: string;
159
+ severity?: string;
160
+ class?: string;
161
+ component?: string;
162
+ group?: string;
163
+ source?: string;
164
+ details?: Record<string, string>;
165
+ links?: Array<{
166
+ href: string;
167
+ text?: string;
168
+ }>;
169
+ images?: Array<{
170
+ src: string;
171
+ alt?: string;
172
+ href?: string;
173
+ }>;
174
+ http_config?: HttpClientConfig;
175
+ }
176
+ /** One entry under `receivers:`. */
177
+ export interface ReceiverConfig {
178
+ name: string;
179
+ webhook_configs?: WebhookConfig[];
180
+ email_configs?: EmailConfig[];
181
+ slack_configs?: SlackConfig[];
182
+ pagerduty_configs?: PagerDutyConfig[];
183
+ }
184
+ /** A route in the routing tree. The top-level `route:` is the root. */
185
+ export interface RouteConfig {
186
+ receiver?: string;
187
+ group_by?: string[];
188
+ continue?: boolean;
189
+ /** Matchers in Alertmanager's syntax, e.g. `severity="critical"` or `team=~"db|infra"`. */
190
+ matchers?: string[];
191
+ group_wait?: string;
192
+ group_interval?: string;
193
+ repeat_interval?: string;
194
+ mute_time_intervals?: string[];
195
+ active_time_intervals?: string[];
196
+ routes?: RouteConfig[];
197
+ }
198
+ /** One entry under `inhibit_rules:`. */
199
+ export interface InhibitRuleConfig {
200
+ source_matchers?: string[];
201
+ target_matchers?: string[];
202
+ /** Labels that must be equal on source and target for the inhibition to apply. */
203
+ equal?: string[];
204
+ }
205
+ export interface TimeRangeConfig {
206
+ start_time: string;
207
+ end_time: string;
208
+ }
209
+ /** One period inside a time interval. Every field left out matches everything. */
210
+ export interface TimePeriodConfig {
211
+ times?: TimeRangeConfig[];
212
+ /** e.g. `monday:friday`, `saturday`. */
213
+ weekdays?: string[];
214
+ /** e.g. `1:5`, `-1`. */
215
+ days_of_month?: string[];
216
+ /** e.g. `january:march`, `12`. */
217
+ months?: string[];
218
+ /** e.g. `2026:2027`. */
219
+ years?: string[];
220
+ /** An IANA time zone name, e.g. `Europe/Berlin`. Defaults to UTC. */
221
+ location?: string;
222
+ }
223
+ /** One entry under `time_intervals:`. */
224
+ export interface TimeIntervalConfig {
225
+ name: string;
226
+ time_intervals: TimePeriodConfig[];
227
+ }
228
+ /** `global:` settings. */
229
+ export interface AlertmanagerGlobalConfig {
230
+ resolve_timeout?: string;
231
+ smtp_from?: string;
232
+ smtp_smarthost?: string;
233
+ smtp_hello?: string;
234
+ smtp_auth_username?: string;
235
+ smtp_auth_password?: string;
236
+ smtp_auth_password_file?: string;
237
+ smtp_auth_secret?: string;
238
+ smtp_auth_secret_file?: string;
239
+ smtp_auth_identity?: string;
240
+ smtp_require_tls?: boolean;
241
+ slack_api_url?: string;
242
+ slack_api_url_file?: string;
243
+ pagerduty_url?: string;
244
+ http_config?: HttpClientConfig;
245
+ }
246
+ /** A whole `alertmanager.yml`, the file `amtool check-config` reads. */
247
+ export interface AlertmanagerConfig {
248
+ global?: AlertmanagerGlobalConfig;
249
+ templates?: string[];
250
+ route?: RouteConfig;
251
+ inhibit_rules?: InhibitRuleConfig[];
252
+ receivers?: ReceiverConfig[];
253
+ time_intervals?: TimeIntervalConfig[];
254
+ }
255
+ /** The four receiver integrations this lexicon types. */
256
+ export declare const RECEIVER_INTEGRATIONS: readonly ["webhook_configs", "email_configs", "slack_configs", "pagerduty_configs"];
257
+ /** True when a parsed document has the shape of a Prometheus rule file. */
258
+ export declare function looksLikeRuleFile(value: unknown): value is RuleFileConfig;
259
+ /** True when a parsed document has the shape of an `alertmanager.yml`. */
260
+ export declare function looksLikeAlertmanagerConfig(value: unknown): value is AlertmanagerConfig;
261
+ export {};
262
+ //# sourceMappingURL=model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,2DAA2D;AAC3D,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE9C,uFAAuF;AACvF,MAAM,WAAW,mBAAmB;IAClC,mFAAmF;IACnF,MAAM,EAAE,MAAM,CAAC;IACf,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,MAAM,CAAC,EAAE,QAAQ,CAAC;CACnB;AAED,0EAA0E;AAC1E,MAAM,WAAW,kBAAkB;IACjC,qEAAqE;IACrE,KAAK,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,IAAI,EAAE,MAAM,CAAC;IACb,2EAA2E;IAC3E,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,+EAA+E;IAC/E,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,+EAA+E;IAC/E,MAAM,CAAC,EAAE,QAAQ,CAAC;IAClB,oFAAoF;IACpF,WA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AAM,CAAC;IAC5B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,gBAAgB,CAAC;CAChC;AAED,wEAAwE;AACxE,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,wBAAwB,CAAC;IAClC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,aAAa,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACpC,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;IAC7B,cAAc,CAAC,EAAE,kBAAkB,EAAE,CAAC;CACvC;AAED,yDAAyD;AACzD,eAAO,MAAM,qBAAqB,qFAAsF,CAAC;AAEzH,2EAA2E;AAC3E,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CAOzE;AAED,0EAA0E;AAC1E,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,kBAAkB,CASvF"}
@@ -0,0 +1,34 @@
1
+ ---
2
+ okf_version: '0.2'
3
+ ---
4
+
5
+ # Resource types
6
+
7
+ * [AlertmanagerSettings](/types/AlertmanagerSettings.md) - Prometheus::Alertmanager::Settings
8
+ * [InhibitRule](/types/InhibitRule.md) - Prometheus::Alertmanager::InhibitRule
9
+ * [Receiver](/types/Receiver.md) - Prometheus::Alertmanager::Receiver
10
+ * [Route](/types/Route.md) - Prometheus::Alertmanager::Route
11
+ * [RuleGroup](/types/RuleGroup.md) - Prometheus::Rules::RuleGroup
12
+ * [TimeInterval](/types/TimeInterval.md) - Prometheus::Alertmanager::TimeInterval
13
+
14
+ # Rules
15
+
16
+ * [PROM001](/rules/PROM001.md) - a credential written as a literal in a `Receiver` or
17
+ * [PROM002](/rules/PROM002.md) - a rule's `expr`, written as a string literal inside a
18
+ * [PROM003](/rules/PROM003.md) - an `Slo` whose literal objective, window or SLI expression can
19
+ * [PROM101](/rules/PROM101.md) - Two rule groups in one rule file share a name
20
+ * [PROM102](/rules/PROM102.md) - Two rules share a name and label set
21
+ * [PROM103](/rules/PROM103.md) - A rule or group duration is not a Prometheus duration
22
+ * [PROM104](/rules/PROM104.md) - A rule expression is not valid PromQL
23
+ * [PROM105](/rules/PROM105.md) - A rule or group is malformed
24
+ * [PROM106](/rules/PROM106.md) - An alerting rule has no severity label
25
+ * [PROM107](/rules/PROM107.md) - An alerting rule has no summary or description annotation
26
+ * [PROM201](/rules/PROM201.md) - A route sends to a receiver that is not declared
27
+ * [PROM202](/rules/PROM202.md) - An alert severity is not routed by any route
28
+ * [PROM203](/rules/PROM203.md) - Two receivers or two time intervals share a name
29
+ * [PROM204](/rules/PROM204.md) - A route names a time interval that is not declared
30
+ * [PROM205](/rules/PROM205.md) - The root route is missing, has no receiver, or has matchers
31
+ * [PROM206](/rules/PROM206.md) - A route or inhibit rule matcher does not parse
32
+ * [PROM207](/rules/PROM207.md) - A receiver is declared but no route sends to it
33
+ * [PROM208](/rules/PROM208.md) - An Alertmanager duration is not a duration
34
+ * [PROM209](/rules/PROM209.md) - A receiver integration is missing its destination or credential
@@ -0,0 +1,16 @@
1
+ ---
2
+ type: lint-rule
3
+ title: PROM001
4
+ description: a credential written as a literal in a `Receiver` or
5
+ id: PROM001
6
+ severity: error
7
+ category: security
8
+ lexicon: prometheus
9
+ docs: https://intentius.io/chant/lexicons/prometheus/rules/
10
+ ---
11
+ a credential written as a literal in a `Receiver` or
12
+
13
+ ## Applies to
14
+
15
+ - [AlertmanagerSettings](/types/AlertmanagerSettings.md)
16
+ - [Receiver](/types/Receiver.md)
@@ -0,0 +1,15 @@
1
+ ---
2
+ type: lint-rule
3
+ title: PROM002
4
+ description: a rule's `expr`, written as a string literal inside a
5
+ id: PROM002
6
+ severity: error
7
+ category: correctness
8
+ lexicon: prometheus
9
+ docs: https://intentius.io/chant/lexicons/prometheus/rules/
10
+ ---
11
+ a rule's `expr`, written as a string literal inside a
12
+
13
+ ## Applies to
14
+
15
+ - [RuleGroup](/types/RuleGroup.md)
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: lint-rule
3
+ title: PROM003
4
+ description: an `Slo` whose literal objective, window or SLI expression can
5
+ id: PROM003
6
+ severity: error
7
+ category: correctness
8
+ lexicon: prometheus
9
+ docs: https://intentius.io/chant/lexicons/prometheus/rules/
10
+ ---
11
+ an `Slo` whose literal objective, window or SLI expression can
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: PROM101
4
+ description: Two rule groups in one rule file share a name
5
+ id: PROM101
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: prometheus
9
+ docs: https://intentius.io/chant/lexicons/prometheus/rules/
10
+ ---
11
+ Two rule groups in one rule file share a name
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: PROM102
4
+ description: Two rules share a name and label set
5
+ id: PROM102
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: prometheus
9
+ docs: https://intentius.io/chant/lexicons/prometheus/rules/
10
+ ---
11
+ Two rules share a name and label set
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: PROM103
4
+ description: A rule or group duration is not a Prometheus duration
5
+ id: PROM103
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: prometheus
9
+ docs: https://intentius.io/chant/lexicons/prometheus/rules/
10
+ ---
11
+ A rule or group duration is not a Prometheus duration
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: PROM104
4
+ description: A rule expression is not valid PromQL
5
+ id: PROM104
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: prometheus
9
+ docs: https://intentius.io/chant/lexicons/prometheus/rules/
10
+ ---
11
+ A rule expression is not valid PromQL
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: PROM105
4
+ description: A rule or group is malformed
5
+ id: PROM105
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: prometheus
9
+ docs: https://intentius.io/chant/lexicons/prometheus/rules/
10
+ ---
11
+ A rule or group is malformed
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: PROM106
4
+ description: An alerting rule has no severity label
5
+ id: PROM106
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: prometheus
9
+ docs: https://intentius.io/chant/lexicons/prometheus/rules/
10
+ ---
11
+ An alerting rule has no severity label
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: PROM107
4
+ description: An alerting rule has no summary or description annotation
5
+ id: PROM107
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: prometheus
9
+ docs: https://intentius.io/chant/lexicons/prometheus/rules/
10
+ ---
11
+ An alerting rule has no summary or description annotation
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: PROM201
4
+ description: A route sends to a receiver that is not declared
5
+ id: PROM201
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: prometheus
9
+ docs: https://intentius.io/chant/lexicons/prometheus/rules/
10
+ ---
11
+ A route sends to a receiver that is not declared
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: PROM202
4
+ description: An alert severity is not routed by any route
5
+ id: PROM202
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: prometheus
9
+ docs: https://intentius.io/chant/lexicons/prometheus/rules/
10
+ ---
11
+ An alert severity is not routed by any route
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: PROM203
4
+ description: Two receivers or two time intervals share a name
5
+ id: PROM203
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: prometheus
9
+ docs: https://intentius.io/chant/lexicons/prometheus/rules/
10
+ ---
11
+ Two receivers or two time intervals share a name
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: PROM204
4
+ description: A route names a time interval that is not declared
5
+ id: PROM204
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: prometheus
9
+ docs: https://intentius.io/chant/lexicons/prometheus/rules/
10
+ ---
11
+ A route names a time interval that is not declared
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: PROM205
4
+ description: The root route is missing, has no receiver, or has matchers
5
+ id: PROM205
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: prometheus
9
+ docs: https://intentius.io/chant/lexicons/prometheus/rules/
10
+ ---
11
+ The root route is missing, has no receiver, or has matchers
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: PROM206
4
+ description: A route or inhibit rule matcher does not parse
5
+ id: PROM206
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: prometheus
9
+ docs: https://intentius.io/chant/lexicons/prometheus/rules/
10
+ ---
11
+ A route or inhibit rule matcher does not parse
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: PROM207
4
+ description: A receiver is declared but no route sends to it
5
+ id: PROM207
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: prometheus
9
+ docs: https://intentius.io/chant/lexicons/prometheus/rules/
10
+ ---
11
+ A receiver is declared but no route sends to it
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: PROM208
4
+ description: An Alertmanager duration is not a duration
5
+ id: PROM208
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: prometheus
9
+ docs: https://intentius.io/chant/lexicons/prometheus/rules/
10
+ ---
11
+ An Alertmanager duration is not a duration
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: PROM209
4
+ description: A receiver integration is missing its destination or credential
5
+ id: PROM209
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: prometheus
9
+ docs: https://intentius.io/chant/lexicons/prometheus/rules/
10
+ ---
11
+ A receiver integration is missing its destination or credential
@@ -0,0 +1,13 @@
1
+ ---
2
+ type: resource-type
3
+ title: AlertmanagerSettings
4
+ description: prometheus resource type Prometheus::Alertmanager::Settings
5
+ name: AlertmanagerSettings
6
+ lexicon: prometheus
7
+ resource_type: Prometheus::Alertmanager::Settings
8
+ ---
9
+ `Prometheus::Alertmanager::Settings`, a resource type of the prometheus lexicon.
10
+
11
+ ## Governed by
12
+
13
+ - [PROM001](/rules/PROM001.md): a credential written as a literal in a `Receiver` or
@@ -0,0 +1,9 @@
1
+ ---
2
+ type: resource-type
3
+ title: InhibitRule
4
+ description: prometheus resource type Prometheus::Alertmanager::InhibitRule
5
+ name: InhibitRule
6
+ lexicon: prometheus
7
+ resource_type: Prometheus::Alertmanager::InhibitRule
8
+ ---
9
+ `Prometheus::Alertmanager::InhibitRule`, a resource type of the prometheus lexicon.
@@ -0,0 +1,13 @@
1
+ ---
2
+ type: resource-type
3
+ title: Receiver
4
+ description: prometheus resource type Prometheus::Alertmanager::Receiver
5
+ name: Receiver
6
+ lexicon: prometheus
7
+ resource_type: Prometheus::Alertmanager::Receiver
8
+ ---
9
+ `Prometheus::Alertmanager::Receiver`, a resource type of the prometheus lexicon.
10
+
11
+ ## Governed by
12
+
13
+ - [PROM001](/rules/PROM001.md): a credential written as a literal in a `Receiver` or
@@ -0,0 +1,9 @@
1
+ ---
2
+ type: resource-type
3
+ title: Route
4
+ description: prometheus resource type Prometheus::Alertmanager::Route
5
+ name: Route
6
+ lexicon: prometheus
7
+ resource_type: Prometheus::Alertmanager::Route
8
+ ---
9
+ `Prometheus::Alertmanager::Route`, a resource type of the prometheus lexicon.
@@ -0,0 +1,13 @@
1
+ ---
2
+ type: resource-type
3
+ title: RuleGroup
4
+ description: prometheus resource type Prometheus::Rules::RuleGroup
5
+ name: RuleGroup
6
+ lexicon: prometheus
7
+ resource_type: Prometheus::Rules::RuleGroup
8
+ ---
9
+ `Prometheus::Rules::RuleGroup`, a resource type of the prometheus lexicon.
10
+
11
+ ## Governed by
12
+
13
+ - [PROM002](/rules/PROM002.md): a rule's `expr`, written as a string literal inside a
@@ -0,0 +1,9 @@
1
+ ---
2
+ type: resource-type
3
+ title: TimeInterval
4
+ description: prometheus resource type Prometheus::Alertmanager::TimeInterval
5
+ name: TimeInterval
6
+ lexicon: prometheus
7
+ resource_type: Prometheus::Alertmanager::TimeInterval
8
+ ---
9
+ `Prometheus::Alertmanager::TimeInterval`, a resource type of the prometheus lexicon.
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env tsx
2
+ export {};
3
+ //# sourceMappingURL=package-cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-cli.d.ts","sourceRoot":"","sources":["../src/package-cli.ts"],"names":[],"mappings":""}
package/dist/pin.d.ts ADDED
@@ -0,0 +1,20 @@
1
+ /**
2
+ * The upstream releases this lexicon's hand-written types follow.
3
+ *
4
+ * Neither Prometheus nor Alertmanager publishes a machine-readable schema for
5
+ * its config files, so the types in `model.ts` are written against the Go
6
+ * structs of these releases (`prometheus/model/rulefmt`,
7
+ * `alertmanager/config`). Moving a version is a lexicon change like any
8
+ * other, released with this package.
9
+ */
10
+ export declare const PROMETHEUS_PIN: Readonly<{
11
+ prometheus: Readonly<{
12
+ source: "github.com/prometheus/prometheus";
13
+ version: "v3.15.0";
14
+ }>;
15
+ alertmanager: Readonly<{
16
+ source: "github.com/prometheus/alertmanager";
17
+ version: "v0.34.1";
18
+ }>;
19
+ }>;
20
+ //# sourceMappingURL=pin.d.ts.map