Skip to content

And small application that collects vital metrics from Solr Metrics API and pushes them to Lagoon Insights.

License

Notifications You must be signed in to change notification settings

salsadigitalauorg/lagoon-solr-metrics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 git@github.com: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

About

And small application that collects vital metrics from Solr Metrics API and pushes them to Lagoon Insights.

Resources

License

Stars

Watchers

Forks

Packages