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

Bump deps and improve config packaging #12

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
63 changes: 28 additions & 35 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@ builds:
# - darwin
goarch:
- amd64
archives:
# replacements:
# linux: Linux
# windows: Windows
# amd64: x86_64
#files:
# - README.md
checksum:
name_template: "checksums.txt"
snapshot:
Expand All @@ -43,7 +36,7 @@ nfpms:

vendor: Communi5 Technologies GmbH
homepage: https://github.com/communi5/prometheus-c5-exporter/
maintainer: Robert Traussnig<[email protected]>
maintainer: Robert Traussnig <[email protected]>
description: A prometheus exporter for C5 application processes
license: Commercial

Expand All @@ -60,30 +53,30 @@ nfpms:
bindir: /usr/bin

contents:
- src: "resources/prometheus-c5-exporter.service"
dst: "/usr/lib/systemd/system/prometheus-c5-exporter.service"
- src: "resources/prometheus-c5-exporter.initd"
dst: "/etc/init.d/prometheus-c5-exporter"
- src: "README.md"
dst: "/usr/share/doc/prometheus-c5-exporter/README.md"
- src: "resources/rsyslog.d/prometheus-c5-exporter.conf"
dst: "/usr/share/doc/prometheus-c5-exporter/rsyslog.d/prometheus-c5-exporter.conf"
- src: "resources/logrotate.d/prometheus-c5-exporter.conf"
dst: "/usr/share/doc/prometheus-c5-exporter/logrotate.d/prometheus-c5-exporter.conf"
- src: "resources/grafana/dashboard-c5-proxy-details.json"
dst: "/usr/share/doc/prometheus-c5-exporter/grafana/dashboard-c5-proxy-details.json"
- src: "resources/grafana/dashboard-c5-acd-details.json"
dst: "/usr/share/doc/prometheus-c5-exporter/grafana/dashboard-c5-acd-details.json"
- src: "resources/grafana/dashboard-c5-registrar-details.json"
dst: "/usr/share/doc/prometheus-c5-exporter/grafana/dashboard-c5-registrar-details.json"
- src: "resources/grafana/dashboard-c5-bt-details.json"
dst: "/usr/share/doc/prometheus-c5-exporter/grafana/dashboard-c5-bt-details.json"
- src: "resources/grafana/dashboard-c5-bt-overview.json"
dst: "/usr/share/doc/prometheus-c5-exporter/grafana/dashboard-c5-bt-overview.json"
- src: "prometheus-c5-exporter.conf.example"
dst: "/usr/share/doc/prometheus-c5-exporter/prometheus-c5-exporter.conf.example"
# Config files to add to your package. They are about the same as
# the files keyword, except package managers treat them differently
- src: "prometheus-c5-exporter.conf.example"
dst: "/etc/prometheus-c5-exporter.conf"
type: config
- src: "resources/prometheus-c5-exporter.service"
dst: "/usr/lib/systemd/system/prometheus-c5-exporter.service"
- src: "resources/prometheus-c5-exporter.initd"
dst: "/etc/init.d/prometheus-c5-exporter"
- src: "README.md"
dst: "/usr/share/doc/prometheus-c5-exporter/README.md"
- src: "resources/rsyslog.d/prometheus-c5-exporter.conf"
dst: "/usr/share/doc/prometheus-c5-exporter/rsyslog.d/prometheus-c5-exporter.conf"
- src: "resources/logrotate.d/prometheus-c5-exporter.conf"
dst: "/usr/share/doc/prometheus-c5-exporter/logrotate.d/prometheus-c5-exporter.conf"
- src: "resources/grafana/dashboard-c5-proxy-details.json"
dst: "/usr/share/doc/prometheus-c5-exporter/grafana/dashboard-c5-proxy-details.json"
- src: "resources/grafana/dashboard-c5-acd-details.json"
dst: "/usr/share/doc/prometheus-c5-exporter/grafana/dashboard-c5-acd-details.json"
- src: "resources/grafana/dashboard-c5-registrar-details.json"
dst: "/usr/share/doc/prometheus-c5-exporter/grafana/dashboard-c5-registrar-details.json"
- src: "resources/grafana/dashboard-c5-bt-details.json"
dst: "/usr/share/doc/prometheus-c5-exporter/grafana/dashboard-c5-bt-details.json"
- src: "resources/grafana/dashboard-c5-bt-overview.json"
dst: "/usr/share/doc/prometheus-c5-exporter/grafana/dashboard-c5-bt-overview.json"
- src: "prometheus-c5-exporter.conf.example"
dst: "/usr/share/doc/prometheus-c5-exporter/prometheus-c5-exporter.conf.example"
# Config files to add to your package. They are about the same as
# the files keyword, except package managers treat them differently
- src: "prometheus-c5-exporter.conf.example"
dst: "/etc/prometheus-c5-exporter.conf"
type: config|noreplace
10 changes: 5 additions & 5 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
{
"label": "Build static",
"type": "shell",
"command": "CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -ldflags '-s -w' -o c5exporter main.go && ls -l c5exporter",
"command": "CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -ldflags '-s -w' -o c5exporter main.go service_provider.go && ls -l c5exporter",
"detail": "Create a static build for Linux AMD64",
"group": {
"kind": "build",
"isDefault": true
},
}
},
{
"label": "Test all",
Expand All @@ -33,18 +33,18 @@
{
"label": "Build tagged release distribution packages",
"type": "shell",
"command": "goreleaser release --skip-publish --rm-dist",
"command": "goreleaser release --skip-publish --clean",
"group": "build",
"detail": "Build a debian package based on the latest Git tag",
"problemMatcher": []
},
{
"label": "Build snapshot distribution packages",
"type": "shell",
"command": "goreleaser release --snapshot --rm-dist",
"command": "goreleaser release --snapshot --clean",
"group": "build",
"detail": "Build a debian package from the current snapshot",
"problemMatcher": []
}
]
}
}
9 changes: 5 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ module github.com/communi5/prometheus-c5-exporter
go 1.19

require (
github.com/VictoriaMetrics/metrics v1.23.1
github.com/jinzhu/configor v1.2.1
github.com/VictoriaMetrics/metrics v1.33.1
github.com/jinzhu/configor v1.2.2
)

require (
github.com/BurntSushi/toml v1.2.1 // indirect
github.com/BurntSushi/toml v1.3.2 // indirect
github.com/valyala/fastrand v1.1.0 // indirect
github.com/valyala/histogram v1.2.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
golang.org/x/sys v0.15.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
29 changes: 11 additions & 18 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,24 +1,17 @@
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak=
github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/VictoriaMetrics/metrics v1.17.2 h1:9zPJ7DPfxdJWshOGLPLpAtPL0ZZ9AeUyQC3fIqG6Lvo=
github.com/VictoriaMetrics/metrics v1.17.2/go.mod h1:Z1tSfPfngDn12bTfZSCqArT3OPY3u88J12hSoOhuiRE=
github.com/VictoriaMetrics/metrics v1.23.1 h1:/j8DzeJBxSpL2qSIdqnRFLvQQhbJyJbbEi22yMm7oL0=
github.com/VictoriaMetrics/metrics v1.23.1/go.mod h1:rAr/llLpEnAdTehiNlUxKgnjcOuROSzpw0GvjpEbvFc=
github.com/jinzhu/configor v1.2.1 h1:OKk9dsR8i6HPOCZR8BcMtcEImAFjIhbJFZNyn5GCZko=
github.com/jinzhu/configor v1.2.1/go.mod h1:nX89/MOmDba7ZX7GCyU/VIaQ2Ar2aizBl2d3JLF/rDc=
github.com/valyala/fastrand v1.0.0 h1:LUKT9aKer2dVQNUi3waewTbKV+7H17kvWFNKs2ObdkI=
github.com/valyala/fastrand v1.0.0/go.mod h1:HWqCzkrkg6QXT8V2EXWvXCoow7vLwOFN002oeRzjapQ=
github.com/BurntSushi/toml v1.2.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8=
github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/VictoriaMetrics/metrics v1.33.1 h1:CNV3tfm2Kpv7Y9W3ohmvqgFWPR55tV2c7M2U6OIo+UM=
github.com/VictoriaMetrics/metrics v1.33.1/go.mod h1:r7hveu6xMdUACXvB8TYdAj8WEsKzWB0EkpJN+RDtOf8=
github.com/jinzhu/configor v1.2.2 h1:sLgh6KMzpCmaQB4e+9Fu/29VErtBUqsS2t8C9BNIVsA=
github.com/jinzhu/configor v1.2.2/go.mod h1:iFFSfOBKP3kC2Dku0ZGB3t3aulfQgTGJknodhFavsU8=
github.com/valyala/fastrand v1.1.0 h1:f+5HkLW4rsgzdNoleUOB69hyT9IlD2ZQh9GyDMfb5G8=
github.com/valyala/fastrand v1.1.0/go.mod h1:HWqCzkrkg6QXT8V2EXWvXCoow7vLwOFN002oeRzjapQ=
github.com/valyala/histogram v1.1.2 h1:vOk5VrGjMBIoPR5k6wA8vBaC8toeJ8XO0yfRjFEc1h8=
github.com/valyala/histogram v1.1.2/go.mod h1:CZAr6gK9dbD7hYx2s8WSPh0p5x5wETjC+2b3PJVtEdg=
github.com/valyala/histogram v1.2.0 h1:wyYGAZZt3CpwUiIb9AU/Zbllg1llXyrtApRS815OLoQ=
github.com/valyala/histogram v1.2.0/go.mod h1:Hb4kBwb4UxsaNbbbh+RRz8ZR6pdodR57tzWUS3BUzXY=
golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
Loading