draios/grafana-sysdig-datasource

config for provisioning

easternbloc opened this issue · 2 comments

Hi,

I'm looking into setting up the sysdig datasource using grafana provisioning.

I don't suppose you have done this and have a config available?

Many thanks.

@easternbloc I admit I haven't used Grafana provisioning much, so take this with a grain of salt.

I did manage to start Grafana deployed as Docker container with the following steps:

1. Prepare provisioning resources
I created provisioning and provisioning/datasources directories, and I created the file provisioning/datasources/sysdig.yaml with the following content:

apiVersion: 1
datasources:
- name: Sysdig
  type: sysdig
  access: proxy
  # <int> org id. will default to orgId 1 if not specified
  orgId: 1
  # <string> Sysdig URL (Basic/Pro Cloud will use https://app.sysdigcloud.com, Pro Software will refer to your Sysdig deployment)
  url: https://app.sysdigcloud.com
  basicAuth: false
  withCredentials: false
  # <bool> mark as default datasource. Max one per org
  isDefault: false
  # <map> fields that will be converted to json and stored in jsonData
  # apiToken must be set to the API token associated to your user and team
  jsonData:
     apiToken: xxxxx
     tlsAuth: false
     tlsAuthWithCACert: false
  version: 1
  # <bool> allow users to edit datasources from the UI.
  editable: false

2. Run container
I followed instructions in the Readme to use Grafana and Sysdig datasource with Docker, and then executed the following command:

docker run -d -p 3000:3000 -v $(pwd)/provisioning:/etc/grafana/provisioning grafana-sysdig

Note: I'm not sure you're supposed to mount /etc/grafana/provisioning this way, but I wasn't able to do so otherwise.


Does this make sense? Would this work for your use case?

👍 thanks so much for that you were extremely helpful this solves my use case perfectly 💃