Data Visualization with Grafana MCP
Build real-time monitoring dashboards that visualize PostgreSQL data using Cursor with MCP
Introduction
This project has been archived
We're no longer updating this project - we recommend checking out our active projects instead!
If you've already completed this project, don't worry! Your documentation is still available for you to check out and share.
If you have any questions, leave a question in our Discord and we'll get back to you ASAP!
âĄī¸ 30 second Summary
Imagine you've built data pipelines and queries that generate customer insights. Your database has revenue trends, order patterns, purchase behavior. But your stakeholders keep asking: "Can you just send me a CSV?" or "Can you make a chart showing...?" You could export data, create one-off charts, repeat this weekly... or you could work like production data teams do.
Production data teams use Grafana - interactive dashboards that connect directly to databases. Write a query once, visualize it as charts. Monitor trends in real-time, set up alerts, share dashboards across teams. All updating automatically, all accessible to everyone.
What you'll build
In this project, you'll use Grafana to build monitoring dashboards connected to PostgreSQL and visualize e-commerce data in real-time.
Why Grafana?
Grafana is the industry standard for operational monitoring and analytics. Companies like Bloomberg, NVIDIA, and Salesforce use it to visualize billions of data points. It connects directly to your database and transforms SQL queries into interactive charts.
Not sure if this project is right for you? Check if it matches your goals
đĄ New to Grafana?
You don't need any prior Grafana or visualization experience. This project teaches you how to connect it to databases and create professional dashboards.
How you'll build it:
First, you'll set up Grafana and connect it to your PostgreSQL database. Then, you'll use Cursor with MCP to build and manage your dashboards through conversation.
By the end of this project, you'll have:
- A working Grafana dashboard connected to your database.
- Interactive visualizations showing e-commerce revenue and customer metrics.
- đ Secret Mission: A monitoring dashboard comparing raw vs transformed DBT data.
Before you begin, try this quick quiz to get familiar with the concepts:
Want a complete demo of how to do this project, from start to finish? Check out our đŦ walkthrough with Kahu đŦ
This project is part of a series:
Configure Grafana MCP in Cursor
Time to connect Cursor to Grafana! We'll set up the Grafana MCP server so you can create dashboards, configure data sources, and visualize your data through natural language.
In this step, you're going to:
- Create and configure a Grafana Docker container
- Connect Cursor with the Grafana MCP
Check Your Current MCP Setup
Before we add Grafana, let's see what MCP servers you already have configured.
- Open Cursor.
- Click the settings icon (gear icon) in the top right.
- Select MCP from the settings menu.
Now, look at your MCP servers list. What do you see?
â I see docker and postgres
Perfect! You already have Docker and PostgreSQL MCP servers configured (likely from previous projects in this series).
Before you continue: Start your PostgreSQL container!
Since you completed previous projects in this series, you have a PostgreSQL container set up. But it might not be running right now. Let's make sure it's active:
Check if PostgreSQL is running:
docker ps | grep postgres
If you don't see nextwork_postgres in the list, start it:
docker start nextwork_postgres
Verify it's running:
docker ps | grep postgres
You should see nextwork_postgres with status "Up" - this means Grafana will be able to connect to it in Step 2!
â I don't see docker and postgres
No worries! Here's the fast-track setup (takes about 15 minutes). We'll get you set up with Docker, Postgres, AND Grafana all at once.
What you'll set up:
- Docker Desktop + PostgreSQL container
- uv package manager
- MCP servers (Docker + Postgres)
- Demo data loaded
1. Install Docker Desktop
First, check if you already have Docker installed.
- Open Terminal (Mac) or PowerShell (Windows).
- Run this command.
docker --version
What do you see?
â I see a version number
Perfect! Docker is already installed.
â Command not found
Let's install Docker Desktop:
đ macOS
- Download from docker.com/products/docker-desktop.
- Choose Apple Chip (M1/M2/M3) or Intel Chip based on your Mac.
- Drag Docker.dmg to Applications folder.
- Open Docker Desktop, accept terms, click Finish.
- Look for đŗ whale icon in menu bar (means it's running).
đŧī¸ Windows
- Download from docker.com/products/docker-desktop.
- Run installer, accept defaults, restart computer when prompted.
- Open Docker Desktop, skip sign-in.
- Look for đŗ whale icon in system tray (means it's running).
If you see WSL 2 errors: Open PowerShell as Admin, run wsl --install, restart computer.
Need help with Docker installation? Ask the community!
2. Install uv Package Manager
- Open Cursor (or download it if you don't have it).
- Check if you have a folder called MCP-data-series on your Desktop.
Do you see the folder?
â Folder exists
Great! You have the folder from previous projects in this series.
- Select Open Project and navigate to your existing MCP-data-series folder on your Desktop.
â No folder
No problem! Let's create it now.
- Select Open Project
- Create a new folder on your Desktop called MCP-data-series.
- Open terminal in Cursor (Ctrl/Cmd + Shift + `).
đ macOS
đŧī¸ Windows
Now check if you already have uv installed:
- Run this command in terminal:
uv --version
What do you see?
â I see a version number
Great! uv is already installed. Continue to step 3 below.
â Command not found
Let's install uv.
Run the install command for your OS:
đ macOS
- Run this command in terminal:
curl -LsSf https://astral.sh/uv/install.sh | sh
Then verify:
- Run this command in terminal:
uv --version
đŧī¸ Windows
- Run this command in terminal:
iwr https://astral.sh/uv/install.ps1 -UseBasicParsing | iex
Then verify:
- Run this command in terminal:
uv --version
If you get permission errors: Close terminal, right-click Cursor â Run as Administrator, try again.
You should see a version number (like uv 0.4.18).
Need help installing uv? Ask the community!
3. Create PostgreSQL Container + Load Data
- Run these commands in terminal one by one:
uv init
See "Project is already initialized" error?
That's fine! This means you used this folder in previous MCP projects. Skip to the next command.
docker run -d --name pg-local -p 5432:5432 -e POSTGRES_USER=app -e POSTGRES_PASSWORD=app -e POSTGRES_DB=demo postgres:16
What do you see?
â Container created successfully
Great! Wait 20 seconds for PostgreSQL to start up, then download and load data.
â Command failed
No worries, that's all good! Let's troubleshoot this together.
Here's how to fix it:
- Ensure Docker Desktop is running (look for đŗ whale icon).
- Run docker ps -a to check if a container named pg-local already exists.
- If it exists, remove it first: docker rm -f pg-local.
- Try the docker run command again.
Still stuck? Get help or ask the community!
Wait 20 seconds for PostgreSQL to start up, then download and load data:
đ macOS
- Run these commands in terminal.
# Download demo data
curl -o demo_data.sql https://storage.googleapis.com/nextwork_course_resources/courses/ai/mcp-data-engineering/demo_data.sql
# Load into database
cat demo_data.sql | docker exec -i pg-local psql -U app -d demo
đŧī¸ Windows
- Run these commands in terminal.
# Download demo data
Invoke-WebRequest -Uri "https://storage.googleapis.com/nextwork_course_resources/courses/ai/mcp-data-engineering/demo_data.sql" -OutFile "demo_data.sql"
# Load into database
Get-Content demo_data.sql | docker exec -i pg-local psql -U app -d demo
You'll see SQL output scrolling by - that's 40,000+ rows being inserted!
See errors about duplicate keys or existing tables?
This happens if you've already loaded demo data in a previous project. That's fine! The data is already there, and you can move on. These errors won't affect your project - your database already has the data you need.
4. Configure Docker and Postgres MCP Servers in Cursor
Let's set up Docker and Postgres MCPs. (We'll add Grafana in the next section!)
- Click the settings icon (gear icon) in the top right of Cursor.
- Select MCP from the left sidebar.
- Click Add Custom MCP.
Your mcp.json file opens. Paste this config based on your OS:
đ macOS
{
"mcpServers": {
"docker": {
"command": "uv",
"args": ["run", "--with", "docker-mcp", "docker-mcp", "--access-mode=unrestricted"],
"env": { "DOCKER_HOST": "unix:///var/run/docker.sock" }
},
"postgres": {
"command": "uv",
"args": ["run", "--with", "postgres-mcp", "postgres-mcp", "--access-mode=unrestricted"],
"env": { "DATABASE_URI": "postgresql://app:app@localhost:5432/demo" }
}
}
}
đŧī¸ Windows
{
"mcpServers": {
"docker": {
"command": "uv",
"args": ["run", "--with", "docker-mcp", "docker-mcp", "--access-mode=unrestricted"],
"env": { "DOCKER_HOST": "npipe:////./pipe/docker_engine" }
},
"postgres": {
"command": "uv",
"args": ["run", "--with", "postgres-mcp", "postgres-mcp", "--access-mode=unrestricted"],
"env": { "DATABASE_URI": "postgresql://app:app@localhost:5432/demo" }
}
}
}
What does this configuration include?
- docker: Lets Cursor control Docker containers
- postgres: Lets Cursor query your PostgreSQL database
â You're all set! You now have the same setup as someone who completed the PostgreSQL MCP project.
Continue below to add Grafana to your configuration.
Create Grafana Docker Container
Now let's create a Grafana instance using Docker. Think of Grafana as your visualization engine - it connects to databases, runs queries, and transforms the results into interactive charts and dashboards.
What's the difference between Grafana and SQL?
SQL lets you query data and see results as text tables - rows and columns of numbers. Grafana takes those same SQL queries and turns the results into visual charts - bar graphs, line charts, stat panels with big numbers.
SQL is great for analysis, but Grafana is built for monitoring: dashboards that update automatically, metrics that stand out visually, and alerts when something goes wrong. You write SQL queries in both - Grafana just makes them visual and interactive.
We'll run it in Docker so you don't need to install anything permanently on your computer. When you're done with the project, you can delete the container and it's gone - no leftover software!
Open a new terminal in Cursor.
- In Cursor, go to Terminal â New Terminal from the menu bar (or press Ctrl/Cmd + Shift + `).
đ macOS
đŧī¸ Windows
- Run this command in terminal:
docker run -d --name grafana -p 3000:3000 grafana/grafana:latest
What do you see?
â Container created successfully
Perfect! Wait 20-30 seconds for Grafana to start up.
â Command failed
No worries, that's all good! Let's troubleshoot this together.
Here's how to fix it:
- Ensure Docker Desktop is running (look for đŗ whale icon).
- Run docker ps -a to check if a container named grafana already exists.
- If it exists, remove it first: docker rm -f grafana.
- Try the docker run command again.
See "Unable to find image 'grafana/grafana:latest' locally"?
That's fine! It means Docker is downloading the Grafana image for the first time. This is normal and will take a minute or two. Once downloaded, Docker will cache it locally for future use.
đĄ What does this command do?
This creates a Grafana container that runs in the background (-d for detached mode). The -p 3000:3000 flag maps port 3000 on your computer to port 3000 inside the container, allowing you to access Grafana in your browser.
The --name grafana gives the container an easy-to-remember name for management later.
Still stuck? Get help or ask the community!
- Open your browser and navigate to http://localhost:3000.
You'll see the Grafana login screen.
Default Grafana credentials
Grafana's default username and password are both admin. This is the standard for new Grafana installations. You can change the password after logging in, but for this project, the defaults work fine.
- Enter username: admin.
- Enter password: admin.
- Click Log in.
- Skip the password change prompt (or set a new password if you prefer).
You should see the Grafana welcome screen!
Excellent! Grafana is running and you're logged in.
Create a Service Account Token
The MCP needs an API token to interact with Grafana's API - creating dashboards, adding panels, and managing data sources through code instead of manually clicking in the UI.
- Navigate to Administration â Users and Access â Service Accounts
- Click Add service account.
- Enter display name: MCP account.
- Select role: Admin.
- Click Create.
- Click Add service account token.
You'll see the token creation page.
- Enter display name: MCP Access.
- Leave expiration at No expiration (we'll delete everything at the end of this project).
- Click Generate token.
- Click Copy to clipboard to copy the generated service account token.
- Save this token - you'll need it in the next step. Copy it to a text file or note:
glsa_Nz1vM2ExY2ExNjNmNTQ3MDk2OTQ5YWM3YmE3ZjA2YjFl...
Important
This token is like a password. Keep it secure and don't share it.
đĄ What is a service account token?
A service account token is like a password that lets the Grafana MCP server authenticate and control Grafana. Unlike user passwords, tokens can be revoked individually and have specific permissions.
đĄ What is the Admin role?
The Admin role gives the MCP full access to create dashboards, configure data sources, and manage visualizations.
Add Grafana MCP Configuration
Great! You've got your authentication token. This is the key that lets Cursor control Grafana - create dashboards, configure data sources, and manage visualizations, all through chat.
Now let's add Grafana to your MCP configuration.
- In Cursor, click the settings icon.
- Select MCP from the left sidebar.
- Click New MCP Server.
Your mcp.json should already have docker and postgres configured.
- Add the Grafana MCP configuration below your existing servers:
"grafana": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"--network",
"bridge",
"-e",
"GRAFANA_URL",
"-e",
"GRAFANA_SERVICE_ACCOUNT_TOKEN",
"mcp/grafana",
"--transport",
"stdio"
],
"env": {
"GRAFANA_URL": "http://host.docker.internal:3000",
"GRAFANA_SERVICE_ACCOUNT_TOKEN": "[[YOUR_GRAFANA_TOKEN="your-token-here"]]"
}
}
- Replace the placeholder: Change your-token-here with your actual token that you saved earlier (it starts with glsa_...).
- Add this below your existing MCP configs
Hint: Don't forget to add a comma!
When adding the Grafana config to your mcp.json, make sure there's a comma (,) after the closing brace of your postgres MCP server. JSON requires commas between objects.
đĄ What does this Grafana configuration mean?
- command: "docker" - The MCP runs Grafana's tools inside a Docker container
- GRAFANA_URL - Where to find your Grafana instance (host.docker.internal:3000)
- GRAFANA_SERVICE_ACCOUNT_TOKEN - The authentication token you just created
- --transport stdio - How Cursor and the MCP communicate (through standard input/output)
This setup lets Cursor control Grafana by sending commands through the MCP server.
Your file should now include Docker, Postgres, and Grafana.
Nice! You've just configured the complete MCP setup: Docker creates containers, Postgres stores data, and Grafana visualizes it - all controlled through Cursor chat.
Save and Restart Cursor
Now that you've added Grafana to your mcp.json, let's restart Cursor so it picks up the new configuration.
- Save the file with Cmd + S (Mac) or Ctrl + S (Windows).
- Quit Cursor completely (not just minimize!)
How do I quit Cursor?
- Mac: Cursor â Quit Cursor or Cmd+Q
- Windows: File â Exit or Alt+F4
- Reopen Cursor.
- Click the Settings icon.
- Select MCP.
Verify All MCPs Are Connected
What do you see?
â All servers green
You should now see docker, postgres, and grafana all with green indicators!
Perfect! You've just connected three powerful tools together:
- Docker - Manages your containers (Grafana + PostgreSQL)
- PostgreSQL - Stores your data
- Grafana - Visualizes your data
Cursor can now orchestrate all three through natural language. This is the foundation for building professional data dashboards!
Note
âšī¸ Seeing a "tools limit" warning?
You might see a message about "exceeding tools limit" when the Grafana MCP connects. This is expected and won't affect your work! The Grafana MCP server provides extensive API coverage (creating dashboards, panels, data sources, etc.), which can trigger this informational message. Just ignore it and continue - everything will work perfectly.
đââī¸ What about the DBT MCP?
If you see a dbt server too (from Part 2 of this series), that's fine! Keep it there - we'll use it in the Secret Mission to compare raw vs transformed data. It won't interfere with this project.
đ´ Grafana shows red
No worries - this is usually a quick fix! If Grafana shows a red indicator:
- Check that you saved the mcp.json file correctly.
- Verify the JSON syntax is valid (no missing commas or brackets).
- Make sure the Grafana container is running: docker ps.
- Verify the service account token is correct.
- Try restarting Cursor again.
Still red? Get help debugging or ask the NextWork community - we've all been here!
đ´ Other servers red
That's okay - these are from the PostgreSQL MCP project! If docker or postgres show red indicators:
- Review the PostgreSQL MCP project setup.
- Ensure Docker Desktop is running.
- Verify PostgreSQL container is running: docker ps.
- Check your mcp.json configuration.
Need help? Get debugging tips or reach out to the NextWork community - these issues are common and fixable!
Create a PostgreSQL Data Source
Great work! Cursor is now connected to Grafana.
But here's the thing: Grafana is just a visualization tool. It can create beautiful charts and dashboards, but it needs to know where to get the data from. Right now, Grafana is running but has no data to display.
You need to connect Grafana to your PostgreSQL database. That connection is called a "data source."
Let's connect Grafana to your PostgreSQL database!
In this step, you're going to:
- Create a PostgreSQL data source in Grafana
- Test the connection to ensure it works
Quick check: Is PostgreSQL running?
Before connecting Grafana to PostgreSQL, verify your database container is running:
docker ps | grep postgres
You should see nextwork_postgres with status "Up". If not, start it:
docker start nextwork_postgres
If you see "Error: No such container", you'll need to go back and complete the PostgreSQL setup from Project 1.
Navigate to Data Sources
First, let's get to the data sources configuration page.
- Open the Grafana data sources page in your browser (http://localhost:3000/connections/datasources)
- Click Add new data source
- Select PostgreSQL
What is a data source?
A data source tells Grafana where to fetch data from. Grafana supports many data sources: PostgreSQL, MySQL, Prometheus, InfluxDB, and dozens more.
Each data source needs connection information (host, port, credentials) so Grafana can query the database and pull data for your dashboards.
Configure the Data Source
Now comes the connection setup. You're about to tell Grafana exactly how to reach your PostgreSQL database - the host address, which database to use, and the credentials to authenticate.
Think of this as programming a speed dial: once configured, Grafana will know exactly where to go whenever it needs data.
- Fill in the connection details as shown below:
- Name: grafana-postgresql-datasource (this might be already filled in)
- Host: host.docker.internal:5432
- Database: demo
- Username: app
- Password: app
- TLS/SSL Mode: disable
Why host.docker.internal?
Grafana is running inside a Docker container, and PostgreSQL is running in another container. host.docker.internal is a special DNS name that Docker provides - it lets containers connect to services running on your host machine or in other containers.
đĄ Extra for experts: Why not localhost?
Containers can't use localhost to talk to each other. From Grafana's perspective, localhost means "inside MY container," not "on the host machine." If you use localhost:5432, Grafana will try to connect to PostgreSQL inside its own container (which doesn't exist) and fail with "connection refused."
Test and Save
- Scroll to the bottom of the page.
- Click Save & test.
â Connection successful
Perfect! The connection is live.
Grafana can now reach into your database, pull metrics with SQL queries, and transform them into visual dashboards.
Let's move on to building dashboards!
â Connection failed
That's all good! Let's troubleshoot this connection together.
If you see a red error message instead of the green success, here's how to fix it:
- Verify PostgreSQL is running: docker ps should show pg-local with status "Up"
- Check that the host is host.docker.internal:5432 (not localhost)
- Verify username and password are both app
- Make sure database name is demo
- Ensure TLS/SSL Mode is set to disable
Still having issues? Get connection help or reach out to the NextWork community!
Build Your First Dashboard
You've connected Grafana to PostgreSQL - now you need to tell Grafana what to visualize. Your database has revenue, orders, customers - but which metrics matter? How should they be displayed?
Dashboards are where this happens. Instead of querying numbers, you'll build visual interfaces that show trends, comparisons, and key metrics at a glance - and they update automatically.
Now to bring it all together! Let's create a complete e-commerce analytics dashboard. We'll build a professional layout with KPIs at the top and detailed breakdowns below.
What's a dashboard?
A dashboard is a collection of panels that visualize your data in one place. Think of the dashboard as a blank canvas, and panels as individual charts or metrics you add to it.
Each panel has its own query, visualization type (stat panels, bar charts, time series), and formatting. Dashboards let you arrange these panels however you want - putting KPIs at the top, detailed breakdowns below, and trends at the bottom.
Dashboards update automatically so teams can monitor performance without running SQL queries manually.
In this step, you're going to:
- Create a dashboard with 6 panels
- Show key metrics with stat panels, orders by status with bar charts, and revenue trends with time series
Create Your Complete Dashboard
Let's build the entire dashboard with a single, well-structured prompt.
- Open Cursor's chat (Ctrl+L or Cmd+L).
- Send this prompt:
Using the Grafana MCP, create a dashboard called "E-Commerce Analytics" with:
Top row (4 stat panels):
- Total Revenue: SELECT SUM(total_amount) as value FROM app.orders (Currency USD)
- Total Orders: SELECT COUNT(*) as value FROM app.orders (Number)
- Avg Order Value: SELECT AVG(total_amount) as value FROM app.orders (Currency USD)
- Total Customers: SELECT COUNT(*) as value FROM app.customers (Number)
Bottom row (2 bar charts):
- Orders by Status: SELECT status, COUNT(*) as value FROM app.orders GROUP BY status ORDER BY value DESC (Horizontal bar chart)
- Revenue by Region: SELECT region, SUM(total_amount) as value FROM app.orders GROUP BY region ORDER BY value DESC (Horizontal bar chart, Currency USD)
Dashboard settings:
- Refresh: 30 seconds
- Description: "E-commerce performance dashboard showing key metrics and breakdowns by status and region."
- Allow tool calls when prompted.
What does that prompt actually do?
- Query format: Each query uses as value - this tells Grafana which column contains the data to visualize. For time series charts, you'll use as time for dates and as value for metrics.
- Panel formatting: The "(Currency USD)" and "(Number)" annotations tell the MCP how to format values. Currency USD adds $1,234.56, while Number shows 1,234. Grafana supports dozens of formats - percentages, bytes, milliseconds, etc.
- Auto-refresh: The 30-second refresh tells Grafana to automatically re-run all queries and update the dashboard every half minute, letting teams monitor metrics in real-time without manual refreshes.
Watch as Cursor orchestrates the Grafana MCP - creating panels, writing SQL queries, configuring visualizations, all through natural language!
Cursor will use the Grafana MCP to create the entire dashboard with all 6 panels.
View Your Dashboard
- In your browser, navigate to http://localhost:3000/dashboards
You should see your new E-Commerce Analytics dashboard.
- Click on E-Commerce Analytics to view.
â Dashboard displays correctly
Perfect! Your dashboard is live and showing real data from PostgreSQL.
What should I see?
Top row: 4 stat panels showing total revenue, order count, average order value, and total customers.
Bottom row: 2 bar charts breaking down orders by status and revenue by region.
Try hovering over the charts to see exact values. The dashboard auto-refreshes every 30 seconds with live data.
â I see an error
No worries, that's all good! Let's troubleshoot this together.
Here's how to fix it:
- Verify the data source is configured: Settings â Connections â Data sources â Check grafana-postgresql-datasource exists
- Check the PostgreSQL container is running: docker ps should show pg-local with status "Up"
- Try refreshing the dashboard: Click the refresh icon in the top right
- Check for SQL errors: Click on any panel and select Edit to see if there are query errors
Still stuck? Get help or ask the community!
Add Revenue Trend Over Time
Now let's add a time series chart to see how revenue has changed month over month.
- In Cursor chat, send this prompt:
Add a new panel to the existing "E-Commerce Analytics" dashboard (do NOT create a new dashboard).
Panel title: "Monthly Revenue Trend"
Panel type: Time series (line chart)
SQL query with time_series format:
SELECT
DATE_TRUNC('month', order_date)::timestamp as time,
SUM(total_amount) as value
FROM app.orders
GROUP BY DATE_TRUNC('month', order_date)
ORDER BY time
Formatting: Currency USD
Layout: Place it full-width below the existing bar charts
What does this query do?
This query calculates total revenue for each month. It groups all orders by month, sums up their amounts, and returns time-based data that Grafana can plot as a line chart showing revenue trends over time.
đĄ What does DATE_TRUNC do?
DATE_TRUNC('month', order_date) rounds each order date down to the first day of its month. This groups all orders from January into "2024-01-01", all February orders into "2024-02-01", etc. It's how we aggregate daily data into monthly trends.
The ::timestamp converts it to the format Grafana expects for time series charts.
- Refresh your browser to see the new panel.
- Click the Zoom to data button on the time series panel to properly fit the data.
Why zoom to data?
By default, Grafana might show a time range that's too wide (or too narrow) for your actual data. "Zoom to data" automatically adjusts the x-axis to perfectly fit your dataset's date range, making the trend easier to see.
You should now see a line chart showing how monthly revenue has grown over time. This is perfect for spotting trends, seasonal patterns, and growth trajectories.
What Does This Show You?
Look at the trend line - is revenue going up, down, or staying flat? Do you see spikes in certain months? These patterns tell a story about your business that raw numbers can't convey.
In production, teams use time series to spot problems early ("Why did revenue drop in March?") or celebrate wins ("Holiday sales hit a record!"). This is data-driven decision making in action.
You've built a complete monitoring dashboard with stat panels for KPIs, bar charts for breakdowns, and time series for trends. This is how data teams at companies like Airbnb and Netflix monitor their platforms in real-time.
Secret mission
Ready for the Secret Mission? You'll visualize your DBT transformation pipeline from Project 3!
Visualize Your DBT Pipeline
Clean Up Your Resources
Clean Up Your Resources
Nice work completing this project! Let's clean up the resources we created.
Resources to delete:
- Stop the Grafana container
- Decide what to do with PostgreSQL (keep, stop, or remove)
Stop Grafana
First, stop the Grafana container:
docker stop grafana
What About PostgreSQL?
You have options for the PostgreSQL container:
Keep PostgreSQL running
If you plan to continue with more MCP data engineering projects, leave the PostgreSQL container running.
The database and data will stay available for future projects!
Stop PostgreSQL
If you're done for now but might come back:
docker stop pg-local
This pauses the container without deleting data. You can restart it later with docker start pg-local.
Remove PostgreSQL completely
If you want to completely remove the containers and their data:
docker stop grafana pg-local
docker rm grafana pg-local
â ī¸ Warning: This deletes all data in the containers. You'll need to recreate them and reload data if you want to use them again.
What's the difference between stop and remove?
docker stop pauses the container - it keeps your data and you can restart it later with docker start. docker rm permanently deletes the container and all its data. Only use rm if you're completely done with the project.
That's a wrap!
That's a wrap!
You did it! đ You've built Grafana dashboards that visualize your database data.
What you learned:
- đ How to create and configure Grafana dashboards
- đ Connecting Grafana to PostgreSQL data sources
- đ Building visualizations with stat panels, bar charts, and time series
- đ¨ Best practices for data visualization
- đŦ Using MCP to manage Grafana through natural language
Ready to quiz yourself? đĒ
p.s. Does it say "Still tasks to complete!" at the bottom of the screen?
This means you still have screenshots left to upload, or questions left to answer!
- Press Ctrl+F (Windows) or Cmd+F (Mac) on your keyboard
- Search for the text Return to later
- Jump straight to your incomplete tasks!
đŖ If you're EVER stuck - ask the NextWork community. Students like you are already asking questions about this project.