Grafana
License: PRO+ (Professional Edition or higher)
Plugin Type: Index Plugin
Author: Diskover Data, Inc.
Overview
The Grafana plugin enables time series analysis of your storage metrics by exporting directory-level data to a dedicated Elasticsearch index. While Diskover's primary indices provide point-in-time snapshots of your storage, this plugin creates a historical record that accumulates over time—allowing you to visualize storage growth trends, perform capacity planning, and answer questions like "How has this directory grown over the past six months?"
At the end of each crawl, the plugin automatically queries directory information from your Diskover index and exports it to a daily Elasticsearch index (using Logstash-compatible naming by default). This data can then be visualized in Grafana dashboards connected to Elasticsearch.
What This Plugin Does
Creates timestamped documents containing directory size, file counts, and directory counts
Exports data to daily Elasticsearch indices (e.g.,
logstash-2025.01.21)Automatically includes file age distribution data when fileages are enabled
Runs at the end of each crawl with no manual intervention required
Use Cases
Storage Administrators & Capacity Planners
Track storage growth rates for specific directories over weeks or months
Predict when storage thresholds will be reached based on historical trends
Identify which storage areas are growing fastest to prioritize tier migration
Support procurement planning with data-driven budget forecasting
Project Managers & Department Leads
Monitor how project directories grow throughout the project lifecycle
Identify active versus dormant projects based on storage activity patterns
Compare storage utilization across departments or teams
Finance & Compliance
Generate historical reports on departmental storage consumption for chargebacks
Track data accumulation patterns for compliance documentation
Forecast future storage costs based on observed growth trends
Understanding Time Series Data for Storage
Why Time Series Analysis Matters
Traditional storage analysis shows you what exists right now. Time series analysis shows you how things change over time. This distinction is crucial for capacity planning because knowing that a directory is 500 GB tells you far less than knowing it grew from 200 GB to 500 GB in the past three months.
The Grafana plugin transforms Diskover's snapshot data into time series data by:
Timestamping – Adding
@timestampto each document for temporal orderingDaily Indexing – Creating separate indices per day that accumulate over time
Metric Extraction – Pulling key metrics (size, counts) from directory documents
Why Separate Indices?
Diskover's primary indices are optimized for searching and analyzing current data. The Grafana plugin creates separate indices because each serves a different purpose:
Aspect | Primary Diskover Index | Grafana Time Series Index |
|---|---|---|
Purpose | Current state analysis | Historical trend analysis |
Data scope | All files and directories | Summary data (directories only) |
Index lifecycle | Replaced on re-index | Accumulates over time |
Query pattern | Search and filter | Time-based aggregations |
Visualization | Diskover web UI | Grafana dashboards |
How Data Flows
When a crawl completes, the plugin:
Queries all directories from the Diskover index where
dir_depthis within your configured maximumExtracts path, size, file count, directory count, and fileages (if available)
Adds a timestamp marking when the crawl completed
Uploads all documents to a daily index (e.g.,
logstash-2025.01.21)
If multiple crawls occur on the same day, documents are appended to the same daily index.
Grafana vs. Grafana Cloud Plugin
Diskover provides two plugins for time series visualization. Choose based on your infrastructure:
Aspect | Grafana Plugin | Grafana Cloud Plugin |
|---|---|---|
Data destination | Local Elasticsearch | Grafana Cloud (Graphite) |
Infrastructure | Self-hosted ES cluster | Cloud-managed service |
Network requirements | Internal network only | HTTPS to grafana.net |
Fileages support | Yes | No |
Best for | On-premise, air-gapped environments | SaaS, managed infrastructure |
Use this plugin if you maintain an on-premise Elasticsearch cluster or have security requirements that mandate data stays within your network.
Requirements
System Requirements
Python 3.9 or higher
Diskover indexer with plugin support enabled
Elasticsearch cluster (same cluster as primary Diskover index)
Grafana instance with Elasticsearch datasource capability
Network connectivity between Diskover and Elasticsearch
Python Dependencies
This plugin has no external Python dependencies beyond the Diskover core libraries and the Elasticsearch Python client (already included with Diskover).
Installation
Step 1: Install Dependencies
No additional installation is required. The plugin uses libraries already included with Diskover.
Step 2: Configure the Plugin
Navigate to Diskover Admin > Plugins > Index Plugins > Grafana
Enable the plugin and configure parameters as needed (see Configuration section below)
Save the configuration
Step 3: Enable in Index Task Configuration
Navigate to Diskover > Configurations > [Your Configuration Name]
At the bottom within Index Plugins Enablement, enable the Grafana plugin
The plugin will now run automatically at the end of each crawl using this configuration
Step 4: Enable Fileages (Optional but Recommended)
To include file age distribution data in your time series exports:
Navigate to Diskover > Configurations > [Your Configuration Name]
Locate the File Age Groups section
Enable and configure your desired age group thresholds
Save the configuration
When fileages are enabled, the Grafana plugin automatically includes this data in each export.
Configuration
Configuration Parameters
Parameter | Type | Default | Description |
|---|---|---|---|
| integer |
| Maximum directory depth to include. Directories with |
| string |
| Prefix for the daily index name. Index format: |
Understanding max_dir_depth
The max_dir_depth parameter controls which directories are exported to the time series index. This setting balances granularity against data volume.
max_dir_depth | Directories Captured | Example Paths |
|---|---|---|
| Root only |
|
| Root + first level |
|
| Root + two levels |
|
| Root + three levels | All of above + |
Recommendation: Start with max_dir_depth: 2 and increase only if you need deeper granularity. Higher values significantly increase the number of documents generated per crawl.
Configuration Examples
Standard Configuration (Recommended)
Capture root and top two directory levels with Logstash-compatible naming:
{
"max_dir_depth": 2,
"index_prefix": "logstash-"
}
This creates indices like logstash-2025.01.21 containing directories at depth 0, 1, and 2.
Shallow Capture for Large Environments
For environments with many top-level directories, limit to the first level only to reduce data volume:
{
"max_dir_depth": 1,
"index_prefix": "logstash-"
}
Custom Index Prefix
Use a custom prefix to separate Diskover metrics from other Logstash data:
{
"max_dir_depth": 2,
"index_prefix": "diskover-metrics-"
}
This creates indices like diskover-metrics-2025.01.21.
Deep Capture for Project Hierarchies
For project-based storage with nested structures requiring granular tracking:
{
"max_dir_depth": 4,
"index_prefix": "logstash-"
}
Note: Deep captures can generate large numbers of documents. Monitor your index sizes when using higher depth values.
Indexed Fields / Elasticsearch Mappings
Index Naming Convention
The plugin creates indices using a daily naming pattern:
<index_prefix>YYYY.MM.DD
Examples:
logstash-2025.01.21logstash-2025.01.22diskover-metrics-2025.01.21
If multiple crawls complete on the same day, documents are appended to the existing daily index.
Field Mappings
Each document in the time series index contains:
Field | ES Type | Description |
|---|---|---|
| date (ISO 8601) | Timestamp when the crawl completed |
| keyword | Full directory path |
| long | Total size in bytes (apparent size) |
| long | Disk usage in bytes (allocated size) |
| long | Number of files in the directory (recursive) |
| long | Number of subdirectories (recursive) |
| object | File age distribution data (included when fileages are enabled) |
Fileages Subfields
When fileages are enabled in your Diskover configuration, the fileages object provides age distribution data:
Subfield | Description |
|---|---|
| Files modified within the last 1 day |
| Files modified within the last 7 days |
| Files modified within the last 30 days |
| Files modified within the last 90 days |
| Files modified within the last 180 days |
| Files modified within the last 365 days |
| Files older than 365 days |
Example Document
A document generated at the end of a crawl:
{
"@timestamp": "2025-01-21T14:30:45.123456",
"path": "/mnt/data/projects/alpha",
"size": 10737418240,
"size_du": 11274289152,
"file_count": 15234,
"dir_count": 342,
"fileages": {
"1d": 50,
"7d": 200,
"30d": 500,
"90d": 1200,
"180d": 2000,
"365d": 5000,
"older": 6284
}
}
Grafana Setup
Configuring the Elasticsearch Datasource
To visualize the time series data in Grafana, add an Elasticsearch datasource:
In Grafana, navigate to Configuration > Data Sources > Add data source
Select Elasticsearch
Configure the connection:
URL: Your Elasticsearch URL (e.g.,
http://localhost:9200)Index name: Use a pattern matching your index prefix (e.g.,
logstash-*ordiskover-metrics-*)Time field name:
@timestampVersion: Select your Elasticsearch version
Click Save & Test to verify the connection
Building Dashboards
With the datasource configured, you can create panels to visualize:
Storage growth over time – Line charts showing
sizefor specific pathsFile accumulation trends – Time series of
file_countchangesAge distribution changes – Stacked area charts using
fileagesdataComparative analysis – Multiple paths on a single chart for comparison
For detailed Grafana configuration and panel creation, refer to the Grafana Elasticsearch Datasource Documentation.
Example Queries
Track size of a specific directory over time:
Query:
path:"/mnt/data/projects/alpha"Metric: Average of
sizeGroup by: Date histogram on
@timestamp
Compare growth across multiple directories:
Query:
path:"/mnt/data/projects/*"Metric: Average of
sizeGroup by: Terms on
path, then date histogram on@timestamp
Monitor file count changes:
Query:
*Metric: Sum of
file_countGroup by: Date histogram on
@timestamp
Troubleshooting
Common Issues
Issue | Cause | Solution |
|---|---|---|
No documents in | Plugin not enabled in Index Task Configuration | Navigate to Diskover > Configurations > [Config Name] and enable the Grafana plugin in Index Plugins Enablement |
No documents in | No directories exist at configured depth | Verify directories exist in the primary index, or reduce |
Index creation fails | Elasticsearch cluster issues or permissions | Check cluster health and ensure the Diskover user has index creation privileges |
Missing fileages data in exports | Fileages not enabled in Diskover configuration | Enable File Age Groups in Diskover > Configurations > [Config Name] |
Grafana shows "No data" | Datasource misconfiguration | Verify index pattern matches your |
Grafana shows "No data" | Time range mismatch | Adjust Grafana dashboard time range to include when crawls occurred |
Plugin processing is slow | Too many directories at configured depth | Reduce |
Only partial data exported | Query limited to 1000 results | Reduce |
Verifying Plugin Activity
Check Diskover logs for plugin activity:
Linux:
grep -i "grafana" /var/log/diskover/diskover.log | tail -20
Windows:
Check Diskover service logs or your configured log location.
Verifying Index Creation
Check if the time series index was created:
curl -X GET "localhost:9200/_cat/indices/logstash-*?v"
Checking Document Count
Verify documents exist in the index:
curl -X GET "localhost:9200/logstash-*/_count" | jq '.count'
Debug Logging
To enable verbose logging for troubleshooting, adjust the logging level in your Diskover configuration. Plugin logs will appear with the prefix diskover.grafana_plugin.
Support
Last Updated: January 2026
Diskover Data, Inc.
Comments
0 comments
Please sign in to leave a comment.