diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index ea4d0002..1d4cb803 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -1,12 +1,4 @@ -# Dependency Review Action -# -# This Action will scan dependency manifest files that change as part of a Pull Request, -# surfacing known-vulnerable versions of the packages declared or updated in the PR. -# Once installed, if the workflow run is marked as required, -# PRs introducing known-vulnerable packages will be blocked from merging. -# -# Source repository: https://github.com/actions/dependency-review-action -name: 'Dependency Review' +name: dependency_review on: [pull_request] permissions: diff --git a/.github/workflows/pr-build.yaml b/.github/workflows/pr-build.yaml index 2ccf2b49..bdf86b86 100644 --- a/.github/workflows/pr-build.yaml +++ b/.github/workflows/pr-build.yaml @@ -10,7 +10,35 @@ on: permissions: {} jobs: - build: + lint-chart: + runs-on: ubuntu-latest + steps: + - name: Harden Runner + uses: step-security/harden-runner@55d479fb1c5bcad5a4f9099a5d9f37c8857b2845 # v2.4.1 + with: + egress-policy: audit + + - name: Checkout + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3 + with: + fetch-depth: 0 + + - name: Set up Helm + uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 #v3.5 + with: + version: v3.4.0 + + - uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0 # v4.6.1 + with: + python-version: 3.7 + + - name: Set up chart-testing + uses: helm/chart-testing-action@e8788873172cb653a90ca2e819d79d65a66d4e76 # v2.4.0 + + - name: Run chart-testing (lint) + run: ct lint --target-branch=master --chart-dirs chart --check-version-increment=false + + lint: runs-on: ubuntu-latest steps: - name: Harden Runner @@ -37,6 +65,35 @@ jobs: run: make vet - name: lint run: make lint + - name: Check if working tree is dirty + run: | + if [[ $(git diff --stat) != '' ]]; then + git --no-pager diff + echo 'run make test and commit changes' + exit 1 + fi + + build: + runs-on: ubuntu-latest + steps: + - name: Harden Runner + uses: step-security/harden-runner@55d479fb1c5bcad5a4f9099a5d9f37c8857b2845 # v2.4.1 + with: + egress-policy: audit + + - name: Checkout + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3 + - name: Setup Go + uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 + with: + go-version: 1.20.5 + - name: Restore Go cache + uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- - name: Run tests run: make test - name: Build binary @@ -45,13 +102,6 @@ jobs: uses: shogo82148/actions-goveralls@df920a6a2468668dfcf71a0b43817f89eaa5ea04 # v1.7.0 with: path-to-profile: coverage.out - - name: Check if working tree is dirty - run: | - if [[ $(git diff --stat) != '' ]]; then - git --no-pager diff - echo 'run make test and commit changes' - exit 1 - fi - name: Build container image run: | make docker-build @@ -69,6 +119,61 @@ jobs: profiles=$(ls config/tests/cases | jq -R -s -c 'split("\n")[:-1]') echo $profiles echo "::set-output name=matrix::$profiles" + + test-chart: + runs-on: ubuntu-latest + needs: + - build + - lint-chart + steps: + - name: Harden Runner + uses: step-security/harden-runner@55d479fb1c5bcad5a4f9099a5d9f37c8857b2845 # v2.4.1 + with: + egress-policy: audit + + - name: Checkout + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3 + with: + fetch-depth: 0 + + - name: Set up Helm + uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 #v3.5 + with: + version: v3.4.0 + + - uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0 # v4.6.1 + with: + python-version: 3.7 + + - name: Set up chart-testing + uses: helm/chart-testing-action@e8788873172cb653a90ca2e819d79d65a66d4e76 # v2.4.0 + + - name: Run chart-testing (list-changed) + id: list-changed + run: | + changed=$(ct list-changed --target-branch=master --chart-dirs chart) + if [[ -n "$changed" ]]; then + echo "::set-output name=changed::true" + fi + + - name: Create kind cluster + uses: helm/kind-action@fa81e57adff234b2908110485695db0f181f3c67 # v1.7.0 + if: steps.list-changed.outputs.changed == 'true' + + - name: Download exporter container + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + with: + name: exporter-container + path: /tmp + - name: Load image + run: | + docker load --input /tmp/exporter-container.tar + docker tag ghcr.io/raffis/mongodb-query-exporter:latest ghcr.io/raffis/mongodb-query-exporter:0.0.0 + docker image ls -a + kind load docker-image ghcr.io/raffis/mongodb-query-exporter:0.0.0 --name chart-testing + + - name: Run chart-testing (install) + run: ct install --target-branch=master --chart-dirs chart e2e-tests: runs-on: ubuntu-latest diff --git a/.github/workflows/pr-chart.yaml b/.github/workflows/pr-chart.yaml deleted file mode 100644 index 7a862f4a..00000000 --- a/.github/workflows/pr-chart.yaml +++ /dev/null @@ -1,49 +0,0 @@ -name: pr-chart - -on: pull_request - -permissions: {} - -jobs: - lint-test: - runs-on: ubuntu-latest - steps: - - name: Harden Runner - uses: step-security/harden-runner@55d479fb1c5bcad5a4f9099a5d9f37c8857b2845 # v2.4.1 - with: - egress-policy: audit - - - name: Checkout - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3 - with: - fetch-depth: 0 - - - name: Set up Helm - uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 #v3.5 - with: - version: v3.4.0 - - - uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0 # v4.6.1 - with: - python-version: 3.7 - - - name: Set up chart-testing - uses: helm/chart-testing-action@e8788873172cb653a90ca2e819d79d65a66d4e76 # v2.4.0 - - - name: Run chart-testing (list-changed) - id: list-changed - run: | - changed=$(ct list-changed --target-branch=master --chart-dirs chart) - if [[ -n "$changed" ]]; then - echo "::set-output name=changed::true" - fi - - - name: Run chart-testing (lint) - run: ct lint --target-branch=master --chart-dirs chart - - - name: Create kind cluster - uses: helm/kind-action@fa81e57adff234b2908110485695db0f181f3c67 # v1.7.0 - if: steps.list-changed.outputs.changed == 'true' - - - name: Run chart-testing (install) - run: ct install --target-branch=master --chart-dirs chart diff --git a/.github/workflows/release-chart.yaml b/.github/workflows/release-chart.yaml deleted file mode 100644 index ae2f606c..00000000 --- a/.github/workflows/release-chart.yaml +++ /dev/null @@ -1,45 +0,0 @@ -name: release-chart - -on: - push: - branches: - - master - -permissions: {} - -jobs: - release: - runs-on: ubuntu-latest - permissions: - packages: write # Needed to publish chart to ghcr.io - id-token: write # Needed for keyless signing - steps: - - name: Harden Runner - uses: step-security/harden-runner@55d479fb1c5bcad5a4f9099a5d9f37c8857b2845 # v2.4.1 - with: - egress-policy: audit - - - name: Checkout - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3 - with: - fetch-depth: 0 - - - name: Install Helm - uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 #v3.5 - - - name: Setup Cosign - uses: sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06 # v3.1.1 - - - name: Login to Github Container Registry using helm - run: echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ghcr.io --username ${{ github.actor }} --password-stdin - - - name: Package helm charts - run: | - helm package chart/mongodb-query-exporter -d chart - - - name: Publish helm charts to Github Container Registry - run: | - repository=$(echo "${{ github.repository_owner }}" | tr [:upper:] [:lower:]) - helm push ${{ github.workspace }}/chart/mongodb-query-exporter-*.tgz oci://ghcr.io/$repository/charts |& tee .digest - cosign login --username ${GITHUB_ACTOR} --password ${{ secrets.GITHUB_TOKEN }} ghcr.io - cosign sign --yes ghcr.io/${{ github.repository_owner }}/charts/mongodb-query-exporter@$(cat .digest | awk -F "[, ]+" '/Digest/{print $NF}') diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b7c51719..d836e0e1 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -7,8 +7,7 @@ on: permissions: {} jobs: - build: - name: Build + release: runs-on: ubuntu-latest permissions: contents: write # needed to write releases @@ -44,3 +43,42 @@ jobs: args: release --rm-dist --skip-validate env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + release-chart: + runs-on: ubuntu-latest + needs: + - release + permissions: + packages: write # Needed to publish chart to ghcr.io + id-token: write # Needed for keyless signing + steps: + - name: Harden Runner + uses: step-security/harden-runner@55d479fb1c5bcad5a4f9099a5d9f37c8857b2845 # v2.4.1 + with: + egress-policy: audit + + - name: Checkout + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3 + with: + fetch-depth: 0 + + - name: Install Helm + uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 #v3.5 + + - name: Setup Cosign + uses: sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06 # v3.1.1 + + - name: Login to Github Container Registry using helm + run: echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ghcr.io --username ${{ github.actor }} --password-stdin + + - name: Package helm charts + run: | + packVersion=$(echo "${{ github.ref_name }}" | sed 's/^v//g') + helm package chart/mongodb-query-exporter -d chart --version=$packVersion --app-version=${{ github.ref_name }} + + - name: Publish helm charts to Github Container Registry + run: | + repository=$(echo "${{ github.repository_owner }}" | tr [:upper:] [:lower:]) + helm push ${{ github.workspace }}/chart/mongodb-query-exporter-*.tgz oci://ghcr.io/$repository/charts |& tee .digest + cosign login --username ${GITHUB_ACTOR} --password ${{ secrets.GITHUB_TOKEN }} ghcr.io + cosign sign --yes ghcr.io/${{ github.repository_owner }}/charts/mongodb-query-exporter@$(cat .digest | awk -F "[, ]+" '/Digest/{print $NF}') diff --git a/README.md b/README.md index 1d123890..66b01fde 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Prometheus MongoDB query exporter [![release](https://github.com/raffis/mongodb-query-exporter/actions/workflows/release.yaml/badge.svg)](https://github.com/raffis/mongodb-query-exporter/actions/workflows/release.yaml) -[![Go Report Card](https://goreportcard.com/badge/github.com/raffis/mongodb-query-exporter/v3)](https://goreportcard.com/report/github.com/raffis/mongodb-query-exporter/v3) +[![Go Report Card](https://goreportcard.com/badge/github.com/raffis/mongodb-query-exporter/v5)](https://goreportcard.com/report/github.com/raffis/mongodb-query-exporter/v5) [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/raffis/mongodb-query-exporter/badge)](https://api.securityscorecards.dev/projects/github.com/raffis/mongodb-query-exporter) [![Coverage Status](https://coveralls.io/repos/github/raffis/mongodb-query-exporter/badge.svg?branch=master)](https://coveralls.io/github/raffis/mongodb-query-exporter?branch=master) [![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/mongodb-query-exporter)](https://artifacthub.io/packages/search?repo=mongodb-query-exporter) @@ -138,7 +138,8 @@ aggregations: overrideEmpty: true # if an empty result set is returned.. emptyValue: 0 # create a metric with value 0 labels: [] - constLabels: [] + constLabels: + region: eu-central-1 cache: 0 mode: pull pipeline: | @@ -153,7 +154,7 @@ aggregations: help: 'The total number of processes in a job queue' value: total labels: [type,status] - constLabels: [] + constLabels: {} mode: pull pipeline: | [ @@ -188,7 +189,7 @@ aggregations: help: 'The total number of events (created 1h ago or newer)' value: count labels: [type] - constLabels: [] + constLabels: {} mode: pull # Note $$NOW is only supported in MongoDB >= 4.2 pipeline: | diff --git a/chart/mongodb-query-exporter/Chart.yaml b/chart/mongodb-query-exporter/Chart.yaml index 0de7580c..043bf507 100644 --- a/chart/mongodb-query-exporter/Chart.yaml +++ b/chart/mongodb-query-exporter/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -appVersion: 2.0.3 +appVersion: 0.0.0 description: A Prometheus exporter for MongoDB custom aggregations home: https://github.com/raffis/mongodb-query-exporter maintainers: @@ -15,4 +15,4 @@ keywords: name: mongodb-query-exporter sources: - https://github.com/raffis/mongodb-query-exporter -version: 4.0.3 +version: 0.0.0 diff --git a/cmd/integration_test.go b/cmd/integration_test.go index b24f1ef6..f4114d22 100644 --- a/cmd/integration_test.go +++ b/cmd/integration_test.go @@ -33,19 +33,13 @@ type integrationTest struct { func TestMetricsConfigv2(t *testing.T) { expected := map[string]string{ - "myapp_example_simplevalue_total": `name:"myapp_example_simplevalue_total" help:"Simple gauge metric" type:GAUGE metric: gauge: > `, + "myapp_example_simplevalue_total": `name:"myapp_example_simplevalue_total" help:"Simple gauge metric" type:GAUGE metric: label: gauge: > `, "myapp_example_processes_total": `name:"myapp_example_processes_total" help:"The total number of processes in a job queue" type:GAUGE metric: label: label: gauge: > metric: label: label: gauge: > `, "myapp_events_total": `name:"myapp_events_total" help:"The total number of events (created 1h ago or newer)" type:GAUGE metric: label: gauge: > metric: label: gauge: > `, "mongodb_query_exporter_query_total": `name:"mongodb_query_exporter_query_total" help:"How many MongoDB queries have been processed, partitioned by metric, server and status" type:COUNTER metric: label: label: counter: > metric: label: label: counter: > metric: label: label: counter: > `, } tests := []integrationTest{ - /*integrationTest{ - name: "integration test using config v1.0 and mongodb:5.0", - configPath: "../example/configv1.yaml", - mongodbImage: "mongo:5.0", - expectedMetrics: expected, - },*/ { name: "integration test using config v2.0 and mongodb:5.0", configPath: "../example/configv2.yaml", diff --git a/cmd/main.go b/cmd/main.go index 95a5fbc8..2eb6d794 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -8,11 +8,11 @@ import ( "os/user" "time" - "github.com/raffis/mongodb-query-exporter/v3/internal/collector" - "github.com/raffis/mongodb-query-exporter/v3/internal/config" - v1 "github.com/raffis/mongodb-query-exporter/v3/internal/config/v1" - v2 "github.com/raffis/mongodb-query-exporter/v3/internal/config/v2" - v3 "github.com/raffis/mongodb-query-exporter/v3/internal/config/v3" + "github.com/raffis/mongodb-query-exporter/v5/internal/collector" + "github.com/raffis/mongodb-query-exporter/v5/internal/config" + v1 "github.com/raffis/mongodb-query-exporter/v5/internal/config/v1" + v2 "github.com/raffis/mongodb-query-exporter/v5/internal/config/v2" + v3 "github.com/raffis/mongodb-query-exporter/v5/internal/config/v3" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" diff --git a/example/configv1.yaml b/example/configv1.yaml index bcd31b42..5fe52313 100644 --- a/example/configv1.yaml +++ b/example/configv1.yaml @@ -16,7 +16,8 @@ metrics: labels: [] mode: pull cache: 0 - constLabels: [] + constLabels: + region: eu-central-1 database: mydb collection: objects pipeline: | @@ -29,7 +30,7 @@ metrics: value: total mode: pull labels: [type,status] - constLabels: [] + constLabels: {} database: mydb collection: queue pipeline: | @@ -63,7 +64,7 @@ metrics: value: count mode: pull labels: [type] - constLabels: [] + constLabels: {} database: mydb collection: events # Note $$NOW is only supported in MongoDB >= 4.2 diff --git a/example/configv2.yaml b/example/configv2.yaml index a29bdc34..bf37cae5 100644 --- a/example/configv2.yaml +++ b/example/configv2.yaml @@ -24,7 +24,8 @@ metrics: labels: [] mode: pull cache: 0 - constLabels: [] + constLabels: + region: eu-central-1 database: mydb collection: objects pipeline: | @@ -37,7 +38,7 @@ metrics: value: total mode: pull labels: [type,status] - constLabels: [] + constLabels: {} database: mydb collection: queue pipeline: | @@ -71,7 +72,7 @@ metrics: value: count mode: pull labels: [type] - constLabels: [] + constLabels: {} database: mydb collection: events # Note $$NOW is only supported in MongoDB >= 4.2 diff --git a/example/configv3.yaml b/example/configv3.yaml index 99ba6160..7a78f413 100644 --- a/example/configv3.yaml +++ b/example/configv3.yaml @@ -25,7 +25,8 @@ aggregations: overrideEmpty: true # if an empty result set is returned.. emptyValue: 0 # create a metric with value 0 labels: [] - constLabels: [] + constLabels: + region: eu-central-1 mode: pull pipeline: | [ @@ -39,7 +40,7 @@ aggregations: help: 'The total number of processes in a job queue' value: total labels: [type,status] - constLabels: [] + constLabels: {} mode: pull cache: "5m" pipeline: | @@ -75,7 +76,7 @@ aggregations: help: 'The total number of events (created 1h ago or newer)' value: count labels: [type] - constLabels: [] + constLabels: {} mode: pull # Note $$NOW is only supported in MongoDB >= 4.2 pipeline: | diff --git a/go.mod b/go.mod index bd7146c4..26c73f4b 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/raffis/mongodb-query-exporter/v3 +module github.com/raffis/mongodb-query-exporter/v5 go 1.20 @@ -65,13 +65,13 @@ require ( go.uber.org/atomic v1.9.0 // indirect go.uber.org/goleak v1.1.12 // indirect go.uber.org/multierr v1.8.0 // indirect - golang.org/x/crypto v0.10.0 // indirect + golang.org/x/crypto v0.13.0 // indirect golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea // indirect golang.org/x/mod v0.9.0 // indirect - golang.org/x/net v0.11.0 // indirect + golang.org/x/net v0.15.0 // indirect golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.9.0 // indirect - golang.org/x/text v0.10.0 // indirect + golang.org/x/sys v0.12.0 // indirect + golang.org/x/text v0.13.0 // indirect golang.org/x/tools v0.7.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect google.golang.org/grpc v1.56.1 // indirect diff --git a/go.sum b/go.sum index b905043a..b86b7347 100644 --- a/go.sum +++ b/go.sum @@ -315,8 +315,8 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.10.0 h1:LKqV2xt9+kDzSTfOhx4FrkEBcMrAgHSYgzywV9zcGmM= -golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= +golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= +golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -390,8 +390,8 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.11.0 h1:Gi2tvZIJyBtO9SDr1q9h5hEQCp/4L2RQ+ar0qjx2oNU= -golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= +golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= +golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -464,8 +464,8 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s= -golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -478,8 +478,8 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58= -golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= diff --git a/internal/config/config.go b/internal/config/config.go index 70038ff3..41b8b15e 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -4,7 +4,7 @@ import ( "time" "github.com/prometheus/client_golang/prometheus" - "github.com/raffis/mongodb-query-exporter/v3/internal/collector" + "github.com/raffis/mongodb-query-exporter/v5/internal/collector" ) // Config defaults diff --git a/internal/config/v1/config.go b/internal/config/v1/config.go index 04f6968b..9a9a1edc 100644 --- a/internal/config/v1/config.go +++ b/internal/config/v1/config.go @@ -6,9 +6,9 @@ import ( "time" "github.com/prometheus/client_golang/prometheus" - "github.com/raffis/mongodb-query-exporter/v3/internal/collector" - "github.com/raffis/mongodb-query-exporter/v3/internal/config" - "github.com/raffis/mongodb-query-exporter/v3/internal/x/zap" + "github.com/raffis/mongodb-query-exporter/v5/internal/collector" + "github.com/raffis/mongodb-query-exporter/v5/internal/config" + "github.com/raffis/mongodb-query-exporter/v5/internal/x/zap" "go.mongodb.org/mongo-driver/mongo/options" ) diff --git a/internal/config/v2/config.go b/internal/config/v2/config.go index f6fde0ba..9501d5c7 100644 --- a/internal/config/v2/config.go +++ b/internal/config/v2/config.go @@ -8,9 +8,9 @@ import ( "time" "github.com/prometheus/client_golang/prometheus" - "github.com/raffis/mongodb-query-exporter/v3/internal/collector" - "github.com/raffis/mongodb-query-exporter/v3/internal/config" - "github.com/raffis/mongodb-query-exporter/v3/internal/x/zap" + "github.com/raffis/mongodb-query-exporter/v5/internal/collector" + "github.com/raffis/mongodb-query-exporter/v5/internal/config" + "github.com/raffis/mongodb-query-exporter/v5/internal/x/zap" "go.mongodb.org/mongo-driver/mongo/options" ) diff --git a/internal/config/v2/config_test.go b/internal/config/v2/config_test.go index ed7c86d1..5e52b08f 100644 --- a/internal/config/v2/config_test.go +++ b/internal/config/v2/config_test.go @@ -4,7 +4,7 @@ import ( "os" "testing" - "github.com/raffis/mongodb-query-exporter/v3/internal/x/zap" + "github.com/raffis/mongodb-query-exporter/v5/internal/x/zap" "github.com/tj/assert" ) diff --git a/internal/config/v3/config.go b/internal/config/v3/config.go index 6d5d3f9d..5cd14c03 100644 --- a/internal/config/v3/config.go +++ b/internal/config/v3/config.go @@ -8,9 +8,9 @@ import ( "time" "github.com/prometheus/client_golang/prometheus" - "github.com/raffis/mongodb-query-exporter/v3/internal/collector" - "github.com/raffis/mongodb-query-exporter/v3/internal/config" - "github.com/raffis/mongodb-query-exporter/v3/internal/x/zap" + "github.com/raffis/mongodb-query-exporter/v5/internal/collector" + "github.com/raffis/mongodb-query-exporter/v5/internal/config" + "github.com/raffis/mongodb-query-exporter/v5/internal/x/zap" "go.mongodb.org/mongo-driver/mongo/options" ) diff --git a/internal/config/v3/config_test.go b/internal/config/v3/config_test.go index 717cf26a..3e5f466a 100644 --- a/internal/config/v3/config_test.go +++ b/internal/config/v3/config_test.go @@ -4,7 +4,7 @@ import ( "os" "testing" - "github.com/raffis/mongodb-query-exporter/v3/internal/x/zap" + "github.com/raffis/mongodb-query-exporter/v5/internal/x/zap" "github.com/tj/assert" )