filestat_exporter
filestat_exporter copied to clipboard
Availability of the file to be checked.
Hello , encountered the following problem, there are 3 files test.txt here is my filestat.yaml
exporter:
listen_address: ':9943'
metrics_path: /metrics
working_directory: "/app"
# Default enable/disable of metrics - overridden if not set by parameter '-metric.*'
enable_crc32_metric: true
# enable_nb_line_metric: false
# list of patterns to apply - metrics can be enable/disabled for each group
files:
- patterns: ["test1.txt","test2.txt","test23.txt"]
enable_nb_line_metric: true
enable_crc32_metric: true
The received metrics look like this and when changing the content of files hash change, but when deleting a file, for example test1.txt metrics do not change in any way. Also if you recreate the file test1.txt. the metrics will not change in any way.
HELP file_content_hash_crc32 CRC32 hash of file content using the IEEE polynomial TYPE file_content_hash_crc32 gauge file_content_hash_crc32{path="test1.txt"} 3.85946783e+09 file_content_hash_crc32{path="test2.txt"} 2.657284769e+09 file_content_hash_crc32{path="test23.txt"} 7.73236185e+08
I would be grateful to find a solution.
Hello.
Do you mean that the metric continues to exists even though the file is no longer on the disk ?
Closing the question.
Note that if you are looking at prometheus metrics, stale metrics are kept for 5 minutes or so.