Skip to content
Discussion options

You must be logged in to vote

For your follow-up, the file source exposes an open_files gauge. With the default internal-metrics namespace, it appears in Prometheus as vector_open_files, with component_id identifying the file source.

This exposes Vector's internal metrics:

sources:
  internal:
    type: internal_metrics
    scrape_interval_secs: 1

sinks:
  metrics:
    type: prometheus_exporter
    inputs: [internal]
    address: "0.0.0.0:9598"

I checked this on Vector 0.60.0: the gauge reported 2 for two open files, then 3 when another matching file appeared.

The count cannot prove that every file was discovered. A file can appear and disappear between discovery scans. Keep rotated files available long enough to be …

Replies: 2 comments 1 reply

Comment options

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

Comment options

You must be logged in to vote
0 replies
Answer selected by pront
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
source:file Anything `file` source related domain:observability Anything related to monitoring/observing Vector
3 participants