A demonstration project showing how to work with time series data using modern tools and techniques, all presented with a fun "Back to the Future" theme!
The DeLorean Monitoring system uses a three-tier architecture to collect, store, and visualize time series data:
Data Flow:
- The .NET application generates simulated DeLorean metrics
- Data is formatted in InfluxDB Line Protocol format
- Data is sent to InfluxDB Cloud via HTTP API
- Grafana queries InfluxDB using SQL
- Dashboards display real-time metrics and analytics
-
.NET 9 SDK - Latest version
- Required for running and building the data generator
- Minimum version: .NET 9.0 Preview 2 or later
- Includes required packages:
- Microsoft.Extensions.Hosting
- Microsoft.Extensions.Http
-
Visual Studio Code (recommended) or Visual Studio 2022
- With C# extension installed
- Or any IDE that supports .NET development
-
- Free tier is sufficient for this demo
- Provides serverless time series database
- Requires:
- Organization name
- API token with write access
- Bucket with at least 7-day retention
-
- Free tier is sufficient
- For dashboard visualization
- Ability to add InfluxDB as a data source
- Operating System: Windows 10/11, macOS, or Linux
- Memory: Minimum 2GB RAM (4GB recommended)
- Storage: At least 100MB free space
- Internet Connection: Required for cloud services
- Outbound HTTPS access to:
- InfluxDB Cloud API endpoints
- Grafana Cloud API endpoints
- No inbound connections required
-
Sign up for InfluxDB Cloud
- Go to InfluxDB Cloud
- Create a free account or sign in
-
Create a Bucket
- Navigate to "Load Data" > "Buckets"
- Click "Create Bucket"
- Name it "gigawatt_metrics"
- Set retention period to 7 days
-
Generate API Token
- Go to "Load Data" > "API Tokens"
- Click "Generate API Token"
- Select "All Access Token"
- Copy and save this token securely
-
Clone this Repository
git clone https://github.com/Quorralyne/DeLoreanMonitoring.git cd DeLoreanMonitoring
-
Configure InfluxDB Credentials
- Open
Program.cs
in the root directory - Update the following variables in the
DeLoreanDataGeneratorService
class:
_influxUrl = "https://your-influxdb-url.aws.cloud2.influxdata.com/api/v2/write"; _influxToken = "your_influx_token_here" 8000 ; _influxOrg = "your_org"; _influxBucket = "gigawatt_metrics";
- Open
-
Run the Application
dotnet build dotnet run
-
Verify Data Generation
- You should see console output showing data points being generated
- Check your InfluxDB Cloud interface to confirm data is being received
-
Create InfluxDB Data Source in Grafana
- Sign in to your Grafana Cloud account
- Navigate to Configuration > Data Sources
- Click "Add data source" and select "InfluxDB"
- Configure with these settings:
- Name: DeLorean_Monitoring
- URL: Your InfluxDB Cloud URL (without the /api/v2/write path)
- Query Language: SQL
- Database:
gigawatt_metrics
- Token: Your InfluxDB API token
- Add these HTTP Headers:
- Name:
Authorization
, Value:Token YOUR_INFLUX_TOKEN
- Name:
Content-Type
, Value:application/json
- Name:
Accept
, Value:application/json
- Name:
- Click "Save & Test"
-
Import the Enhanced Dashboard
- Go to Dashboards > Import
- Click "Import" in Grafana
- Upload the
DeLoreanMonitoring/grafana/delorean_monitoring_dashboard.json
file from this repo - Select your InfluxDB data source when prompted
- Click "Import"
-
Note About Enhanced Dashboard
- The dashboard has been optimized with a Back to the Future theme
- All SQL queries are embedded directly in the dashboard JSON
- No manual panel configuration is required after import
The enhanced dashboard includes the following panels, each with its embedded SQL query:
Flux Capacitor Power
SELECT time, power_level
FROM "delorean_stats"
WHERE device = 'flux_capacitor' AND time >= now() - interval '15 minutes'
Current Speed / Time Travel Threshold
SELECT time, velocity_mph
FROM "delorean_stats"
WHERE device = 'speedometer' AND time >= now() - interval '5 minutes'
Mr. Fusion Fuel Level
SELECT time, plutonium_level
FROM "delorean_stats"
WHERE device = 'mr_fusion' AND time >= now() - interval '15 minutes'
Time Circuits Power Stability
SELECT time, voltage
FROM "delorean_stats"
WHERE device = 'time_circuits' AND time >= now() - interval '15 minutes'
Engine Temperature
SELECT time, temperature_f
FROM "delorean_stats"
WHERE device = 'engine' AND time >= now() - interval '15 minutes'
DeLorean Velocity
SELECT time, velocity_mph
FROM "delorean_stats"
WHERE device = 'speedometer' AND time >= now() - interval '15 minutes'
The dashboard monitors various DeLorean time machine metrics that are produced by the data generator:
-
Flux Capacitor Power:
- Tracks the power level of Doc Brown's key invention
- Stored as
power_level
in theflux_capacitor
device - Critical value: 121W (representing 1.21 gigawatts)
- Powers the temporal displacement
-
Vehicle Velocity:
- Monitors the DeLorean's current speed
- Stored as
velocity_mph
in thespeedometer
device - Threshold value: 88 mph triggers time travel
- Shows patterns of acceleration and post-time-travel deceleration
-
Engine Temperature:
- Tracks the modified V6 PRV engine temperature
- Stored as
temperature_f
in theengine
device - Safe range: 60-200°F
- Critical for stable operation across time periods
-
Mr. Fusion Fuel Level:
- Tracks the plutonium level in the Mr. Fusion Home Energy Reactor
- Represents technology from the 2015 timeline in BTTF Part II
- Stored as
plutonium_level
in themr_fusion
device - Value range: 0-100%
- Gradually decreases over time with occasional refueling events
-
Time Circuits Power Stability:
- Monitors voltage fluctuations in the time circuits that control destination time periods
- Essential for navigation between past, present and future
- Stored as
voltage
in thetime_circuits
device - Normal range: 11-13V with occasional spikes/drops
- Critical for accurate temporal displacement
This demo showcases:
- High Cardinality Data Handling: See how InfluxDB efficiently manages millions of unique tag combinations
- Efficient Data Writing: Using Line Protocol for compact, fast data writes
- SQL for Time Series: Industry-standard SQL for complex time-based queries
- Real-time Visualization: Monitor DeLorean metrics as they happen
- Predictive Analytics: Simple forecasting without complex data science
- Themed Dashboard: Back to the Future-inspired visual design
The enhanced dashboard provides a complete view of DeLorean metrics through six carefully designed panels, each representing a different aspect of time-based analysis:
- Type: Gauge panel showing current power
- Purpose: Real-time monitoring of current power levels
- Insight: Indicates if the DeLorean has sufficient power for time travel
- Back to the Future Reference: Doc Brown's famous "1.21 gigawatts!" exclamation
- Type: Stat panel with area graph
- Purpose: Shows proximity to time travel speed
- Insight: When this value reaches 88 mph, time travel is imminent
- Back to the Future Reference: "88 miles per hour!" threshold for time travel
- Type: Gauge panel showing percentage
- Purpose: Monitors fuel reserves for the time machine
- Insight: Indicates if refueling is needed before time travel
- Back to the Future Reference: The Mr. Fusion Home Energy Reactor from BTTF Part II (2015 timeline)
- Type: Time series chart
- Purpose: Monitors voltage stability over time
- Insight: Fluctuations could result in inaccurate temporal destinations
- Back to the Future Reference: The time circuits that allow specific date selection for past/future travel
- Type: Stat panel with area graph
- Purpose: Current reading with immediate historical context
- Insight: Shows if engine temperature is stable or fluctuating
- Importance: Critical for safe operation across different time periods
- Type: Time series chart over 15 minutes
- Purpose: Historical pattern analysis
- Insight: Shows velocity patterns with 88 mph threshold line
- Back to the Future Reference: Each spike to 88 mph followed by a drop represents a time travel event
- Pattern: The recurring build-up to 88 mph shows multiple time travel occurrences
- Program.cs: Main .NET console application for generating time series data
- DeLoreanMonitoring.csproj: Project file for the .NET application
- grafana/delorean_monitoring_dashboard.json: Grafana dashboard configuration
- bin/: Build output directory
- obj/: Intermediate build files
- Verify your API token and organization name
- Check network connectivity to InfluxDB Cloud
- Confirm the bucket "gigawatt_metrics" exists
- Ensure your data source configuration is correct
- Verify that the InfluxDB data source name exactly matches "DeLorean_Monitoring"
- Check that the time range includes data points
- If some panels show no data, verify that your data generator is producing all the expected metrics
- Make sure all required packages are installed
- Check for runtime errors in the console output
- Verify that the configuration variables are set correctly in Program.cs
- A PDF guide of the how the full project was done from scratch is included at the top level of this repo. If you don't want to clone the project and run it, follow the guide for each step of the process.
- FILENAME: Complete Demo Guide - DeLorean Dashboard - Back to the Future of Time Series Data.pdf
- Inspired by the "Back to the Future" movie trilogy
- Built with InfluxDB 3 Cloud Serverless, .NET 9, and Grafana Cloud
- Special thanks to Doc Brown and Marty McFly for the DeLorean specs 🚗⚡