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,1247 @@
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 Any, List, Optional, Union
11
+ from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
12
+
13
+
14
+ class InputGrafanaType2(str, Enum, metaclass=utils.OpenEnumMeta):
15
+ GRAFANA = "grafana"
16
+
17
+
18
+ class InputGrafanaConnection2TypedDict(TypedDict):
19
+ output: str
20
+ pipeline: NotRequired[str]
21
+
22
+
23
+ class InputGrafanaConnection2(BaseModel):
24
+ output: str
25
+
26
+ pipeline: Optional[str] = None
27
+
28
+
29
+ class InputGrafanaMode2(str, Enum, metaclass=utils.OpenEnumMeta):
30
+ r"""With Smart mode, PQ will write events to the filesystem only when it detects backpressure from the processing engine. With Always On mode, PQ will always write events directly to the queue before forwarding them to the processing engine."""
31
+
32
+ SMART = "smart"
33
+ ALWAYS = "always"
34
+
35
+
36
+ class InputGrafanaCompression2(str, Enum, metaclass=utils.OpenEnumMeta):
37
+ r"""Codec to use to compress the persisted data"""
38
+
39
+ NONE = "none"
40
+ GZIP = "gzip"
41
+
42
+
43
+ class InputGrafanaPq2TypedDict(TypedDict):
44
+ mode: NotRequired[InputGrafanaMode2]
45
+ r"""With Smart mode, PQ will write events to the filesystem only when it detects backpressure from the processing engine. With Always On mode, PQ will always write events directly to the queue before forwarding them to the processing engine."""
46
+ max_buffer_size: NotRequired[float]
47
+ r"""The maximum number of events to hold in memory before writing the events to disk"""
48
+ commit_frequency: NotRequired[float]
49
+ r"""The number of events to send downstream before committing that Stream has read them"""
50
+ max_file_size: NotRequired[str]
51
+ r"""The maximum size to store in each queue file before closing and optionally compressing. Enter a numeral with units of KB, MB, etc."""
52
+ max_size: NotRequired[str]
53
+ 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."""
54
+ path: NotRequired[str]
55
+ r"""The location for the persistent queue files. To this field's value, the system will append: /<worker-id>/inputs/<input-id>"""
56
+ compress: NotRequired[InputGrafanaCompression2]
57
+ r"""Codec to use to compress the persisted data"""
58
+
59
+
60
+ class InputGrafanaPq2(BaseModel):
61
+ mode: Annotated[
62
+ Optional[InputGrafanaMode2], PlainValidator(validate_open_enum(False))
63
+ ] = InputGrafanaMode2.ALWAYS
64
+ r"""With Smart mode, PQ will write events to the filesystem only when it detects backpressure from the processing engine. With Always On mode, PQ will always write events directly to the queue before forwarding them to the processing engine."""
65
+
66
+ max_buffer_size: Annotated[
67
+ Optional[float], pydantic.Field(alias="maxBufferSize")
68
+ ] = 1000
69
+ r"""The maximum number of events to hold in memory before writing the events to disk"""
70
+
71
+ commit_frequency: Annotated[
72
+ Optional[float], pydantic.Field(alias="commitFrequency")
73
+ ] = 42
74
+ r"""The number of events to send downstream before committing that Stream has read them"""
75
+
76
+ max_file_size: Annotated[Optional[str], pydantic.Field(alias="maxFileSize")] = (
77
+ "1 MB"
78
+ )
79
+ r"""The maximum size to store in each queue file before closing and optionally compressing. Enter a numeral with units of KB, MB, etc."""
80
+
81
+ max_size: Annotated[Optional[str], pydantic.Field(alias="maxSize")] = "5GB"
82
+ 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."""
83
+
84
+ path: Optional[str] = "$CRIBL_HOME/state/queues"
85
+ r"""The location for the persistent queue files. To this field's value, the system will append: /<worker-id>/inputs/<input-id>"""
86
+
87
+ compress: Annotated[
88
+ Optional[InputGrafanaCompression2], PlainValidator(validate_open_enum(False))
89
+ ] = InputGrafanaCompression2.NONE
90
+ r"""Codec to use to compress the persisted data"""
91
+
92
+
93
+ class InputGrafanaMinimumTLSVersion2(str, Enum, metaclass=utils.OpenEnumMeta):
94
+ TL_SV1 = "TLSv1"
95
+ TL_SV1_1 = "TLSv1.1"
96
+ TL_SV1_2 = "TLSv1.2"
97
+ TL_SV1_3 = "TLSv1.3"
98
+
99
+
100
+ class InputGrafanaMaximumTLSVersion2(str, Enum, metaclass=utils.OpenEnumMeta):
101
+ TL_SV1 = "TLSv1"
102
+ TL_SV1_1 = "TLSv1.1"
103
+ TL_SV1_2 = "TLSv1.2"
104
+ TL_SV1_3 = "TLSv1.3"
105
+
106
+
107
+ class InputGrafanaTLSSettingsServerSide2TypedDict(TypedDict):
108
+ disabled: NotRequired[bool]
109
+ certificate_name: NotRequired[str]
110
+ r"""The name of the predefined certificate"""
111
+ priv_key_path: NotRequired[str]
112
+ r"""Path on server containing the private key to use. PEM format. Can reference $ENV_VARS."""
113
+ passphrase: NotRequired[str]
114
+ r"""Passphrase to use to decrypt private key"""
115
+ cert_path: NotRequired[str]
116
+ r"""Path on server containing certificates to use. PEM format. Can reference $ENV_VARS."""
117
+ ca_path: NotRequired[str]
118
+ r"""Path on server containing CA certificates to use. PEM format. Can reference $ENV_VARS."""
119
+ request_cert: NotRequired[bool]
120
+ r"""Require clients to present their certificates. Used to perform client authentication using SSL certs."""
121
+ reject_unauthorized: NotRequired[Any]
122
+ common_name_regex: NotRequired[Any]
123
+ min_version: NotRequired[InputGrafanaMinimumTLSVersion2]
124
+ max_version: NotRequired[InputGrafanaMaximumTLSVersion2]
125
+
126
+
127
+ class InputGrafanaTLSSettingsServerSide2(BaseModel):
128
+ disabled: Optional[bool] = True
129
+
130
+ certificate_name: Annotated[
131
+ Optional[str], pydantic.Field(alias="certificateName")
132
+ ] = None
133
+ r"""The name of the predefined certificate"""
134
+
135
+ priv_key_path: Annotated[Optional[str], pydantic.Field(alias="privKeyPath")] = None
136
+ r"""Path on server containing the private key to use. PEM format. Can reference $ENV_VARS."""
137
+
138
+ passphrase: Optional[str] = None
139
+ r"""Passphrase to use to decrypt private key"""
140
+
141
+ cert_path: Annotated[Optional[str], pydantic.Field(alias="certPath")] = None
142
+ r"""Path on server containing certificates to use. PEM format. Can reference $ENV_VARS."""
143
+
144
+ ca_path: Annotated[Optional[str], pydantic.Field(alias="caPath")] = None
145
+ r"""Path on server containing CA certificates to use. PEM format. Can reference $ENV_VARS."""
146
+
147
+ request_cert: Annotated[Optional[bool], pydantic.Field(alias="requestCert")] = False
148
+ r"""Require clients to present their certificates. Used to perform client authentication using SSL certs."""
149
+
150
+ reject_unauthorized: Annotated[
151
+ Optional[Any], pydantic.Field(alias="rejectUnauthorized")
152
+ ] = None
153
+
154
+ common_name_regex: Annotated[
155
+ Optional[Any], pydantic.Field(alias="commonNameRegex")
156
+ ] = None
157
+
158
+ min_version: Annotated[
159
+ Annotated[
160
+ Optional[InputGrafanaMinimumTLSVersion2],
161
+ PlainValidator(validate_open_enum(False)),
162
+ ],
163
+ pydantic.Field(alias="minVersion"),
164
+ ] = None
165
+
166
+ max_version: Annotated[
167
+ Annotated[
168
+ Optional[InputGrafanaMaximumTLSVersion2],
169
+ PlainValidator(validate_open_enum(False)),
170
+ ],
171
+ pydantic.Field(alias="maxVersion"),
172
+ ] = None
173
+
174
+
175
+ class InputGrafanaPrometheusAuthAuthenticationType2(
176
+ str, Enum, metaclass=utils.OpenEnumMeta
177
+ ):
178
+ r"""Remote Write authentication type"""
179
+
180
+ NONE = "none"
181
+ BASIC = "basic"
182
+ CREDENTIALS_SECRET = "credentialsSecret"
183
+ TOKEN = "token"
184
+ TEXT_SECRET = "textSecret"
185
+ OAUTH = "oauth"
186
+
187
+
188
+ class PrometheusAuthOauthParam2TypedDict(TypedDict):
189
+ name: str
190
+ r"""OAuth parameter name"""
191
+ value: str
192
+ r"""OAuth parameter value"""
193
+
194
+
195
+ class PrometheusAuthOauthParam2(BaseModel):
196
+ name: str
197
+ r"""OAuth parameter name"""
198
+
199
+ value: str
200
+ r"""OAuth parameter value"""
201
+
202
+
203
+ class PrometheusAuthOauthHeader2TypedDict(TypedDict):
204
+ name: str
205
+ r"""OAuth header name"""
206
+ value: str
207
+ r"""OAuth header value"""
208
+
209
+
210
+ class PrometheusAuthOauthHeader2(BaseModel):
211
+ name: str
212
+ r"""OAuth header name"""
213
+
214
+ value: str
215
+ r"""OAuth header value"""
216
+
217
+
218
+ class InputGrafanaPrometheusAuth2TypedDict(TypedDict):
219
+ auth_type: NotRequired[InputGrafanaPrometheusAuthAuthenticationType2]
220
+ r"""Remote Write authentication type"""
221
+ username: NotRequired[str]
222
+ password: NotRequired[str]
223
+ token: NotRequired[str]
224
+ r"""Bearer token to include in the authorization header"""
225
+ credentials_secret: NotRequired[str]
226
+ r"""Select or create a secret that references your credentials"""
227
+ text_secret: NotRequired[str]
228
+ r"""Select or create a stored text secret"""
229
+ login_url: NotRequired[str]
230
+ r"""URL for OAuth"""
231
+ secret_param_name: NotRequired[str]
232
+ r"""Secret parameter name to pass in request body"""
233
+ secret: NotRequired[str]
234
+ r"""Secret parameter value to pass in request body"""
235
+ token_attribute_name: NotRequired[str]
236
+ r"""Name of the auth token attribute in the OAuth response. Can be top-level (e.g., 'token'); or nested, using a period (e.g., 'data.token')."""
237
+ auth_header_expr: NotRequired[str]
238
+ r"""JavaScript expression to compute the Authorization header value to pass in requests. The value `${token}` is used to reference the token obtained from authentication, e.g.: `Bearer ${token}`."""
239
+ token_timeout_secs: NotRequired[float]
240
+ r"""How often the OAuth token should be refreshed."""
241
+ oauth_params: NotRequired[List[PrometheusAuthOauthParam2TypedDict]]
242
+ r"""Additional parameters to send in the OAuth login request. @{product} will combine the secret with these parameters, and will send the URL-encoded result in a POST request to the endpoint specified in the 'Login URL'. We'll automatically add the content-type header 'application/x-www-form-urlencoded' when sending this request."""
243
+ oauth_headers: NotRequired[List[PrometheusAuthOauthHeader2TypedDict]]
244
+ r"""Additional headers to send in the OAuth login request. @{product} will automatically add the content-type header 'application/x-www-form-urlencoded' when sending this request."""
245
+
246
+
247
+ class InputGrafanaPrometheusAuth2(BaseModel):
248
+ auth_type: Annotated[
249
+ Annotated[
250
+ Optional[InputGrafanaPrometheusAuthAuthenticationType2],
251
+ PlainValidator(validate_open_enum(False)),
252
+ ],
253
+ pydantic.Field(alias="authType"),
254
+ ] = InputGrafanaPrometheusAuthAuthenticationType2.NONE
255
+ r"""Remote Write authentication type"""
256
+
257
+ username: Optional[str] = None
258
+
259
+ password: Optional[str] = None
260
+
261
+ token: Optional[str] = None
262
+ r"""Bearer token to include in the authorization header"""
263
+
264
+ credentials_secret: Annotated[
265
+ Optional[str], pydantic.Field(alias="credentialsSecret")
266
+ ] = None
267
+ r"""Select or create a secret that references your credentials"""
268
+
269
+ text_secret: Annotated[Optional[str], pydantic.Field(alias="textSecret")] = None
270
+ r"""Select or create a stored text secret"""
271
+
272
+ login_url: Annotated[Optional[str], pydantic.Field(alias="loginUrl")] = None
273
+ r"""URL for OAuth"""
274
+
275
+ secret_param_name: Annotated[
276
+ Optional[str], pydantic.Field(alias="secretParamName")
277
+ ] = None
278
+ r"""Secret parameter name to pass in request body"""
279
+
280
+ secret: Optional[str] = None
281
+ r"""Secret parameter value to pass in request body"""
282
+
283
+ token_attribute_name: Annotated[
284
+ Optional[str], pydantic.Field(alias="tokenAttributeName")
285
+ ] = None
286
+ r"""Name of the auth token attribute in the OAuth response. Can be top-level (e.g., 'token'); or nested, using a period (e.g., 'data.token')."""
287
+
288
+ auth_header_expr: Annotated[
289
+ Optional[str], pydantic.Field(alias="authHeaderExpr")
290
+ ] = "`Bearer ${token}`"
291
+ r"""JavaScript expression to compute the Authorization header value to pass in requests. The value `${token}` is used to reference the token obtained from authentication, e.g.: `Bearer ${token}`."""
292
+
293
+ token_timeout_secs: Annotated[
294
+ Optional[float], pydantic.Field(alias="tokenTimeoutSecs")
295
+ ] = 3600
296
+ r"""How often the OAuth token should be refreshed."""
297
+
298
+ oauth_params: Annotated[
299
+ Optional[List[PrometheusAuthOauthParam2]], pydantic.Field(alias="oauthParams")
300
+ ] = None
301
+ r"""Additional parameters to send in the OAuth login request. @{product} will combine the secret with these parameters, and will send the URL-encoded result in a POST request to the endpoint specified in the 'Login URL'. We'll automatically add the content-type header 'application/x-www-form-urlencoded' when sending this request."""
302
+
303
+ oauth_headers: Annotated[
304
+ Optional[List[PrometheusAuthOauthHeader2]], pydantic.Field(alias="oauthHeaders")
305
+ ] = None
306
+ r"""Additional headers to send in the OAuth login request. @{product} will automatically add the content-type header 'application/x-www-form-urlencoded' when sending this request."""
307
+
308
+
309
+ class InputGrafanaLokiAuthAuthenticationType2(str, Enum, metaclass=utils.OpenEnumMeta):
310
+ r"""Loki logs authentication type"""
311
+
312
+ NONE = "none"
313
+ BASIC = "basic"
314
+ CREDENTIALS_SECRET = "credentialsSecret"
315
+ TOKEN = "token"
316
+ TEXT_SECRET = "textSecret"
317
+ OAUTH = "oauth"
318
+
319
+
320
+ class LokiAuthOauthParam2TypedDict(TypedDict):
321
+ name: str
322
+ r"""OAuth parameter name"""
323
+ value: str
324
+ r"""OAuth parameter value"""
325
+
326
+
327
+ class LokiAuthOauthParam2(BaseModel):
328
+ name: str
329
+ r"""OAuth parameter name"""
330
+
331
+ value: str
332
+ r"""OAuth parameter value"""
333
+
334
+
335
+ class LokiAuthOauthHeader2TypedDict(TypedDict):
336
+ name: str
337
+ r"""OAuth header name"""
338
+ value: str
339
+ r"""OAuth header value"""
340
+
341
+
342
+ class LokiAuthOauthHeader2(BaseModel):
343
+ name: str
344
+ r"""OAuth header name"""
345
+
346
+ value: str
347
+ r"""OAuth header value"""
348
+
349
+
350
+ class InputGrafanaLokiAuth2TypedDict(TypedDict):
351
+ auth_type: NotRequired[InputGrafanaLokiAuthAuthenticationType2]
352
+ r"""Loki logs authentication type"""
353
+ username: NotRequired[str]
354
+ password: NotRequired[str]
355
+ token: NotRequired[str]
356
+ r"""Bearer token to include in the authorization header"""
357
+ credentials_secret: NotRequired[str]
358
+ r"""Select or create a secret that references your credentials"""
359
+ text_secret: NotRequired[str]
360
+ r"""Select or create a stored text secret"""
361
+ login_url: NotRequired[str]
362
+ r"""URL for OAuth"""
363
+ secret_param_name: NotRequired[str]
364
+ r"""Secret parameter name to pass in request body"""
365
+ secret: NotRequired[str]
366
+ r"""Secret parameter value to pass in request body"""
367
+ token_attribute_name: NotRequired[str]
368
+ r"""Name of the auth token attribute in the OAuth response. Can be top-level (e.g., 'token'); or nested, using a period (e.g., 'data.token')."""
369
+ auth_header_expr: NotRequired[str]
370
+ r"""JavaScript expression to compute the Authorization header value to pass in requests. The value `${token}` is used to reference the token obtained from authentication, e.g.: `Bearer ${token}`."""
371
+ token_timeout_secs: NotRequired[float]
372
+ r"""How often the OAuth token should be refreshed."""
373
+ oauth_params: NotRequired[List[LokiAuthOauthParam2TypedDict]]
374
+ r"""Additional parameters to send in the OAuth login request. @{product} will combine the secret with these parameters, and will send the URL-encoded result in a POST request to the endpoint specified in the 'Login URL'. We'll automatically add the content-type header 'application/x-www-form-urlencoded' when sending this request."""
375
+ oauth_headers: NotRequired[List[LokiAuthOauthHeader2TypedDict]]
376
+ r"""Additional headers to send in the OAuth login request. @{product} will automatically add the content-type header 'application/x-www-form-urlencoded' when sending this request."""
377
+
378
+
379
+ class InputGrafanaLokiAuth2(BaseModel):
380
+ auth_type: Annotated[
381
+ Annotated[
382
+ Optional[InputGrafanaLokiAuthAuthenticationType2],
383
+ PlainValidator(validate_open_enum(False)),
384
+ ],
385
+ pydantic.Field(alias="authType"),
386
+ ] = InputGrafanaLokiAuthAuthenticationType2.NONE
387
+ r"""Loki logs authentication type"""
388
+
389
+ username: Optional[str] = None
390
+
391
+ password: Optional[str] = None
392
+
393
+ token: Optional[str] = None
394
+ r"""Bearer token to include in the authorization header"""
395
+
396
+ credentials_secret: Annotated[
397
+ Optional[str], pydantic.Field(alias="credentialsSecret")
398
+ ] = None
399
+ r"""Select or create a secret that references your credentials"""
400
+
401
+ text_secret: Annotated[Optional[str], pydantic.Field(alias="textSecret")] = None
402
+ r"""Select or create a stored text secret"""
403
+
404
+ login_url: Annotated[Optional[str], pydantic.Field(alias="loginUrl")] = None
405
+ r"""URL for OAuth"""
406
+
407
+ secret_param_name: Annotated[
408
+ Optional[str], pydantic.Field(alias="secretParamName")
409
+ ] = None
410
+ r"""Secret parameter name to pass in request body"""
411
+
412
+ secret: Optional[str] = None
413
+ r"""Secret parameter value to pass in request body"""
414
+
415
+ token_attribute_name: Annotated[
416
+ Optional[str], pydantic.Field(alias="tokenAttributeName")
417
+ ] = None
418
+ r"""Name of the auth token attribute in the OAuth response. Can be top-level (e.g., 'token'); or nested, using a period (e.g., 'data.token')."""
419
+
420
+ auth_header_expr: Annotated[
421
+ Optional[str], pydantic.Field(alias="authHeaderExpr")
422
+ ] = "`Bearer ${token}`"
423
+ r"""JavaScript expression to compute the Authorization header value to pass in requests. The value `${token}` is used to reference the token obtained from authentication, e.g.: `Bearer ${token}`."""
424
+
425
+ token_timeout_secs: Annotated[
426
+ Optional[float], pydantic.Field(alias="tokenTimeoutSecs")
427
+ ] = 3600
428
+ r"""How often the OAuth token should be refreshed."""
429
+
430
+ oauth_params: Annotated[
431
+ Optional[List[LokiAuthOauthParam2]], pydantic.Field(alias="oauthParams")
432
+ ] = None
433
+ r"""Additional parameters to send in the OAuth login request. @{product} will combine the secret with these parameters, and will send the URL-encoded result in a POST request to the endpoint specified in the 'Login URL'. We'll automatically add the content-type header 'application/x-www-form-urlencoded' when sending this request."""
434
+
435
+ oauth_headers: Annotated[
436
+ Optional[List[LokiAuthOauthHeader2]], pydantic.Field(alias="oauthHeaders")
437
+ ] = None
438
+ r"""Additional headers to send in the OAuth login request. @{product} will automatically add the content-type header 'application/x-www-form-urlencoded' when sending this request."""
439
+
440
+
441
+ class InputGrafanaMetadatum2TypedDict(TypedDict):
442
+ name: str
443
+ value: str
444
+ r"""JavaScript expression to compute field's value, enclosed in quotes or backticks. (Can evaluate to a constant.)"""
445
+
446
+
447
+ class InputGrafanaMetadatum2(BaseModel):
448
+ name: str
449
+
450
+ value: str
451
+ r"""JavaScript expression to compute field's value, enclosed in quotes or backticks. (Can evaluate to a constant.)"""
452
+
453
+
454
+ class InputGrafana2TypedDict(TypedDict):
455
+ type: InputGrafanaType2
456
+ port: float
457
+ r"""Port to listen on"""
458
+ id: NotRequired[str]
459
+ r"""Unique ID for this input"""
460
+ disabled: NotRequired[bool]
461
+ pipeline: NotRequired[str]
462
+ r"""Pipeline to process data from this Source before sending it through the Routes"""
463
+ send_to_routes: NotRequired[bool]
464
+ r"""Select whether to send data to Routes, or directly to Destinations."""
465
+ environment: NotRequired[str]
466
+ r"""Optionally, enable this config only on a specified Git branch. If empty, will be enabled everywhere."""
467
+ pq_enabled: NotRequired[bool]
468
+ r"""Use a disk queue to minimize data loss when connected services block. See [Cribl Docs](https://docs.cribl.io/stream/persistent-queues) for PQ defaults (Cribl-managed Cloud Workers) and configuration options (on-prem and hybrid Workers)."""
469
+ streamtags: NotRequired[List[str]]
470
+ r"""Tags for filtering and grouping in @{product}"""
471
+ connections: NotRequired[List[InputGrafanaConnection2TypedDict]]
472
+ r"""Direct connections to Destinations, and optionally via a Pipeline or a Pack"""
473
+ pq: NotRequired[InputGrafanaPq2TypedDict]
474
+ host: NotRequired[str]
475
+ r"""Address to bind on. Defaults to 0.0.0.0 (all addresses)."""
476
+ tls: NotRequired[InputGrafanaTLSSettingsServerSide2TypedDict]
477
+ max_active_req: NotRequired[float]
478
+ r"""Maximum number of active requests allowed per Worker Process. Set to 0 for unlimited. Caution: Increasing the limit above the default value, or setting it to unlimited, may degrade performance and reduce throughput."""
479
+ max_requests_per_socket: NotRequired[int]
480
+ r"""Maximum number of requests per socket before @{product} instructs the client to close the connection. Default is 0 (unlimited)."""
481
+ enable_proxy_header: NotRequired[bool]
482
+ r"""Extract the client IP and port from PROXY protocol v1/v2. When enabled, the X-Forwarded-For header is ignored. Disable to use the X-Forwarded-For header for client IP extraction."""
483
+ capture_headers: NotRequired[bool]
484
+ r"""Add request headers to events, in the __headers field"""
485
+ activity_log_sample_rate: NotRequired[float]
486
+ r"""How often request activity is logged at the `info` level. A value of 1 would log every request, 10 every 10th request, etc."""
487
+ request_timeout: NotRequired[float]
488
+ r"""How long to wait for an incoming request to complete before aborting it. Use 0 to disable."""
489
+ socket_timeout: NotRequired[float]
490
+ r"""How long @{product} should wait before assuming that an inactive socket has timed out. To wait forever, set to 0."""
491
+ keep_alive_timeout: NotRequired[float]
492
+ r"""Maximum time to wait for additional data, after the last response was sent, before closing a socket connection. This can be very useful when Grafana Agent remote write's request frequency is high so, reusing connections, would help mitigating the cost of creating a new connection per request. Note that Grafana Agent's embedded Prometheus would attempt to keep connections open for up to 5 minutes."""
493
+ enable_health_check: NotRequired[bool]
494
+ r"""Expose the /cribl_health endpoint, which returns 200 OK when this Source is healthy"""
495
+ ip_allowlist_regex: NotRequired[str]
496
+ r"""Messages from matched IP addresses will be processed, unless also matched by the denylist"""
497
+ ip_denylist_regex: NotRequired[str]
498
+ r"""Messages from matched IP addresses will be ignored. This takes precedence over the allowlist."""
499
+ prometheus_api: NotRequired[str]
500
+ r"""Absolute path on which to listen for Grafana Agent's Remote Write requests. Defaults to /api/prom/push, which will expand as: 'http://<your‑upstream‑URL>:<your‑port>/api/prom/push'. Either this field or 'Logs API endpoint' must be configured."""
501
+ loki_api: NotRequired[str]
502
+ r"""Absolute path on which to listen for Loki logs requests. Defaults to /loki/api/v1/push, which will (in this example) expand as: 'http://<your‑upstream‑URL>:<your‑port>/loki/api/v1/push'. Either this field or 'Remote Write API endpoint' must be configured."""
503
+ prometheus_auth: NotRequired[InputGrafanaPrometheusAuth2TypedDict]
504
+ loki_auth: NotRequired[InputGrafanaLokiAuth2TypedDict]
505
+ metadata: NotRequired[List[InputGrafanaMetadatum2TypedDict]]
506
+ r"""Fields to add to events from this input"""
507
+ description: NotRequired[str]
508
+
509
+
510
+ class InputGrafana2(BaseModel):
511
+ type: Annotated[InputGrafanaType2, PlainValidator(validate_open_enum(False))]
512
+
513
+ port: float
514
+ r"""Port to listen on"""
515
+
516
+ id: Optional[str] = None
517
+ r"""Unique ID for this input"""
518
+
519
+ disabled: Optional[bool] = False
520
+
521
+ pipeline: Optional[str] = None
522
+ r"""Pipeline to process data from this Source before sending it through the Routes"""
523
+
524
+ send_to_routes: Annotated[Optional[bool], pydantic.Field(alias="sendToRoutes")] = (
525
+ True
526
+ )
527
+ r"""Select whether to send data to Routes, or directly to Destinations."""
528
+
529
+ environment: Optional[str] = None
530
+ r"""Optionally, enable this config only on a specified Git branch. If empty, will be enabled everywhere."""
531
+
532
+ pq_enabled: Annotated[Optional[bool], pydantic.Field(alias="pqEnabled")] = False
533
+ r"""Use a disk queue to minimize data loss when connected services block. See [Cribl Docs](https://docs.cribl.io/stream/persistent-queues) for PQ defaults (Cribl-managed Cloud Workers) and configuration options (on-prem and hybrid Workers)."""
534
+
535
+ streamtags: Optional[List[str]] = None
536
+ r"""Tags for filtering and grouping in @{product}"""
537
+
538
+ connections: Optional[List[InputGrafanaConnection2]] = None
539
+ r"""Direct connections to Destinations, and optionally via a Pipeline or a Pack"""
540
+
541
+ pq: Optional[InputGrafanaPq2] = None
542
+
543
+ host: Optional[str] = "0.0.0.0"
544
+ r"""Address to bind on. Defaults to 0.0.0.0 (all addresses)."""
545
+
546
+ tls: Optional[InputGrafanaTLSSettingsServerSide2] = None
547
+
548
+ max_active_req: Annotated[Optional[float], pydantic.Field(alias="maxActiveReq")] = (
549
+ 256
550
+ )
551
+ r"""Maximum number of active requests allowed per Worker Process. Set to 0 for unlimited. Caution: Increasing the limit above the default value, or setting it to unlimited, may degrade performance and reduce throughput."""
552
+
553
+ max_requests_per_socket: Annotated[
554
+ Optional[int], pydantic.Field(alias="maxRequestsPerSocket")
555
+ ] = 0
556
+ r"""Maximum number of requests per socket before @{product} instructs the client to close the connection. Default is 0 (unlimited)."""
557
+
558
+ enable_proxy_header: Annotated[
559
+ Optional[bool], pydantic.Field(alias="enableProxyHeader")
560
+ ] = False
561
+ r"""Extract the client IP and port from PROXY protocol v1/v2. When enabled, the X-Forwarded-For header is ignored. Disable to use the X-Forwarded-For header for client IP extraction."""
562
+
563
+ capture_headers: Annotated[
564
+ Optional[bool], pydantic.Field(alias="captureHeaders")
565
+ ] = False
566
+ r"""Add request headers to events, in the __headers field"""
567
+
568
+ activity_log_sample_rate: Annotated[
569
+ Optional[float], pydantic.Field(alias="activityLogSampleRate")
570
+ ] = 100
571
+ r"""How often request activity is logged at the `info` level. A value of 1 would log every request, 10 every 10th request, etc."""
572
+
573
+ request_timeout: Annotated[
574
+ Optional[float], pydantic.Field(alias="requestTimeout")
575
+ ] = 0
576
+ r"""How long to wait for an incoming request to complete before aborting it. Use 0 to disable."""
577
+
578
+ socket_timeout: Annotated[
579
+ Optional[float], pydantic.Field(alias="socketTimeout")
580
+ ] = 0
581
+ r"""How long @{product} should wait before assuming that an inactive socket has timed out. To wait forever, set to 0."""
582
+
583
+ keep_alive_timeout: Annotated[
584
+ Optional[float], pydantic.Field(alias="keepAliveTimeout")
585
+ ] = 5
586
+ r"""Maximum time to wait for additional data, after the last response was sent, before closing a socket connection. This can be very useful when Grafana Agent remote write's request frequency is high so, reusing connections, would help mitigating the cost of creating a new connection per request. Note that Grafana Agent's embedded Prometheus would attempt to keep connections open for up to 5 minutes."""
587
+
588
+ enable_health_check: Annotated[
589
+ Optional[bool], pydantic.Field(alias="enableHealthCheck")
590
+ ] = False
591
+ r"""Expose the /cribl_health endpoint, which returns 200 OK when this Source is healthy"""
592
+
593
+ ip_allowlist_regex: Annotated[
594
+ Optional[str], pydantic.Field(alias="ipAllowlistRegex")
595
+ ] = "/.*/"
596
+ r"""Messages from matched IP addresses will be processed, unless also matched by the denylist"""
597
+
598
+ ip_denylist_regex: Annotated[
599
+ Optional[str], pydantic.Field(alias="ipDenylistRegex")
600
+ ] = "/^$/"
601
+ r"""Messages from matched IP addresses will be ignored. This takes precedence over the allowlist."""
602
+
603
+ prometheus_api: Annotated[Optional[str], pydantic.Field(alias="prometheusAPI")] = (
604
+ "/api/prom/push"
605
+ )
606
+ r"""Absolute path on which to listen for Grafana Agent's Remote Write requests. Defaults to /api/prom/push, which will expand as: 'http://<your‑upstream‑URL>:<your‑port>/api/prom/push'. Either this field or 'Logs API endpoint' must be configured."""
607
+
608
+ loki_api: Annotated[Optional[str], pydantic.Field(alias="lokiAPI")] = (
609
+ "/loki/api/v1/push"
610
+ )
611
+ r"""Absolute path on which to listen for Loki logs requests. Defaults to /loki/api/v1/push, which will (in this example) expand as: 'http://<your‑upstream‑URL>:<your‑port>/loki/api/v1/push'. Either this field or 'Remote Write API endpoint' must be configured."""
612
+
613
+ prometheus_auth: Annotated[
614
+ Optional[InputGrafanaPrometheusAuth2], pydantic.Field(alias="prometheusAuth")
615
+ ] = None
616
+
617
+ loki_auth: Annotated[
618
+ Optional[InputGrafanaLokiAuth2], pydantic.Field(alias="lokiAuth")
619
+ ] = None
620
+
621
+ metadata: Optional[List[InputGrafanaMetadatum2]] = None
622
+ r"""Fields to add to events from this input"""
623
+
624
+ description: Optional[str] = None
625
+
626
+
627
+ class InputGrafanaType1(str, Enum, metaclass=utils.OpenEnumMeta):
628
+ GRAFANA = "grafana"
629
+
630
+
631
+ class InputGrafanaConnection1TypedDict(TypedDict):
632
+ output: str
633
+ pipeline: NotRequired[str]
634
+
635
+
636
+ class InputGrafanaConnection1(BaseModel):
637
+ output: str
638
+
639
+ pipeline: Optional[str] = None
640
+
641
+
642
+ class InputGrafanaMode1(str, Enum, metaclass=utils.OpenEnumMeta):
643
+ r"""With Smart mode, PQ will write events to the filesystem only when it detects backpressure from the processing engine. With Always On mode, PQ will always write events directly to the queue before forwarding them to the processing engine."""
644
+
645
+ SMART = "smart"
646
+ ALWAYS = "always"
647
+
648
+
649
+ class InputGrafanaCompression1(str, Enum, metaclass=utils.OpenEnumMeta):
650
+ r"""Codec to use to compress the persisted data"""
651
+
652
+ NONE = "none"
653
+ GZIP = "gzip"
654
+
655
+
656
+ class InputGrafanaPq1TypedDict(TypedDict):
657
+ mode: NotRequired[InputGrafanaMode1]
658
+ r"""With Smart mode, PQ will write events to the filesystem only when it detects backpressure from the processing engine. With Always On mode, PQ will always write events directly to the queue before forwarding them to the processing engine."""
659
+ max_buffer_size: NotRequired[float]
660
+ r"""The maximum number of events to hold in memory before writing the events to disk"""
661
+ commit_frequency: NotRequired[float]
662
+ r"""The number of events to send downstream before committing that Stream has read them"""
663
+ max_file_size: NotRequired[str]
664
+ r"""The maximum size to store in each queue file before closing and optionally compressing. Enter a numeral with units of KB, MB, etc."""
665
+ max_size: NotRequired[str]
666
+ 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."""
667
+ path: NotRequired[str]
668
+ r"""The location for the persistent queue files. To this field's value, the system will append: /<worker-id>/inputs/<input-id>"""
669
+ compress: NotRequired[InputGrafanaCompression1]
670
+ r"""Codec to use to compress the persisted data"""
671
+
672
+
673
+ class InputGrafanaPq1(BaseModel):
674
+ mode: Annotated[
675
+ Optional[InputGrafanaMode1], PlainValidator(validate_open_enum(False))
676
+ ] = InputGrafanaMode1.ALWAYS
677
+ r"""With Smart mode, PQ will write events to the filesystem only when it detects backpressure from the processing engine. With Always On mode, PQ will always write events directly to the queue before forwarding them to the processing engine."""
678
+
679
+ max_buffer_size: Annotated[
680
+ Optional[float], pydantic.Field(alias="maxBufferSize")
681
+ ] = 1000
682
+ r"""The maximum number of events to hold in memory before writing the events to disk"""
683
+
684
+ commit_frequency: Annotated[
685
+ Optional[float], pydantic.Field(alias="commitFrequency")
686
+ ] = 42
687
+ r"""The number of events to send downstream before committing that Stream has read them"""
688
+
689
+ max_file_size: Annotated[Optional[str], pydantic.Field(alias="maxFileSize")] = (
690
+ "1 MB"
691
+ )
692
+ r"""The maximum size to store in each queue file before closing and optionally compressing. Enter a numeral with units of KB, MB, etc."""
693
+
694
+ max_size: Annotated[Optional[str], pydantic.Field(alias="maxSize")] = "5GB"
695
+ 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."""
696
+
697
+ path: Optional[str] = "$CRIBL_HOME/state/queues"
698
+ r"""The location for the persistent queue files. To this field's value, the system will append: /<worker-id>/inputs/<input-id>"""
699
+
700
+ compress: Annotated[
701
+ Optional[InputGrafanaCompression1], PlainValidator(validate_open_enum(False))
702
+ ] = InputGrafanaCompression1.NONE
703
+ r"""Codec to use to compress the persisted data"""
704
+
705
+
706
+ class InputGrafanaMinimumTLSVersion1(str, Enum, metaclass=utils.OpenEnumMeta):
707
+ TL_SV1 = "TLSv1"
708
+ TL_SV1_1 = "TLSv1.1"
709
+ TL_SV1_2 = "TLSv1.2"
710
+ TL_SV1_3 = "TLSv1.3"
711
+
712
+
713
+ class InputGrafanaMaximumTLSVersion1(str, Enum, metaclass=utils.OpenEnumMeta):
714
+ TL_SV1 = "TLSv1"
715
+ TL_SV1_1 = "TLSv1.1"
716
+ TL_SV1_2 = "TLSv1.2"
717
+ TL_SV1_3 = "TLSv1.3"
718
+
719
+
720
+ class InputGrafanaTLSSettingsServerSide1TypedDict(TypedDict):
721
+ disabled: NotRequired[bool]
722
+ certificate_name: NotRequired[str]
723
+ r"""The name of the predefined certificate"""
724
+ priv_key_path: NotRequired[str]
725
+ r"""Path on server containing the private key to use. PEM format. Can reference $ENV_VARS."""
726
+ passphrase: NotRequired[str]
727
+ r"""Passphrase to use to decrypt private key"""
728
+ cert_path: NotRequired[str]
729
+ r"""Path on server containing certificates to use. PEM format. Can reference $ENV_VARS."""
730
+ ca_path: NotRequired[str]
731
+ r"""Path on server containing CA certificates to use. PEM format. Can reference $ENV_VARS."""
732
+ request_cert: NotRequired[bool]
733
+ r"""Require clients to present their certificates. Used to perform client authentication using SSL certs."""
734
+ reject_unauthorized: NotRequired[Any]
735
+ common_name_regex: NotRequired[Any]
736
+ min_version: NotRequired[InputGrafanaMinimumTLSVersion1]
737
+ max_version: NotRequired[InputGrafanaMaximumTLSVersion1]
738
+
739
+
740
+ class InputGrafanaTLSSettingsServerSide1(BaseModel):
741
+ disabled: Optional[bool] = True
742
+
743
+ certificate_name: Annotated[
744
+ Optional[str], pydantic.Field(alias="certificateName")
745
+ ] = None
746
+ r"""The name of the predefined certificate"""
747
+
748
+ priv_key_path: Annotated[Optional[str], pydantic.Field(alias="privKeyPath")] = None
749
+ r"""Path on server containing the private key to use. PEM format. Can reference $ENV_VARS."""
750
+
751
+ passphrase: Optional[str] = None
752
+ r"""Passphrase to use to decrypt private key"""
753
+
754
+ cert_path: Annotated[Optional[str], pydantic.Field(alias="certPath")] = None
755
+ r"""Path on server containing certificates to use. PEM format. Can reference $ENV_VARS."""
756
+
757
+ ca_path: Annotated[Optional[str], pydantic.Field(alias="caPath")] = None
758
+ r"""Path on server containing CA certificates to use. PEM format. Can reference $ENV_VARS."""
759
+
760
+ request_cert: Annotated[Optional[bool], pydantic.Field(alias="requestCert")] = False
761
+ r"""Require clients to present their certificates. Used to perform client authentication using SSL certs."""
762
+
763
+ reject_unauthorized: Annotated[
764
+ Optional[Any], pydantic.Field(alias="rejectUnauthorized")
765
+ ] = None
766
+
767
+ common_name_regex: Annotated[
768
+ Optional[Any], pydantic.Field(alias="commonNameRegex")
769
+ ] = None
770
+
771
+ min_version: Annotated[
772
+ Annotated[
773
+ Optional[InputGrafanaMinimumTLSVersion1],
774
+ PlainValidator(validate_open_enum(False)),
775
+ ],
776
+ pydantic.Field(alias="minVersion"),
777
+ ] = None
778
+
779
+ max_version: Annotated[
780
+ Annotated[
781
+ Optional[InputGrafanaMaximumTLSVersion1],
782
+ PlainValidator(validate_open_enum(False)),
783
+ ],
784
+ pydantic.Field(alias="maxVersion"),
785
+ ] = None
786
+
787
+
788
+ class InputGrafanaPrometheusAuthAuthenticationType1(
789
+ str, Enum, metaclass=utils.OpenEnumMeta
790
+ ):
791
+ r"""Remote Write authentication type"""
792
+
793
+ NONE = "none"
794
+ BASIC = "basic"
795
+ CREDENTIALS_SECRET = "credentialsSecret"
796
+ TOKEN = "token"
797
+ TEXT_SECRET = "textSecret"
798
+ OAUTH = "oauth"
799
+
800
+
801
+ class PrometheusAuthOauthParam1TypedDict(TypedDict):
802
+ name: str
803
+ r"""OAuth parameter name"""
804
+ value: str
805
+ r"""OAuth parameter value"""
806
+
807
+
808
+ class PrometheusAuthOauthParam1(BaseModel):
809
+ name: str
810
+ r"""OAuth parameter name"""
811
+
812
+ value: str
813
+ r"""OAuth parameter value"""
814
+
815
+
816
+ class PrometheusAuthOauthHeader1TypedDict(TypedDict):
817
+ name: str
818
+ r"""OAuth header name"""
819
+ value: str
820
+ r"""OAuth header value"""
821
+
822
+
823
+ class PrometheusAuthOauthHeader1(BaseModel):
824
+ name: str
825
+ r"""OAuth header name"""
826
+
827
+ value: str
828
+ r"""OAuth header value"""
829
+
830
+
831
+ class InputGrafanaPrometheusAuth1TypedDict(TypedDict):
832
+ auth_type: NotRequired[InputGrafanaPrometheusAuthAuthenticationType1]
833
+ r"""Remote Write authentication type"""
834
+ username: NotRequired[str]
835
+ password: NotRequired[str]
836
+ token: NotRequired[str]
837
+ r"""Bearer token to include in the authorization header"""
838
+ credentials_secret: NotRequired[str]
839
+ r"""Select or create a secret that references your credentials"""
840
+ text_secret: NotRequired[str]
841
+ r"""Select or create a stored text secret"""
842
+ login_url: NotRequired[str]
843
+ r"""URL for OAuth"""
844
+ secret_param_name: NotRequired[str]
845
+ r"""Secret parameter name to pass in request body"""
846
+ secret: NotRequired[str]
847
+ r"""Secret parameter value to pass in request body"""
848
+ token_attribute_name: NotRequired[str]
849
+ r"""Name of the auth token attribute in the OAuth response. Can be top-level (e.g., 'token'); or nested, using a period (e.g., 'data.token')."""
850
+ auth_header_expr: NotRequired[str]
851
+ r"""JavaScript expression to compute the Authorization header value to pass in requests. The value `${token}` is used to reference the token obtained from authentication, e.g.: `Bearer ${token}`."""
852
+ token_timeout_secs: NotRequired[float]
853
+ r"""How often the OAuth token should be refreshed."""
854
+ oauth_params: NotRequired[List[PrometheusAuthOauthParam1TypedDict]]
855
+ r"""Additional parameters to send in the OAuth login request. @{product} will combine the secret with these parameters, and will send the URL-encoded result in a POST request to the endpoint specified in the 'Login URL'. We'll automatically add the content-type header 'application/x-www-form-urlencoded' when sending this request."""
856
+ oauth_headers: NotRequired[List[PrometheusAuthOauthHeader1TypedDict]]
857
+ r"""Additional headers to send in the OAuth login request. @{product} will automatically add the content-type header 'application/x-www-form-urlencoded' when sending this request."""
858
+
859
+
860
+ class InputGrafanaPrometheusAuth1(BaseModel):
861
+ auth_type: Annotated[
862
+ Annotated[
863
+ Optional[InputGrafanaPrometheusAuthAuthenticationType1],
864
+ PlainValidator(validate_open_enum(False)),
865
+ ],
866
+ pydantic.Field(alias="authType"),
867
+ ] = InputGrafanaPrometheusAuthAuthenticationType1.NONE
868
+ r"""Remote Write authentication type"""
869
+
870
+ username: Optional[str] = None
871
+
872
+ password: Optional[str] = None
873
+
874
+ token: Optional[str] = None
875
+ r"""Bearer token to include in the authorization header"""
876
+
877
+ credentials_secret: Annotated[
878
+ Optional[str], pydantic.Field(alias="credentialsSecret")
879
+ ] = None
880
+ r"""Select or create a secret that references your credentials"""
881
+
882
+ text_secret: Annotated[Optional[str], pydantic.Field(alias="textSecret")] = None
883
+ r"""Select or create a stored text secret"""
884
+
885
+ login_url: Annotated[Optional[str], pydantic.Field(alias="loginUrl")] = None
886
+ r"""URL for OAuth"""
887
+
888
+ secret_param_name: Annotated[
889
+ Optional[str], pydantic.Field(alias="secretParamName")
890
+ ] = None
891
+ r"""Secret parameter name to pass in request body"""
892
+
893
+ secret: Optional[str] = None
894
+ r"""Secret parameter value to pass in request body"""
895
+
896
+ token_attribute_name: Annotated[
897
+ Optional[str], pydantic.Field(alias="tokenAttributeName")
898
+ ] = None
899
+ r"""Name of the auth token attribute in the OAuth response. Can be top-level (e.g., 'token'); or nested, using a period (e.g., 'data.token')."""
900
+
901
+ auth_header_expr: Annotated[
902
+ Optional[str], pydantic.Field(alias="authHeaderExpr")
903
+ ] = "`Bearer ${token}`"
904
+ r"""JavaScript expression to compute the Authorization header value to pass in requests. The value `${token}` is used to reference the token obtained from authentication, e.g.: `Bearer ${token}`."""
905
+
906
+ token_timeout_secs: Annotated[
907
+ Optional[float], pydantic.Field(alias="tokenTimeoutSecs")
908
+ ] = 3600
909
+ r"""How often the OAuth token should be refreshed."""
910
+
911
+ oauth_params: Annotated[
912
+ Optional[List[PrometheusAuthOauthParam1]], pydantic.Field(alias="oauthParams")
913
+ ] = None
914
+ r"""Additional parameters to send in the OAuth login request. @{product} will combine the secret with these parameters, and will send the URL-encoded result in a POST request to the endpoint specified in the 'Login URL'. We'll automatically add the content-type header 'application/x-www-form-urlencoded' when sending this request."""
915
+
916
+ oauth_headers: Annotated[
917
+ Optional[List[PrometheusAuthOauthHeader1]], pydantic.Field(alias="oauthHeaders")
918
+ ] = None
919
+ r"""Additional headers to send in the OAuth login request. @{product} will automatically add the content-type header 'application/x-www-form-urlencoded' when sending this request."""
920
+
921
+
922
+ class InputGrafanaLokiAuthAuthenticationType1(str, Enum, metaclass=utils.OpenEnumMeta):
923
+ r"""Loki logs authentication type"""
924
+
925
+ NONE = "none"
926
+ BASIC = "basic"
927
+ CREDENTIALS_SECRET = "credentialsSecret"
928
+ TOKEN = "token"
929
+ TEXT_SECRET = "textSecret"
930
+ OAUTH = "oauth"
931
+
932
+
933
+ class LokiAuthOauthParam1TypedDict(TypedDict):
934
+ name: str
935
+ r"""OAuth parameter name"""
936
+ value: str
937
+ r"""OAuth parameter value"""
938
+
939
+
940
+ class LokiAuthOauthParam1(BaseModel):
941
+ name: str
942
+ r"""OAuth parameter name"""
943
+
944
+ value: str
945
+ r"""OAuth parameter value"""
946
+
947
+
948
+ class LokiAuthOauthHeader1TypedDict(TypedDict):
949
+ name: str
950
+ r"""OAuth header name"""
951
+ value: str
952
+ r"""OAuth header value"""
953
+
954
+
955
+ class LokiAuthOauthHeader1(BaseModel):
956
+ name: str
957
+ r"""OAuth header name"""
958
+
959
+ value: str
960
+ r"""OAuth header value"""
961
+
962
+
963
+ class InputGrafanaLokiAuth1TypedDict(TypedDict):
964
+ auth_type: NotRequired[InputGrafanaLokiAuthAuthenticationType1]
965
+ r"""Loki logs authentication type"""
966
+ username: NotRequired[str]
967
+ password: NotRequired[str]
968
+ token: NotRequired[str]
969
+ r"""Bearer token to include in the authorization header"""
970
+ credentials_secret: NotRequired[str]
971
+ r"""Select or create a secret that references your credentials"""
972
+ text_secret: NotRequired[str]
973
+ r"""Select or create a stored text secret"""
974
+ login_url: NotRequired[str]
975
+ r"""URL for OAuth"""
976
+ secret_param_name: NotRequired[str]
977
+ r"""Secret parameter name to pass in request body"""
978
+ secret: NotRequired[str]
979
+ r"""Secret parameter value to pass in request body"""
980
+ token_attribute_name: NotRequired[str]
981
+ r"""Name of the auth token attribute in the OAuth response. Can be top-level (e.g., 'token'); or nested, using a period (e.g., 'data.token')."""
982
+ auth_header_expr: NotRequired[str]
983
+ r"""JavaScript expression to compute the Authorization header value to pass in requests. The value `${token}` is used to reference the token obtained from authentication, e.g.: `Bearer ${token}`."""
984
+ token_timeout_secs: NotRequired[float]
985
+ r"""How often the OAuth token should be refreshed."""
986
+ oauth_params: NotRequired[List[LokiAuthOauthParam1TypedDict]]
987
+ r"""Additional parameters to send in the OAuth login request. @{product} will combine the secret with these parameters, and will send the URL-encoded result in a POST request to the endpoint specified in the 'Login URL'. We'll automatically add the content-type header 'application/x-www-form-urlencoded' when sending this request."""
988
+ oauth_headers: NotRequired[List[LokiAuthOauthHeader1TypedDict]]
989
+ r"""Additional headers to send in the OAuth login request. @{product} will automatically add the content-type header 'application/x-www-form-urlencoded' when sending this request."""
990
+
991
+
992
+ class InputGrafanaLokiAuth1(BaseModel):
993
+ auth_type: Annotated[
994
+ Annotated[
995
+ Optional[InputGrafanaLokiAuthAuthenticationType1],
996
+ PlainValidator(validate_open_enum(False)),
997
+ ],
998
+ pydantic.Field(alias="authType"),
999
+ ] = InputGrafanaLokiAuthAuthenticationType1.NONE
1000
+ r"""Loki logs authentication type"""
1001
+
1002
+ username: Optional[str] = None
1003
+
1004
+ password: Optional[str] = None
1005
+
1006
+ token: Optional[str] = None
1007
+ r"""Bearer token to include in the authorization header"""
1008
+
1009
+ credentials_secret: Annotated[
1010
+ Optional[str], pydantic.Field(alias="credentialsSecret")
1011
+ ] = None
1012
+ r"""Select or create a secret that references your credentials"""
1013
+
1014
+ text_secret: Annotated[Optional[str], pydantic.Field(alias="textSecret")] = None
1015
+ r"""Select or create a stored text secret"""
1016
+
1017
+ login_url: Annotated[Optional[str], pydantic.Field(alias="loginUrl")] = None
1018
+ r"""URL for OAuth"""
1019
+
1020
+ secret_param_name: Annotated[
1021
+ Optional[str], pydantic.Field(alias="secretParamName")
1022
+ ] = None
1023
+ r"""Secret parameter name to pass in request body"""
1024
+
1025
+ secret: Optional[str] = None
1026
+ r"""Secret parameter value to pass in request body"""
1027
+
1028
+ token_attribute_name: Annotated[
1029
+ Optional[str], pydantic.Field(alias="tokenAttributeName")
1030
+ ] = None
1031
+ r"""Name of the auth token attribute in the OAuth response. Can be top-level (e.g., 'token'); or nested, using a period (e.g., 'data.token')."""
1032
+
1033
+ auth_header_expr: Annotated[
1034
+ Optional[str], pydantic.Field(alias="authHeaderExpr")
1035
+ ] = "`Bearer ${token}`"
1036
+ r"""JavaScript expression to compute the Authorization header value to pass in requests. The value `${token}` is used to reference the token obtained from authentication, e.g.: `Bearer ${token}`."""
1037
+
1038
+ token_timeout_secs: Annotated[
1039
+ Optional[float], pydantic.Field(alias="tokenTimeoutSecs")
1040
+ ] = 3600
1041
+ r"""How often the OAuth token should be refreshed."""
1042
+
1043
+ oauth_params: Annotated[
1044
+ Optional[List[LokiAuthOauthParam1]], pydantic.Field(alias="oauthParams")
1045
+ ] = None
1046
+ r"""Additional parameters to send in the OAuth login request. @{product} will combine the secret with these parameters, and will send the URL-encoded result in a POST request to the endpoint specified in the 'Login URL'. We'll automatically add the content-type header 'application/x-www-form-urlencoded' when sending this request."""
1047
+
1048
+ oauth_headers: Annotated[
1049
+ Optional[List[LokiAuthOauthHeader1]], pydantic.Field(alias="oauthHeaders")
1050
+ ] = None
1051
+ r"""Additional headers to send in the OAuth login request. @{product} will automatically add the content-type header 'application/x-www-form-urlencoded' when sending this request."""
1052
+
1053
+
1054
+ class InputGrafanaMetadatum1TypedDict(TypedDict):
1055
+ name: str
1056
+ value: str
1057
+ r"""JavaScript expression to compute field's value, enclosed in quotes or backticks. (Can evaluate to a constant.)"""
1058
+
1059
+
1060
+ class InputGrafanaMetadatum1(BaseModel):
1061
+ name: str
1062
+
1063
+ value: str
1064
+ r"""JavaScript expression to compute field's value, enclosed in quotes or backticks. (Can evaluate to a constant.)"""
1065
+
1066
+
1067
+ class InputGrafana1TypedDict(TypedDict):
1068
+ type: InputGrafanaType1
1069
+ port: float
1070
+ r"""Port to listen on"""
1071
+ id: NotRequired[str]
1072
+ r"""Unique ID for this input"""
1073
+ disabled: NotRequired[bool]
1074
+ pipeline: NotRequired[str]
1075
+ r"""Pipeline to process data from this Source before sending it through the Routes"""
1076
+ send_to_routes: NotRequired[bool]
1077
+ r"""Select whether to send data to Routes, or directly to Destinations."""
1078
+ environment: NotRequired[str]
1079
+ r"""Optionally, enable this config only on a specified Git branch. If empty, will be enabled everywhere."""
1080
+ pq_enabled: NotRequired[bool]
1081
+ r"""Use a disk queue to minimize data loss when connected services block. See [Cribl Docs](https://docs.cribl.io/stream/persistent-queues) for PQ defaults (Cribl-managed Cloud Workers) and configuration options (on-prem and hybrid Workers)."""
1082
+ streamtags: NotRequired[List[str]]
1083
+ r"""Tags for filtering and grouping in @{product}"""
1084
+ connections: NotRequired[List[InputGrafanaConnection1TypedDict]]
1085
+ r"""Direct connections to Destinations, and optionally via a Pipeline or a Pack"""
1086
+ pq: NotRequired[InputGrafanaPq1TypedDict]
1087
+ host: NotRequired[str]
1088
+ r"""Address to bind on. Defaults to 0.0.0.0 (all addresses)."""
1089
+ tls: NotRequired[InputGrafanaTLSSettingsServerSide1TypedDict]
1090
+ max_active_req: NotRequired[float]
1091
+ r"""Maximum number of active requests allowed per Worker Process. Set to 0 for unlimited. Caution: Increasing the limit above the default value, or setting it to unlimited, may degrade performance and reduce throughput."""
1092
+ max_requests_per_socket: NotRequired[int]
1093
+ r"""Maximum number of requests per socket before @{product} instructs the client to close the connection. Default is 0 (unlimited)."""
1094
+ enable_proxy_header: NotRequired[bool]
1095
+ r"""Extract the client IP and port from PROXY protocol v1/v2. When enabled, the X-Forwarded-For header is ignored. Disable to use the X-Forwarded-For header for client IP extraction."""
1096
+ capture_headers: NotRequired[bool]
1097
+ r"""Add request headers to events, in the __headers field"""
1098
+ activity_log_sample_rate: NotRequired[float]
1099
+ r"""How often request activity is logged at the `info` level. A value of 1 would log every request, 10 every 10th request, etc."""
1100
+ request_timeout: NotRequired[float]
1101
+ r"""How long to wait for an incoming request to complete before aborting it. Use 0 to disable."""
1102
+ socket_timeout: NotRequired[float]
1103
+ r"""How long @{product} should wait before assuming that an inactive socket has timed out. To wait forever, set to 0."""
1104
+ keep_alive_timeout: NotRequired[float]
1105
+ r"""Maximum time to wait for additional data, after the last response was sent, before closing a socket connection. This can be very useful when Grafana Agent remote write's request frequency is high so, reusing connections, would help mitigating the cost of creating a new connection per request. Note that Grafana Agent's embedded Prometheus would attempt to keep connections open for up to 5 minutes."""
1106
+ enable_health_check: NotRequired[bool]
1107
+ r"""Expose the /cribl_health endpoint, which returns 200 OK when this Source is healthy"""
1108
+ ip_allowlist_regex: NotRequired[str]
1109
+ r"""Messages from matched IP addresses will be processed, unless also matched by the denylist"""
1110
+ ip_denylist_regex: NotRequired[str]
1111
+ r"""Messages from matched IP addresses will be ignored. This takes precedence over the allowlist."""
1112
+ prometheus_api: NotRequired[str]
1113
+ r"""Absolute path on which to listen for Grafana Agent's Remote Write requests. Defaults to /api/prom/push, which will expand as: 'http://<your‑upstream‑URL>:<your‑port>/api/prom/push'. Either this field or 'Logs API endpoint' must be configured."""
1114
+ loki_api: NotRequired[str]
1115
+ r"""Absolute path on which to listen for Loki logs requests. Defaults to /loki/api/v1/push, which will (in this example) expand as: 'http://<your‑upstream‑URL>:<your‑port>/loki/api/v1/push'. Either this field or 'Remote Write API endpoint' must be configured."""
1116
+ prometheus_auth: NotRequired[InputGrafanaPrometheusAuth1TypedDict]
1117
+ loki_auth: NotRequired[InputGrafanaLokiAuth1TypedDict]
1118
+ metadata: NotRequired[List[InputGrafanaMetadatum1TypedDict]]
1119
+ r"""Fields to add to events from this input"""
1120
+ description: NotRequired[str]
1121
+
1122
+
1123
+ class InputGrafana1(BaseModel):
1124
+ type: Annotated[InputGrafanaType1, PlainValidator(validate_open_enum(False))]
1125
+
1126
+ port: float
1127
+ r"""Port to listen on"""
1128
+
1129
+ id: Optional[str] = None
1130
+ r"""Unique ID for this input"""
1131
+
1132
+ disabled: Optional[bool] = False
1133
+
1134
+ pipeline: Optional[str] = None
1135
+ r"""Pipeline to process data from this Source before sending it through the Routes"""
1136
+
1137
+ send_to_routes: Annotated[Optional[bool], pydantic.Field(alias="sendToRoutes")] = (
1138
+ True
1139
+ )
1140
+ r"""Select whether to send data to Routes, or directly to Destinations."""
1141
+
1142
+ environment: Optional[str] = None
1143
+ r"""Optionally, enable this config only on a specified Git branch. If empty, will be enabled everywhere."""
1144
+
1145
+ pq_enabled: Annotated[Optional[bool], pydantic.Field(alias="pqEnabled")] = False
1146
+ r"""Use a disk queue to minimize data loss when connected services block. See [Cribl Docs](https://docs.cribl.io/stream/persistent-queues) for PQ defaults (Cribl-managed Cloud Workers) and configuration options (on-prem and hybrid Workers)."""
1147
+
1148
+ streamtags: Optional[List[str]] = None
1149
+ r"""Tags for filtering and grouping in @{product}"""
1150
+
1151
+ connections: Optional[List[InputGrafanaConnection1]] = None
1152
+ r"""Direct connections to Destinations, and optionally via a Pipeline or a Pack"""
1153
+
1154
+ pq: Optional[InputGrafanaPq1] = None
1155
+
1156
+ host: Optional[str] = "0.0.0.0"
1157
+ r"""Address to bind on. Defaults to 0.0.0.0 (all addresses)."""
1158
+
1159
+ tls: Optional[InputGrafanaTLSSettingsServerSide1] = None
1160
+
1161
+ max_active_req: Annotated[Optional[float], pydantic.Field(alias="maxActiveReq")] = (
1162
+ 256
1163
+ )
1164
+ r"""Maximum number of active requests allowed per Worker Process. Set to 0 for unlimited. Caution: Increasing the limit above the default value, or setting it to unlimited, may degrade performance and reduce throughput."""
1165
+
1166
+ max_requests_per_socket: Annotated[
1167
+ Optional[int], pydantic.Field(alias="maxRequestsPerSocket")
1168
+ ] = 0
1169
+ r"""Maximum number of requests per socket before @{product} instructs the client to close the connection. Default is 0 (unlimited)."""
1170
+
1171
+ enable_proxy_header: Annotated[
1172
+ Optional[bool], pydantic.Field(alias="enableProxyHeader")
1173
+ ] = False
1174
+ r"""Extract the client IP and port from PROXY protocol v1/v2. When enabled, the X-Forwarded-For header is ignored. Disable to use the X-Forwarded-For header for client IP extraction."""
1175
+
1176
+ capture_headers: Annotated[
1177
+ Optional[bool], pydantic.Field(alias="captureHeaders")
1178
+ ] = False
1179
+ r"""Add request headers to events, in the __headers field"""
1180
+
1181
+ activity_log_sample_rate: Annotated[
1182
+ Optional[float], pydantic.Field(alias="activityLogSampleRate")
1183
+ ] = 100
1184
+ r"""How often request activity is logged at the `info` level. A value of 1 would log every request, 10 every 10th request, etc."""
1185
+
1186
+ request_timeout: Annotated[
1187
+ Optional[float], pydantic.Field(alias="requestTimeout")
1188
+ ] = 0
1189
+ r"""How long to wait for an incoming request to complete before aborting it. Use 0 to disable."""
1190
+
1191
+ socket_timeout: Annotated[
1192
+ Optional[float], pydantic.Field(alias="socketTimeout")
1193
+ ] = 0
1194
+ r"""How long @{product} should wait before assuming that an inactive socket has timed out. To wait forever, set to 0."""
1195
+
1196
+ keep_alive_timeout: Annotated[
1197
+ Optional[float], pydantic.Field(alias="keepAliveTimeout")
1198
+ ] = 5
1199
+ r"""Maximum time to wait for additional data, after the last response was sent, before closing a socket connection. This can be very useful when Grafana Agent remote write's request frequency is high so, reusing connections, would help mitigating the cost of creating a new connection per request. Note that Grafana Agent's embedded Prometheus would attempt to keep connections open for up to 5 minutes."""
1200
+
1201
+ enable_health_check: Annotated[
1202
+ Optional[bool], pydantic.Field(alias="enableHealthCheck")
1203
+ ] = False
1204
+ r"""Expose the /cribl_health endpoint, which returns 200 OK when this Source is healthy"""
1205
+
1206
+ ip_allowlist_regex: Annotated[
1207
+ Optional[str], pydantic.Field(alias="ipAllowlistRegex")
1208
+ ] = "/.*/"
1209
+ r"""Messages from matched IP addresses will be processed, unless also matched by the denylist"""
1210
+
1211
+ ip_denylist_regex: Annotated[
1212
+ Optional[str], pydantic.Field(alias="ipDenylistRegex")
1213
+ ] = "/^$/"
1214
+ r"""Messages from matched IP addresses will be ignored. This takes precedence over the allowlist."""
1215
+
1216
+ prometheus_api: Annotated[Optional[str], pydantic.Field(alias="prometheusAPI")] = (
1217
+ "/api/prom/push"
1218
+ )
1219
+ r"""Absolute path on which to listen for Grafana Agent's Remote Write requests. Defaults to /api/prom/push, which will expand as: 'http://<your‑upstream‑URL>:<your‑port>/api/prom/push'. Either this field or 'Logs API endpoint' must be configured."""
1220
+
1221
+ loki_api: Annotated[Optional[str], pydantic.Field(alias="lokiAPI")] = (
1222
+ "/loki/api/v1/push"
1223
+ )
1224
+ r"""Absolute path on which to listen for Loki logs requests. Defaults to /loki/api/v1/push, which will (in this example) expand as: 'http://<your‑upstream‑URL>:<your‑port>/loki/api/v1/push'. Either this field or 'Remote Write API endpoint' must be configured."""
1225
+
1226
+ prometheus_auth: Annotated[
1227
+ Optional[InputGrafanaPrometheusAuth1], pydantic.Field(alias="prometheusAuth")
1228
+ ] = None
1229
+
1230
+ loki_auth: Annotated[
1231
+ Optional[InputGrafanaLokiAuth1], pydantic.Field(alias="lokiAuth")
1232
+ ] = None
1233
+
1234
+ metadata: Optional[List[InputGrafanaMetadatum1]] = None
1235
+ r"""Fields to add to events from this input"""
1236
+
1237
+ description: Optional[str] = None
1238
+
1239
+
1240
+ InputGrafanaUnionTypedDict = TypeAliasType(
1241
+ "InputGrafanaUnionTypedDict", Union[InputGrafana1TypedDict, InputGrafana2TypedDict]
1242
+ )
1243
+
1244
+
1245
+ InputGrafanaUnion = TypeAliasType(
1246
+ "InputGrafanaUnion", Union[InputGrafana1, InputGrafana2]
1247
+ )