I’m adding serves to my prometheus config like this:
- job_name: cluster1
static_configs:
- targets:
- server1.example.com
- server2.example.com
- server3.example.com
but now I would like to label the instances with additional static labels, like the server1 and server2 with “database” and server3 with “mail” and maybe server1 additionally with “mysql” and server2 with “postgres”.
I would then like to use this labels in grafana to filter on like here:
free_space_in_bytes{job=~'$job', server_type='database', database_type='mysql' }
Is this achievable within the prometheus config? Filtering on the jobname or instance is indeed possible, but I would like to extend this to more labels.