/openshift-newrelic-synthetics

Sync OpenShift Routes to New Relic Synthetics monitors

Primary LanguageGo

openshift-newrelic-synthetics

Sync OpenShift Routes to New Relic Synthetics monitors

Features

  • Automatically provision New Relic Synthetics monitors using Routes as a source of truth

Usage

Visit NewRelic https://one.newrelic.com/launcher/api-keys-ui.launcher

Create a new 'User' key, name doesn't matter.

The following command will demonstrate which monitors will be created or skipped.

openshift-newrelic-synthetics sync --new-relic-api-key=xxxxxxxxxxxxxxx --dry-run my-namespace

Depending on your go environment, you might need to do something like:

go run github.com/universityofadelaide/openshift-newrelic-synthetics/cmd/openshift-newrelic-synthetics sync etc etc.

Docker

There is a Dockerfile, so its possible to build a docker image as well with:

docker build -t newrelic-sync .

And then can be run with something like:

docker run -v ~/.kube/config:/root/.kube/config newrelic-sync sync --kubernetes-config=/root/.kube/config --new-relic-api-key=XXXXXXXXXXXXXX --dry-run namespace

Use the UA_TEAM_NAME environment variable to control team tag applied to synthetics rules. Default: sapp

Disable syncing a route

Disable:

oc annotate route/example one.newrelic.com/synthetics-status=Disabled

Enable (delete the annotation):

oc annotate route/example one.newrelic.com/synthetics-status-