loading...
Cover image for Introducing the Prometheus Exporter by Lunar

Introducing the Prometheus Exporter by Lunar

phennex profile image 𝚔𝚊𝚜𝚙𝚎𝚛 𝚗𝚒𝚜𝚜𝚎𝚗 ・1 min read

If you are looking for a quick and easy way to export your Snyk scans into Prometheus, check out the snyk_exporter project by the Lunar team.

The Prometheus exporter for Snyk is written in Go and allows for exporting scanning data into Prometheus by scraping the Snyk HTTP API.

Check out the README and repo here:

GitHub logo lunarway / snyk_exporter

Prometheus exporter for Snyk

Snyk exporter

Build Status Go Report Card Docker Repository on Quay

Prometheus exporter for Snyk written in Go Allows for exporting scanning data into Prometheus by scraping the Snyk HTTP API.

Installation

Several pre-compiled binaries are available from the releases page.

A docker image is also available on our Quay.io registry.

docker run quay.io/lunarway/snyk_exporter --snyk.api-token <api-token&gt

Usage

You need a Snyk API token to access to API Get your through the Snyk account settings.

It exposes prometheus metrics on /metrics on port 9532 (can be configured).

snyk_exporter --snyk.api-token <api-token>

See all configuration options with the --help flag

$ snyk_exporter --help
usage: snyk_exporter --snyk.api-token=SNYK.API-TOKEN [<flags>]

Snyk exporter for Prometheus. Provide your Snyk API token and the organization(s) to scrape to expose Prometheus metrics.

Flags:
  -h, --help              Show context-sensitive help (also try --help-long and --help-man).
      --snyk.api-url="https://snyk.io/api/v1"
                          Snyk API URL
      --snyk.api-token=SNYK.API-TOKEN
                          Snyk API token
  -i, --snyk.interval=60  Polling interval for requesting data from Snyk API in seconds
      --snyk.organization=SNYK.ORGANIZATION ...
                          Snyk organization

And if you'd like to see it in action, join us for a live demo with the Snyk team on December 9th at 5PM GMT.

Feel free to let us know what you think, and ask any questions you may have.

Discussion

pic
Editor guide