Skip to content

Commit 4f43fa7

Browse files
committed
Merge branch 'main' into feature/sandbox-information
Signed-off-by: Örnfeldt Philip (66140321) <philip.ornfeldt@forsakringskassan.se>
2 parents 1a10b9e + c4ba2aa commit 4f43fa7

26 files changed

Lines changed: 667 additions & 407 deletions

.dockerignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
data/
2+
.build/
3+
.tarballs/
4+
5+
!.build/linux-amd64/
6+
!.build/linux-arm64/
7+
!.build/linux-armv7/
8+
!.build/linux-ppc64le/
9+
!.build/linux-riscv64/
10+
!.build/linux-s390x/

.github/dependabot.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
version: 2
22
updates:
3-
- package-ecosystem: gomod
4-
directory: /
3+
- package-ecosystem: "gomod"
4+
directory: "/"
55
schedule:
6-
interval: monthly
7-
open-pull-requests-limit: 10
8-
- package-ecosystem: github-actions
9-
directory: /
6+
interval: "monthly"
7+
- package-ecosystem: "github-actions"
8+
directory: "/"
109
schedule:
11-
interval: monthly
12-
open-pull-requests-limit: 10
10+
interval: "monthly"
11+
# Exclude configs synced from upstream prometheus/prometheus.
12+
exclude-paths:
13+
- .github/workflows/container_description.yml
14+
- .github/workflows/golangci-lint.yml

.github/workflows/ci.yml

Lines changed: 27 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,69 @@
1+
---
12
name: CI
2-
33
on:
4-
push:
5-
tags:
6-
- 'v*'
7-
branches:
8-
- main
94
pull_request:
10-
workflow_call:
5+
push:
6+
branches: [main, master, 'release-*']
7+
tags: ['v*']
8+
9+
permissions:
10+
contents: read
1111

1212
jobs:
13-
build:
14-
name: Build for common architectures
13+
test_go:
14+
name: Go tests
1515
runs-on: ubuntu-latest
16-
if: |
17-
!(github.event_name == 'push' && github.event.ref == 'refs/heads/main')
18-
&&
19-
!(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'))
20-
strategy:
21-
matrix:
22-
thread: [ 0, 1, 2 ]
16+
container:
17+
# Whenever the Go version is updated here, .promu.yml
18+
# should also be updated.
19+
image: quay.io/prometheus/golang-builder:1.26-base
2320
steps:
2421
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
25-
- uses: prometheus/promci@fc721ff8497a70a93a881cd552b71af7fb3a9d53 # v0.5.4
26-
- uses: ./.github/promci/actions/build
27-
with:
28-
promu_opts: "-p linux/amd64 -p windows/amd64 -p darwin/amd64 -p linux/arm64 -p windows/arm64 -p darwin/arm64"
29-
parallelism: 3
30-
thread: ${{ matrix.thread }}
22+
- uses: prometheus/promci-setup@5af30ba8c199a91d6c04ebdc3c48e630e355f62d # v0.1.0
23+
- run: make GO_ONLY=1 SKIP_GOLANGCI_LINT=1
3124

32-
build_all:
33-
name: Build for all architectures
25+
build:
26+
name: Build
3427
runs-on: ubuntu-latest
35-
if: |
36-
(github.event_name == 'push' && github.event.ref == 'refs/heads/main')
37-
||
38-
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'))
3928
strategy:
4029
matrix:
41-
thread: [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ]
30+
thread: [ 0, 1, 2, 3]
4231
steps:
4332
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
44-
- uses: prometheus/promci@fc721ff8497a70a93a881cd552b71af7fb3a9d53 # v0.5.4
45-
- uses: ./.github/promci/actions/build
33+
- uses: prometheus/promci/build@9c86752f3395e08c57719af549cc455d8e2c2514 # v0.7.0
4634
with:
47-
parallelism: 12
35+
parallelism: 4
4836
thread: ${{ matrix.thread }}
4937

50-
verify-example-configs:
51-
name: Verify
52-
runs-on: ubuntu-latest
53-
container:
54-
image: quay.io/prometheus/golang-builder:1.25-base
55-
steps:
56-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
57-
- run: make build
58-
- name: Verify example configs
59-
run: find ./examples -name "*.yml" -print0 | xargs -0 -I % ./yace verify-config -config.file %
60-
6138
publish_main:
6239
name: Publish main branch artifacts
6340
runs-on: ubuntu-latest
64-
needs: [build_all, verify-example-configs]
41+
needs: [test_go, build]
6542
if: |
66-
(github.repository == 'prometheus-community/fortigate_exporter')
67-
&&
6843
(github.event_name == 'push' && github.event.ref == 'refs/heads/main')
44+
||
45+
(github.event_name == 'push' && github.event.ref == 'refs/heads/master')
6946
steps:
7047
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
71-
- uses: prometheus/promci@fc721ff8497a70a93a881cd552b71af7fb3a9d53 # v0.5.4
72-
- uses: ./.github/promci/actions/publish_main
48+
- uses: prometheus/promci/publish_main@9c86752f3395e08c57719af549cc455d8e2c2514 # v0.7.0
7349
with:
7450
docker_hub_organization: prometheuscommunity
75-
docker_hub_login: ${{ secrets.docker_hub_login }}
7651
docker_hub_password: ${{ secrets.docker_hub_password }}
7752
quay_io_organization: prometheuscommunity
78-
quay_io_login: ${{ secrets.quay_io_login }}
7953
quay_io_password: ${{ secrets.quay_io_password }}
8054

8155
publish_release:
82-
name: Publish release artifacts
56+
name: Publish release artefacts
8357
runs-on: ubuntu-latest
84-
needs: [build_all, verify-example-configs]
58+
needs: [test_go, build]
8559
if: |
86-
(github.repository == 'prometheus-community/fortigate_exporter')
87-
&&
8860
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'))
8961
steps:
9062
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
91-
- uses: prometheus/promci@fc721ff8497a70a93a881cd552b71af7fb3a9d53 # v0.5.4
92-
- uses: ./.github/promci/actions/publish_release
63+
- uses: prometheus/promci/publish_release@9c86752f3395e08c57719af549cc455d8e2c2514 # v0.7.0
9364
with:
9465
docker_hub_organization: prometheuscommunity
95-
docker_hub_login: ${{ secrets.docker_hub_login }}
9666
docker_hub_password: ${{ secrets.docker_hub_password }}
9767
quay_io_organization: prometheuscommunity
98-
quay_io_login: ${{ secrets.quay_io_login }}
9968
quay_io_password: ${{ secrets.quay_io_password }}
10069
github_token: ${{ secrets.PROMBOT_GITHUB_TOKEN }}

.github/workflows/golangci-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
with:
3131
persist-credentials: false
3232
- name: Install Go
33-
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
33+
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
3434
with:
3535
go-version: 1.26.x
3636
- name: Install snmp_exporter/generator dependencies

.github/workflows/govulncheck.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: govulncheck
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
- master
9+
schedule:
10+
- cron: '33 2 * * *'
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
govulncheck:
17+
runs-on: ubuntu-latest
18+
name: Run govulncheck
19+
steps:
20+
- id: govulncheck
21+
uses: golang/govulncheck-action@31f7c5463448f83528bd771c2d978d940080c9fd # v1.0.4-unreleased

.promu.yml

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

CHANGELOG.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
## v1.25.0 / 2026-03-15
2+
3+
First release after the move to the prometheus-community
4+
5+
> [!CAUTION]
6+
> [**BREAKINGCHANGE**] Rewrite BGP probes to use Prometheus state sets instead of numeric values for FortiOS 7.6 (#366)
7+
> this one will **REPLACE** the exisisting `fortigate_bgp_neighbor_ipv(4|6)_info` metric to a stateset `fortigate_bgp_neighbor_ipv(4|6)_state` impacting cardinality by +17 per bgp neighbor
8+
9+
> [!IMPORTANT]
10+
> [CHANGE] Rewrite SDN Connector Status probe to use Prometheus state sets (#368)
11+
> this one will **ADD** a stateset `fortigate_system_sdn_connector_state` impacing cardinality by +5 per sdn connector.
12+
>
13+
> **We are planning to deprecate `fortigate_system_sdn_connector_status` in a future release**
14+
15+
- [CHANGE] Rename internal version package (#375)
16+
- [CHANGE] Rename internal HTTP client package (#371)
17+
- [CHANGE] Update project license (#309); add missing license description (#376)
18+
- [CHANGE] Transfer project to Prometheus Community; update CI/CD (#312, #314, #341, #344)
19+
- [CHANGE] Update maintainers list and remove archive notice from README (#372)
20+
- [CHANGE] Refactor README for improved structure and clarity (#349)
21+
- [FEATURE] Add System HA Peer probe (#347)
22+
- [FEATURE] Add System Performance Status probe (#336)
23+
- [FEATURE] Add DNS Latency probe (#334)
24+
- [FEATURE] Add VDOM Resources probe (#338)
25+
- [FEATURE] Add Interface Transceivers probe for FortiOS 7.4+ (#332)
26+
- [FEATURE] Add System NTP Status probe (#335)
27+
- [FEATURE] Add Sensor Info probe for FortiOS 7.4+ (#331)
28+
- [FEATURE] Add Central Management Status probe (#337)
29+
- [FEATURE] Add System Global Location probe (#363)
30+
- [FEATURE] Add FortiOS 7.6 support for system status probe (#367)
31+
- [BUGFIX] Fix managed-switch API endpoint for updated FortiOS API (#324)
32+
- [ENHANCEMENT] Enable additional golangci-lint checks (#346)
33+
- [DEPENDENCY] Bump `golang.org/x/crypto` from 0.36.0 to 0.45.0 (#374)
34+
- [DEPENDENCY] Bump `github.com/prometheus/client_golang` (#339)
35+
- [DEPENDENCY] Bump `github.com/google/go-jsonnet` from 0.20.0 to 0.21.0 (#325)
36+
- [DEPENDENCY] Bump GitHub Actions dependencies (#326, #330, #352, #353, #356, #357, #360, #361, #369)
37+
38+
## v1.24.1 / 2024-01-08
39+
40+
Previous release.

Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@ ARG ARCH="amd64"
22
ARG OS="linux"
33
FROM quay.io/prometheus/busybox-${OS}-${ARCH}:glibc
44
LABEL maintainer="The Prometheus Authors <prometheus-developers@googlegroups.com>"
5+
LABEL org.opencontainers.image.authors="The Prometheus Authors"
6+
LABEL org.opencontainers.image.vendor="Prometheus"
7+
LABEL org.opencontainers.image.title="snmp_exporter"
8+
LABEL org.opencontainers.image.description="Prometheus SNMP Exporter"
9+
LABEL org.opencontainers.image.source="https://github.com/prometheus-community/fortigate_exporter"
10+
LABEL org.opencontainers.image.url="https://github.com/prometheus-community/fortigate_exporter"
11+
LABEL org.opencontainers.image.documentation="https://github.com/prometheus-community/fortigate_exporter/blob/main/README.md"
12+
LABEL org.opencontainers.image.licenses="Apache License 2.0"
13+
LABEL io.prometheus.image.variant="busybox"
514

615
ARG ARCH="amd64"
716
ARG OS="linux"

Dockerfile.distroless

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
ARG DISTROLESS_ARCH="amd64"
2+
FROM gcr.io/distroless/static-debian13:nonroot-${DISTROLESS_ARCH}
3+
4+
ARG ARCH="amd64"
5+
ARG OS="linux"
6+
LABEL maintainer="The Prometheus Authors <prometheus-developers@googlegroups.com>"
7+
LABEL org.opencontainers.image.authors="The Prometheus Authors"
8+
LABEL org.opencontainers.image.vendor="Prometheus"
9+
LABEL org.opencontainers.image.title="snmp_exporter"
10+
LABEL org.opencontainers.image.description="Prometheus SNMP Exporter"
11+
LABEL org.opencontainers.image.source="https://github.com/prometheus-community/fortigate_exporter"
12+
LABEL org.opencontainers.image.url="https://github.com/prometheus-community/fortigate_exporter"
13+
LABEL org.opencontainers.image.documentation="https://github.com/prometheus-community/fortigate_exporter/blob/main/README.md"
14+
LABEL org.opencontainers.image.licenses="Apache License 2.0"
15+
LABEL io.prometheus.image.variant="distroless"
16+
17+
ARG ARCH="amd64"
18+
ARG OS="linux"
19+
COPY .build/${OS}-${ARCH}/fortigate_exporter /bin/fortigate_exporter
20+
21+
EXPOSE 9710
22+
ENTRYPOINT [ "/bin/fortigate_exporter" ]

0 commit comments

Comments
 (0)