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

Add node name in the container metrics because of system_process #378

Conversation

marceloamaral
Copy link
Collaborator

The issue #365 identified that the system_process "container" energy consumption is being aggregated across all nodes.
This is because the name and namespace are the same in all nodes.

To fix that, we can introduce the node label in the container metrics

Signed-off-by: Marcelo Amaral marcelo.amaral1@ibm.com

…rocess

Signed-off-by: Marcelo Amaral <marcelo.amaral1@ibm.com>
@rootfs
Copy link
Contributor

rootfs commented Nov 11, 2022

each metric emits the instance name, e.g.

we don't need to add addtional node name in the metric

{
  "__name__": "kepler_pod_energy_stat",
  "block_devices_used": "1",
  "command": "python3.8",
  "container": "kepler-exporter",
  "container_name": "server-api",
  "curr_bytes_read": "0",
  "curr_bytes_writes": "0",
  "curr_cache_miss": "87188",
  "curr_container_cpu_usage_seconds_total": "0",
  "curr_container_memory_working_set_bytes": "0",
  "curr_cpu_cycles": "51576400",
  "curr_cpu_instr": "67433499",
  "curr_cpu_time": "6",
  "endpoint": "http",
  "instance": "xxxxx",  <--- this is the node name
  "job": "kepler-exporter",
  "namespace": "kepler",
  "pod": "kepler-exporter-hp5x2",
  "pod_name": "kepler-model-server-68b9ccbfd6-xsjps",
  "pod_namespace": "monitoring",
  "service": "kepler-exporter",
  "total_bytes_read": "0",
  "total_bytes_writes": "1236992",
  "total_cache_miss": "6316520376",
  "total_container_cpu_usage_seconds_total": "3462",
  "total_container_memory_working_set_bytes": "47489024",
  "total_cpu_cycles": "4008660406685",
  "total_cpu_instr": "5408344083710",
  "total_cpu_time": "52555158"
}

@marceloamaral
Copy link
Collaborator Author

You are right...sorry for the mistake.

kepler_container_joules_total{container="kepler-exporter", container_name="kube-rbac-proxy", 
container_namespace="monitoring", endpoint="http", instance="kind-control-plane", job="kepler-exporter", 
namespace="kepler", pod="kepler-exporter-65b6m", pod_name="prometheus-operator-7b64d465b9-2598k", 
service="kepler-exporter"}

@marceloamaral marceloamaral deleted the node-name-metric branch October 5, 2023 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants