lagoon-solr-metrics

command module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2024 License: MIT Imports: 7 Imported by: 0

README

Lagoon Solr Metrics

GitHub go.mod Go version Go Report Card Coverage Status Release

Installation

curl -L -o lagoon-solr-metrics https://github.com/salsadigitalauorg/lagoon-solr-metrics/releases/latest/download/lagoon-solr-metrics-$(uname -s)-$(uname -m)
chmod +x lagoon-solr-metrics
mv lagoon-solr-metrics /usr/local/bin/lagoon-solr-metrics
Docker

Run directly from a docker image:

docker run --rm ghcr.io/salsadigitalauorg/lagoon-solr-metrics:latest lagoon-solr-metrics

Or add to your docker image:

COPY --from=ghcr.io/salsadigitalauorg/lagoon-solr-metrics:latest /usr/local/bin/lagoon-solr-metrics /usr/local/bin/lagoon-solr-metrics

Usage

The application needs a few environmental variables set so that it can know where to collect the metrics from and where to push it.

SOLR_HOST=solr
SOLR_PORT=8983
SOLR_CORE=drupal
LAGOON_INSIGHTS_ENDPOINT="http://lagoon-remote-insights-remote.lagoon.svc"

The above are the defaults that the application will use, but you can override them as needed in your runtime environment.

Local development

Build
git clone [email protected]:salsadigitalauorg/lagoon-solr-metrics.git && cd lagoon-solr-metrics
go generate ./...
go build -ldflags="-s -w" -o build/lagoon-solr-metrics .
go run . -h
Run tests
go generate ./...
go test -v ./... -coverprofile=build/coverage.out

View coverage results:

go tool cover -html=build/coverage.out

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL