mirror of
https://github.com/prometheus/statsd_exporter.git
synced 2024-05-28 22:18:10 +00:00
Compare commits
9 commits
337849188c
...
58769c7b4d
Author | SHA1 | Date | |
---|---|---|---|
58769c7b4d | |||
9c4dfce4e0 | |||
29c77f407c | |||
233d74d0f7 | |||
3f985fa9ac | |||
479379a908 | |||
6e02dfcaae | |||
2c4ffa9620 | |||
ac0ef06e65 |
52
.github/workflows/container_description.yml
vendored
Normal file
52
.github/workflows/container_description.yml
vendored
Normal file
|
@ -0,0 +1,52 @@
|
|||
---
|
||||
name: Push README to Docker Hub
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- "README.md"
|
||||
- ".github/workflows/container_description.yml"
|
||||
branches: [ main, master ]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
PushDockerHubReadme:
|
||||
runs-on: ubuntu-latest
|
||||
name: Push README to Docker Hub
|
||||
if: github.repository_owner == 'prometheus' || github.repository_owner == 'prometheus-community' # Don't run this workflow on forks.
|
||||
steps:
|
||||
- name: git checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
- name: Set docker hub repo name
|
||||
run: echo "DOCKER_REPO_NAME=$(make docker-repo-name)" >> $GITHUB_ENV
|
||||
- name: Push README to Dockerhub
|
||||
uses: christian-korneck/update-container-description-action@d36005551adeaba9698d8d67a296bd16fa91f8e8 # v1
|
||||
env:
|
||||
DOCKER_USER: ${{ secrets.DOCKER_HUB_LOGIN }}
|
||||
DOCKER_PASS: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||
with:
|
||||
destination_container_repo: ${{ env.DOCKER_REPO_NAME }}
|
||||
provider: dockerhub
|
||||
short_description: ${{ env.DOCKER_REPO_NAME }}
|
||||
readme_file: 'README.md'
|
||||
|
||||
PushQuayIoReadme:
|
||||
runs-on: ubuntu-latest
|
||||
name: Push README to quay.io
|
||||
if: github.repository_owner == 'prometheus' || github.repository_owner == 'prometheus-community' # Don't run this workflow on forks.
|
||||
steps:
|
||||
- name: git checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
- name: Set quay.io org name
|
||||
run: echo "DOCKER_REPO=$(echo quay.io/${GITHUB_REPOSITORY_OWNER} | tr -d '-')" >> $GITHUB_ENV
|
||||
- name: Set quay.io repo name
|
||||
run: echo "DOCKER_REPO_NAME=$(make docker-repo-name)" >> $GITHUB_ENV
|
||||
- name: Push README to quay.io
|
||||
uses: christian-korneck/update-container-description-action@d36005551adeaba9698d8d67a296bd16fa91f8e8 # v1
|
||||
env:
|
||||
DOCKER_APIKEY: ${{ secrets.QUAY_IO_API_TOKEN }}
|
||||
with:
|
||||
destination_container_repo: ${{ env.DOCKER_REPO_NAME }}
|
||||
provider: quay
|
||||
readme_file: 'README.md'
|
4
.github/workflows/golangci-lint.yml
vendored
4
.github/workflows/golangci-lint.yml
vendored
|
@ -33,6 +33,6 @@ jobs:
|
|||
run: sudo apt-get update && sudo apt-get -y install libsnmp-dev
|
||||
if: github.repository == 'prometheus/snmp_exporter'
|
||||
- name: Lint
|
||||
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0
|
||||
uses: golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804 # v4.0.0
|
||||
with:
|
||||
version: v1.55.2
|
||||
version: v1.56.2
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
extends: default
|
||||
ignore: |
|
||||
ui/react-app/node_modules
|
||||
|
||||
rules:
|
||||
braces:
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
## 0.26.1 / 2024-03-22
|
||||
|
||||
* [SECURITY] Update dependencies, including `google.golang.org/protobuf` for CVE-2024-24786
|
||||
|
||||
This is a maintenance release.
|
||||
|
||||
## 0.26.0 / 2023-12-06
|
||||
|
||||
* [CHANGE] Update dependencies: prometheus/common, client model, and Go 1.21
|
||||
|
|
|
@ -49,7 +49,7 @@ endif
|
|||
GOTEST := $(GO) test
|
||||
GOTEST_DIR :=
|
||||
ifneq ($(CIRCLE_JOB),)
|
||||
ifneq ($(shell command -v gotestsum > /dev/null),)
|
||||
ifneq ($(shell command -v gotestsum 2> /dev/null),)
|
||||
GOTEST_DIR := test-results
|
||||
GOTEST := gotestsum --junitfile $(GOTEST_DIR)/unit-tests.xml --
|
||||
endif
|
||||
|
@ -61,7 +61,7 @@ PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_
|
|||
SKIP_GOLANGCI_LINT :=
|
||||
GOLANGCI_LINT :=
|
||||
GOLANGCI_LINT_OPTS ?=
|
||||
GOLANGCI_LINT_VERSION ?= v1.55.2
|
||||
GOLANGCI_LINT_VERSION ?= v1.56.2
|
||||
# golangci-lint only supports linux, darwin and windows platforms on i386/amd64/arm64.
|
||||
# windows isn't included here because of the path separator being different.
|
||||
ifeq ($(GOHOSTOS),$(filter $(GOHOSTOS),linux darwin))
|
||||
|
@ -169,16 +169,20 @@ common-vet:
|
|||
common-lint: $(GOLANGCI_LINT)
|
||||
ifdef GOLANGCI_LINT
|
||||
@echo ">> running golangci-lint"
|
||||
# 'go list' needs to be executed before staticcheck to prepopulate the modules cache.
|
||||
# Otherwise staticcheck might fail randomly for some reason not yet explained.
|
||||
$(GO) list -e -compiled -test=true -export=false -deps=true -find=false -tags= -- ./... > /dev/null
|
||||
$(GOLANGCI_LINT) run $(GOLANGCI_LINT_OPTS) $(pkgs)
|
||||
endif
|
||||
|
||||
.PHONY: common-lint-fix
|
||||
common-lint-fix: $(GOLANGCI_LINT)
|
||||
ifdef GOLANGCI_LINT
|
||||
@echo ">> running golangci-lint fix"
|
||||
$(GOLANGCI_LINT) run --fix $(GOLANGCI_LINT_OPTS) $(pkgs)
|
||||
endif
|
||||
|
||||
.PHONY: common-yamllint
|
||||
common-yamllint:
|
||||
@echo ">> running yamllint on all YAML files in the repository"
|
||||
ifeq (, $(shell command -v yamllint > /dev/null))
|
||||
ifeq (, $(shell command -v yamllint 2> /dev/null))
|
||||
@echo "yamllint not installed so skipping"
|
||||
else
|
||||
yamllint .
|
||||
|
@ -204,6 +208,10 @@ common-tarball: promu
|
|||
@echo ">> building release tarball"
|
||||
$(PROMU) tarball --prefix $(PREFIX) $(BIN_DIR)
|
||||
|
||||
.PHONY: common-docker-repo-name
|
||||
common-docker-repo-name:
|
||||
@echo "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)"
|
||||
|
||||
.PHONY: common-docker $(BUILD_DOCKER_ARCHS)
|
||||
common-docker: $(BUILD_DOCKER_ARCHS)
|
||||
$(BUILD_DOCKER_ARCHS): common-docker-%:
|
||||
|
|
67
README.md
67
README.md
|
@ -108,71 +108,7 @@ NOTE: Version 0.7.0 switched to the [kingpin](https://github.com/alecthomas/king
|
|||
* boolean long flags are disabled by prefixing with no (`--flag-name` is true, `--no-flag-name` is false)
|
||||
* multiple short flags can be combined (but there currently is only one)
|
||||
* flag processing stops at the first `--`
|
||||
|
||||
```
|
||||
usage: statsd_exporter [<flags>]
|
||||
|
||||
Flags:
|
||||
-h, --help Show context-sensitive help (also try
|
||||
--help-long and --help-man).
|
||||
--web.listen-address=":9102"
|
||||
The address on which to expose the web interface
|
||||
and generated Prometheus metrics.
|
||||
--web.enable-lifecycle Enable shutdown and reload via HTTP request.
|
||||
--web.telemetry-path="/metrics"
|
||||
Path under which to expose metrics.
|
||||
--statsd.listen-udp=":9125"
|
||||
The UDP address on which to receive statsd
|
||||
metric lines. "" disables it.
|
||||
--statsd.listen-tcp=":9125"
|
||||
The TCP address on which to receive statsd
|
||||
metric lines. "" disables it.
|
||||
--statsd.listen-unixgram=""
|
||||
The Unixgram socket path to receive statsd
|
||||
metric lines in datagram. "" disables it.
|
||||
--statsd.unixsocket-mode="755"
|
||||
The permission mode of the unix socket.
|
||||
--statsd.mapping-config=STATSD.MAPPING-CONFIG
|
||||
Metric mapping configuration file name.
|
||||
--statsd.read-buffer=STATSD.READ-BUFFER
|
||||
Size (in bytes) of the operating system's
|
||||
transmit read buffer associated with the UDP or
|
||||
Unixgram connection. Please make sure the kernel
|
||||
parameters net.core.rmem_max is set to a value
|
||||
greater than the value specified.
|
||||
--statsd.cache-size=1000 Maximum size of your metric mapping cache.
|
||||
Relies on least recently used replacement policy
|
||||
if max size is reached.
|
||||
--statsd.cache-type=lru Metric mapping cache type. Valid options are
|
||||
"lru" and "random"
|
||||
--statsd.event-queue-size=10000
|
||||
Size of internal queue for processing events
|
||||
--statsd.event-flush-threshold=1000
|
||||
Number of events to hold in queue before
|
||||
flushing
|
||||
--statsd.event-flush-interval=200ms
|
||||
Maximum time between event queue flushes.
|
||||
--debug.dump-fsm="" The path to dump internal FSM generated for
|
||||
glob matching as Dot file.
|
||||
--check-config Check configuration and exit.
|
||||
--statsd.parse-dogstatsd-tags
|
||||
Parse DogStatsd style tags. Enabled by default.
|
||||
--statsd.parse-influxdb-tags
|
||||
Parse InfluxDB style tags. Enabled by default.
|
||||
--statsd.parse-librato-tags
|
||||
Parse Librato style tags. Enabled by default.
|
||||
--statsd.parse-signalfx-tags
|
||||
Parse SignalFX style tags. Enabled by default.
|
||||
--statsd.relay.address=STATSD.RELAY.ADDRESS
|
||||
The UDP relay target address (host:port)
|
||||
--statsd.relay.packet-length=1400
|
||||
Maximum relay output packet length to avoid fragmentation
|
||||
--log.level=info Only log messages with the given severity or
|
||||
above. One of: [debug, info, warn, error]
|
||||
--log.format=logfmt Output format of log messages. One of: [logfmt,
|
||||
json]
|
||||
--version Show application version.
|
||||
```
|
||||
* see `--help` for a full list of flags
|
||||
|
||||
## Lifecycle API
|
||||
|
||||
|
@ -633,7 +569,6 @@ Semantic versioning of the exporter is based on the impact on users of the expor
|
|||
|
||||
We encourage re-use of these packages and welcome [issues](https://github.com/prometheus/statsd_exporter/issues?q=is%3Aopen+is%3Aissue+label%3Alibrary) related to their usability as a library.
|
||||
|
||||
[travis]: https://travis-ci.org/prometheus/statsd_exporter
|
||||
[circleci]: https://circleci.com/gh/prometheus/statsd_exporter
|
||||
[quay]: https://quay.io/repository/prometheus/statsd-exporter
|
||||
[hub]: https://hub.docker.com/r/prom/statsd-exporter/
|
||||
|
|
2
go.mod
2
go.mod
|
@ -32,5 +32,5 @@ require (
|
|||
golang.org/x/sys v0.16.0 // indirect
|
||||
golang.org/x/text v0.14.0 // indirect
|
||||
google.golang.org/appengine v1.6.7 // indirect
|
||||
google.golang.org/protobuf v1.32.0 // indirect
|
||||
google.golang.org/protobuf v1.33.0 // indirect
|
||||
)
|
||||
|
|
4
go.sum
4
go.sum
|
@ -72,8 +72,8 @@ google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6
|
|||
google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I=
|
||||
google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
|
||||
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
|
||||
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
|
|
Loading…
Reference in a new issue