-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi.json
6191 lines (6191 loc) · 133 KB
/
api.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"basePath": "/api",
"consumes": [
"application/json"
],
"definitions": {
"Ack": {
"type": "object"
},
"Alert": {
"properties": {
"activeAt": {
"format": "date-time",
"type": "string"
},
"annotations": {
"$ref": "#/definitions/overrideLabels"
},
"labels": {
"$ref": "#/definitions/overrideLabels"
},
"state": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"labels",
"annotations",
"state",
"value"
],
"title": "Alert has info for an alert.",
"type": "object"
},
"AlertDiscovery": {
"properties": {
"alerts": {
"items": {
"$ref": "#/definitions/Alert"
},
"type": "array"
}
},
"required": [
"alerts"
],
"title": "AlertDiscovery has info for all active alerts.",
"type": "object"
},
"AlertInstancesResponse": {
"properties": {
"instances": {
"description": "Instances is an array of arrow encoded dataframes\neach frame has a single row, and a column for each instance (alert identified by unique labels) with a boolean value (firing/not firing)",
"items": {
"items": {
"format": "uint8",
"type": "integer"
},
"type": "array"
},
"type": "array"
}
},
"type": "object"
},
"AlertManager": {
"properties": {
"url": {
"type": "string"
}
},
"title": "AlertManager models a configured Alert Manager.",
"type": "object"
},
"AlertManagerNotReady": {
"type": "object"
},
"AlertManagersResult": {
"properties": {
"activeAlertManagers": {
"items": {
"$ref": "#/definitions/AlertManager"
},
"type": "array"
},
"droppedAlertManagers": {
"items": {
"$ref": "#/definitions/AlertManager"
},
"type": "array"
}
},
"title": "AlertManagersResult contains the result from querying the alertmanagers endpoint.",
"type": "object"
},
"AlertQuery": {
"properties": {
"datasourceUid": {
"description": "Grafana data source unique identifier; it should be '__expr__' for a Server Side Expression operation.",
"type": "string"
},
"model": {
"description": "JSON is the raw JSON query and includes the above properties as well as custom properties.",
"type": "object"
},
"queryType": {
"description": "QueryType is an optional identifier for the type of query.\nIt can be used to distinguish different types of queries.",
"type": "string"
},
"refId": {
"description": "RefID is the unique identifier of the query, set by the frontend call.",
"type": "string"
},
"relativeTimeRange": {
"$ref": "#/definitions/RelativeTimeRange"
}
},
"title": "AlertQuery represents a single query associated with an alert definition.",
"type": "object"
},
"AlertQueryExport": {
"properties": {
"datasourceUid": {
"type": "string"
},
"model": {
"additionalProperties": {},
"type": "object"
},
"queryType": {
"type": "string"
},
"refId": {
"type": "string"
},
"relativeTimeRange": {
"$ref": "#/definitions/RelativeTimeRangeExport"
}
},
"title": "AlertQueryExport is the provisioned export of models.AlertQuery.",
"type": "object"
},
"AlertResponse": {
"properties": {
"data": {
"$ref": "#/definitions/AlertDiscovery"
},
"error": {
"type": "string"
},
"errorType": {
"$ref": "#/definitions/ErrorType"
},
"status": {
"type": "string"
}
},
"required": [
"status"
],
"type": "object"
},
"AlertRuleExport": {
"properties": {
"annotations": {
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"condition": {
"type": "string"
},
"dasboardUid": {
"type": "string"
},
"data": {
"items": {
"$ref": "#/definitions/AlertQueryExport"
},
"type": "array"
},
"execErrState": {
"enum": [
"OK",
"Alerting",
"Error"
],
"type": "string"
},
"for": {
"$ref": "#/definitions/Duration"
},
"isPaused": {
"type": "boolean"
},
"labels": {
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"noDataState": {
"enum": [
"Alerting",
"NoData",
"OK"
],
"type": "string"
},
"notification_settings": {
"$ref": "#/definitions/AlertRuleNotificationSettingsExport"
},
"panelId": {
"format": "int64",
"type": "integer"
},
"title": {
"type": "string"
},
"uid": {
"type": "string"
}
},
"title": "AlertRuleExport is the provisioned file export of models.AlertRule.",
"type": "object"
},
"AlertRuleGroup": {
"properties": {
"folderUid": {
"type": "string"
},
"interval": {
"format": "int64",
"type": "integer"
},
"rules": {
"items": {
"$ref": "#/definitions/ProvisionedAlertRule"
},
"type": "array"
},
"title": {
"type": "string"
}
},
"type": "object"
},
"AlertRuleGroupExport": {
"properties": {
"folder": {
"type": "string"
},
"interval": {
"$ref": "#/definitions/Duration"
},
"name": {
"type": "string"
},
"orgId": {
"format": "int64",
"type": "integer"
},
"rules": {
"items": {
"$ref": "#/definitions/AlertRuleExport"
},
"type": "array"
}
},
"title": "AlertRuleGroupExport is the provisioned file export of AlertRuleGroupV1.",
"type": "object"
},
"AlertRuleGroupMetadata": {
"properties": {
"interval": {
"format": "int64",
"type": "integer"
}
},
"type": "object"
},
"AlertRuleNotificationSettings": {
"properties": {
"group_by": {
"default": [
"alertname",
"grafana_folder"
],
"description": "Override the labels by which incoming alerts are grouped together. For example, multiple alerts coming in for\ncluster=A and alertname=LatencyHigh would be batched into a single group. To aggregate by all possible labels\nuse the special value '...' as the sole label name.\nThis effectively disables aggregation entirely, passing through all alerts as-is. This is unlikely to be what\nyou want, unless you have a very low alert volume or your upstream notification system performs its own grouping.\nMust include 'alertname' and 'grafana_folder' if not using '...'.",
"example": [
"alertname",
"grafana_folder",
"cluster"
],
"items": {
"type": "string"
},
"type": "array"
},
"group_interval": {
"description": "Override how long to wait before sending a notification about new alerts that are added to a group of alerts for\nwhich an initial notification has already been sent. (Usually ~5m or more.)",
"example": "5m",
"type": "string"
},
"group_wait": {
"description": "Override how long to initially wait to send a notification for a group of alerts. Allows to wait for an\ninhibiting alert to arrive or collect more initial alerts for the same group. (Usually ~0s to few minutes.)",
"example": "30s",
"type": "string"
},
"mute_time_intervals": {
"description": "Override the times when notifications should be muted. These must match the name of a mute time interval defined\nin the alertmanager configuration mute_time_intervals section. When muted it will not send any notifications, but\notherwise acts normally.",
"example": [
"maintenance"
],
"items": {
"type": "string"
},
"type": "array"
},
"receiver": {
"description": "Name of the receiver to send notifications to.",
"example": "grafana-default-email",
"type": "string"
},
"repeat_interval": {
"description": "Override how long to wait before sending a notification again if it has already been sent successfully for an\nalert. (Usually ~3h or more).\nNote that this parameter is implicitly bound by Alertmanager's `--data.retention` configuration flag.\nNotifications will be resent after either repeat_interval or the data retention period have passed, whichever\noccurs first. `repeat_interval` should not be less than `group_interval`.",
"example": "4h",
"type": "string"
}
},
"required": [
"receiver"
],
"type": "object"
},
"AlertRuleNotificationSettingsExport": {
"properties": {
"group_by": {
"items": {
"type": "string"
},
"type": "array"
},
"group_interval": {
"type": "string"
},
"group_wait": {
"type": "string"
},
"mute_time_intervals": {
"items": {
"type": "string"
},
"type": "array"
},
"receiver": {
"type": "string"
},
"repeat_interval": {
"type": "string"
}
},
"title": "AlertRuleNotificationSettingsExport is the provisioned export of models.NotificationSettings.",
"type": "object"
},
"AlertingFileExport": {
"properties": {
"apiVersion": {
"format": "int64",
"type": "integer"
},
"contactPoints": {
"items": {
"$ref": "#/definitions/ContactPointExport"
},
"type": "array"
},
"groups": {
"items": {
"$ref": "#/definitions/AlertRuleGroupExport"
},
"type": "array"
},
"muteTimes": {
"items": {
"$ref": "#/definitions/MuteTimeIntervalExport"
},
"type": "array"
},
"policies": {
"items": {
"$ref": "#/definitions/NotificationPolicyExport"
},
"type": "array"
}
},
"title": "AlertingFileExport is the full provisioned file export.",
"type": "object"
},
"AlertingRule": {
"description": "adapted from cortex",
"properties": {
"activeAt": {
"format": "date-time",
"type": "string"
},
"alerts": {
"items": {
"$ref": "#/definitions/Alert"
},
"type": "array"
},
"annotations": {
"$ref": "#/definitions/overrideLabels"
},
"duration": {
"format": "double",
"type": "number"
},
"evaluationTime": {
"format": "double",
"type": "number"
},
"health": {
"type": "string"
},
"labels": {
"$ref": "#/definitions/overrideLabels"
},
"lastError": {
"type": "string"
},
"lastEvaluation": {
"format": "date-time",
"type": "string"
},
"name": {
"type": "string"
},
"query": {
"type": "string"
},
"state": {
"description": "State can be \"pending\", \"firing\", \"inactive\".",
"type": "string"
},
"totals": {
"additionalProperties": {
"format": "int64",
"type": "integer"
},
"type": "object"
},
"totalsFiltered": {
"additionalProperties": {
"format": "int64",
"type": "integer"
},
"type": "object"
},
"type": {
"$ref": "#/definitions/RuleType"
}
},
"required": [
"name",
"query",
"health",
"type",
"state",
"annotations",
"activeAt"
],
"type": "object"
},
"AlertingStatus": {
"properties": {
"alertmanagersChoice": {
"enum": [
"all",
"internal",
"external"
],
"type": "string"
},
"numExternalAlertmanagers": {
"format": "int64",
"type": "integer"
}
},
"type": "object"
},
"ApiRuleNode": {
"properties": {
"alert": {
"type": "string"
},
"annotations": {
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"expr": {
"type": "string"
},
"for": {
"type": "string"
},
"keep_firing_for": {
"type": "string"
},
"labels": {
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"record": {
"type": "string"
}
},
"type": "object"
},
"Authorization": {
"properties": {
"credentials": {
"$ref": "#/definitions/Secret"
},
"credentials_file": {
"type": "string"
},
"type": {
"type": "string"
}
},
"title": "Authorization contains HTTP authorization credentials.",
"type": "object"
},
"BacktestConfig": {
"properties": {
"annotations": {
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"condition": {
"type": "string"
},
"data": {
"items": {
"$ref": "#/definitions/AlertQuery"
},
"type": "array"
},
"for": {
"$ref": "#/definitions/Duration"
},
"from": {
"format": "date-time",
"type": "string"
},
"interval": {
"$ref": "#/definitions/Duration"
},
"labels": {
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"no_data_state": {
"enum": [
"Alerting",
"NoData",
"OK"
],
"type": "string"
},
"title": {
"type": "string"
},
"to": {
"format": "date-time",
"type": "string"
}
},
"type": "object"
},
"BacktestResult": {
"$ref": "#/definitions/Frame"
},
"BasicAuth": {
"properties": {
"password": {
"$ref": "#/definitions/Secret"
},
"password_file": {
"type": "string"
},
"username": {
"type": "string"
},
"username_file": {
"type": "string"
}
},
"title": "BasicAuth contains basic HTTP authentication credentials.",
"type": "object"
},
"ConfFloat64": {
"description": "ConfFloat64 is a float64. It Marshals float64 values of NaN of Inf\nto null.",
"format": "double",
"type": "number"
},
"Config": {
"properties": {
"global": {
"$ref": "#/definitions/GlobalConfig"
},
"inhibit_rules": {
"items": {
"$ref": "#/definitions/InhibitRule"
},
"type": "array"
},
"mute_time_intervals": {
"description": "MuteTimeIntervals is deprecated and will be removed before Alertmanager 1.0.",
"items": {
"$ref": "#/definitions/MuteTimeInterval"
},
"type": "array"
},
"route": {
"$ref": "#/definitions/Route"
},
"templates": {
"items": {
"type": "string"
},
"type": "array"
},
"time_intervals": {
"items": {
"$ref": "#/definitions/TimeInterval"
},
"type": "array"
}
},
"title": "Config is the top-level configuration for Alertmanager's config files.",
"type": "object"
},
"ContactPointExport": {
"properties": {
"name": {
"type": "string"
},
"orgId": {
"format": "int64",
"type": "integer"
},
"receivers": {
"items": {
"$ref": "#/definitions/ReceiverExport"
},
"type": "array"
}
},
"title": "ContactPointExport is the provisioned file export of alerting.ContactPointV1.",
"type": "object"
},
"ContactPoints": {
"items": {
"$ref": "#/definitions/EmbeddedContactPoint"
},
"type": "array"
},
"CounterResetHint": {
"description": "or alternatively that we are dealing with a gauge histogram, where counter resets do not apply.",
"format": "uint8",
"title": "CounterResetHint contains the known information about a counter reset,",
"type": "integer"
},
"DataLink": {
"description": "DataLink define what",
"properties": {
"internal": {
"$ref": "#/definitions/InternalDataLink"
},
"targetBlank": {
"type": "boolean"
},
"title": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"DataResponse": {
"description": "A map of RefIDs (unique query identifiers) to this type makes up the Responses property of a QueryDataResponse.\nThe Error property is used to allow for partial success responses from the containing QueryDataResponse.",
"properties": {
"Error": {
"description": "Error is a property to be set if the corresponding DataQuery has an error.",
"type": "string"
},
"ErrorSource": {
"$ref": "#/definitions/ErrorSource"
},
"Frames": {
"$ref": "#/definitions/Frames"
},
"Status": {
"$ref": "#/definitions/Status"
}
},
"title": "DataResponse contains the results from a DataQuery.",
"type": "object"
},
"DataTopic": {
"description": "nolint:revive",
"title": "DataTopic is used to identify which topic the frame should be assigned to.",
"type": "string"
},
"DiscordConfig": {
"properties": {
"http_config": {
"$ref": "#/definitions/HTTPClientConfig"
},
"message": {
"type": "string"
},
"send_resolved": {
"type": "boolean"
},
"title": {
"type": "string"
},
"webhook_url": {
"$ref": "#/definitions/SecretURL"
},
"webhook_url_file": {
"type": "string"
}
},
"title": "DiscordConfig configures notifications via Discord.",
"type": "object"
},
"DiscoveryBase": {
"properties": {
"error": {
"type": "string"
},
"errorType": {
"$ref": "#/definitions/ErrorType"
},
"status": {
"type": "string"
}
},
"required": [
"status"
],
"type": "object"
},
"Duration": {
"format": "int64",
"title": "Duration is a type used for marshalling durations.",
"type": "integer"
},
"EmailConfig": {
"properties": {
"auth_identity": {
"type": "string"
},
"auth_password": {
"$ref": "#/definitions/Secret"
},
"auth_password_file": {
"type": "string"
},
"auth_secret": {
"$ref": "#/definitions/Secret"
},
"auth_username": {
"type": "string"
},
"from": {
"type": "string"
},
"headers": {
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"hello": {
"type": "string"
},
"html": {
"type": "string"
},
"require_tls": {
"type": "boolean"
},
"send_resolved": {
"type": "boolean"
},
"smarthost": {
"$ref": "#/definitions/HostPort"
},
"text": {
"type": "string"
},
"tls_config": {
"$ref": "#/definitions/TLSConfig"
},
"to": {
"description": "Email address to notify.",
"type": "string"
}
},
"title": "EmailConfig configures notifications via mail.",
"type": "object"
},
"EmbeddedContactPoint": {
"description": "EmbeddedContactPoint is the contact point type that is used\nby grafanas embedded alertmanager implementation.",
"properties": {
"disableResolveMessage": {
"example": false,
"type": "boolean"
},
"name": {
"description": "Name is used as grouping key in the UI. Contact points with the\nsame name will be grouped in the UI.",
"example": "webhook_1",
"type": "string"
},
"provenance": {
"readOnly": true,
"type": "string"
},
"settings": {
"$ref": "#/definitions/Json"
},
"type": {
"enum": [
"alertmanager",
" dingding",
" discord",
" email",
" googlechat",
" kafka",
" line",
" opsgenie",
" pagerduty",
" pushover",
" sensugo",
" slack",
" teams",
" telegram",
" threema",
" victorops",
" webhook",
" wecom"
],
"example": "webhook",
"type": "string"
},
"uid": {
"description": "UID is the unique identifier of the contact point. The UID can be\nset by the user.",
"example": "my_external_reference",
"maxLength": 40,
"minLength": 1,
"pattern": "^[a-zA-Z0-9\\-\\_]+$",
"type": "string"
}
},
"required": [
"type",
"settings"
],
"type": "object"
},
"EnumFieldConfig": {
"description": "Enum field config\nVector values are used as lookup keys into the enum fields",
"properties": {
"color": {
"description": "Color is the color value for a given index (empty is undefined)",
"items": {
"type": "string"
},
"type": "array"
},
"description": {
"description": "Description of the enum state",
"items": {
"type": "string"
},
"type": "array"
},
"icon": {
"description": "Icon supports setting an icon for a given index value",
"items": {
"type": "string"
},
"type": "array"
},
"text": {
"description": "Value is the string display value for a given index",
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"ErrorSource": {
"description": "ErrorSource type defines the source of the error",
"type": "string"
},
"ErrorType": {
"title": "ErrorType models the different API error types.",
"type": "string"
},
"EvalAlertConditionCommand": {
"description": "EvalAlertConditionCommand is the command for evaluating a condition",
"properties": {
"condition": {
"type": "string"
},
"data": {
"items": {
"$ref": "#/definitions/AlertQuery"
},
"type": "array"
},
"now": {
"format": "date-time",
"type": "string"
}
},
"type": "object"
},
"EvalQueriesPayload": {
"properties": {
"condition": {
"type": "string"
},
"data": {
"items": {
"$ref": "#/definitions/AlertQuery"
},
"type": "array"
},
"now": {
"format": "date-time",
"type": "string"
}
},
"type": "object"
},
"EvalQueriesResponse": {},
"ExplorePanelsState": {
"description": "This is an object constructed with the keys as the values of the enum VisType and the value being a bag of properties"
},
"ExtendedReceiver": {
"properties": {
"email_configs": {
"$ref": "#/definitions/EmailConfig"
},
"grafana_managed_receiver": {
"$ref": "#/definitions/PostableGrafanaReceiver"
},
"opsgenie_configs": {
"$ref": "#/definitions/OpsGenieConfig"
},
"pagerduty_configs": {
"$ref": "#/definitions/PagerdutyConfig"
},
"pushover_configs": {
"$ref": "#/definitions/PushoverConfig"
},
"slack_configs": {
"$ref": "#/definitions/SlackConfig"
},
"victorops_configs": {
"$ref": "#/definitions/VictorOpsConfig"
},
"webhook_configs": {
"$ref": "#/definitions/WebhookConfig"
},
"wechat_configs": {