Get filesystem-exporter running in minutes!
docker pull ghcr.io/d0ugal/filesystem-exporter:latest# Copy the example configuration to create your own config
cp config.example.yaml config.yaml
# Edit the configuration for your environment
nano config.yamldocker run -d \
--name filesystem-exporter \
-p 8080:8080 \
-v /:/host:ro \
-v $(pwd)/config.yaml:/root/config.yaml:ro \
ghcr.io/d0ugal/filesystem-exporter:latest# Check the health endpoint
curl http://localhost:8080/health
# View metrics
curl http://localhost:8080/metricsgit clone https://github.com/d0ugal/filesystem-exporter.git
cd filesystem-exporter# Build the application
make build
# Run with default configuration
./filesystem-exporterversion: '3.8'
services:
filesystem-exporter:
image: ghcr.io/d0ugal/filesystem-exporter:latest
ports:
- "8080:8080"
volumes:
- /:/host:ro
- ./config.yaml:/root/config.yaml:ro
restart: unless-stoppeddocker-compose up -dserver:
host: "0.0.0.0"
port: 8080
logging:
level: "info"
format: "json"
metrics:
collection:
default_interval: "5m"
filesystems:
- name: "root"
mount_point: "/"
device: "sda1"
interval: "1m"
directories:
home:
path: "/home"
subdirectory_levels: 1filesystems:
- name: "volume1"
mount_point: "/volume1"
device: "sda1"
interval: "1m"
- name: "usb1"
mount_point: "/volumeUSB1/usbshare"
device: "usb1p1"
interval: "2m"
directories:
nas:
path: "/volume1/nas/"
subdirectory_levels: 1
media:
path: "/volume1/nas/Media/"
subdirectory_levels: 2- Configure for your environment - Edit
config.yamlwith your filesystems and directories - Set up monitoring - Add the metrics endpoint to your Prometheus configuration
- Create dashboards - Build Grafana dashboards using the available metrics
- Set up alerts - Configure alerts for disk space and directory size thresholds
Permission Denied
- Ensure the container has read access to mounted volumes
- Use
:ro(read-only) flag for volume mounts
Configuration Errors
- Check YAML syntax in your config file
- Validate paths exist and are accessible
High Memory Usage
- Reduce
subdirectory_levelsfor large directory trees - Increase collection intervals for less frequent monitoring
- Documentation: See README.md for detailed documentation
- Issues: Report bugs and request features on GitHub
- Examples: Check config.example.yaml for more configuration examples