# Snyk vulnerability monitoring with Coralogix

Copy as Markdown[Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fdocs-docusaurus.kinsta.page%2Fintegrations%2Fsecurity%2Fsnyk-vulnerability-monitoring-with-coralogix.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fdocs-docusaurus.kinsta.page%2Fintegrations%2Fsecurity%2Fsnyk-vulnerability-monitoring-with-coralogix.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)

This tutorial demonstrates how to conduct [Snyk](https://snyk.io/) vulnerability monitoring with Coralogix by exporting Snyk's security testing data using [Prometheus](https://docs-docusaurus.kinsta.page/integrations/metrics/prometheus/.md).

## Overview[​](#overview "Direct link to Overview")

This Docker was designed by the LunarTech team and was written in Go. This exporter enables you to automatically export Snyk’s security testing data into Prometheus by scraping [Snyk’s API](https://snyk.docs.apiary.io/#)**.**

## Prerequisites[​](#prerequisites "Direct link to Prerequisites")

* Active [Snyk account](https://snyk.io/)

## Snyk Setup[​](#snyk-setup "Direct link to Snyk Setup")

You are required to obtain your **Organization ID** and **Organization API key** in your Synk UI.

**To obtain your Organization ID**:

**STEP 1**. In your left-hand sidebar, select your Synk Group.

**STEP 2**. Select your Snyk Organization.

**STEP 3**. Navigate to **Settings**.

**STEP 4**. Copy your Organization ID.

[![](/assets/images/Details-1024x497-348738791beefa8b4f1892742f21813b.webp)](https://docs-docusaurus.kinsta.page/assets/images/Details-1024x497-348738791beefa8b4f1892742f21813b.webp)

**To access your Organization API key**:

**STEP 5**. Complete **STEPS 1-4** above, then click **Manage service accounts**.

**STEP 6**. Create a new service account and token for Coralogix.

* Input **Name** & **Role**.

* Click **Create**.

[![](/assets/images/key-1024x333-6cb9d3286d845847e017abfb79317682.webp)](https://docs-docusaurus.kinsta.page/assets/images/key-1024x333-6cb9d3286d845847e017abfb79317682.webp)

**STEP 7**. Copy the Organization API key.

## Configuration[​](#configuration "Direct link to Configuration")

**STEP 1**. Run the docker command with the following arguments:

```
docker run -p9532:9532 [quay.io/lunarway/snyk_exporter](<http://quay.io/lunarway/snyk_exporter>) --snyk.api-token 'API TOKEN' --log.level="info" --snyk.organization='ORG ID’
```

The output should appear as follows:

```
time="2023-04-25T18:45:37Z" level=info msg="Starting Snyk exporter for organization '62b64ba1-aab2-4409-a1cb-6f94b3f93977'" source="main.go:67"

time="2023-04-25T18:45:37Z" level=info msg="Listening on :9532" source="main.go:111"

time="2023-04-25T18:45:37Z" level=info msg="Snyk API scraper starting" source="main.go:140"

time="2023-04-25T18:45:37Z" level=info msg="Running Snyk API scraper for organizations: Financial Applications" source="main.go:174"

time="2023-04-25T18:45:37Z" level=info msg="Collecting for organization 'Financial Applications'" source="main.go:196"
```

The Docker output should appear as follows:

```
time="2023-04-25T18:52:54Z" level=info msg="Recorded 585 results for organization 'Financial Applications'" source="main.go:205"

time="2023-04-25T18:52:54Z" level=info msg="Exposing 585 results as metrics" source="main.go:216"
```

**STEP 2**. Update **Prometheus RemoteWrite** by following [these instructions](https://docs-docusaurus.kinsta.page/integrations/metrics/prometheus/.md).

```
remote_write:

- url: https://ingress.eu2.coralogix.com/prometheus/v1

  name: '<customer_name>'

  remote_timeout: 120s

  bearer_token: '<Send_Your_Data_private_key>'
```

* `url`: Select a **Prometheus RemoteWrite** [endpoint URL](https://docs-docusaurus.kinsta.page/integrations/coralogix-endpoints/.md) for the domain associated with your Coralogix account

* `name`: Name of the timeseries

* `bearerToken`: Your Coralogix [Send-Your-Data API key](https://docs-docusaurus.kinsta.page/user-guides/account-management/api-keys/send-your-data-api-key/.md)

## Validation[​](#validation "Direct link to Validation")

**STEP 1**. Access the Coralogix Grafana instance to ensure metrics are being published and scraped. Query the **snyk\_vulnerabilities\_total** metric.

**STEP 2**. Install the [Grafana Snyk dashboard](https://github.com/vberegov/snyk-grafana/blob/main/snyk.json) to obtain an overview of the data.

[![](/assets/images/json-1024x440-662fca39dda9c26cc251963462ec341a.webp)](https://docs-docusaurus.kinsta.page/assets/images/json-1024x440-662fca39dda9c26cc251963462ec341a.webp)

## Additional Resources[​](#additional-resources "Direct link to Additional Resources")

|               |                                                                                       |
| ------------- | ------------------------------------------------------------------------------------- |
| Documentation | [Prometheus](https://docs-docusaurus.kinsta.page/integrations/metrics/prometheus/.md) |
