/1000eyes_exporter

Prometheus exporter for metrics and alerts from ThousandEyes.

Primary LanguageGoApache License 2.0Apache-2.0

1000eyes_exporter

Prometheus exporter ot export test metrics and alerts from ThousandEyes. The port 9350 was chosen because someone already reserved it for a ThousandEyes exporter that was supposed to be coming soon but has not been published up to November 2018.

Environment & Arguments

Environment Settings

Mandatory

  • ENV VAR "THOUSANDEYES_TOKEN"

or

  • ENV VAR "THOUSANDEYES_BASIC_AUTH_USER" &&
  • ENV VAR "THOUSANDEYES_BASIC_AUTH_TOKEN"

set to a valid ThousandEyes token to be able to query.

Arguments

  • -GetBGP=true [true|false (default)] if you want BGP test data collected

  • -GetHTTP=true [true|false (default)] if you want HTTP request test data collected (false is default if not set)

  • -GetHttpMetrics=true [true|false (default)] if you want HTTP routing test data collected (false is default if not set)

    HINT: please be aware of the API request limit per minute .. if you have many tests and collect all details it's pretty sure that you're going to it.

  • Just for debugging purpose: -RetrospectionPeriod You can set the period of time it queries into the past, e.g. -RetrospectionPeriod 12h. Large values do not make much sense, because we do not get data about when they started or ended. Just that they existed.

Docker

  1. make build

  2. Run

  • Normal Run to get actual alerts firing:

    • Bearer:

      docker run --rm -p 9350:9350 -e "THOUSANDEYES_BASIC_AUTH_TOKEN=<secret_api_bearer_token>" $(IMAGE):$(VERSION)

    • Basic Auth:

      docker run --rm -p 9350:9350 -e "THOUSANDEYES_BASIC_AUTH_USER=<secret_api_user>" -e "THOUSANDEYES_BASIC_AUTH_TOKEN=<secret_api_basic_auth_token>" $(IMAGE):$(VERSION)

  • Run to get actual alerts firing and Test Results:

    docker run --rm -p 9350:9350 -e "THOUSANDEYES_TOKEN=<secret_api_bearer_token>" $(IMAGE):$(VERSION) -GetBGP=true -GetHTTP=true

  • Run getting alerts from the past - makes only sense for Check/Debug purpose:

    docker run --rm -p 9350:9350 -e "THOUSANDEYES_TOKEN= secret_api_bearer_token " $(IMAGE):$(VERSION) -RetrospectionPeriod=12h