Skip to content

Commit

Permalink
add some additional logic to grab a useful site name
Browse files Browse the repository at this point in the history
  • Loading branch information
alemsh committed Feb 15, 2024
1 parent ece398b commit a381412
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions condor_history_to_prometheus.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,10 @@ def compose_ad_metrics(ad, metrics):
labels['IceProdTaskName'] = ad['IceProdTaskName']
except:
pass

labels['MATCH_EXP_JOBGLIDEIN_ResourceName'] = ad['MATCH_EXP_JOBGLIDEIN_ResourceName']
if labels['MATCH_EXP_JOBGLIDEIN_ResourceName'] != 'other':
labels['MATCH_EXP_JOBGLIDEIN_ResourceName'] = ad['MATCH_EXP_JOBGLIDEIN_ResourceName']
elif labels['MachineAttrGLIDEIN_Site0'] != 'other':
labels['MATCH_EXP_JOBGLIDEIN_ResourceName'] = labels['MachineAttrGLIDEIN_Site0']

metrics.condor_job_count.labels(**labels).inc()
metrics.condor_job_walltime_hours.labels(**labels).inc(ad['walltimehrs'])
Expand Down

0 comments on commit a381412

Please sign in to comment.