Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

set deployment monitoring

Syntax

Hierarchy Level

[edit]

Description

Configure the monitoring in Routing Director to collect metrics from different types of sources (host metrics, kube-state-metric, syslogs and so on) and forward the collected data to designated sinks, or destinations (Prometheus, VictoriaMetrics, and so on).

Note: The default sources (audit, host, ksm) must not be altered or removed.

Use the request deployment deploy monitoring command to deploy the monitoring configuration. For more information, see Post Installation Tasks.

Options

sink id elasticsearch elasticsearch-options

For the specified sink ID, write the log messages to elasticsearch. The sink ID must be in the [a-z][a-z0-9_-]* format.

elasticsearch-options include the following:

  • api_version versionAPI version of elasticsearch. Options include auto, v6, v7, and v8.

  • compression method—Data compression method. Default is none. Options include none, gzip, snappy, zlib, and zstd.

  • endpoints (value | [values])—HTTP(S) endpoint of sources/sinks. Enter a single value or multiple [values].

  • healthcheck (none | enabled)—When enabled, check the health of the sink when the Vector starts up.

  • mode (bulk | data_stream)—Elasticsearch indexing mode.

  • query parameters—Custom parameters to add to the query string for each HTTP request sent to Elasticsearch, in the arg1_key#arg1_value#arg2_key#arg2_value... format. Number of hashtag-separated items has to be an even number.

sink id prometheus_remote_write prometheus-options

For the specified sink ID, write metric data to the endpoint with Prometheus remote write protocol. The sink ID must be in the [a-z][a-z0-9_-]* format.

prometheus-options include the following:

  • compression method—Data compression method. Default is snappy. Options include gzip, snappy, and zstd.

  • endpoint value—HTTP(S) endpoint of sources/sinks.

  • healthcheck (none | enabled)—When enabled, check the health of the sink when the Vector starts up.

sink id socket socket-options

For the specified sink ID, deliver logs to a remote socket endpoint. The sink ID must be in the [a-z][a-z0-9_-]* format.

socket-options include the following:

  • encoding codec format—Configures how events are encoded into raw bytes. The format options include avro, csv, gelf, json, logfmt, native, native_json, protobuf, raw_message, and text.

  • mode (tcp | udp)—The type of socket to use.

sink id loki loki-options

For the specified sink ID, write log messages to Loki. The sink ID must be in the [a-z][a-z0-9_-]* format.

loki-options include the following:

  • encoding codec format—Configures how events are encoded into raw bytes. The format options include avro, csv, gelf, json, logfmt, native, native_json, protobuf, raw_message, and text.

  • endpoint value—HTTP(S) endpoint of sinks.

  • labels label-set—A set of labels that are attached to each batch of events. The labels must be in the arg1_key#arg1_value#arg2_key#arg2_value... format. The number of hashtag separated items must be an even number.

sink id inputs value

For the specified sink ID, enter source IDs to send to the sink. Enter a single value or multiple [values].The sink ID must be in the [a-z][a-z0-9_-]* format.

source id cluster kafka options

For the specified source ID, monitor cluster-level metric source and subscribe to Kafka topics for messages.

options include the following options:

  • bootstrap_servers servers—Comma separated list of bootstrap servers.

  • group_id value— Kafka subscription group ID.

  • topics ((value | [values] | audits-dev)—List of Kafka topics. Enter a single value or multiple [values] or audits-dev.

source id cluster prometheus_scrape options

For the specified source ID, monitor cluster-level metric source and collect metrics through sources which writes prometheus-format data.

options include the following:

  • endpoints (value | [values])—HTTP(S) endpoint of sources/sinks. Enter a single value or multiple [values].

  • scrape_interval_secs interval— Scrape interval in seconds.

source id cluster kubernetes_container_metrics

For the specified source ID, collect fundamental Kubernetes container resource metrics like CPU, memory, and network usage.

source id cluster kubernetes_logs kubernetes-options

For the specified source ID, collect pod logs from Kubernetes nodes, automatically enriching data with metadata through the Kubernetes API.

kubernetes-options include the following options:

  • extra_field_selector value—Specify the field selector with which to filter pods, to be used in addition to the built-in node filter. Must be a comma separated list. For example, metadata.name!=pod-name-to-exclude,metadata.name=mypod.

  • extra_label_selector value—Specify the label selector with which to filter pods, to be used in addition to the built-in exclude filter. Must be a comma separated list. For example, my_custom_label!=my_value,my_other_custom_label=my_value.

  • extra_namespace_label_selector value—Specify the field selector with which to filter namespaces, to be used in addition to the built-in exclude filter. Must be a comma separated list. For example, my_custom_label!=my_value,my_other_custom_label=my_value.

  • read_from (beginning | end )—Specify the file position to use when reading a new file.

source id node host_metrics scrape_interval_secs interval

For the specified source ID, monitor and collect node-level metric data. Enter scrape interval in seconds.

source id node docker_logs container-options

For the specified source ID, collect logs from Docker.

container-options include the following options:

  • none— Execute this command.

  • exclude_containers value

    Enter a list of container IDs or names of containers to exclude from log collection. You can specify a prefix. This list takes priority over include_containers.

  • include_containers value

    Enter a list of container IDs or names of containers to include in log collection. You can specify a prefix. This list has a lower priority than exclude_containers.

source id node syslog

For the specified source ID, collect syslog from every single Linux host in the Juniper Routing Director deployment cluster.

source id node cmgd_log

For the specified source ID, collect logs from all deployment shell CLIs in the Juniper Routing Director deployment cluster.

Required Privilege Level

configure

Release Information

Statement introduced in Juniper Paragon Automation Release 2.0.0.