Skip to content
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

update anx-prod from upstream #17

Merged
merged 60 commits into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
1487e71
Collect fan status information for EX series switches
tomhughes Aug 4, 2023
08fdbbc
Merge pull request #224 from tomhughes/ex-fans
czerwonk Aug 13, 2023
30ff477
scraping of subscribers -> new metric: junos_subscriber_info
Sep 13, 2023
659ce4c
fix BGP group label for old EX devices, add info label with filter po…
czerwonk Sep 18, 2023
80a0f1f
use system ASN if local ASN is not configured on session
czerwonk Sep 18, 2023
3123fbe
Merge pull request #222 from anexia/netdev-517/add-interface-type,-pr…
czerwonk Sep 20, 2023
e5388fe
remove unused parameter
czerwonk Sep 20, 2023
2864d45
move interfaceMediaInfoFromRPCResult to helpers
czerwonk Sep 20, 2023
1e3123a
add new label representing BGP options to BGP info metric
czerwonk Sep 20, 2023
2a74bc5
Merge pull request #227 from anexia/netdev-786/collect-subscriber-inf…
czerwonk Sep 26, 2023
5b46a30
code cleanup
czerwonk Sep 26, 2023
b113665
add a new config parameter to decrypt key file with a passphrase + im…
ahuret Oct 8, 2023
1053b17
Bump golang.org/x/net from 0.7.0 to 0.17.0
dependabot[bot] Oct 11, 2023
fc2a49a
Merge pull request #230 from czerwonk/dependabot/go_modules/golang.or…
czerwonk Oct 12, 2023
c774d50
Merge pull request #229 from ahuret/main
czerwonk Oct 12, 2023
adca478
add test for #226
czerwonk Oct 18, 2023
aff64df
add parsing of logical interface descriptions (fixes #226)
czerwonk Oct 18, 2023
83b9996
Bump google.golang.org/grpc from 1.53.0 to 1.56.3
dependabot[bot] Oct 25, 2023
d59f995
Merge pull request #231 from czerwonk/dependabot/go_modules/google.go…
czerwonk Oct 26, 2023
156627b
helm: junosexporter: Make sshkey value optional
wigust Nov 10, 2023
c068936
helm: junosexporter: Allow to specify extra environment variables
wigust Nov 10, 2023
3a6a881
helm: junosexporter: Allow to specify extra arguments
wigust Nov 10, 2023
2755756
helm: junosexporter: Make configyml value optional
wigust Nov 10, 2023
d724370
helm: junosexporter: Update appVersion to v0.12.2
wigust Nov 10, 2023
2a1db39
helm: junosexporter: Allow to disable serviceMonitor
wigust Nov 10, 2023
868b705
helm: junosexporter: Change name
wigust Nov 10, 2023
60dfe15
helm: junosexporter: Specify command
wigust Nov 10, 2023
4546e29
helm: README.md: Document SSH password authentication
wigust Nov 10, 2023
397f6d0
helm: junosexporter: Fix missing volumes
wigust Nov 10, 2023
86b47f0
helm: junosexporter: Rename servicemonitor
wigust Nov 10, 2023
3a42b4b
helm: junosexporter: Pass configmap as a map
wigust Nov 10, 2023
231b31e
helm: junosexporter: Delete namespace
wigust Nov 10, 2023
cb74623
helm: junosexporter: Restart pods automatically on configmap change
wigust Nov 10, 2023
40e7842
helm: junosexporter: Fix not loading config file
wigust Nov 10, 2023
60b8c1b
helm: junosexporter: Update version to 0.2.0
wigust Nov 10, 2023
44580ae
use go version 1.21
czerwonk Nov 13, 2023
2d3c6d4
Merge pull request #234 from wigust/helm
czerwonk Nov 14, 2023
66c9748
Bump golang.org/x/crypto from 0.15.0 to 0.17.0
dependabot[bot] Dec 18, 2023
8fe983e
Merge pull request #235 from czerwonk/dependabot/go_modules/golang.or…
czerwonk Dec 19, 2023
0eafc3b
Merge branch 'NETDEV-1189/underlying-interface' into test_master
Jan 10, 2024
39dc782
Merge branch 'master' into NETDEV-1189/underlying-interface
Gaste8 Jan 10, 2024
caf9d00
Merge branch 'NETDEV-1189/underlying-interface' of code.anexia.com:ne…
Jan 10, 2024
4b1264a
fix go build version
Jan 10, 2024
dca3717
fix ci
Jan 10, 2024
d22d294
Delete .github/workflows/anx-ci.yml
Gaste8 Jan 17, 2024
3d89b3e
readd ci
Jan 10, 2024
42950ff
update ci
Feb 14, 2024
cf88de4
fix string hyphens
Feb 14, 2024
74e56e8
remove string
Feb 14, 2024
e875c6c
change build to use debian 11 (try to fix glibc version errror)
Feb 14, 2024
805b751
fix ca-certificates
Feb 14, 2024
d08143d
test out docker image
Feb 14, 2024
698e59b
change to pthon bullseye
Feb 14, 2024
4f83a56
remove vcs information to resolve error
Feb 14, 2024
898ac29
fix buildvcs
Feb 14, 2024
0d57e5e
try with CGO_LDFLAGS
Feb 14, 2024
ca98b20
remove ca
Feb 14, 2024
d1fcc1d
use ubuntu 20.04
Feb 14, 2024
852f9b5
delete linking option
Feb 14, 2024
198d905
finalize ci
Feb 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 22 additions & 23 deletions .github/workflows/anx-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,29 @@ on:

name: anx-ci
jobs:
# test:
# # if: github.repository == ‘anexia/junos_exporter’
# strategy:
# matrix:
# go-version: [1.18.x]
# platform: [ubuntu-latest, macos-latest, windows-latest]
# runs-on: ${{ matrix.platform }}
# steps:
# - name: Install Go
# if: success()
# uses: actions/setup-go@v3
# with:
# go-version: ${{ matrix.go-version }}
# - name: Checkout code
# uses: actions/checkout@v3
# - name: Build
# run: go build
# - name: Run tests
# run: go test ./... -v -covermode=count
test:
strategy:
matrix:
go-version: ["1.21.x"]
platform: [ubuntu-latest, macos-latest, windows-latest, ubuntu-20.04]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
if: success()
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v3
- name: Build
run: go build
- name: Run tests
run: go test ./... -v -covermode=count

publish:
# if: github.repository == ‘anexia/junos_exporter’
# needs: test
runs-on: ubuntu-latest
needs: test
runs-on: ubuntu-20.04

env:
S3_URL: ${{ vars.S3_URL }}
S3_BUCKET: ${{ vars.S3_BUCKET }}
Expand All @@ -44,7 +43,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.21

- name: Build
run: go build .
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.20"
go-version: "1.21"

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
test:
strategy:
matrix:
go-version: ["1.20.x"]
go-version: ["1.21.x"]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ config.yml
artifacts
config/tests/config_local.yml
.vscode*
notes.txt
notes.txt
.DS_Store/
2 changes: 2 additions & 0 deletions collectors.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
"github.com/czerwonk/junos_exporter/pkg/features/rpki"
"github.com/czerwonk/junos_exporter/pkg/features/rpm"
"github.com/czerwonk/junos_exporter/pkg/features/security"
"github.com/czerwonk/junos_exporter/pkg/features/securityike"
"github.com/czerwonk/junos_exporter/pkg/features/securitypolicies"
"github.com/czerwonk/junos_exporter/pkg/features/storage"
"github.com/czerwonk/junos_exporter/pkg/features/subscriber"
Expand Down Expand Up @@ -105,6 +106,7 @@ func (c *collectors) initCollectorsForDevices(device *connector.Device) {
c.addCollectorIfEnabledForDevice(device, "rpki", f.RPKI, rpki.NewCollector)
c.addCollectorIfEnabledForDevice(device, "rpm", f.RPM, rpm.NewCollector)
c.addCollectorIfEnabledForDevice(device, "security", f.Security, security.NewCollector)
c.addCollectorIfEnabledForDevice(device, "security_ike", f.SecurityIKE, securityike.NewCollector)
c.addCollectorIfEnabledForDevice(device, "security_policies", f.SecurityPolicies, securitypolicies.NewCollector)
c.addCollectorIfEnabledForDevice(device, "storage", f.Storage, storage.NewCollector)
c.addCollectorIfEnabledForDevice(device, "system", (f.System || f.License), system.NewCollector)
Expand Down
8 changes: 4 additions & 4 deletions devices.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ func authForDevice(device *config.DeviceConfig, cfg *config.Config) (connector.A
}

if device.KeyFile != "" {
return authForKeyFile(user, device.KeyFile)
return authForKeyFile(user, device.KeyFile, device.KeyPassphrase)
}

if *sshKeyFile != "" {
return authForKeyFile(user, *sshKeyFile)
return authForKeyFile(user, *sshKeyFile, *sshKeyPassphrase)
}

if device.Password != "" {
Expand All @@ -97,14 +97,14 @@ func authForDevice(device *config.DeviceConfig, cfg *config.Config) (connector.A
return nil, errors.New("no valid authentication method available")
}

func authForKeyFile(username, keyFile string) (connector.AuthMethod, error) {
func authForKeyFile(username, keyFile, keyPassphrase string) (connector.AuthMethod, error) {
f, err := os.Open(keyFile)
if err != nil {
return nil, errors.Wrap(err, "could not open ssh key file")
}
defer f.Close()

auth, err := connector.AuthByKey(username, f)
auth, err := connector.AuthByKey(username, f, keyPassphrase)
if err != nil {
return nil, errors.Wrap(err, "could not load ssh private key file")
}
Expand Down
56 changes: 29 additions & 27 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,46 +1,48 @@
module github.com/czerwonk/junos_exporter

go 1.20
go 1.21

require (
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.14.0
github.com/prometheus/client_model v0.3.0
github.com/sirupsen/logrus v1.9.0
github.com/stretchr/testify v1.8.1
go.opentelemetry.io/otel v1.12.0
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.12.0
go.opentelemetry.io/otel/sdk v1.12.0
go.opentelemetry.io/otel/trace v1.12.0
golang.org/x/crypto v0.3.0
github.com/prometheus/client_golang v1.17.0
github.com/prometheus/client_model v0.5.0
github.com/sirupsen/logrus v1.9.3
github.com/stretchr/testify v1.8.4
go.opentelemetry.io/otel v1.20.0
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.20.0
go.opentelemetry.io/otel/sdk v1.20.0
go.opentelemetry.io/otel/trace v1.20.0
golang.org/x/crypto v0.17.0
gopkg.in/yaml.v2 v2.4.0
)

require (
github.com/cenkalti/backoff/v4 v4.2.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.12.0 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/text v0.7.0 // indirect
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect
google.golang.org/grpc v1.53.0 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
go.opentelemetry.io/otel/metric v1.20.0 // indirect
golang.org/x/net v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect
google.golang.org/grpc v1.59.0 // indirect
)

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/logr v1.3.0 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.12.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.12.0
go.opentelemetry.io/proto/otlp v0.19.0 // indirect
golang.org/x/sys v0.5.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
github.com/prometheus/common v0.45.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
golang.org/x/sys v0.15.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading
Loading