Skip to content

Commit 5211b71

Browse files
authored
Merge branch 'main' into feature/dns-latency
2 parents df8c266 + 31d00d9 commit 5211b71

19 files changed

Lines changed: 507 additions & 81 deletions

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
thread: [ 0, 1, 2 ]
2323
steps:
2424
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
25-
- uses: prometheus/promci@52c7012f5f0070d7281b8db4a119e21341d43c91 # v0.4.5
25+
- uses: prometheus/promci@443c7fc2397e946bc9f5029e313a9c3441b9b86d # v0.4.7
2626
- uses: ./.github/promci/actions/build
2727
with:
2828
promu_opts: "-p linux/amd64 -p windows/amd64 -p darwin/amd64 -p linux/arm64 -p windows/arm64 -p darwin/arm64"
@@ -41,7 +41,7 @@ jobs:
4141
thread: [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ]
4242
steps:
4343
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
44-
- uses: prometheus/promci@52c7012f5f0070d7281b8db4a119e21341d43c91 # v0.4.5
44+
- uses: prometheus/promci@443c7fc2397e946bc9f5029e313a9c3441b9b86d # v0.4.7
4545
- uses: ./.github/promci/actions/build
4646
with:
4747
parallelism: 12
@@ -51,7 +51,7 @@ jobs:
5151
name: Verify
5252
runs-on: ubuntu-latest
5353
container:
54-
image: quay.io/prometheus/golang-builder:1.23-base
54+
image: quay.io/prometheus/golang-builder:1.25-base
5555
steps:
5656
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
5757
- run: make build
@@ -68,7 +68,7 @@ jobs:
6868
(github.event_name == 'push' && github.event.ref == 'refs/heads/main')
6969
steps:
7070
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
71-
- uses: prometheus/promci@52c7012f5f0070d7281b8db4a119e21341d43c91 # v0.4.5
71+
- uses: prometheus/promci@443c7fc2397e946bc9f5029e313a9c3441b9b86d # v0.4.7
7272
- uses: ./.github/promci/actions/publish_main
7373
with:
7474
docker_hub_organization: prometheuscommunity
@@ -88,7 +88,7 @@ jobs:
8888
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v0.'))
8989
steps:
9090
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
91-
- uses: prometheus/promci@52c7012f5f0070d7281b8db4a119e21341d43c91 # v0.4.5
91+
- uses: prometheus/promci@443c7fc2397e946bc9f5029e313a9c3441b9b86d # v0.4.7
9292
- uses: ./.github/promci/actions/publish_release
9393
with:
9494
docker_hub_organization: prometheuscommunity

.github/workflows/container_description.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
steps:
2020
- name: git checkout
2121
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
22+
with:
23+
persist-credentials: false
2224
- name: Set docker hub repo name
2325
run: echo "DOCKER_REPO_NAME=$(make docker-repo-name)" >> $GITHUB_ENV
2426
- name: Push README to Dockerhub
@@ -41,6 +43,8 @@ jobs:
4143
steps:
4244
- name: git checkout
4345
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
46+
with:
47+
persist-credentials: false
4448
- name: Set quay.io org name
4549
run: echo "DOCKER_REPO=$(echo quay.io/${GITHUB_REPOSITORY_OWNER} | tr -d '-')" >> $GITHUB_ENV
4650
- name: Set quay.io repo name

.github/workflows/golangci-lint.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,20 @@ jobs:
2525
steps:
2626
- name: Checkout repository
2727
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
28+
with:
29+
persist-credentials: false
2830
- name: Install Go
29-
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
31+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
3032
with:
31-
go-version: 1.23.x
33+
go-version: 1.25.x
3234
- name: Install snmp_exporter/generator dependencies
3335
run: sudo apt-get update && sudo apt-get -y install libsnmp-dev
3436
if: github.repository == 'prometheus/snmp_exporter'
37+
- name: Get golangci-lint version
38+
id: golangci-lint-version
39+
run: echo "version=$(make print-golangci-lint-version)" >> $GITHUB_OUTPUT
3540
- name: Lint
36-
uses: golangci/golangci-lint-action@ec5d18412c0aeab7936cb16880d708ba2a64e1ae # v6.2.0
41+
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
3742
with:
3843
args: --verbose
39-
version: v1.63.4
44+
version: ${{ steps.golangci-lint-version.outputs.version }}

.golangci.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
1-
---
1+
version: "2"
22
linters:
33
enable:
44
- misspell
55
- sloglint
6-
7-
issues:
8-
exclude-rules:
9-
- path: _test.go
10-
linters:
11-
- errcheck
6+
exclusions:
7+
generated: lax
8+
presets:
9+
- comments
10+
- common-false-positives
11+
- legacy
12+
- std-error-handling
13+
rules:
14+
- linters:
15+
- errcheck
16+
path: _test.go
17+
formatters:
18+
exclusions:
19+
generated: lax

.promu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
go:
22
# This must match .circle/config.yml.
3-
version: 1.23
3+
version: 1.25
44
repository:
55
path: github.com/prometheus-community/fortigate_exporter
66
build:

CODE_OF_CONDUCT.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Prometheus Community Code of Conduct
2+
3+
Prometheus follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/main/code-of-conduct.md).

Makefile.common

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_
6161
SKIP_GOLANGCI_LINT :=
6262
GOLANGCI_LINT :=
6363
GOLANGCI_LINT_OPTS ?=
64-
GOLANGCI_LINT_VERSION ?= v1.63.4
64+
GOLANGCI_LINT_VERSION ?= v2.4.0
65+
GOLANGCI_FMT_OPTS ?=
6566
# golangci-lint only supports linux, darwin and windows platforms on i386/amd64/arm64.
6667
# windows isn't included here because of the path separator being different.
6768
ifeq ($(GOHOSTOS),$(filter $(GOHOSTOS),linux darwin))
@@ -138,7 +139,7 @@ common-deps:
138139
update-go-deps:
139140
@echo ">> updating Go dependencies"
140141
@for m in $$($(GO) list -mod=readonly -m -f '{{ if and (not .Indirect) (not .Main)}}{{.Path}}{{end}}' all); do \
141-
$(GO) get -d $$m; \
142+
$(GO) get $$m; \
142143
done
143144
$(GO) mod tidy
144145

@@ -156,9 +157,13 @@ $(GOTEST_DIR):
156157
@mkdir -p $@
157158

158159
.PHONY: common-format
159-
common-format:
160+
common-format: $(GOLANGCI_LINT)
160161
@echo ">> formatting code"
161162
$(GO) fmt $(pkgs)
163+
ifdef GOLANGCI_LINT
164+
@echo ">> formatting code with golangci-lint"
165+
$(GOLANGCI_LINT) fmt $(GOLANGCI_FMT_OPTS)
166+
endif
162167

163168
.PHONY: common-vet
164169
common-vet:
@@ -248,8 +253,8 @@ $(PROMU):
248253
cp $(PROMU_TMP)/promu-$(PROMU_VERSION).$(GO_BUILD_PLATFORM)/promu $(FIRST_GOPATH)/bin/promu
249254
rm -r $(PROMU_TMP)
250255

251-
.PHONY: proto
252-
proto:
256+
.PHONY: common-proto
257+
common-proto:
253258
@echo ">> generating code from proto files"
254259
@./scripts/genproto.sh
255260

@@ -261,6 +266,10 @@ $(GOLANGCI_LINT):
261266
| sh -s -- -b $(FIRST_GOPATH)/bin $(GOLANGCI_LINT_VERSION)
262267
endif
263268

269+
.PHONY: common-print-golangci-lint-version
270+
common-print-golangci-lint-version:
271+
@echo $(GOLANGCI_LINT_VERSION)
272+
264273
.PHONY: precheck
265274
precheck::
266275

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,11 @@ Global:
4141
* `fortigate_network_dns_latency_`
4242
* `fortigate_network_dns_latest_update`
4343
* _System/SensorInfo_
44+
* `fortigate_sensor_alarm_status`
4445
* `fortigate_sensor_fan_rpm`
4546
* `fortigate_sensor_temperature_celsius`
4647
* `fortigate_sensor_voltage_volts`
48+
* `fortigate_sensor_thresholds`
4749
* _System/Status_
4850
* `fortigate_version_info`
4951
* _System/Time/Clock_

SECURITY.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Reporting a security issue
2+
3+
The Prometheus security policy, including how to report vulnerabilities, can be
4+
found here:
5+
6+
<https://prometheus.io/docs/operating/security/>

go.mod

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
module github.com/prometheus-community/fortigate_exporter
22

3-
go 1.22.0
3+
go 1.24.0
44

55
require (
66
github.com/google/go-jsonnet v0.20.0
7-
github.com/prometheus/client_golang v1.18.0
7+
github.com/prometheus/client_golang v1.23.2
88
gopkg.in/yaml.v2 v2.4.0
99
)
1010

1111
require (
1212
github.com/beorn7/perks v1.0.1 // indirect
13-
github.com/cespare/xxhash/v2 v2.2.0 // indirect
14-
github.com/davecgh/go-spew v1.1.1 // indirect
13+
github.com/cespare/xxhash/v2 v2.3.0 // indirect
1514
github.com/kr/text v0.2.0 // indirect
16-
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
17-
github.com/prometheus/client_model v0.5.0 // indirect
18-
github.com/prometheus/common v0.45.0 // indirect
19-
github.com/prometheus/procfs v0.12.0 // indirect
20-
golang.org/x/sys v0.15.0 // indirect
21-
google.golang.org/protobuf v1.31.0 // indirect
15+
github.com/kylelemons/godebug v1.1.0 // indirect
16+
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
17+
github.com/prometheus/client_model v0.6.2 // indirect
18+
github.com/prometheus/common v0.66.1 // indirect
19+
github.com/prometheus/procfs v0.16.1 // indirect
20+
go.yaml.in/yaml/v2 v2.4.2 // indirect
21+
golang.org/x/sys v0.35.0 // indirect
22+
google.golang.org/protobuf v1.36.8 // indirect
2223
sigs.k8s.io/yaml v1.1.0 // indirect
2324
)

0 commit comments

Comments
 (0)