Only for AWS EFS volume monitoring!
Refer project wiki for more details
docker run --rm -p 9888:9888 -it dockerpandamaster/efs_volume_exporter --volume-dir=bin:/bin
Add as a sidecar in deployment
- name: volume-exporter
image: dockerpandamaster/efs_volume_exporter
imagePullPolicy: "Always"
args:
- --volume-dir=prometheus:/prometheus
ports:
- name: metrics-volume
containerPort: 9888
volumeMounts:
- mountPath: /prometheus
name: prometheus-data
readOnly: true
Expose port 9888 in service
- name: metrics-volume
port: 9888
protocol: TCP
targetPort: 9888
Complete Service example
apiVersion: v1
kind: Service
metadata:
name: cdn
spec:
ports:
- port: 80
targetPort: 80
protocol: TCP
name: http
- name: metrics-volume
port: 9888
protocol: TCP
targetPort: 9888
selector:
app: nginx
In prometheus.yml, add a job to scrape metrics
scrape_configs:
- job_name: 'cdn_volume_metrics'
scrape_interval: 15s
scrape_timeout: 5s
static_configs:
- targets: ['cdn.staging:9888']
Flag | Description |
---|---|
web.listen-address | Address to listen on for web interface and telemetry. Default is 9888 |
web.telemetry-path | Path under which to expose metrics. Default is /metrics |
volume-dir | volumes to report, the format is volumeName:VolumeDir, For example ==> logs:/app/logs, you can use this flag multiple times to provide multiple volumes |
metrics | Type | Description |
---|---|---|
volume_bytes_used{volume_name=”someName”, volume_path=”/some/path”} | Gauge | Used size of volume/disk |