cribl-control-plane 0.0.13__py3-none-any.whl

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.

Potentially problematic release.


This version of cribl-control-plane might be problematic. Click here for more details.

Files changed (197) hide show
  1. cribl_control_plane/__init__.py +17 -0
  2. cribl_control_plane/_hooks/__init__.py +5 -0
  3. cribl_control_plane/_hooks/clientcredentials.py +211 -0
  4. cribl_control_plane/_hooks/registration.py +13 -0
  5. cribl_control_plane/_hooks/sdkhooks.py +81 -0
  6. cribl_control_plane/_hooks/types.py +112 -0
  7. cribl_control_plane/_version.py +15 -0
  8. cribl_control_plane/auth_sdk.py +184 -0
  9. cribl_control_plane/basesdk.py +358 -0
  10. cribl_control_plane/errors/__init__.py +60 -0
  11. cribl_control_plane/errors/apierror.py +38 -0
  12. cribl_control_plane/errors/criblcontrolplaneerror.py +26 -0
  13. cribl_control_plane/errors/error.py +24 -0
  14. cribl_control_plane/errors/healthstatus_error.py +38 -0
  15. cribl_control_plane/errors/no_response_error.py +13 -0
  16. cribl_control_plane/errors/responsevalidationerror.py +25 -0
  17. cribl_control_plane/health.py +166 -0
  18. cribl_control_plane/httpclient.py +126 -0
  19. cribl_control_plane/models/__init__.py +7305 -0
  20. cribl_control_plane/models/addhectokenrequest.py +34 -0
  21. cribl_control_plane/models/authtoken.py +13 -0
  22. cribl_control_plane/models/createinputhectokenbyidop.py +45 -0
  23. cribl_control_plane/models/createinputop.py +24 -0
  24. cribl_control_plane/models/createoutputop.py +24 -0
  25. cribl_control_plane/models/createoutputtestbyidop.py +46 -0
  26. cribl_control_plane/models/criblevent.py +14 -0
  27. cribl_control_plane/models/deleteinputbyidop.py +37 -0
  28. cribl_control_plane/models/deleteoutputbyidop.py +37 -0
  29. cribl_control_plane/models/deleteoutputpqbyidop.py +36 -0
  30. cribl_control_plane/models/getinputbyidop.py +37 -0
  31. cribl_control_plane/models/getoutputbyidop.py +37 -0
  32. cribl_control_plane/models/getoutputpqbyidop.py +36 -0
  33. cribl_control_plane/models/getoutputsamplesbyidop.py +37 -0
  34. cribl_control_plane/models/healthstatus.py +36 -0
  35. cribl_control_plane/models/input.py +199 -0
  36. cribl_control_plane/models/inputappscope.py +448 -0
  37. cribl_control_plane/models/inputazureblob.py +308 -0
  38. cribl_control_plane/models/inputcollection.py +208 -0
  39. cribl_control_plane/models/inputconfluentcloud.py +585 -0
  40. cribl_control_plane/models/inputcribl.py +165 -0
  41. cribl_control_plane/models/inputcriblhttp.py +341 -0
  42. cribl_control_plane/models/inputcribllakehttp.py +342 -0
  43. cribl_control_plane/models/inputcriblmetrics.py +175 -0
  44. cribl_control_plane/models/inputcribltcp.py +299 -0
  45. cribl_control_plane/models/inputcrowdstrike.py +410 -0
  46. cribl_control_plane/models/inputdatadogagent.py +364 -0
  47. cribl_control_plane/models/inputdatagen.py +180 -0
  48. cribl_control_plane/models/inputedgeprometheus.py +551 -0
  49. cribl_control_plane/models/inputelastic.py +494 -0
  50. cribl_control_plane/models/inputeventhub.py +360 -0
  51. cribl_control_plane/models/inputexec.py +213 -0
  52. cribl_control_plane/models/inputfile.py +259 -0
  53. cribl_control_plane/models/inputfirehose.py +341 -0
  54. cribl_control_plane/models/inputgooglepubsub.py +247 -0
  55. cribl_control_plane/models/inputgrafana_union.py +1247 -0
  56. cribl_control_plane/models/inputhttp.py +403 -0
  57. cribl_control_plane/models/inputhttpraw.py +407 -0
  58. cribl_control_plane/models/inputjournalfiles.py +208 -0
  59. cribl_control_plane/models/inputkafka.py +581 -0
  60. cribl_control_plane/models/inputkinesis.py +363 -0
  61. cribl_control_plane/models/inputkubeevents.py +182 -0
  62. cribl_control_plane/models/inputkubelogs.py +256 -0
  63. cribl_control_plane/models/inputkubemetrics.py +233 -0
  64. cribl_control_plane/models/inputloki.py +468 -0
  65. cribl_control_plane/models/inputmetrics.py +290 -0
  66. cribl_control_plane/models/inputmodeldriventelemetry.py +274 -0
  67. cribl_control_plane/models/inputmsk.py +654 -0
  68. cribl_control_plane/models/inputnetflow.py +224 -0
  69. cribl_control_plane/models/inputoffice365mgmt.py +384 -0
  70. cribl_control_plane/models/inputoffice365msgtrace.py +449 -0
  71. cribl_control_plane/models/inputoffice365service.py +377 -0
  72. cribl_control_plane/models/inputopentelemetry.py +516 -0
  73. cribl_control_plane/models/inputprometheus.py +464 -0
  74. cribl_control_plane/models/inputprometheusrw.py +470 -0
  75. cribl_control_plane/models/inputrawudp.py +207 -0
  76. cribl_control_plane/models/inputs3.py +416 -0
  77. cribl_control_plane/models/inputs3inventory.py +440 -0
  78. cribl_control_plane/models/inputsecuritylake.py +425 -0
  79. cribl_control_plane/models/inputsnmp.py +274 -0
  80. cribl_control_plane/models/inputsplunk.py +387 -0
  81. cribl_control_plane/models/inputsplunkhec.py +478 -0
  82. cribl_control_plane/models/inputsplunksearch.py +537 -0
  83. cribl_control_plane/models/inputsqs.py +320 -0
  84. cribl_control_plane/models/inputsyslog_union.py +759 -0
  85. cribl_control_plane/models/inputsystemmetrics.py +533 -0
  86. cribl_control_plane/models/inputsystemstate.py +417 -0
  87. cribl_control_plane/models/inputtcp.py +359 -0
  88. cribl_control_plane/models/inputtcpjson.py +334 -0
  89. cribl_control_plane/models/inputwef.py +498 -0
  90. cribl_control_plane/models/inputwindowsmetrics.py +457 -0
  91. cribl_control_plane/models/inputwineventlogs.py +222 -0
  92. cribl_control_plane/models/inputwiz.py +334 -0
  93. cribl_control_plane/models/inputzscalerhec.py +439 -0
  94. cribl_control_plane/models/listinputop.py +24 -0
  95. cribl_control_plane/models/listoutputop.py +24 -0
  96. cribl_control_plane/models/logininfo.py +16 -0
  97. cribl_control_plane/models/output.py +229 -0
  98. cribl_control_plane/models/outputazureblob.py +471 -0
  99. cribl_control_plane/models/outputazuredataexplorer.py +660 -0
  100. cribl_control_plane/models/outputazureeventhub.py +321 -0
  101. cribl_control_plane/models/outputazurelogs.py +386 -0
  102. cribl_control_plane/models/outputclickhouse.py +650 -0
  103. cribl_control_plane/models/outputcloudwatch.py +273 -0
  104. cribl_control_plane/models/outputconfluentcloud.py +591 -0
  105. cribl_control_plane/models/outputcriblhttp.py +494 -0
  106. cribl_control_plane/models/outputcribllake.py +396 -0
  107. cribl_control_plane/models/outputcribltcp.py +387 -0
  108. cribl_control_plane/models/outputcrowdstrikenextgensiem.py +410 -0
  109. cribl_control_plane/models/outputdatadog.py +472 -0
  110. cribl_control_plane/models/outputdataset.py +437 -0
  111. cribl_control_plane/models/outputdefault.py +55 -0
  112. cribl_control_plane/models/outputdevnull.py +50 -0
  113. cribl_control_plane/models/outputdiskspool.py +89 -0
  114. cribl_control_plane/models/outputdls3.py +560 -0
  115. cribl_control_plane/models/outputdynatracehttp.py +454 -0
  116. cribl_control_plane/models/outputdynatraceotlp.py +486 -0
  117. cribl_control_plane/models/outputelastic.py +494 -0
  118. cribl_control_plane/models/outputelasticcloud.py +407 -0
  119. cribl_control_plane/models/outputexabeam.py +297 -0
  120. cribl_control_plane/models/outputfilesystem.py +357 -0
  121. cribl_control_plane/models/outputgooglechronicle.py +486 -0
  122. cribl_control_plane/models/outputgooglecloudlogging.py +557 -0
  123. cribl_control_plane/models/outputgooglecloudstorage.py +499 -0
  124. cribl_control_plane/models/outputgooglepubsub.py +274 -0
  125. cribl_control_plane/models/outputgrafanacloud_union.py +1024 -0
  126. cribl_control_plane/models/outputgraphite.py +225 -0
  127. cribl_control_plane/models/outputhoneycomb.py +369 -0
  128. cribl_control_plane/models/outputhumiohec.py +389 -0
  129. cribl_control_plane/models/outputinfluxdb.py +523 -0
  130. cribl_control_plane/models/outputkafka.py +581 -0
  131. cribl_control_plane/models/outputkinesis.py +312 -0
  132. cribl_control_plane/models/outputloki.py +425 -0
  133. cribl_control_plane/models/outputminio.py +512 -0
  134. cribl_control_plane/models/outputmsk.py +654 -0
  135. cribl_control_plane/models/outputnetflow.py +80 -0
  136. cribl_control_plane/models/outputnewrelic.py +424 -0
  137. cribl_control_plane/models/outputnewrelicevents.py +401 -0
  138. cribl_control_plane/models/outputopentelemetry.py +669 -0
  139. cribl_control_plane/models/outputprometheus.py +485 -0
  140. cribl_control_plane/models/outputring.py +121 -0
  141. cribl_control_plane/models/outputrouter.py +83 -0
  142. cribl_control_plane/models/outputs3.py +556 -0
  143. cribl_control_plane/models/outputsamplesresponse.py +14 -0
  144. cribl_control_plane/models/outputsecuritylake.py +505 -0
  145. cribl_control_plane/models/outputsentinel.py +488 -0
  146. cribl_control_plane/models/outputsentineloneaisiem.py +505 -0
  147. cribl_control_plane/models/outputservicenow.py +543 -0
  148. cribl_control_plane/models/outputsignalfx.py +369 -0
  149. cribl_control_plane/models/outputsnmp.py +80 -0
  150. cribl_control_plane/models/outputsns.py +274 -0
  151. cribl_control_plane/models/outputsplunk.py +383 -0
  152. cribl_control_plane/models/outputsplunkhec.py +434 -0
  153. cribl_control_plane/models/outputsplunklb.py +558 -0
  154. cribl_control_plane/models/outputsqs.py +328 -0
  155. cribl_control_plane/models/outputstatsd.py +224 -0
  156. cribl_control_plane/models/outputstatsdext.py +225 -0
  157. cribl_control_plane/models/outputsumologic.py +378 -0
  158. cribl_control_plane/models/outputsyslog.py +415 -0
  159. cribl_control_plane/models/outputtcpjson.py +413 -0
  160. cribl_control_plane/models/outputtestrequest.py +15 -0
  161. cribl_control_plane/models/outputtestresponse.py +29 -0
  162. cribl_control_plane/models/outputwavefront.py +369 -0
  163. cribl_control_plane/models/outputwebhook.py +689 -0
  164. cribl_control_plane/models/outputxsiam.py +415 -0
  165. cribl_control_plane/models/schemeclientoauth.py +24 -0
  166. cribl_control_plane/models/security.py +36 -0
  167. cribl_control_plane/models/updatehectokenrequest.py +31 -0
  168. cribl_control_plane/models/updateinputbyidop.py +44 -0
  169. cribl_control_plane/models/updateinputhectokenbyidandtokenop.py +52 -0
  170. cribl_control_plane/models/updateoutputbyidop.py +44 -0
  171. cribl_control_plane/outputs.py +1615 -0
  172. cribl_control_plane/py.typed +1 -0
  173. cribl_control_plane/sdk.py +164 -0
  174. cribl_control_plane/sdkconfiguration.py +36 -0
  175. cribl_control_plane/sources.py +1355 -0
  176. cribl_control_plane/types/__init__.py +21 -0
  177. cribl_control_plane/types/basemodel.py +39 -0
  178. cribl_control_plane/utils/__init__.py +187 -0
  179. cribl_control_plane/utils/annotations.py +55 -0
  180. cribl_control_plane/utils/datetimes.py +23 -0
  181. cribl_control_plane/utils/enums.py +74 -0
  182. cribl_control_plane/utils/eventstreaming.py +238 -0
  183. cribl_control_plane/utils/forms.py +223 -0
  184. cribl_control_plane/utils/headers.py +136 -0
  185. cribl_control_plane/utils/logger.py +27 -0
  186. cribl_control_plane/utils/metadata.py +118 -0
  187. cribl_control_plane/utils/queryparams.py +205 -0
  188. cribl_control_plane/utils/requestbodies.py +66 -0
  189. cribl_control_plane/utils/retries.py +217 -0
  190. cribl_control_plane/utils/security.py +207 -0
  191. cribl_control_plane/utils/serializers.py +249 -0
  192. cribl_control_plane/utils/unmarshal_json_response.py +24 -0
  193. cribl_control_plane/utils/url.py +155 -0
  194. cribl_control_plane/utils/values.py +137 -0
  195. cribl_control_plane-0.0.13.dist-info/METADATA +489 -0
  196. cribl_control_plane-0.0.13.dist-info/RECORD +197 -0
  197. cribl_control_plane-0.0.13.dist-info/WHEEL +4 -0
@@ -0,0 +1,425 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from cribl_control_plane import utils
5
+ from cribl_control_plane.types import BaseModel
6
+ from cribl_control_plane.utils import validate_open_enum
7
+ from enum import Enum
8
+ import pydantic
9
+ from pydantic.functional_validators import PlainValidator
10
+ from typing import List, Optional
11
+ from typing_extensions import Annotated, NotRequired, TypedDict
12
+
13
+
14
+ class OutputLokiType(str, Enum, metaclass=utils.OpenEnumMeta):
15
+ LOKI = "loki"
16
+
17
+
18
+ class OutputLokiMessageFormat(str, Enum, metaclass=utils.OpenEnumMeta):
19
+ r"""Format to use when sending logs to Loki (Protobuf or JSON)"""
20
+
21
+ PROTOBUF = "protobuf"
22
+ JSON = "json"
23
+
24
+
25
+ class OutputLokiLabelTypedDict(TypedDict):
26
+ value: str
27
+ name: NotRequired[str]
28
+
29
+
30
+ class OutputLokiLabel(BaseModel):
31
+ value: str
32
+
33
+ name: Optional[str] = ""
34
+
35
+
36
+ class OutputLokiAuthenticationType(str, Enum, metaclass=utils.OpenEnumMeta):
37
+ NONE = "none"
38
+ TOKEN = "token"
39
+ TEXT_SECRET = "textSecret"
40
+ BASIC = "basic"
41
+ CREDENTIALS_SECRET = "credentialsSecret"
42
+
43
+
44
+ class OutputLokiExtraHTTPHeaderTypedDict(TypedDict):
45
+ value: str
46
+ name: NotRequired[str]
47
+
48
+
49
+ class OutputLokiExtraHTTPHeader(BaseModel):
50
+ value: str
51
+
52
+ name: Optional[str] = None
53
+
54
+
55
+ class OutputLokiFailedRequestLoggingMode(str, Enum, metaclass=utils.OpenEnumMeta):
56
+ r"""Data to log when a request fails. All headers are redacted by default, unless listed as safe headers below."""
57
+
58
+ PAYLOAD = "payload"
59
+ PAYLOAD_AND_HEADERS = "payloadAndHeaders"
60
+ NONE = "none"
61
+
62
+
63
+ class OutputLokiResponseRetrySettingTypedDict(TypedDict):
64
+ http_status: float
65
+ r"""The HTTP response status code that will trigger retries"""
66
+ initial_backoff: NotRequired[float]
67
+ r"""How long, in milliseconds, Cribl Stream should wait before initiating backoff. Maximum interval is 600,000 ms (10 minutes)."""
68
+ backoff_rate: NotRequired[float]
69
+ r"""Base for exponential backoff. A value of 2 (default) means Cribl Stream will retry after 2 seconds, then 4 seconds, then 8 seconds, etc."""
70
+ max_backoff: NotRequired[float]
71
+ r"""The maximum backoff interval, in milliseconds, Cribl Stream should apply. Default (and minimum) is 10,000 ms (10 seconds); maximum is 180,000 ms (180 seconds)."""
72
+
73
+
74
+ class OutputLokiResponseRetrySetting(BaseModel):
75
+ http_status: Annotated[float, pydantic.Field(alias="httpStatus")]
76
+ r"""The HTTP response status code that will trigger retries"""
77
+
78
+ initial_backoff: Annotated[
79
+ Optional[float], pydantic.Field(alias="initialBackoff")
80
+ ] = 1000
81
+ r"""How long, in milliseconds, Cribl Stream should wait before initiating backoff. Maximum interval is 600,000 ms (10 minutes)."""
82
+
83
+ backoff_rate: Annotated[Optional[float], pydantic.Field(alias="backoffRate")] = 2
84
+ r"""Base for exponential backoff. A value of 2 (default) means Cribl Stream will retry after 2 seconds, then 4 seconds, then 8 seconds, etc."""
85
+
86
+ max_backoff: Annotated[Optional[float], pydantic.Field(alias="maxBackoff")] = 10000
87
+ r"""The maximum backoff interval, in milliseconds, Cribl Stream should apply. Default (and minimum) is 10,000 ms (10 seconds); maximum is 180,000 ms (180 seconds)."""
88
+
89
+
90
+ class OutputLokiTimeoutRetrySettingsTypedDict(TypedDict):
91
+ timeout_retry: NotRequired[bool]
92
+ initial_backoff: NotRequired[float]
93
+ r"""How long, in milliseconds, Cribl Stream should wait before initiating backoff. Maximum interval is 600,000 ms (10 minutes)."""
94
+ backoff_rate: NotRequired[float]
95
+ r"""Base for exponential backoff. A value of 2 (default) means Cribl Stream will retry after 2 seconds, then 4 seconds, then 8 seconds, etc."""
96
+ max_backoff: NotRequired[float]
97
+ r"""The maximum backoff interval, in milliseconds, Cribl Stream should apply. Default (and minimum) is 10,000 ms (10 seconds); maximum is 180,000 ms (180 seconds)."""
98
+
99
+
100
+ class OutputLokiTimeoutRetrySettings(BaseModel):
101
+ timeout_retry: Annotated[Optional[bool], pydantic.Field(alias="timeoutRetry")] = (
102
+ False
103
+ )
104
+
105
+ initial_backoff: Annotated[
106
+ Optional[float], pydantic.Field(alias="initialBackoff")
107
+ ] = 1000
108
+ r"""How long, in milliseconds, Cribl Stream should wait before initiating backoff. Maximum interval is 600,000 ms (10 minutes)."""
109
+
110
+ backoff_rate: Annotated[Optional[float], pydantic.Field(alias="backoffRate")] = 2
111
+ r"""Base for exponential backoff. A value of 2 (default) means Cribl Stream will retry after 2 seconds, then 4 seconds, then 8 seconds, etc."""
112
+
113
+ max_backoff: Annotated[Optional[float], pydantic.Field(alias="maxBackoff")] = 10000
114
+ r"""The maximum backoff interval, in milliseconds, Cribl Stream should apply. Default (and minimum) is 10,000 ms (10 seconds); maximum is 180,000 ms (180 seconds)."""
115
+
116
+
117
+ class OutputLokiBackpressureBehavior(str, Enum, metaclass=utils.OpenEnumMeta):
118
+ r"""How to handle events when all receivers are exerting backpressure"""
119
+
120
+ BLOCK = "block"
121
+ DROP = "drop"
122
+ QUEUE = "queue"
123
+
124
+
125
+ class OutputLokiCompression(str, Enum, metaclass=utils.OpenEnumMeta):
126
+ r"""Codec to use to compress the persisted data"""
127
+
128
+ NONE = "none"
129
+ GZIP = "gzip"
130
+
131
+
132
+ class OutputLokiQueueFullBehavior(str, Enum, metaclass=utils.OpenEnumMeta):
133
+ r"""How to handle events when the queue is exerting backpressure (full capacity or low disk). 'Block' is the same behavior as non-PQ blocking. 'Drop new data' throws away incoming data, while leaving the contents of the PQ unchanged."""
134
+
135
+ BLOCK = "block"
136
+ DROP = "drop"
137
+
138
+
139
+ class OutputLokiMode(str, Enum, metaclass=utils.OpenEnumMeta):
140
+ r"""In Error mode, PQ writes events to the filesystem if the Destination is unavailable. In Backpressure mode, PQ writes events to the filesystem when it detects backpressure from the Destination. In Always On mode, PQ always writes events to the filesystem."""
141
+
142
+ ERROR = "error"
143
+ BACKPRESSURE = "backpressure"
144
+ ALWAYS = "always"
145
+
146
+
147
+ class OutputLokiPqControlsTypedDict(TypedDict):
148
+ pass
149
+
150
+
151
+ class OutputLokiPqControls(BaseModel):
152
+ pass
153
+
154
+
155
+ class OutputLokiTypedDict(TypedDict):
156
+ type: OutputLokiType
157
+ url: str
158
+ r"""The endpoint to send logs to"""
159
+ id: NotRequired[str]
160
+ r"""Unique ID for this output"""
161
+ pipeline: NotRequired[str]
162
+ r"""Pipeline to process data before sending out to this output"""
163
+ system_fields: NotRequired[List[str]]
164
+ r"""Fields to automatically add to events, such as cribl_pipe. Supports wildcards. These fields are added as labels to generated logs."""
165
+ environment: NotRequired[str]
166
+ r"""Optionally, enable this config only on a specified Git branch. If empty, will be enabled everywhere."""
167
+ streamtags: NotRequired[List[str]]
168
+ r"""Tags for filtering and grouping in @{product}"""
169
+ message: NotRequired[str]
170
+ r"""Name of the event field that contains the message to send. If not specified, Stream sends a JSON representation of the whole event."""
171
+ message_format: NotRequired[OutputLokiMessageFormat]
172
+ r"""Format to use when sending logs to Loki (Protobuf or JSON)"""
173
+ labels: NotRequired[List[OutputLokiLabelTypedDict]]
174
+ r"""List of labels to send with logs. Labels define Loki streams, so use static labels to avoid proliferating label value combinations and streams. Can be merged and/or overridden by the event's __labels field. Example: '__labels: {host: \"cribl.io\", level: \"error\"}'"""
175
+ auth_type: NotRequired[OutputLokiAuthenticationType]
176
+ concurrency: NotRequired[float]
177
+ r"""Maximum number of ongoing requests before blocking. Warning: Setting this value > 1 can cause Loki to complain about entries being delivered out of order."""
178
+ max_payload_size_kb: NotRequired[float]
179
+ r"""Maximum size, in KB, of the request body. Warning: Setting this too low can increase the number of ongoing requests (depending on the value of 'Request concurrency'); this can cause Loki to complain about entries being delivered out of order."""
180
+ max_payload_events: NotRequired[float]
181
+ r"""Maximum number of events to include in the request body. Defaults to 0 (unlimited). Warning: Setting this too low can increase the number of ongoing requests (depending on the value of 'Request concurrency'); this can cause Loki to complain about entries being delivered out of order."""
182
+ reject_unauthorized: NotRequired[bool]
183
+ r"""Reject certificates not authorized by a CA in the CA certificate path or by another trusted CA (such as the system's).
184
+ Enabled by default. When this setting is also present in TLS Settings (Client Side),
185
+ that value will take precedence.
186
+ """
187
+ timeout_sec: NotRequired[float]
188
+ r"""Amount of time, in seconds, to wait for a request to complete before canceling it"""
189
+ flush_period_sec: NotRequired[float]
190
+ r"""Maximum time between requests. Small values could cause the payload size to be smaller than the configured Maximum time between requests. Small values can reduce the payload size below the configured 'Max record size' and 'Max events per request'. Warning: Setting this too low can increase the number of ongoing requests (depending on the value of 'Request concurrency'); this can cause Loki to complain about entries being delivered out of order."""
191
+ extra_http_headers: NotRequired[List[OutputLokiExtraHTTPHeaderTypedDict]]
192
+ r"""Headers to add to all events"""
193
+ use_round_robin_dns: NotRequired[bool]
194
+ r"""Enable round-robin DNS lookup. When a DNS server returns multiple addresses, @{product} will cycle through them in the order returned. For optimal performance, consider enabling this setting for non-load balanced destinations."""
195
+ failed_request_logging_mode: NotRequired[OutputLokiFailedRequestLoggingMode]
196
+ r"""Data to log when a request fails. All headers are redacted by default, unless listed as safe headers below."""
197
+ safe_headers: NotRequired[List[str]]
198
+ r"""List of headers that are safe to log in plain text"""
199
+ response_retry_settings: NotRequired[List[OutputLokiResponseRetrySettingTypedDict]]
200
+ r"""Automatically retry after unsuccessful response status codes, such as 429 (Too Many Requests) or 503 (Service Unavailable)"""
201
+ timeout_retry_settings: NotRequired[OutputLokiTimeoutRetrySettingsTypedDict]
202
+ response_honor_retry_after_header: NotRequired[bool]
203
+ r"""Honor any Retry-After header that specifies a delay (in seconds) no longer than 180 seconds after the retry request. @{product} limits the delay to 180 seconds, even if the Retry-After header specifies a longer delay. When enabled, takes precedence over user-configured retry options. When disabled, all Retry-After headers are ignored."""
204
+ on_backpressure: NotRequired[OutputLokiBackpressureBehavior]
205
+ r"""How to handle events when all receivers are exerting backpressure"""
206
+ total_memory_limit_kb: NotRequired[float]
207
+ r"""Maximum total size of the batches waiting to be sent. If left blank, defaults to 5 times the max body size (if set). If 0, no limit is enforced."""
208
+ description: NotRequired[str]
209
+ compress: NotRequired[bool]
210
+ r"""Compress the payload body before sending"""
211
+ token: NotRequired[str]
212
+ r"""Bearer token to include in the authorization header. In Grafana Cloud, this is generally built by concatenating the username and the API key, separated by a colon. Example: <your-username>:<your-api-key>"""
213
+ text_secret: NotRequired[str]
214
+ r"""Select or create a stored text secret"""
215
+ username: NotRequired[str]
216
+ r"""Username for authentication"""
217
+ password: NotRequired[str]
218
+ r"""Password (API key in Grafana Cloud domain) for authentication"""
219
+ credentials_secret: NotRequired[str]
220
+ r"""Select or create a secret that references your credentials"""
221
+ pq_max_file_size: NotRequired[str]
222
+ r"""The maximum size to store in each queue file before closing and optionally compressing (KB, MB, etc.)"""
223
+ pq_max_size: NotRequired[str]
224
+ r"""The maximum disk space that the queue can consume (as an average per Worker Process) before queueing stops. Enter a numeral with units of KB, MB, etc."""
225
+ pq_path: NotRequired[str]
226
+ r"""The location for the persistent queue files. To this field's value, the system will append: /<worker-id>/<output-id>."""
227
+ pq_compress: NotRequired[OutputLokiCompression]
228
+ r"""Codec to use to compress the persisted data"""
229
+ pq_on_backpressure: NotRequired[OutputLokiQueueFullBehavior]
230
+ r"""How to handle events when the queue is exerting backpressure (full capacity or low disk). 'Block' is the same behavior as non-PQ blocking. 'Drop new data' throws away incoming data, while leaving the contents of the PQ unchanged."""
231
+ pq_mode: NotRequired[OutputLokiMode]
232
+ r"""In Error mode, PQ writes events to the filesystem if the Destination is unavailable. In Backpressure mode, PQ writes events to the filesystem when it detects backpressure from the Destination. In Always On mode, PQ always writes events to the filesystem."""
233
+ pq_controls: NotRequired[OutputLokiPqControlsTypedDict]
234
+
235
+
236
+ class OutputLoki(BaseModel):
237
+ type: Annotated[OutputLokiType, PlainValidator(validate_open_enum(False))]
238
+
239
+ url: str
240
+ r"""The endpoint to send logs to"""
241
+
242
+ id: Optional[str] = None
243
+ r"""Unique ID for this output"""
244
+
245
+ pipeline: Optional[str] = None
246
+ r"""Pipeline to process data before sending out to this output"""
247
+
248
+ system_fields: Annotated[
249
+ Optional[List[str]], pydantic.Field(alias="systemFields")
250
+ ] = None
251
+ r"""Fields to automatically add to events, such as cribl_pipe. Supports wildcards. These fields are added as labels to generated logs."""
252
+
253
+ environment: Optional[str] = None
254
+ r"""Optionally, enable this config only on a specified Git branch. If empty, will be enabled everywhere."""
255
+
256
+ streamtags: Optional[List[str]] = None
257
+ r"""Tags for filtering and grouping in @{product}"""
258
+
259
+ message: Optional[str] = None
260
+ r"""Name of the event field that contains the message to send. If not specified, Stream sends a JSON representation of the whole event."""
261
+
262
+ message_format: Annotated[
263
+ Annotated[
264
+ Optional[OutputLokiMessageFormat], PlainValidator(validate_open_enum(False))
265
+ ],
266
+ pydantic.Field(alias="messageFormat"),
267
+ ] = OutputLokiMessageFormat.PROTOBUF
268
+ r"""Format to use when sending logs to Loki (Protobuf or JSON)"""
269
+
270
+ labels: Optional[List[OutputLokiLabel]] = None
271
+ r"""List of labels to send with logs. Labels define Loki streams, so use static labels to avoid proliferating label value combinations and streams. Can be merged and/or overridden by the event's __labels field. Example: '__labels: {host: \"cribl.io\", level: \"error\"}'"""
272
+
273
+ auth_type: Annotated[
274
+ Annotated[
275
+ Optional[OutputLokiAuthenticationType],
276
+ PlainValidator(validate_open_enum(False)),
277
+ ],
278
+ pydantic.Field(alias="authType"),
279
+ ] = OutputLokiAuthenticationType.NONE
280
+
281
+ concurrency: Optional[float] = 1
282
+ r"""Maximum number of ongoing requests before blocking. Warning: Setting this value > 1 can cause Loki to complain about entries being delivered out of order."""
283
+
284
+ max_payload_size_kb: Annotated[
285
+ Optional[float], pydantic.Field(alias="maxPayloadSizeKB")
286
+ ] = 4096
287
+ r"""Maximum size, in KB, of the request body. Warning: Setting this too low can increase the number of ongoing requests (depending on the value of 'Request concurrency'); this can cause Loki to complain about entries being delivered out of order."""
288
+
289
+ max_payload_events: Annotated[
290
+ Optional[float], pydantic.Field(alias="maxPayloadEvents")
291
+ ] = 0
292
+ r"""Maximum number of events to include in the request body. Defaults to 0 (unlimited). Warning: Setting this too low can increase the number of ongoing requests (depending on the value of 'Request concurrency'); this can cause Loki to complain about entries being delivered out of order."""
293
+
294
+ reject_unauthorized: Annotated[
295
+ Optional[bool], pydantic.Field(alias="rejectUnauthorized")
296
+ ] = True
297
+ r"""Reject certificates not authorized by a CA in the CA certificate path or by another trusted CA (such as the system's).
298
+ Enabled by default. When this setting is also present in TLS Settings (Client Side),
299
+ that value will take precedence.
300
+ """
301
+
302
+ timeout_sec: Annotated[Optional[float], pydantic.Field(alias="timeoutSec")] = 30
303
+ r"""Amount of time, in seconds, to wait for a request to complete before canceling it"""
304
+
305
+ flush_period_sec: Annotated[
306
+ Optional[float], pydantic.Field(alias="flushPeriodSec")
307
+ ] = 15
308
+ r"""Maximum time between requests. Small values could cause the payload size to be smaller than the configured Maximum time between requests. Small values can reduce the payload size below the configured 'Max record size' and 'Max events per request'. Warning: Setting this too low can increase the number of ongoing requests (depending on the value of 'Request concurrency'); this can cause Loki to complain about entries being delivered out of order."""
309
+
310
+ extra_http_headers: Annotated[
311
+ Optional[List[OutputLokiExtraHTTPHeader]],
312
+ pydantic.Field(alias="extraHttpHeaders"),
313
+ ] = None
314
+ r"""Headers to add to all events"""
315
+
316
+ use_round_robin_dns: Annotated[
317
+ Optional[bool], pydantic.Field(alias="useRoundRobinDns")
318
+ ] = False
319
+ r"""Enable round-robin DNS lookup. When a DNS server returns multiple addresses, @{product} will cycle through them in the order returned. For optimal performance, consider enabling this setting for non-load balanced destinations."""
320
+
321
+ failed_request_logging_mode: Annotated[
322
+ Annotated[
323
+ Optional[OutputLokiFailedRequestLoggingMode],
324
+ PlainValidator(validate_open_enum(False)),
325
+ ],
326
+ pydantic.Field(alias="failedRequestLoggingMode"),
327
+ ] = OutputLokiFailedRequestLoggingMode.NONE
328
+ r"""Data to log when a request fails. All headers are redacted by default, unless listed as safe headers below."""
329
+
330
+ safe_headers: Annotated[
331
+ Optional[List[str]], pydantic.Field(alias="safeHeaders")
332
+ ] = None
333
+ r"""List of headers that are safe to log in plain text"""
334
+
335
+ response_retry_settings: Annotated[
336
+ Optional[List[OutputLokiResponseRetrySetting]],
337
+ pydantic.Field(alias="responseRetrySettings"),
338
+ ] = None
339
+ r"""Automatically retry after unsuccessful response status codes, such as 429 (Too Many Requests) or 503 (Service Unavailable)"""
340
+
341
+ timeout_retry_settings: Annotated[
342
+ Optional[OutputLokiTimeoutRetrySettings],
343
+ pydantic.Field(alias="timeoutRetrySettings"),
344
+ ] = None
345
+
346
+ response_honor_retry_after_header: Annotated[
347
+ Optional[bool], pydantic.Field(alias="responseHonorRetryAfterHeader")
348
+ ] = False
349
+ r"""Honor any Retry-After header that specifies a delay (in seconds) no longer than 180 seconds after the retry request. @{product} limits the delay to 180 seconds, even if the Retry-After header specifies a longer delay. When enabled, takes precedence over user-configured retry options. When disabled, all Retry-After headers are ignored."""
350
+
351
+ on_backpressure: Annotated[
352
+ Annotated[
353
+ Optional[OutputLokiBackpressureBehavior],
354
+ PlainValidator(validate_open_enum(False)),
355
+ ],
356
+ pydantic.Field(alias="onBackpressure"),
357
+ ] = OutputLokiBackpressureBehavior.BLOCK
358
+ r"""How to handle events when all receivers are exerting backpressure"""
359
+
360
+ total_memory_limit_kb: Annotated[
361
+ Optional[float], pydantic.Field(alias="totalMemoryLimitKB")
362
+ ] = None
363
+ r"""Maximum total size of the batches waiting to be sent. If left blank, defaults to 5 times the max body size (if set). If 0, no limit is enforced."""
364
+
365
+ description: Optional[str] = None
366
+
367
+ compress: Optional[bool] = True
368
+ r"""Compress the payload body before sending"""
369
+
370
+ token: Optional[str] = None
371
+ r"""Bearer token to include in the authorization header. In Grafana Cloud, this is generally built by concatenating the username and the API key, separated by a colon. Example: <your-username>:<your-api-key>"""
372
+
373
+ text_secret: Annotated[Optional[str], pydantic.Field(alias="textSecret")] = None
374
+ r"""Select or create a stored text secret"""
375
+
376
+ username: Optional[str] = None
377
+ r"""Username for authentication"""
378
+
379
+ password: Optional[str] = None
380
+ r"""Password (API key in Grafana Cloud domain) for authentication"""
381
+
382
+ credentials_secret: Annotated[
383
+ Optional[str], pydantic.Field(alias="credentialsSecret")
384
+ ] = None
385
+ r"""Select or create a secret that references your credentials"""
386
+
387
+ pq_max_file_size: Annotated[
388
+ Optional[str], pydantic.Field(alias="pqMaxFileSize")
389
+ ] = "1 MB"
390
+ r"""The maximum size to store in each queue file before closing and optionally compressing (KB, MB, etc.)"""
391
+
392
+ pq_max_size: Annotated[Optional[str], pydantic.Field(alias="pqMaxSize")] = "5GB"
393
+ r"""The maximum disk space that the queue can consume (as an average per Worker Process) before queueing stops. Enter a numeral with units of KB, MB, etc."""
394
+
395
+ pq_path: Annotated[Optional[str], pydantic.Field(alias="pqPath")] = (
396
+ "$CRIBL_HOME/state/queues"
397
+ )
398
+ r"""The location for the persistent queue files. To this field's value, the system will append: /<worker-id>/<output-id>."""
399
+
400
+ pq_compress: Annotated[
401
+ Annotated[
402
+ Optional[OutputLokiCompression], PlainValidator(validate_open_enum(False))
403
+ ],
404
+ pydantic.Field(alias="pqCompress"),
405
+ ] = OutputLokiCompression.NONE
406
+ r"""Codec to use to compress the persisted data"""
407
+
408
+ pq_on_backpressure: Annotated[
409
+ Annotated[
410
+ Optional[OutputLokiQueueFullBehavior],
411
+ PlainValidator(validate_open_enum(False)),
412
+ ],
413
+ pydantic.Field(alias="pqOnBackpressure"),
414
+ ] = OutputLokiQueueFullBehavior.BLOCK
415
+ r"""How to handle events when the queue is exerting backpressure (full capacity or low disk). 'Block' is the same behavior as non-PQ blocking. 'Drop new data' throws away incoming data, while leaving the contents of the PQ unchanged."""
416
+
417
+ pq_mode: Annotated[
418
+ Annotated[Optional[OutputLokiMode], PlainValidator(validate_open_enum(False))],
419
+ pydantic.Field(alias="pqMode"),
420
+ ] = OutputLokiMode.ERROR
421
+ r"""In Error mode, PQ writes events to the filesystem if the Destination is unavailable. In Backpressure mode, PQ writes events to the filesystem when it detects backpressure from the Destination. In Always On mode, PQ always writes events to the filesystem."""
422
+
423
+ pq_controls: Annotated[
424
+ Optional[OutputLokiPqControls], pydantic.Field(alias="pqControls")
425
+ ] = None