Adding a custom metric (db_size) / query format #514
-
Hello, I'm trying to add a custom metric in the config (Grafana agent yaml file) to collect db_size for the different databases. It would be great to get some help on how to write the query to get the db_size correctly. Thx a lot for support |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
Hi @TomClqncy, let me have a look and come back to you soon. |
Beta Was this translation helpful? Give feedback.
-
So this way? |
Beta Was this translation helpful? Give feedback.
-
Hello @burningalchemist , sorry for following up lately. Still on the table. Update to come on Monday (LinkedIn message sent to you). |
Beta Was this translation helpful? Give feedback.
Yeah, this part specifically (this is from sql_exporter):
Values list should be a set of column names. So if in the query you put
... as NumOfDBs
, then in values list we should also have specificallyNumOfDBs
for the example.Same goes for
key_labels
(it should also be a column in the result set).