Telemetry metrics #15291
-
Hi there, I am new to vector and still struggling with syntaxes etc. I am trying to figure out how does one go about using the telemetry metrics (component_received_event_bytes_total, component_received_events_count etc...). Could someone please post a simple example? Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
Hi @arpitarora2022 ! Typically users will use an |
Beta Was this translation helpful? Give feedback.
-
Thanks @jszwedko, that helped. I am running into a slightly different issue now. Here's my TOML file. For some reason, the host field is being set to an IP address instead of 'test_host' I am trying to set it to.
|
Beta Was this translation helpful? Give feedback.
-
I was able to figure it out. Here's the code. You basically set the tags.host_key to 'host' in the internal_metrics source and then you add the remap transform and set the host there. In this example, I am changing the host to 'test_host'.
|
Beta Was this translation helpful? Give feedback.
-
I have one more question! How do I add custom tags to an 'internal_metrics' source? Do I need to convert the internal metrics to logs using 'metric_to_log', remap and add tags there and then convert the logs to metrics using 'log_to_metric'? This sounds a bit convoluted. Is there any easier way where I can add custom tags into the 'internal_metrics' output? So far, I see it only allows for the 'host_key' and 'pid_key' tags. I want to add the 'environment' tag to the 'internal_metrics' output. |
Beta Was this translation helpful? Give feedback.
Hi @arpitarora2022 ! Typically users will use an
internal_metrics
source with a metrics sink to publish the metrics to an external service (like Prometheus).