Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minuteThe shortest path to a useful local Loki installation is a Docker Compose stack containing Loki, Grafana Alloy, and Grafana. Alloy collects container logs and forwards them to Loki; Grafana lets you inspect and query the resulting streams. Treat this setup as an evaluation environment, not a production design. The sequence is: start the documented example, confirm each service is ready, check that logs arrive, then learn LogQL from label selectors to filters, parsing, and metric queries.
What you are building
Loki stores compressed log data and indexes stream metadata rather than the full text of every line. A local tutorial therefore needs three cooperating services:
- Loki: receives and stores log streams.
- Grafana Alloy: tails the example containers’ logs and forwards them to Loki.
- Grafana: provides Explore and Logs Drilldown for searching and visualizing the data.
Grafana publishes two local learning paths. The Quickstart to run Loki locally uses an evaluate-loki Compose example with sample log generation, Alloy, Loki, Grafana, and supporting services. The newer Loki Tutorial uses a single-binary (monolithic) Loki stack and a repository branch named getting-started. Both are documented procedures; choose one rather than combining files from both.
Prerequisites and the right tutorial path
Operating system
The newer tutorial assumes Linux or macOS. On Windows, use Windows Subsystem for Linux and run the Linux commands there. The quickstart is documented for Linux. Install Docker Engine or Docker Desktop with the Compose subcommand available as docker compose.
Free tools Windows power users keep installed
One-click scans. No signup required.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Learning versus production
Docker and Compose are the documented choices for evaluation, testing, and development. Grafana recommends Helm or Tanka when you need a production deployment. The quickstart’s Simple Scalable Deployment mode is deprecated and scheduled for removal in Loki 4.0; verify the current deployment documentation before relying on that mode for anything durable.
Start the documented Compose example
For a first run, follow the newer tutorial’s repository-based procedure. Clone the getting-started branch of Grafana’s loki-fundamentals repository using the clone command shown on the current tutorial page, then enter the directory that contains its Compose file. Because repository locations and branch contents can change, copy the command and directory name from that page rather than substituting an unpinned example.
- Open a terminal in the tutorial directory.
- Start the stack in the background:
docker compose up -d - List service state and published ports:
docker compose ps - Read startup output if a service is not healthy:
docker compose logs --tail=200 loki
and repeat foralloyorgrafanawhen needed.
The quickstart follows the same Compose lifecycle but uses its own evaluate-loki files and sample generator. Do not copy a selector such as evaluate-loki-flog-1 into the other tutorial and expect it to exist.
Verify the services before querying
Verification prevents confusing an empty result with a broken query. The tutorial’s checks are:
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
- Alloy: open the Alloy user interface and confirm its configuration is loaded and its log pipeline is running.
- Grafana: open the local Grafana URL printed by the Compose configuration, sign in with the credentials supplied by that example, and confirm that a Loki data source is configured.
- Loki: inspect its metrics endpoint or the service logs to confirm it is accepting requests.
- Incoming logs: in Grafana, open Explore (or the example’s Logs Drilldown view), select Loki, and run a broad query. You should see lines from the containers that Alloy tails.
Port numbers, initial credentials, and container names belong to the particular example files. Read those files or the current tutorial page instead of assuming a universal default.
Your first LogQL queries
Grafana’s rule is simple: Loki queries always start with a label selector.
A selector chooses streams by labels; filters and parsers then examine the lines inside those streams.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
1. Select one stream
{container="evaluate-loki-flog-1"}
This example selects a container label used by the evaluation stack. If your result is empty, inspect the label browser in Explore and substitute a label value that actually exists in your deployment.
2. Filter text in matching lines
{container="evaluate-loki-flog-1"} |= "status"
The |= operator keeps lines containing the literal text. Other line-filter operators can exclude text or use a regular expression; start with a literal filter while learning.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstall3. Parse JSON and filter a field
{container="evaluate-loki-flog-1"} | json | status=`404`
| json extracts fields from JSON log lines. The final expression keeps entries whose parsed status field is 404. Parsing happens after stream selection, so it does not replace the selector.
4. Turn logs into a metric
Use a metric query only after selectors and parsing make sense. Grafana’s progression demonstrates counting lines over time and aggregating by container:
sum by (container) (rate({container=~".+"}[1m]))
The exact aggregation expression in your example may differ; the important model is that a range such as [1m] feeds rate, and an aggregation groups the resulting series. Keep high-cardinality values out of labels unless you have a specific operational reason.
Labels: the design decision that shapes every query
A Loki stream is identified by its label set. Labels describe log origin and make selection efficient; Grafana’s overview gives region, cluster, and environment as examples. You may also see labels for containers, jobs, namespaces, or hosts supplied by the collector configuration.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
- Use stable attributes that meaningfully partition streams.
- Discover the labels your Alloy pipeline actually emits before writing dashboards.
- Put rapidly changing request IDs or user IDs in the log body, not automatically into labels; excessive distinct values create many streams and complicate operations.
There is no single mandatory schema in the introductory material. Begin with the labels already present in the example, then change Alloy’s configuration deliberately and update queries with it.
Troubleshooting an empty or failing setup
No containers are running
Run docker compose ps. If a service exited, inspect docker compose logs SERVICE. Typical causes are a port already in use, insufficient Docker resources, or a configuration file copied from a different tutorial. Stop unrelated containers or change the conflicting port in the example’s Compose file, then recreate the stack with docker compose up -d.
Grafana opens but shows no Loki data source
Use the data-source configuration shipped with the selected tutorial. If provisioning did not load, inspect Grafana logs and the mounted provisioning path; do not mix the quickstart’s files with the monolithic tutorial’s files.
Alloy is healthy but streams are empty
Confirm that the sample containers are producing output and that Alloy’s UI shows an active tailing pipeline. Check the Loki endpoint configured in Alloy and inspect Alloy logs for connection or permission errors. Then refresh Explore and widen the time range.
A copied selector returns no lines
Container names differ between examples and may gain a Compose project prefix. In Explore, open the label values, choose an existing container value, and rerun the query. Also check the selected time range; a quiet generator can legitimately produce no entries.
JSON parsing produces errors or no matches
Use | json only on lines that are JSON. First run the stream selector without parsing, inspect a raw line, and then filter the field name and type exactly as emitted. A numeric field and a quoted string are not interchangeable.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
The browser cannot reach a service
Check the published ports in docker compose ps, local firewall rules, and whether the service binds only to the loopback interface. Accessing a container name from the host is not the same as accessing it from another container; use the network and endpoint values supplied by the Compose configuration.
Security and production boundaries
Grafana states that Loki does not include an authentication layer. Never expose a local Loki HTTP endpoint directly to an untrusted network. Put an authenticating reverse proxy in front of Loki services, restrict network access, and configure TLS and authorization at that boundary.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →For production, plan storage, retention, scaling, upgrades, backups, and access control using the current Helm or Tanka guidance. The Compose tutorial does not establish suitable durability, capacity, or availability settings. If you prefer not to install, maintain, and scale Loki yourself, Grafana’s Docker installation documentation identifies Grafana Cloud as a managed alternative; verify its current features, retention, pricing, and regional availability before choosing it.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Capture a Grafana view without maintaining browser automation
If you need an image or PDF of a Grafana page for a ticket, report, or documentation, you can automate a browser yourself, but cookie dialogs, chat widgets, authentication flows, and timing make that brittle.
Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server. It accepts a URL and returns PNG, JPEG, WebP, or PDF; its cleanup step accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets, with each step configurable. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing result. Its MCP tools—take_screenshot, get_page_info, and capture_pdf—work with Claude, Cursor, and other MCP clients.
See the ScreenshotNeo API documentation for authentication and options. A direct request looks like this:
Recommended Free Tools
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://grafana.example.com/d/your-dashboard -o dashboard.webp
Python:
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://grafana.example.com/d/your-dashboard"}, timeout=90)
open("dashboard.webp", "wb").write(r.content)
Node.js:
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://grafana.example.com/d/your-dashboard' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
ScreenshotNeo includes full-page and element captures, device presets, custom viewport and retina scale, PDF paper and page-range controls, CSS and JavaScript injection, waits for selectors or network idle, request blocking, headers and cookies, timezone and geolocation, resizing, chosen cache TTLs, signed image links, asynchronous webhooks, bulk capture of up to 100 URLs per call, usage data, and an OpenAPI specification. Every feature is on every plan: 1,000 shots per month free with no card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
FAQ
Can I run Loki without Grafana Alloy?
Loki can receive logs from other agents, but the documented beginner stack includes Alloy so the Compose example has a collector and forwarding pipeline. Removing it means designing and configuring another client yourself.
Why does a LogQL query begin with braces?
Braces contain the stream selector, for example {environment="dev"}. LogQL requires that initial label selection before line filters, parsers, or metric functions.
Is the local Compose stack suitable for a public service?
No. It is an evaluation and development path. Public access requires authentication in front of Loki and a production deployment model with explicit storage, scaling, and operational controls.
Frequently Asked Questions
Can I run Loki without Grafana Alloy?
Loki can receive logs from other agents, but the documented beginner stack includes Alloy so the Compose example has a collector and forwarding pipeline. Removing it means designing and configuring another client yourself.
Why does a LogQL query begin with braces?
Braces contain the stream selector, for example {environment="dev"}. LogQL requires that initial label selection before line filters, parsers, or metric functions.
Is the local Compose stack suitable for a public service?
No. It is an evaluation and development path. Public access requires authentication in front of Loki and a production deployment model with explicit storage, scaling, and operational controls.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →

