56 Commits

Author SHA1 Message Date
renovate[bot]
42f1acc05b fix(deps): update module github.com/prometheus/client_golang to v1.20.5 2024-12-06 09:38:05 +00:00
23027c5922 Merge pull request #19 from nikdoof/renovate/github.com-sirupsen-logrus-1.x
fix(deps): update module github.com/sirupsen/logrus to v1.9.3
2024-12-06 09:37:17 +00:00
3b145da136 Merge pull request #21 from nikdoof/renovate/golang-1.x
chore(deps): update golang docker tag to v1.20.4
2024-07-26 10:57:58 +01:00
92e47a96c8 Merge pull request #26 from nikdoof/renovate/alpine-3.x
chore(deps): update alpine docker tag to v3.20.2
2024-07-26 10:57:47 +01:00
853d9fc80b Merge pull request #28 from nikdoof/renovate/actions-checkout-4.x
chore(deps): update actions/checkout action to v4
2024-07-26 10:57:15 +01:00
ba346d4312 Merge pull request #33 from nikdoof/renovate/docker-build-push-action-6.x
chore(deps): update docker/build-push-action action to v6
2024-07-26 10:57:00 +01:00
32a94cc135 Merge pull request #31 from nikdoof/renovate/docker-setup-buildx-action-3.x
chore(deps): update docker/setup-buildx-action action to v3
2024-07-26 10:56:49 +01:00
renovate[bot]
92ce7fe969 chore(deps): update docker/build-push-action action to v6 2024-07-26 09:56:49 +00:00
3e2e47b717 Merge pull request #32 from nikdoof/renovate/docker-setup-qemu-action-3.x
chore(deps): update docker/setup-qemu-action action to v3
2024-07-26 10:56:39 +01:00
b71907227b Merge pull request #30 from nikdoof/renovate/docker-login-action-3.x
chore(deps): update docker/login-action action to v3
2024-07-26 10:56:25 +01:00
renovate[bot]
55162b00cd chore(deps): update alpine docker tag to v3.20.2 2024-07-22 23:22:14 +00:00
renovate[bot]
31498311b8 chore(deps): update docker/setup-qemu-action action to v3 2023-10-17 18:38:59 +00:00
renovate[bot]
25033ed3de chore(deps): update docker/setup-buildx-action action to v3 2023-09-12 11:14:58 +00:00
renovate[bot]
faccf547ba chore(deps): update docker/login-action action to v3 2023-09-12 08:13:37 +00:00
renovate[bot]
581ec5b2ab chore(deps): update actions/checkout action to v4 2023-09-04 12:39:35 +00:00
renovate[bot]
975b1f8fa8 chore(deps): update golang docker tag to v1.20.4 2023-08-10 06:26:07 +00:00
renovate[bot]
aa697e0bc9 fix(deps): update module github.com/sirupsen/logrus to v1.9.3 2023-06-03 21:09:58 +00:00
a0cfcb7c18 Merge pull request #23 from nikdoof/renovate/alpine-3.x
chore(deps): update alpine docker tag to v3.17.2
2023-03-23 21:49:03 +00:00
cd71a06345 Merge pull request #17 from nikdoof/renovate/wangyoucao577-go-release-action-1.x
chore(deps): update wangyoucao577/go-release-action action to v1.36
2023-03-23 21:48:54 +00:00
6bc8841336 Merge pull request #22 from nikdoof/renovate/github.com-prometheus-client_golang-1.x
fix(deps): update module github.com/prometheus/client_golang to v1.14.0
2023-03-23 21:48:42 +00:00
9a854913d7 Merge pull request #24 from nikdoof/renovate/docker-build-push-action-4.x
chore(deps): update docker/build-push-action action to v4
2023-03-23 21:48:33 +00:00
renovate[bot]
9481bd72bc chore(deps): update wangyoucao577/go-release-action action to v1.36 2023-03-02 05:56:38 +00:00
renovate[bot]
dfec9d8cc8 chore(deps): update docker/build-push-action action to v4 2023-02-28 14:13:45 +00:00
renovate[bot]
3c0d5ab230 chore(deps): update alpine docker tag to v3.17.2 2023-02-28 14:12:50 +00:00
d0172e19e1 Merge pull request #18 from nikdoof/renovate/alpine-3.x
chore(deps): update alpine docker tag to v3.16.3
2023-02-28 14:12:31 +00:00
renovate[bot]
9b728749da fix(deps): update module github.com/prometheus/client_golang to v1.14.0 2022-11-20 17:55:16 +00:00
renovate[bot]
aa0fb72066 chore(deps): update alpine docker tag to v3.16.3 2022-11-20 17:54:47 +00:00
e699b7747f chore: Update build and docker dependencies 2022-07-16 12:43:23 +01:00
6ac0db075b chore: Update dependencies 2022-07-16 12:42:50 +01:00
83d3970baf Update Go release version 2022-05-05 13:45:01 +01:00
dd126704ef Merge pull request #9 from nikdoof/renovate/github.com-urfave-cli-v2-2.x
fix(deps): update module github.com/urfave/cli/v2 to v2.5.1
2022-05-05 13:41:01 +01:00
f7f77145b8 Merge pull request #6 from nikdoof/renovate/wangyoucao577-go-release-action-1.x
chore(deps): update wangyoucao577/go-release-action action to v1.26
2022-05-05 13:40:41 +01:00
Renovate Bot
ad7aa373c7 fix(deps): update module github.com/urfave/cli/v2 to v2.5.1 2022-05-05 12:40:21 +00:00
Renovate Bot
78137c798c chore(deps): update wangyoucao577/go-release-action action to v1.26 2022-05-05 12:40:08 +00:00
92e6e207a7 Merge pull request #5 from nikdoof/renovate/github.com-prometheus-client_golang-1.x
fix(deps): update module github.com/prometheus/client_golang to v1.12.1
2022-05-05 13:38:30 +01:00
1aee823fe4 Merge pull request #8 from nikdoof/renovate/alpine-3.x
chore(deps): update dependency alpine to v3.15.4
2022-05-05 13:38:09 +01:00
05626a2a8d Merge pull request #7 from nikdoof/renovate/actions-checkout-3.x
chore(deps): update actions/checkout action to v3
2022-05-05 13:37:54 +01:00
122ec1ecec Merge pull request #4 from nikdoof/renovate/golang-1.x
chore(deps): update dependency golang to v1.18.1
2022-05-05 13:37:43 +01:00
Renovate Bot
b8e44f0e76 chore(deps): update dependency golang to v1.18.1 2022-04-24 23:14:37 +00:00
Renovate Bot
776e0862aa chore(deps): update dependency alpine to v3.15.4 2022-04-24 23:14:34 +00:00
Renovate Bot
ed4c96ec25 chore(deps): update actions/checkout action to v3 2022-03-07 15:38:10 +00:00
Renovate Bot
a7655910b0 fix(deps): update module github.com/prometheus/client_golang to v1.12.1 2022-01-29 15:30:56 +00:00
24766c5931 Merge pull request #3 from nikdoof/renovate/golang-1.x
chore(deps): update golang docker tag to v1.17.5
2021-12-18 13:09:34 +00:00
6d212d488f Fix tags for Docker Build 2021-12-18 13:07:53 +00:00
fac6dacc47 Add to CONTRIBUTORS 2021-12-18 13:04:40 +00:00
d51167ac6f Switch to GHCR 2021-12-18 13:04:34 +00:00
Renovate Bot
0e3bc340f9 chore(deps): update golang docker tag to v1.17.5 2021-12-09 18:07:15 +00:00
0a8edc22d6 chore: update README 2021-12-05 10:08:53 +00:00
8eb5ab412c fix: release workflow 2021-12-05 10:01:31 +00:00
ae1b37e493 chore: build release assets 2021-12-05 09:55:01 +00:00
b0fe4d71de chore!: pin alpine version, and change executable name 2021-12-05 09:50:17 +00:00
cf74740370 chore: update example kubernetes deployment 2021-12-05 09:31:35 +00:00
f0527718e7 chore: move renovate config under github tree 2021-12-05 09:28:53 +00:00
f2e714dce5 chore: update module name 2021-12-05 09:28:25 +00:00
2a885cf111 Merge pull request #1 from nikdoof/renovate/configure
Configure Renovate
2021-12-05 09:20:58 +00:00
Renovate Bot
e9928b404e chore(deps): add renovate.json 2021-12-05 09:20:30 +00:00
13 changed files with 1654 additions and 269 deletions

5
.github/renovate.json vendored Normal file
View File

@@ -0,0 +1,5 @@
{
"extends": [
"config:base"
]
}

View File

@@ -1,32 +1,33 @@
name: ci
name: build-docker-image
on:
push:
branches:
- 'master'
- "master"
tags:
- '[0-9]+.[0-9]+.[0-9]+'
- "[0-9]+.[0-9]+.[0-9]+"
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
uses: docker/login-action@v1
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
uses: docker/login-action@v3
if: github.event_name != 'pull_request'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
uses: docker/build-push-action@v6
with:
push: true
tags: nikdoof/hg612-exporter:${{ github.ref_name }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
tags: |
ghcr.io/${{ github.repository_owner }}/hg612-exporter:${{ github.ref_name }}
ghcr.io/${{ github.repository_owner }}/hg612-exporter:latest

27
.github/workflows/release.yaml vendored Normal file
View File

@@ -0,0 +1,27 @@
on:
release:
types: [created]
jobs:
releases-matrix:
name: Release Go Binary
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, windows, darwin]
goarch: ["386", amd64, arm64]
exclude:
- goarch: "386"
goos: darwin
- goarch: arm64
goos: windows
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: wangyoucao577/go-release-action@v1.36
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
goversion: "https://dl.google.com/go/go1.18.4.linux-amd64.tar.gz"
binary_name: "hg612-exporter"
extra_files: LICENSE README.md

View File

@@ -18,6 +18,6 @@ issues:
max-same-issues: 0
linters-settings:
goimports:
local-prefixes: github.com/jakekeeys/hg612-exporter
local-prefixes: github.com/nikdoof/hg612-exporter
misspell:
locale: US

3
CONTRIBUTORS Normal file
View File

@@ -0,0 +1,3 @@
Jake Keeys
Dominic Evans
Andrew Williams

View File

@@ -1,10 +1,10 @@
FROM golang:alpine as build
FROM golang:1.20.4-alpine3.16 as build
WORKDIR /build
COPY . .
RUN go get -d -v .
RUN go build -v -o app .
RUN go build -v -o hg612-exporter .
FROM alpine
FROM alpine:3.20.2
WORKDIR /service
COPY --from=build /build/app .
ENTRYPOINT ["./app"]
COPY --from=build /build/hg612-exporter .
ENTRYPOINT ["./hg612-exporter"]

View File

@@ -1,7 +1,5 @@
# HG612 Prometheus Exporter
[![Docker Repository on Quay](https://quay.io/repository/jakekeeys/hg612-exporter/status "Docker Repository on Quay")](https://quay.io/repository/jakekeeys/hg612-exporter)
A prometheus exporter for the HG612 modem
![](https://i0.wp.com/codeblog.dotsandbrackets.com/wp-content/uploads/2017/01/prometheus-logo.jpg?resize=231%2C231) ![](https://kitz.co.uk/routers/images/huawei_echolife_hg612.jpg)
@@ -20,7 +18,7 @@ NAME:
hg612 prometheus exporter - a metrics exporter for the hg612
USAGE:
main [global options] command [command options] [arguments...]
hg612-exporter [global options] command [command options] [arguments...]
COMMANDS:
help, h Shows a list of commands or help for one command
@@ -39,7 +37,7 @@ GLOBAL OPTIONS:
## Run
* `go run main.go --host <host> --identifier <identifier>`
* `docker run docker run quay.io/jakekeeys/hg612-exporter --host <host> --identifier <identifier>`
* `docker run docker run nikdoof/hg612-exporter --host <host> --identifier <identifier>`
## Metrics
@@ -81,4 +79,4 @@ GLOBAL OPTIONS:
### Grafana Dashboard Preview
![](https://raw.githubusercontent.com/jakekeeys/hg612-exporter/master/resources/dashboard.png)
![](https://raw.githubusercontent.com/nikdoof/hg612-exporter/master/resources/dashboard.png)

9
go.mod
View File

@@ -1,11 +1,10 @@
module github.com/jakekeeys/hg612-exporter
module github.com/nikdoof/hg612-exporter
go 1.15
require (
github.com/gorilla/handlers v1.5.1
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.10.0
github.com/sirupsen/logrus v1.8.1
github.com/urfave/cli/v2 v2.3.0
github.com/prometheus/client_golang v1.20.5
github.com/sirupsen/logrus v1.9.3
github.com/urfave/cli/v2 v2.11.0
)

1807
go.sum

File diff suppressed because it is too large Load Diff

View File

@@ -7,7 +7,7 @@ import (
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/jakekeeys/hg612-exporter/pkg/hg612"
"github.com/nikdoof/hg612-exporter/pkg/hg612"
)
type Collector interface {

View File

@@ -5,7 +5,7 @@ import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
"github.com/jakekeeys/hg612-exporter/pkg/hg612"
"github.com/nikdoof/hg612-exporter/pkg/hg612"
)
type dslMetricsCollector struct {

View File

@@ -10,9 +10,9 @@ import (
"github.com/sirupsen/logrus"
"github.com/urfave/cli/v2"
"github.com/jakekeeys/hg612-exporter/internal/metrics"
"github.com/jakekeeys/hg612-exporter/internal/rest"
"github.com/jakekeeys/hg612-exporter/pkg/hg612"
"github.com/nikdoof/hg612-exporter/internal/metrics"
"github.com/nikdoof/hg612-exporter/internal/rest"
"github.com/nikdoof/hg612-exporter/pkg/hg612"
)
func main() {

View File

@@ -16,10 +16,9 @@ spec:
annotations:
prometheus.io/scrape: 'true'
prometheus.io/port: '8080'
prometheus.io/path: '/prometheus'
spec:
containers:
- image: quay.io/jakekeeys/hg612-exporter:latest
- image: nikdoof/hg612-exporter:latest
imagePullPolicy: Always
name: hg612-exporter
args: