From 6f0930187950a442508e1f276550bcf0e487ecba Mon Sep 17 00:00:00 2001 From: Julien Riou Date: Sat, 14 May 2022 11:30:39 +0200 Subject: [PATCH] feat: Add GPU ID to temperatures Signed-off-by: Julien Riou --- check_trex.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check_trex.py b/check_trex.py index 0836358..f3b5733 100755 --- a/check_trex.py +++ b/check_trex.py @@ -235,7 +235,7 @@ class Trex(Resource): temperature = gpu["temperature"] logger.debug(f"Temperature of {name} ({id}) is {temperature}C") metrics.append( - Metric("temperature", temperature, context="temperature") + Metric(f"temperature_{id}", temperature, context="temperature") ) if "memory_temperature" in gpu: @@ -245,7 +245,7 @@ class Trex(Resource): ) metrics.append( Metric( - "memory_temperature", + f"memory_temperature_{id}", memory_temperature, context="memory_temperature", )