prometheus-community / prometheus-community/stackdriver_exporter

Difference in values when comparing with Cloud Monitoring Metrics Explorer

Open
#150 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
295
Forks
117
Avg merge
9d 14h
Merged PRs (30d)
7

Description

Hi,

I am using the latest version of stackdriver_exporter to collect metrics from google cloud monitoring. However, I can see some difference in values when comparing the prometheus data with actual Metrics Explorer values in cloud monitoring.

I was checking the disk write throughput for one of my VM and the metric explorer in cloud monitoring is showing below values.
Screenshot 2022-04-05 at 7 18 35 PM

Here is the Grafana dashboard which is using prometheus data (scraped from stackdriver_exporter).
Screenshot 2022-04-05 at 7 22 19 PM

The stackdriver_exporter configuration is given below:
Screenshot 2022-04-05 at 4 16 35 PM

The prometheus is scraping the metrics from the exporter endpoint in every 30 seconds.

- job_name: gcp_metrics
  honor_timestamps: true
  scrape_interval: 30s
  scrape_timeout: 30s
  metrics_path: /metrics
  scheme: http
  follow_redirects: true
  relabel_configs:
  static_configs:
  - targets:
    - http://gcp-stackdriver-expo:31992

The cloud monitoring is showing the values above 60KiB, while the Grafana is showing less than 50 KiB. Not sure why it is showing this much difference in values. I am using the following query in Grafana to fetch data from prometheus.

sum(rate(stackdriver_gce_instance_compute_googleapis_com_instance_disk_write_bytes_count{instance_id="xxxxxxxxxxxxxxxx"}[5m])) by (instance_name)

Please correct me, if my query or any of the configuration is wrong.

Thanks

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The payload names no source files or tests; begin with the stackdriver_exporter endpoint, its Google Cloud Monitoring configuration, and the Prometheus scrape and query shown. Done means reproducing the disk-write comparison and documenting whether the query or configuration explains the discrepancy.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, google-cloud, grafana
Domain
cloud, observability-sre
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.