Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redis Cluster on GCP Doesn't Has Separate Resources Utilizations Metrics #973

Open
iqbaltkj opened this issue Jan 31, 2025 · 6 comments
Open
Assignees
Labels

Comments

@iqbaltkj
Copy link

Describe the problem
I run a Redis cluster with 5 shards and 2 replicas on GCP. Since the cluster has only one endpoint, so I added this Redis endpoint to the Redis exporter. I want to monitor the resource utilization of all my Redis instances, but the exporter only shows the total resources for all instances combined.

What version of redis_exporter are you running?
1.67

Running the exporter
Output metrics :

# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.
# TYPE process_cpu_seconds_total counter
process_cpu_seconds_total 950.44

I want to get something like this metrics output :

# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.
# TYPE process_cpu_seconds_total counter
process_cpu_seconds_total_run_id_$(n) 50.44
process_cpu_seconds_total_run_id_$(n) 80.44

Screenshots

Example Dashboard with the same issue

Image

Additional context

  1. Can the current exporter separate the resource utilization for each instance?
  2. Can it work as a new feature or bug fix?
@oliver006
Copy link
Owner

Interesting question. Is there a way to get the CPU stats per process? Does "INFO" talk to a different process each time it's called? Is the process part of the response? If it is then it could be possible to add it to the metric (and others?) and record the metrics on a per-process basis.

@iqbaltkj
Copy link
Author

iqbaltkj commented Feb 3, 2025

I think each time it's called INFO its talk to a random different process.

Image

@oliver006
Copy link
Owner

Ah interesting. Do you also see process_id? Maybe it's possible to add the ID (run_id or process_id) to certain process-level metrics to identify the individual processes that back the cloud service.

@iqbaltkj
Copy link
Author

iqbaltkj commented Feb 3, 2025

process_id is showing the same output each time it's called.

Image

@oliver006
Copy link
Owner

Ah thanks, that actually makes sense. It's probably running in a container and so the pid is always 1.

"run_id" is prob better for identifying the different processes.

@iqbaltkj
Copy link
Author

iqbaltkj commented Feb 4, 2025

So is adding resources utilization or other metrics possible for every Redis instance while having only one endpoint?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants