Folder exporter
|
|
The folder exporter can be used to monitor the number of files (and folders) in desired directories. This can be used, for example, to record the fill level of transfer directories that are filled or processed by INUBIT.
Configuration
The Folder-Exporter is a plugin based on the JavaPlugin-Exporter. To operate it, it must be activated in the configuration of the JavaPlugin-Exporter.
The configuration for the Folder-Exporter is located in the file vimon/config/javaplugin_exporter/javaplugins/folder_exporter.yml.
The directories to be monitored are configured here:
logLevel: INFO # ALL, CONFIG, FINE, FINER, FINEST, INFO, SEVERE, WARNING, OFF
folders:
- dir: c:\temp # Absolute path. On Linux, for example, /tmp
displayName: Temp # A human-readable name for this directory, which is passed to the Prometheus metric
reportFiles: true # Should the number of FILES be reported?
reportFolders: true # Should the number of FOLDERS be reported?
recursiveDepth: 1 # Depth of the directory tree (subfolders) to be included. 1 = no subfolders
- dir: c:\inubit
displayName: INUBIT
reportFiles: false
reportFolders: true
recursiveDepth: 3
|
For productive operation, it is recommended to set the LogLevel to INFO. |
These settings would lead to these metrics:
VIMON_jpe_FolderExporter{folder="c:\inubit", displayName="INUBIT", type="folders"} 470
VIMON_jpe_FolderExporter{folder="c:\temp", displayName="Temp", type="folders"} 1101
VIMON_jpe_FolderExporter{folder="c:\temp", displayName="Temp", type="files"} 7063
prometheus-config
scrape_configs:
- job_name: 'FolderExporter'
scrape_interval: 10s
static_configs:
- targets: ['foo.bar.com:9106']
labels:
app: 'Filesystem'
project: 'vimon'
part: 'folder'
stage: 'prod'
host: 'foo.bar.com'