Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
166 changes: 166 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74487,6 +74487,7 @@ components:
- $ref: '#/components/schemas/ObservabilityPipelineDatabricksZerobusDestination'
- $ref: '#/components/schemas/ObservabilityPipelineDatadogMetricsDestination'
- $ref: '#/components/schemas/ObservabilityPipelineOpentelemetryMetricsDestination'
- $ref: '#/components/schemas/ObservabilityPipelinePrometheusRemoteWriteDestination'
- $ref: '#/components/schemas/ObservabilityPipelineSplunkHecMetricsDestination'
ObservabilityPipelineConfigPipelineType:
default: logs
Expand Down Expand Up @@ -74586,6 +74587,7 @@ components:
- $ref: '#/components/schemas/ObservabilityPipelineSyslogNgSource'
- $ref: '#/components/schemas/ObservabilityPipelineWebsocketSource'
- $ref: '#/components/schemas/ObservabilityPipelineOpentelemetrySource'
- $ref: '#/components/schemas/ObservabilityPipelinePrometheusRemoteWriteSource'
ObservabilityPipelineCrowdStrikeNextGenSiemDestination:
description: |-
The `crowdstrike_next_gen_siem` destination forwards logs to CrowdStrike Next Gen SIEM.
Expand Down Expand Up @@ -77476,6 +77478,170 @@ components:
type: string
x-enum-varnames:
- PARSE_XML
ObservabilityPipelinePrometheusRemoteWriteDestination:
description: |-
The `prometheus_remote_write` destination forwards metrics to an endpoint that supports the Prometheus Remote Write protocol.

**Supported pipeline types:** metrics
properties:
auth_strategy:
$ref: '#/components/schemas/ObservabilityPipelinePrometheusRemoteWriteDestinationAuthStrategy'
buffer:
$ref: '#/components/schemas/ObservabilityPipelineBufferOptions'
default_namespace:
description: The default namespace to add as a prefix to metric names that do not already have one.
example: datadog
type: string
endpoint_url_key:
description: |-
Name of the environment variable or secret that holds the Prometheus Remote Write endpoint URL.
Defaults to `DESTINATION_PROMETHEUS_REMOTE_WRITE_ENDPOINT_URL` (prefixed with `DD_OP_` at runtime).
example: PROMETHEUS_REMOTE_WRITE_ENDPOINT_URL
type: string
id:
description: The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the `input` to downstream components).
example: prometheus-remote-write-destination
type: string
inputs:
description: A list of component IDs whose output is used as the `input` for this component.
example: ["metrics-filter-processor"]
items:
description: The ID of a component whose output is used as input for this destination.
type: string
type: array
password_key:
description: Name of the environment variable or secret that holds the password (used when `auth_strategy` is `basic`).
example: PROMETHEUS_REMOTE_WRITE_PASSWORD
type: string
tenant_id:
description: The tenant ID to include with outgoing requests. Used by multi-tenant Prometheus Remote Write receivers.
example: my-tenant
type: string
tls:
$ref: '#/components/schemas/ObservabilityPipelineClientTls'
token_key:
description: Name of the environment variable or secret that holds the bearer token (used when `auth_strategy` is `bearer`).
example: PROMETHEUS_REMOTE_WRITE_TOKEN
type: string
type:
$ref: '#/components/schemas/ObservabilityPipelinePrometheusRemoteWriteDestinationType'
username_key:
description: Name of the environment variable or secret that holds the username (used when `auth_strategy` is `basic`).
example: PROMETHEUS_REMOTE_WRITE_USERNAME
type: string
required:
- id
- type
- inputs
type: object
x-pipeline-types: [metrics]
ObservabilityPipelinePrometheusRemoteWriteDestinationAuthStrategy:
description: The authentication strategy to use for outgoing Prometheus Remote Write requests.
enum:
- none
- basic
- bearer
example: basic
type: string
x-enum-varnames:
- NONE
- BASIC
- BEARER
ObservabilityPipelinePrometheusRemoteWriteDestinationType:
default: prometheus_remote_write
description: The destination type. The value should always be `prometheus_remote_write`.
enum:
- prometheus_remote_write
example: prometheus_remote_write
type: string
x-enum-varnames:
- PROMETHEUS_REMOTE_WRITE
ObservabilityPipelinePrometheusRemoteWriteSource:
description: |-
The `prometheus_remote_write` source ingests metrics pushed over the Prometheus Remote Write protocol.

**Supported pipeline types:** metrics
properties:
address_key:
description: Name of the environment variable or secret that holds the listen address for the Prometheus Remote Write endpoint.
example: PROMETHEUS_REMOTE_WRITE_ADDRESS
type: string
auth_strategy:
$ref: '#/components/schemas/ObservabilityPipelinePrometheusRemoteWriteSourceAuthStrategy'
id:
description: The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the `input` to downstream components).
example: prometheus-remote-write-source
type: string
password_key:
description: Name of the environment variable or secret that holds the password (used when `auth_strategy` is `plain`).
example: PROMETHEUS_REMOTE_WRITE_PASSWORD
type: string
path:
default: "/api/v1/write"
description: The HTTP path on which the source listens for incoming Prometheus Remote Write requests.
example: "/api/v1/write"
type: string
tls:
$ref: '#/components/schemas/ObservabilityPipelineMtlsServerTls'
type:
$ref: '#/components/schemas/ObservabilityPipelinePrometheusRemoteWriteSourceType'
username_key:
description: Name of the environment variable or secret that holds the username (used when `auth_strategy` is `plain`).
example: PROMETHEUS_REMOTE_WRITE_USERNAME
type: string
valid_tokens:
description: |-
A list of tokens that are accepted for authenticating incoming requests. When set,
the source rejects any request whose token does not match an enabled entry in this list.
items:
$ref: '#/components/schemas/ObservabilityPipelinePrometheusRemoteWriteSourceValidToken'
maxItems: 1000
minItems: 1
type: array
required:
- id
- type
- auth_strategy
type: object
x-pipeline-types: [metrics]
ObservabilityPipelinePrometheusRemoteWriteSourceAuthStrategy:
description: HTTP authentication method.
enum:
- none
- plain
example: plain
type: string
x-enum-varnames:
- NONE
- PLAIN
ObservabilityPipelinePrometheusRemoteWriteSourceType:
default: prometheus_remote_write
description: The source type. The value should always be `prometheus_remote_write`.
enum: [prometheus_remote_write]
example: prometheus_remote_write
type: string
x-enum-varnames:
- PROMETHEUS_REMOTE_WRITE
ObservabilityPipelinePrometheusRemoteWriteSourceValidToken:
description: An accepted token used to authenticate incoming Prometheus Remote Write requests.
properties:
enabled:
default: true
description: |-
Indicates whether this token is currently accepted. Disabled tokens are rejected without
being removed from the configuration.
example: true
type: boolean
path_to_token:
$ref: '#/components/schemas/ObservabilityPipelineHttpServerSourceValidTokenPathToToken'
token_key:
description: Name of the environment variable or secret that holds the expected token value.
example: PROMETHEUS_REMOTE_WRITE_TOKEN
pattern: "^[A-Za-z0-9_]+$"
type: string
required:
- token_key
type: object
ObservabilityPipelineQuotaProcessor:
description: |-
The `quota` processor measures logging traffic for logs that match a specified filter. When the configured daily quota is met, the processor can drop or alert.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1486,6 +1486,61 @@ public ObservabilityPipelineConfigDestinationItem deserialize(
e);
}

// deserialize ObservabilityPipelinePrometheusRemoteWriteDestination
try {
boolean attemptParsing = true;
// ensure that we respect type coercion as set on the client ObjectMapper
if (ObservabilityPipelinePrometheusRemoteWriteDestination.class.equals(Integer.class)
|| ObservabilityPipelinePrometheusRemoteWriteDestination.class.equals(Long.class)
|| ObservabilityPipelinePrometheusRemoteWriteDestination.class.equals(Float.class)
|| ObservabilityPipelinePrometheusRemoteWriteDestination.class.equals(Double.class)
|| ObservabilityPipelinePrometheusRemoteWriteDestination.class.equals(Boolean.class)
|| ObservabilityPipelinePrometheusRemoteWriteDestination.class.equals(String.class)) {
attemptParsing = typeCoercion;
if (!attemptParsing) {
attemptParsing |=
((ObservabilityPipelinePrometheusRemoteWriteDestination.class.equals(Integer.class)
|| ObservabilityPipelinePrometheusRemoteWriteDestination.class.equals(
Long.class))
&& token == JsonToken.VALUE_NUMBER_INT);
attemptParsing |=
((ObservabilityPipelinePrometheusRemoteWriteDestination.class.equals(Float.class)
|| ObservabilityPipelinePrometheusRemoteWriteDestination.class.equals(
Double.class))
&& (token == JsonToken.VALUE_NUMBER_FLOAT
|| token == JsonToken.VALUE_NUMBER_INT));
attemptParsing |=
(ObservabilityPipelinePrometheusRemoteWriteDestination.class.equals(Boolean.class)
&& (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE));
attemptParsing |=
(ObservabilityPipelinePrometheusRemoteWriteDestination.class.equals(String.class)
&& token == JsonToken.VALUE_STRING);
}
}
if (attemptParsing) {
tmp =
tree.traverse(jp.getCodec())
.readValueAs(ObservabilityPipelinePrometheusRemoteWriteDestination.class);
// TODO: there is no validation against JSON schema constraints
// (min, max, enum, pattern...), this does not perform a strict JSON
// validation, which means the 'match' count may be higher than it should be.
if (!((ObservabilityPipelinePrometheusRemoteWriteDestination) tmp).unparsed) {
deserialized = tmp;
match++;
}
log.log(
Level.FINER,
"Input data matches schema 'ObservabilityPipelinePrometheusRemoteWriteDestination'");
}
} catch (Exception e) {
// deserialization failed, continue
log.log(
Level.FINER,
"Input data does not match schema"
+ " 'ObservabilityPipelinePrometheusRemoteWriteDestination'",
e);
}

// deserialize ObservabilityPipelineSplunkHecMetricsDestination
try {
boolean attemptParsing = true;
Expand Down Expand Up @@ -1717,6 +1772,12 @@ public ObservabilityPipelineConfigDestinationItem(
setActualInstance(o);
}

public ObservabilityPipelineConfigDestinationItem(
ObservabilityPipelinePrometheusRemoteWriteDestination o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}

public ObservabilityPipelineConfigDestinationItem(
ObservabilityPipelineSplunkHecMetricsDestination o) {
super("oneOf", Boolean.FALSE);
Expand Down Expand Up @@ -1801,6 +1862,9 @@ public ObservabilityPipelineConfigDestinationItem(
schemas.put(
"ObservabilityPipelineOpentelemetryMetricsDestination",
new GenericType<ObservabilityPipelineOpentelemetryMetricsDestination>() {});
schemas.put(
"ObservabilityPipelinePrometheusRemoteWriteDestination",
new GenericType<ObservabilityPipelinePrometheusRemoteWriteDestination>() {});
schemas.put(
"ObservabilityPipelineSplunkHecMetricsDestination",
new GenericType<ObservabilityPipelineSplunkHecMetricsDestination>() {});
Expand Down Expand Up @@ -1831,6 +1895,7 @@ public Map<String, GenericType> getSchemas() {
* ObservabilityPipelineSyslogNgDestination, ObservabilityPipelineDatabricksZerobusDestination,
* ObservabilityPipelineDatadogMetricsDestination,
* ObservabilityPipelineOpentelemetryMetricsDestination,
* ObservabilityPipelinePrometheusRemoteWriteDestination,
* ObservabilityPipelineSplunkHecMetricsDestination
*
* <p>It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a
Expand Down Expand Up @@ -1983,6 +2048,13 @@ public void setActualInstance(Object instance) {
super.setActualInstance(instance);
return;
}
if (JSON.isInstanceOf(
ObservabilityPipelinePrometheusRemoteWriteDestination.class,
instance,
new HashSet<Class<?>>())) {
super.setActualInstance(instance);
return;
}
if (JSON.isInstanceOf(
ObservabilityPipelineSplunkHecMetricsDestination.class,
instance,
Expand Down Expand Up @@ -2020,6 +2092,7 @@ public void setActualInstance(Object instance) {
+ " ObservabilityPipelineDatabricksZerobusDestination,"
+ " ObservabilityPipelineDatadogMetricsDestination,"
+ " ObservabilityPipelineOpentelemetryMetricsDestination,"
+ " ObservabilityPipelinePrometheusRemoteWriteDestination,"
+ " ObservabilityPipelineSplunkHecMetricsDestination");
}

Expand All @@ -2041,6 +2114,7 @@ public void setActualInstance(Object instance) {
* ObservabilityPipelineSyslogNgDestination, ObservabilityPipelineDatabricksZerobusDestination,
* ObservabilityPipelineDatadogMetricsDestination,
* ObservabilityPipelineOpentelemetryMetricsDestination,
* ObservabilityPipelinePrometheusRemoteWriteDestination,
* ObservabilityPipelineSplunkHecMetricsDestination
*
* @return The actual instance (ObservabilityPipelineElasticsearchDestination,
Expand All @@ -2062,6 +2136,7 @@ public void setActualInstance(Object instance) {
* ObservabilityPipelineDatabricksZerobusDestination,
* ObservabilityPipelineDatadogMetricsDestination,
* ObservabilityPipelineOpentelemetryMetricsDestination,
* ObservabilityPipelinePrometheusRemoteWriteDestination,
* ObservabilityPipelineSplunkHecMetricsDestination)
*/
@Override
Expand Down Expand Up @@ -2415,6 +2490,20 @@ public ObservabilityPipelineSyslogNgDestination getObservabilityPipelineSyslogNg
return (ObservabilityPipelineOpentelemetryMetricsDestination) super.getActualInstance();
}

/**
* Get the actual instance of `ObservabilityPipelinePrometheusRemoteWriteDestination`. If the
* actual instance is not `ObservabilityPipelinePrometheusRemoteWriteDestination`, the
* ClassCastException will be thrown.
*
* @return The actual instance of `ObservabilityPipelinePrometheusRemoteWriteDestination`
* @throws ClassCastException if the instance is not
* `ObservabilityPipelinePrometheusRemoteWriteDestination`
*/
public ObservabilityPipelinePrometheusRemoteWriteDestination
getObservabilityPipelinePrometheusRemoteWriteDestination() throws ClassCastException {
return (ObservabilityPipelinePrometheusRemoteWriteDestination) super.getActualInstance();
}

/**
* Get the actual instance of `ObservabilityPipelineSplunkHecMetricsDestination`. If the actual
* instance is not `ObservabilityPipelineSplunkHecMetricsDestination`, the ClassCastException will
Expand Down
Loading
Loading