IBM Cloud Global

 View Only

Configure IBM Monitoring Sysdig with Grafana

By RASHMI RAMACHANDRA posted Thu May 04, 2023 11:45 PM


Sysdig enables Grafana users to query metrics from Sysdig and visualize them in Grafana dashboards. In order to integrate Sysdig with Grafana, user needs to configure a data source.

We are using the Sysdig Prometheus API to set up the datasource to use with Grafana.

Before Grafana can pull out Sysdig metrics, Grafana must authenticate itself to Sysdig that can be done by setting up an HTTP authentication using the Sysdig API Token

Lets spin up a Grafana container as follows:

docker run --rm -p 3000:3000 --name grafana grafana/grafana

docker ps -a

To sign into Grafana for the first time:

  1. Open your web browser and go to http://localhost:3000/.
  2. The default HTTP port that Grafana listens to is 3000 unless you have configured a different port.
  3. On the sign-in page, enter admin for both username and password.
  4. Click Sign in.
  5. If successful, you will see a prompt to change the password.
  6. Click OK on the prompt and change your password.

Let’s provision a classic cluster in the IBM Cloud console


Now let’s provision an instance of sysdig
in Sydney region


Note: Ensure that the IBM Cloud Monitoring instance is enabled to receive platform metrics

Click on open dashboard link of the IBM Cloud Monitoring

On IBM Cloud Monitoring instance console page; select Integrations> 3rd Party >Grafana Plugin

It shows :

However, refer Configure Sysdig with Grafana and execute the below command:

docker run --rm -p 3000:3000 --name grafana grafana/grafana
  1. Run Grafana http://localhost:3000 [v 9.4.3] and login to it as administrator and create a new datasource
  2. Click Data Sources

2. Launch the http://localhost:3000/datasources

3. Click Add new data source

4. Select Prometheus

5. Enter its name as Sysdig-Prometheus

6. Enter the HTTP url as https://<Monitor URL for Your Region>/prometheus

For IBM Cloud configuration, refer Endpoints :
<IBM Endpoint>/Prometheus


7. Collect API Token that is available through Settings > User Profile > Sysdig Monitor API.

8. Update the Custom HTTP Headers field:

Header: Enter the word, Authorization

Value: Enter the word, Bearer , followed by a space and <Your Sysdig API Token>

example:Bearer b942c4fd-c04d-4284–81c7–81cfacd95bd2

Click Save and Test

Lets connect via CLI to Kubernetes:

ibmcloud login --sso
ibmcloud ks cluster config --cluster <ClusterID>
ibmcloud ks cluster config --cluster ch929not0d5kh32gau20
kubectl config current-context

On the Kubernetes cluster overview console page

Click Connect under Monitoring>Connect to an existing IBM Cloud Monitoring instance>Filter region by Sydney and select the existing instance in Sydney

Launch the

Click on the instance>Monitoring Sources>Kubernetes tab

Execute the command as shown.

curl -sL | bash -s -- -a ACCESS_KEY -c COLLECTOR_ENDPOINT -t TAG_DATA -ac 'sysdig_capture_enabled: false'

curl -sL | bash -s -- -a 52662048-8384-4c1e-a062-2663aba361e2 -c -ac 'sysdig_capture_enabled: false'
kubectl get pods -n ibm-observe

Launch the Sysdig instance console page and view mterics

On Grafana console page; click explore

Chose a metric, and then select “Run query”.

Congratulations!! Grafana users can successfully query metrics from Sysdig.

1 comment



Fri May 05, 2023 10:53 AM

Valuable Post, Good.