Skip to content

Add custom metrics to expose MSSQL server hostname #382

Closed Answered by burningalchemist
barywhyte asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @barywhyte, for this purpose there's a new field static_value which serves exactly as a placeholder if you just need to extract a string label. This feature is not released yet, but will be available in the upcoming v0.13.

As a workaround, I suggest you to construct a query so it returns two columns: the hostname string and some static value. Something like this:

SELECT @@SERVERNAME AS hostname, 1 as value;

Then you specify value in the values field in the config.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@barywhyte
Comment options

Answer selected by barywhyte
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #379 on November 02, 2023 09:24.