Skip to content

General updates and corrections to the Alloy Component docs part 7 #3706

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jun 3, 2025
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ prometheus.exporter.self "<LABEL>" {

## Arguments

The `prometheus.exporter.self` doesn't support any arguments.
The `prometheus.exporter.self` component doesn't support any arguments.

## Blocks

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ prometheus.exporter.snmp "<LABEL>" {

You can use the following arguments with `prometheus.exporter.snmp`:

| Name | Type | Description | Default | Required |
| ----------------------- | -------------------- | ---------------------------------------------------------------------------------------------------------------------------- | --------- | -------- |
| `concurrency` | `int` | SNMP exporter concurrency. | `1` | no |
| `config_file` | `string` | SNMP configuration file defining custom modules. | | no |
| `config_merge_strategy` | `string` | A strategy defining how `config` or `config_file` contents merge with the embedded SNMP config. Can be `replace` or `merge`. | `replace` | no |
| `config` | `string` or `secret` | SNMP configuration as inline string. | | no |
| `targets` | `list(map(string))` | SNMP targets. | | no |
| Name | Type | Description | Default | Required |
| ----------------------- | -------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ----------- | -------- |
| `concurrency` | `int` | SNMP exporter concurrency. | `1` | no |
| `config_file` | `string` | SNMP configuration file defining custom modules. | | no |
| `config_merge_strategy` | `string` | A strategy defining how `config` or `config_file` contents merge with the embedded SNMP config. Can be `replace` or `merge`. | `"replace"` | no |
| `config` | `string` or `secret` | SNMP configuration as inline string. | | no |
| `targets` | `list(map(string))` | SNMP targets. | | no |

The `config_file` argument points to a YAML file defining which snmp_exporter modules to use.
Refer to [snmp_exporter](https://github.com/prometheus/snmp_exporter/tree/{{< param "SNMP_VERSION" >}}?tab=readme-ov-file#configuration) for details on how to generate a configuration file.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ prometheus.exporter.squid "<LABEL>" {

## Arguments

You can use the following arguments to configure the exporter's behavior.`prometheus.exporter.squid`
You can use the following arguments with `prometheus.exporter.squid`:

| Name | Type | Description | Default | Required |
| ---------- | -------- | ----------------------------------------------------- | ------- | -------- |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,33 +25,33 @@ prometheus.exporter.statsd "<LABEL>" {

You can use the following arguments with `prometheus.exporter.statsd`:

| Name | Type | Description | Default | Required |
| ----------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------ | ------- | -------- |
| `cache_size` | `int` | Maximum size of your metric mapping cache. Relies on least recently used replacement policy if max size is reached. | `1000` | no |
| `cache_type` | `string` | Metric mapping cache type. Valid options are "lru" and "random". | `lru` | no |
| `event_flush_interval` | `string` | Maximum time between event queue flushes. | `200ms` | no |
| `event_flush_threshold` | `int` | Number of events to hold in queue before flushing. | `1000` | no |
| `event_queue_size` | `int` | Size of internal queue for processing events. | `10000` | no |
| `listen_tcp` | `string` | The TCP address on which to receive statsd metric lines. Use `""` to disable it. | `:9125` | no |
| `listen_udp` | `string` | The UDP address on which to receive statsd metric lines. Use `""` to disable it. | `:9125` | no |
| `listen_unixgram` | `string` | The Unixgram socket path to receive statsd metric lines in datagram. Use `""` to disable it. | | no |
| `mapping_config_path` | `string` | The path to a YAML mapping file used to translate specific dot-separated StatsD metrics into labeled Prometheus metrics. | | no |
| `parse_dogstatsd_tags` | `string` | Parse DogStatsd style tags. | `true` | no |
| `parse_influxdb_tags` | `string` | Parse InfluxDB style tags. | `true` | no |
| `parse_librato_tags` | `string` | Parse Librato style tags. | `true` | no |
| `parse_signalfx_tags` | `string` | Parse SignalFX style tags. | `true` | no |
| `read_buffer` | `int` | Size (in bytes) of the operating system's transmit read buffer associated with the UDP or Unixgram connection. | | no |
| `relay_addr` | `string` | Relay address configuration (UDP endpoint in the format 'host:port'). | | no |
| `relay_packet_length` | `int` | Maximum relay output packet length to avoid fragmentation. | `1400` | no |
| `unix_socket_mode` | `string` | The permission mode of the Unix socket. | `755` | no |
| Name | Type | Description | Default | Required |
| ----------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------ | --------- | -------- |
| `cache_size` | `int` | Maximum size of your metric mapping cache. Relies on least recently used replacement policy if max size is reached. | `1000` | no |
| `cache_type` | `string` | Metric mapping cache type. Valid options are "lru" and "random". | `"lru"` | no |
| `event_flush_interval` | `string` | Maximum time between event queue flushes. | `"200ms"` | no |
| `event_flush_threshold` | `int` | Number of events to hold in queue before flushing. | `1000` | no |
| `event_queue_size` | `int` | Size of internal queue for processing events. | `10000` | no |
| `listen_tcp` | `string` | The TCP address on which to receive statsd metric lines. Use `""` to disable it. | `":9125"` | no |
| `listen_udp` | `string` | The UDP address on which to receive statsd metric lines. Use `""` to disable it. | `":9125"` | no |
| `listen_unixgram` | `string` | The Unixgram socket path to receive statsd metric lines in datagram. Use `""` to disable it. | | no |
| `mapping_config_path` | `string` | The path to a YAML mapping file used to translate specific dot-separated StatsD metrics into labeled Prometheus metrics. | | no |
| `parse_dogstatsd_tags` | `bool` | Parse DogStatsd style tags. | `true` | no |
| `parse_influxdb_tags` | `bool` | Parse InfluxDB style tags. | `true` | no |
| `parse_librato_tags` | `bool` | Parse Librato style tags. | `true` | no |
| `parse_signalfx_tags` | `bool` | Parse SignalFX style tags. | `true` | no |
| `read_buffer` | `int` | Size (in bytes) of the operating system's transmit read buffer associated with the UDP or Unixgram connection. | | no |
| `relay_addr` | `string` | Relay address configuration (UDP endpoint in the format 'host:port'). | | no |
| `relay_packet_length` | `int` | Maximum relay output packet length to avoid fragmentation. | `1400` | no |
| `unix_socket_mode` | `string` | The permission mode of the Unix socket. | `"755"` | no |

At least one of `listen_udp`, `listen_tcp`, or `listen_unixgram` should be enabled.
Refer to the [`statsd_exporter` documentation](https://github.com/prometheus/statsd_exporter#metric-mapping-and-configuration) more information about the mapping `config file`.
Make sure the kernel parameter `net.core.rmem_max` is set to a value greater than the value specified in `read_buffer`.

### Blocks

The `prometheus.exporter.statsd` component doesn't support any blocks, and is configured fully through arguments.
The `prometheus.exporter.statsd` component doesn't support any blocks. You can configure this component with arguments.

## Exported fields

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ prometheus.exporter.unix "<LABEL>" {

You can use the following arguments with `prometheus.exporter.unix`:

| Name | Type | Description | Default | Required |
| -------------------------- | -------------- | --------------------------------------------------------------------------- | ---------------- | -------- |
| `disable_collectors` | `list(string)` | Collectors to disable. | `[]` | no |
| `enable_collectors` | `list(string)` | Collectors to enable. | `[]` | no |
| `include_exporter_metrics` | `boolean` | Whether metrics about the exporter itself should be reported. | false | no |
| `procfs_path` | `string` | The procfs mount point. | `/proc` | no |
| `rootfs_path` | `string` | Specify a prefix for accessing the host filesystem. | `/` | no |
| `set_collectors` | `list(string)` | Overrides the default set of enabled collectors with the collectors listed. | | no |
| `sysfs_path` | `string` | The sysfs mount point. | `/sys` | no |
| `udev_data_path` | `string` | The udev data path. | `/run/udev/data` | no |
| Name | Type | Description | Default | Required |
| -------------------------- | -------------- | --------------------------------------------------------------------------- | ------------------ | -------- |
| `disable_collectors` | `list(string)` | Collectors to disable. | `[]` | no |
| `enable_collectors` | `list(string)` | Collectors to enable. | `[]` | no |
| `include_exporter_metrics` | `bool` | Whether metrics about the exporter itself should be reported. | `false` | no |
| `procfs_path` | `string` | The procfs mount point. | `"/proc"` | no |
| `rootfs_path` | `string` | Specify a prefix for accessing the host filesystem. | `"/"` | no |
| `set_collectors` | `list(string)` | Overrides the default set of enabled collectors with the collectors listed. | | no |
| `sysfs_path` | `string` | The sysfs mount point. | `"/sys"` | no |
| `udev_data_path` | `string` | The udev data path. | `"/run/udev/data"` | no |

`set_collectors` defines a hand-picked list of enabled-by-default collectors.
If set, anything not provided in that list is disabled by default.
Expand Down Expand Up @@ -191,14 +191,14 @@ The default values vary by the operating system {{< param "PRODUCT_NAME" >}} run

| Name | Type | Description | Default | Required |
| ----------------------------- | --------- | --------------------------------------------------------------------- | ------- | -------- |
| `ignore_invalid_speed_device` | `boolean` | Ignore net devices with invalid speed values. | false | no |
| `ignore_invalid_speed_device` | `boolean` | Ignore net devices with invalid speed values. | `false` | no |
| `ignored_devices` | `string` | Regular expression of net devices to ignore for `netclass` collector. | `"^$"` | no |

### `netdev`

| Name | Type | Description | Default | Required |
| ---------------- | --------- | --------------------------------------------------------------------------------------- | ------- | -------- |
| `address_info` | `boolean` | Enable collecting address-info for every device. | false | no |
| `address_info` | `boolean` | Enable collecting address-info for every device. | `false` | no |
| `device_exclude` | `string` | Regular expression of net devices to exclude. Mutually exclusive with `device_include`. | | no |
| `device_include` | `string` | Regular expression of net devices to include. Mutually exclusive with `device_exclude`. | | no |

Expand Down Expand Up @@ -270,9 +270,9 @@ An explicit value in the block takes precedence over the environment variable.

| Name | Type | Description | Default | Required |
| ----------------- | --------- | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- | -------- |
| `enable_restarts` | `boolean` | Enables service unit metric `service_restart_total` | false | no |
| `start_time` | `boolean` | Enables service unit metric `unit_start_time_seconds` | false | no |
| `task_metrics` | `boolean` | Enables service unit task metrics `unit_tasks_current` and `unit_tasks_max.` | false | no |
| `enable_restarts` | `boolean` | Enables service unit metric `service_restart_total` | `false` | no |
| `start_time` | `boolean` | Enables service unit metric `unit_start_time_seconds` | `false` | no |
| `task_metrics` | `boolean` | Enables service unit task metrics `unit_tasks_current` and `unit_tasks_max.` | `false` | no |
| `unit_exclude` | `string` | Regular expression of systemd units to exclude. Units must both match include and not match exclude to be collected. | `".+\\.(automount\|device\|mount\|scope\|slice)"` | no |
| `unit_include` | `string` | Regular expression of systemd units to include. Units must both match include and not match exclude to be collected. | `".+"` | no |

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ For example, you can set `enabled_list` to `["cluster"]`.

### `mssql`

| Name | Type | Description | Default | Required |
| ----------------- | -------------- | ----------------------------------- | ------- | -------- |
| Name | Type | Description | Default | Required |
| ----------------- | -------------- | ----------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| `enabled_classes` | `list(string)` | A list of MSSQL WMI classes to use. | `["accessmethods", "availreplica", "bufman", "databases", "dbreplica", "genstats", "info", "locks", "memmgr", "sqlerrors", "sqlstats", "transactions", "waitstats"]` | no |

### `network`
Expand Down
Loading
Loading