Expose custom variables via internal metrics #20755
Labels
domain: config
Anything related to configuring Vector
domain: observability
Anything related to monitoring/observing Vector
type: feature
A value-adding code addition that introduce new functionality.
A note for the community
Use Cases
I set several environment values in each Vector instance, which then regulate various actions within VRL. For instance, I have a sample rate that is dependent on system available CPUs. In order to understand this variable currently when graphing data results out of Vector aggregations in Prometheus, I need to import these values via a third-party path (currently: node montitors with text file scrape.) It seems that this is a very roundabout way to get this data, when it should be in Vector's own Prometheus output. That way I have certainty that the data is correct and timely, and I can eliminate significant external tooling. These are static values, mostly based on environment variables that are customized to this exact instance of Vector but yet are different for every Vector instance we operate.
My use case is only Prometheus-based, but I can imagine others have more extensive uses for this type of data exposure.
Attempted Solutions
I have used node text scraper for this, but that requires additional tooling and scripts to double up my data.
Proposal
I would suggest that an option exist in the internal metrics to include arbitrary metrics defined once as part of the internal_metrics definition:
Partial contents of /etc/default/vector (environment variables):
Partial contents of vector.yml:
Partial output of "curl http://127.0.0.1:9300":
References
No response
Version
vector 0.39.0 (x86_64-unknown-linux-gnu)
The text was updated successfully, but these errors were encountered: