Skip to content

Commit

Permalink
Merge main v0.41 (#6932)
Browse files Browse the repository at this point in the history
* Update pyroscope/ebpf to v0.4.6 (#678) (#6917)

* Update pyroscope/ebpf to v0.4.4

Note: Pyroscope updated its prometheus/common dependecy and hence this
required further updates.

* Also update windows exporter

* Allow pid maps to be configured

This also modifieds the way we do defaulting and valides those two new
fields.

* Update pyroscope/ebpf v0.4.5

This updates the pyroscope/ebpf annotations to both have alloy and
river ones.

* Add some testing for argument validation

* Update to v0.4.6 to fix debug data

This also includes a test to make sure debug data is marshalled
correctly.

Co-authored-by: Clayton Cornell <[email protected]>

* Add a snmp_context argument (#6923)

* Update `make docs` procedure (#6930)

Co-authored-by: grafanabot <[email protected]>

---------

Co-authored-by: Christian Simon <[email protected]>
Co-authored-by: Clayton Cornell <[email protected]>
Co-authored-by: Paulin Todev <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: grafanabot <[email protected]>
  • Loading branch information
6 people authored May 31, 2024
1 parent 6e24144 commit 865b48e
Show file tree
Hide file tree
Showing 16 changed files with 377 additions and 123 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ Main (unreleased)

- A new `loki.rules.kubernetes` component that discovers `PrometheusRule` Kubernetes resources and loads them into a Loki Ruler instance. (@EStork09)

- A new `snmp_context` configuration argument for `prometheus.exporter.snmp` and the `snmp` Static mode integration.
It overrides the `context_name` parameter in the SNMP configuration file. (@ptodev)

### Bugfixes

- Fix panic for `prometheus.exporter.snmp` and snmp_exporter integration
Expand Down
84 changes: 63 additions & 21 deletions docs/make-docs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@
# [Semantic versioning](https://semver.org/) is used to help the reader identify the significance of changes.
# Changes are relevant to this script and the support docs.mk GNU Make interface.
#
# ## 8.0.0 (2024-05-28)
#
# ### Changed
#
# - Add environment variable `OUTPUT_FORMAT` to control the output of commands.
#
# The default value is `human` and means the output format is human readable.
# The value `json` is also supported and outputs JSON.
#
# Note that the `json` format isn't supported by `make docs`, only `make doc-validator` and `make vale`.
#
# ## 7.0.0 (2024-05-03)
#
# ### Changed
Expand Down Expand Up @@ -255,6 +266,8 @@ readonly HUGO_REFLINKSERRORLEVEL="${HUGO_REFLINKSERRORLEVEL:-WARNING}"
readonly VALE_MINALERTLEVEL="${VALE_MINALERTLEVEL:-error}"
readonly WEBSITE_EXEC="${WEBSITE_EXEC:-make server-docs}"

readonly OUTPUT_FORMAT="${OUTPUT_FORMAT:-human}"

PODMAN="$(if command -v podman >/dev/null 2>&1; then echo podman; else echo docker; fi)"

if ! command -v curl >/dev/null 2>&1; then
Expand Down Expand Up @@ -748,45 +761,74 @@ POSIX_HERESTRING

case "${image}" in
'grafana/doc-validator')
if ! command -v jq >/dev/null 2>&1; then
errr '`jq` must be installed for the `doc-validator` target to work.'
note 'To install `jq`, refer to https://jqlang.github.io/jq/download/,'

exit 1
fi

proj="$(new_proj "$1")"
printf '\r\n'
"${PODMAN}" run \

IFS='' read -r cmd <<EOF
${PODMAN} run \
--init \
--interactive \
--platform linux/amd64 \
--rm \
--tty \
${volumes} \
"${DOCS_IMAGE}" \
"--include=${DOC_VALIDATOR_INCLUDE}" \
"--skip-checks=${DOC_VALIDATOR_SKIP_CHECKS}" \
"/hugo/content$(proj_canonical "${proj}")" \
"$(proj_canonical "${proj}")" \
| sed "s#$(proj_dst "${proj}")#sources#" \
| jq -r '"ERROR: \(.location.path):\(.location.range.start.line // 1):\(.location.range.start.column // 1): \(.message)" + if .suggestions[0].text then "\nSuggestion: \(.suggestions[0].text)" else "" end'
${DOCS_IMAGE} \
--include=${DOC_VALIDATOR_INCLUDE} \
--skip-checks=${DOC_VALIDATOR_SKIP_CHECKS} \
/hugo/content$(proj_canonical "${proj}") \
"$(proj_canonical "${proj}") \
| sed "s#$(proj_dst "${proj}")#sources#"
EOF

case "${OUTPUT_FORMAT}" in
human)
if ! command -v jq >/dev/null 2>&1; then
errr '`jq` must be installed for the `doc-validator` target to work.'
note 'To install `jq`, refer to https://jqlang.github.io/jq/download/,'

exit 1
fi

${cmd} \
| jq -r '"ERROR: \(.location.path):\(.location.range.start.line // 1):\(.location.range.start.column // 1): \(.message)" + if .suggestions[0].text then "\nSuggestion: \(.suggestions[0].text)" else "" end'
;;
json)
${cmd}
;;
*) # default
errr "Invalid output format '${OUTPUT_FORMAT}'"
esac
;;
'grafana/vale')
proj="$(new_proj "$1")"
printf '\r\n'
"${PODMAN}" run \
IFS='' read -r cmd <<EOF
${PODMAN} run \
--init \
--interactive \
--rm \
--workdir /etc/vale \
--tty \
${volumes} \
"${DOCS_IMAGE}" \
"--minAlertLevel=${VALE_MINALERTLEVEL}" \
'--glob=*.md' \
--output=/etc/vale/rdjsonl.tmpl \
/hugo/content/docs | sed "s#$(proj_dst "${proj}")#sources#"
${DOCS_IMAGE} \
--minAlertLevel=${VALE_MINALERTLEVEL} \
--glob=*.md \
/hugo/content/docs
EOF

case "${OUTPUT_FORMAT}" in
human)
${cmd} --output=line \
| sed "s#$(proj_dst "${proj}")#sources#"
;;
json)
${cmd} --output=/etc/vale/rdjsonl.tmpl \
| sed "s#$(proj_dst "${proj}")#sources#"
;;
*)
errr "Invalid output format '${OUTPUT_FORMAT}'"
esac

;;
*)
tempfile="$(mktemp -t make-docs.XXX)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,13 @@ The following blocks are supported inside the definition of
The `target` block defines an individual SNMP target.
The `target` block may be specified multiple times to define multiple targets. The label of the block is required and will be used in the target's `job` label.

| Name | Type | Description | Default | Required |
| ------------- | -------- | ----------------------------------- | ------- | -------- |
| `address` | `string` | The address of SNMP device. | | yes |
| `module` | `string` | SNMP module to use for polling. | `""` | no |
| `auth` | `string` | SNMP authentication profile to use. | `""` | no |
| `walk_params` | `string` | Config to use for this target. | `""` | no |
| Name | Type | Description | Default | Required |
| -------------- | -------- | --------------------------------------------------------------------- | ------- | -------- |
| `address` | `string` | The address of SNMP device. | | yes |
| `module` | `string` | SNMP module to use for polling. | `""` | no |
| `auth` | `string` | SNMP authentication profile to use. | `""` | no |
| `walk_params` | `string` | Config to use for this target. | `""` | no |
| `snmp_context` | `string` | Override the `context_name` parameter in the SNMP configuration file. | `""` | no |

### walk_param block

Expand Down
2 changes: 2 additions & 0 deletions docs/sources/flow/reference/components/pyroscope.ebpf.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ values.
| `collect_kernel_profile` | `bool` | A flag to enable/disable collection of kernelspace profiles | true | no |
| `demangle` | `string` | C++ demangle mode. Available options are: `none`, `simplified`, `templates`, `full` | `none` | no |
| `python_enabled` | `bool` | A flag to enable/disable python profiling | true | no |
| `symbols_map_size` | `int` | The size of eBPF symbols map | 16384 | no |
| `pid_map_size` | `int` | The size of eBPF PID map | 2048 | no |

## Exported fields

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ Full reference of options:
# walk_param config to use for this snmp_target
[walk_params: <string> | default = ""]
# snmp_context overrides the `context_name` parameter in the SNMP configuration file.
[snmp_context: <string> | default = ""]
```
## walk_param config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ which is an embedded version of
[`snmp_exporter`](https://github.com/prometheus/snmp_exporter). This allows collection of SNMP metrics from the network devices with ease.

{{< admonition type="note" >}}
`snmp config` uses the latest configuration introduced in version 0.23 of the Prometheus `snmp_exporter`.
`snmp config` uses the latest configuration introduced in version 0.26 of the Prometheus `snmp_exporter`.
{{< /admonition >}}

## Quick configuration example
Expand Down Expand Up @@ -167,6 +167,9 @@ Full reference of options:
# walk_param config to use for this snmp_target
[walk_params: <string> | default = ""]
# snmp_context overrides the `context_name` parameter in the SNMP configuration file.
[snmp_context: <string> | default = ""]
```
## walk_param config
Expand Down
22 changes: 11 additions & 11 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ require (
github.com/google/dnsmasq_exporter v0.2.1-0.20230620100026-44b14480804a
github.com/google/go-cmp v0.6.0
github.com/google/go-jsonnet v0.18.0
github.com/google/pprof v0.0.0-20240117000934-35fc243c5815
github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7
github.com/google/renameio/v2 v2.0.0
github.com/google/uuid v1.6.0
github.com/gorilla/mux v1.8.1
Expand All @@ -61,7 +61,7 @@ require (
github.com/grafana/loki v1.6.2-0.20240510183741-cef4c2826b4b // k190 branch
github.com/grafana/pyroscope-go/godeltaprof v0.1.7
github.com/grafana/pyroscope/api v0.4.0
github.com/grafana/pyroscope/ebpf v0.4.3
github.com/grafana/pyroscope/ebpf v0.4.6
github.com/grafana/regexp v0.0.0-20221123153739-15dc172cd2db
github.com/grafana/river v0.3.1-0.20240123144725-960753160cd1
github.com/grafana/snowflake-prometheus-exporter v0.0.0-20221213150626-862cad8e9538
Expand Down Expand Up @@ -216,14 +216,14 @@ require (
go.uber.org/multierr v1.11.0
go.uber.org/zap v1.27.0
golang.org/x/crypto v0.22.0
golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc
golang.org/x/net v0.23.0
golang.org/x/exp v0.0.0-20240119083558-1b970713d09a
golang.org/x/net v0.24.0
golang.org/x/oauth2 v0.18.0
golang.org/x/sys v0.19.0
golang.org/x/text v0.14.0
golang.org/x/time v0.5.0
google.golang.org/api v0.155.0
google.golang.org/grpc v1.62.0
google.golang.org/grpc v1.62.1
google.golang.org/protobuf v1.33.0
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.1
Expand Down Expand Up @@ -310,9 +310,6 @@ require (
github.com/checkpoint-restore/go-criu/v5 v5.3.0 // indirect
github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58 // indirect
github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa // indirect
github.com/containerd/console v1.0.3 // indirect
github.com/containerd/containerd v1.7.11 // indirect
github.com/containerd/continuity v0.4.2 // indirect
github.com/containerd/ttrpc v1.2.2 // indirect
github.com/coreos/go-semver v0.3.1 // indirect
github.com/cpuguy83/dockercfg v0.3.1 // indirect
Expand All @@ -325,7 +322,6 @@ require (
github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/digitalocean/godo v1.104.1 // indirect
github.com/dimchansky/utfbom v1.1.1
github.com/docker/cli v24.0.0+incompatible // indirect
github.com/docker/distribution v2.8.2+incompatible // indirect
github.com/docker/go-units v0.5.0 // indirect
Expand Down Expand Up @@ -579,14 +575,14 @@ require (
golang.org/x/mod v0.14.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/term v0.19.0 // indirect
golang.org/x/tools v0.16.1
golang.org/x/tools v0.17.0
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
gonum.org/v1/gonum v0.14.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240304161311-37d4d3c04a78 // indirect
gopkg.in/alecthomas/kingpin.v2 v2.2.6 // indirect
gopkg.in/fsnotify/fsnotify.v1 v1.4.7 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
Expand All @@ -604,6 +600,7 @@ require github.com/ianlancetaylor/demangle v0.0.0-20230524184225-eabc099b10ab //
require (
connectrpc.com/connect v1.14.0
github.com/Shopify/sarama v1.38.1
github.com/dimchansky/utfbom v1.1.1
github.com/githubexporter/github-exporter v0.0.0-20231025122338-656e7dc33fe7
github.com/grafana/agent-remote-config v0.0.2
github.com/grafana/jfr-parser/pprof v0.0.0-20240126072739-986e71dc0361
Expand Down Expand Up @@ -645,6 +642,9 @@ require (
github.com/channelmeter/iso8601duration v0.0.0-20150204201828-8da3af7a2a61 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/containerd/cgroups/v3 v3.0.2 // indirect
github.com/containerd/console v1.0.3 // indirect
github.com/containerd/containerd v1.7.11 // indirect
github.com/containerd/continuity v0.4.2 // indirect
github.com/containerd/errdefs v0.1.0 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/dgryski/go-metro v0.0.0-20180109044635-280f6062b5bc // indirect
Expand Down
Loading

0 comments on commit 865b48e

Please sign in to comment.