### Docker Compose Installation for Dashdot Source: https://context7.com/mauricenino/dashdot/llms.txt Demonstrates how to deploy Dashdot using Docker Compose for easier configuration management. It includes a basic setup and a more comprehensive configuration with NVIDIA GPU support and various environment variables for customization. Requires Docker Compose. ```yaml # docker-compose.yml - Basic setup version: '3.5' services: dash: image: mauricenino/dashdot:latest restart: unless-stopped privileged: true ports: - '80:3001' volumes: - /:/mnt/host:ro --- # docker-compose.yml - Full configuration with GPU support version: '3.5' services: dash: image: mauricenino/dashdot:nvidia restart: unless-stopped privileged: true deploy: resources: reservations: devices: - capabilities: - gpu ports: - '80:3001' volumes: - /:/mnt/host:ro environment: DASHDOT_WIDGET_LIST: 'os,cpu,storage,ram,network,gpu' DASHDOT_ENABLE_CPU_TEMPS: 'true' DASHDOT_ALWAYS_SHOW_PERCENTAGES: 'true' DASHDOT_PAGE_TITLE: 'My Server' DASHDOT_SHOW_HOST: 'true' DASHDOT_CUSTOM_HOST: 'myserver.example.com' ``` -------------------------------- ### Docker Installation for Dashdot Source: https://context7.com/mauricenino/dashdot/llms.txt Provides commands to deploy Dashdot using Docker. It covers basic installation, installation with custom environment variables for configuration, and installation with NVIDIA GPU support. Dependencies include Docker. Inputs are environment variables and ports. Outputs are a running Dashdot container. ```bash # Basic installation docker container run -it \ -p 80:3001 \ -v /:/mnt/host:ro \ --privileged \ mauricenino/dashdot # With configuration options docker container run -it \ -p 80:3001 \ -v /:/mnt/host:ro \ --privileged \ --env DASHDOT_ENABLE_CPU_TEMPS="true" \ --env DASHDOT_WIDGET_LIST="os,cpu,storage,ram,network" \ --env DASHDOT_ALWAYS_SHOW_PERCENTAGES="true" \ mauricenino/dashdot # With NVIDIA GPU support docker container run -it \ -p 80:3001 \ -v /:/mnt/host:ro \ --privileged \ --gpus all \ --env DASHDOT_WIDGET_LIST="os,cpu,storage,ram,network,gpu" \ mauricenino/dashdot:nvidia ``` -------------------------------- ### Start Dash. Application Source: https://github.com/mauricenino/dashdot/blob/main/apps/docs/content/docs/installation/from-source.mdx Commands to start the Dash. dashboard application after it has been built. For Linux, it requires sudo privileges. For Windows, it's recommended to run as Administrator. ```bash sudo -E yarn start ``` ```bash yarn start ``` -------------------------------- ### GET /load/* Source: https://github.com/mauricenino/dashdot/blob/main/apps/docs/content/docs/integration/api.mdx Retrieves the current load of various system components. ```APIDOC ## GET /load/* ### Description Has multiple sub-routes, each returning the current load of the given type. ### Method GET ### Endpoint /load/{type} ### Parameters #### Path Parameters - **type** (string) - Required - The type of load to retrieve (e.g., `cpu`, `storage`, `ram`, `network`, `gpu`). ### Request Example `https:///load/cpu` ### Response #### Success Response (200) - **load** (number) - The current load value for the specified type. #### Response Example ```json { "load": 0.75 } ``` ``` -------------------------------- ### Install Dashdot via Helm Source: https://github.com/mauricenino/dashdot/blob/main/apps/docs/content/docs/installation/helm.mdx Commands to install the Dashdot application into a Kubernetes cluster using Helm. Supports both OCI registry and traditional repository methods. ```bash helm install dashdot oci://ghcr.io/oben01/charts/dashdot ``` ```bash helm repo add oben01 https://oben01.github.io/charts/ helm repo update helm install dashdot oben01/dashdot ``` -------------------------------- ### GET /load/gpu - GPU Load Metrics Source: https://context7.com/mauricenino/dashdot/llms.txt Retrieves current GPU utilization and memory usage for each installed GPU. ```APIDOC ## GET /load/gpu - GPU Load Metrics ### Description Returns current GPU utilization and memory usage for each installed GPU. ### Method GET ### Endpoint /load/gpu ### Parameters None ### Request Example ```bash curl -X GET "http://localhost:3001/load/gpu" ``` ### Response #### Success Response (200) - **object** - Contains the GPU load and memory usage. - **layout** (array of objects) - An array where each object represents a GPU. - **load** (float) - The GPU utilization percentage. - **memory** (float) - The GPU memory usage percentage. #### Response Example ```json { "layout": [ { "load": 45.2, "memory": 62.8 }, { "load": 12.5, "memory": 25.3 } ] } ``` ``` -------------------------------- ### GET /config Source: https://context7.com/mauricenino/dashdot/llms.txt Returns the current configuration of the dash. instance including enabled widgets, label lists, style settings, and version information. ```APIDOC ## GET /config ### Description Returns the current configuration of the dash. instance. This is useful for understanding how the dashboard is configured, including enabled widgets and style settings. ### Method GET ### Endpoint /config ### Parameters None ### Request Example curl -X GET "http://localhost:3001/config" ### Response #### Success Response (200) - **widgets** (array) - List of enabled widgets - **settings** (object) - Current dashboard style and behavior settings - **version** (string) - Current dash. version #### Response Example { "widgets": ["os", "cpu", "storage", "ram", "network"], "settings": { "show_percentages": true, "page_title": "My Server" }, "version": "6.3.4" } ``` -------------------------------- ### Deploy Dashdot with Docker Compose Source: https://context7.com/mauricenino/dashdot/llms.txt A full configuration example for deploying Dashdot using docker-compose.yml, including volume mounts for host system access and extensive environment variable settings for customization. ```yaml version: '3.5' services: dash: image: mauricenino/dashdot:latest restart: unless-stopped privileged: true ports: - '80:3001' volumes: - /:/mnt/host:ro - ./speedtest.json:/app/speedtest.json:ro environment: DASHDOT_PORT: '3001' DASHDOT_PAGE_TITLE: 'My Server Dashboard' DASHDOT_WIDGET_LIST: 'os,cpu,storage,ram,network' ``` -------------------------------- ### GET /config Source: https://github.com/mauricenino/dashdot/blob/main/apps/docs/content/docs/integration/api.mdx Retrieves configuration details of the running dash. instance, including enabled widgets. ```APIDOC ## GET /config ### Description Gives information about the configurations of the running instance. Mostly needed to read the enabled widgets at `config.widget_list`. ### Method GET ### Endpoint /config ### Parameters None ### Request Example None ### Response #### Success Response (200) - **config** (object) - Contains configuration details. - **widget_list** (array) - List of enabled widgets. #### Response Example ```json { "config": { "widget_list": [ "cpu", "memory", "network" ] } } ``` ``` -------------------------------- ### Get GPU Load Metrics - Bash Source: https://context7.com/mauricenino/dashdot/llms.txt Fetches current GPU utilization and memory usage for each installed GPU. The response is structured to provide load and memory details per GPU. `curl` is used to fetch the data, and `jq` can be used to extract specific GPU information. ```bash # Fetch current GPU load curl -X GET "http://localhost:3001/load/gpu" # Expected response { "layout": [ { "load": 45.2, "memory": 62.8 }, { "load": 12.5, "memory": 25.3 } ] } # Example: Get primary GPU stats curl -s "http://localhost:3001/load/gpu" | jq '.layout[0]' ``` -------------------------------- ### Clone and Build Dash. Project Source: https://github.com/mauricenino/dashdot/blob/main/apps/docs/content/docs/installation/from-source.mdx This snippet clones the Dash. repository, installs dependencies using yarn, and builds the production version of the project. It is provided for both Linux and Windows command-line environments. ```bash git clone https://github.com/MauriceNino/dashdot \ && cd dashdot \ && yarn \ && yarn build:prod ``` ```bash git clone https://github.com/MauriceNino/dashdot ^ && cd dashdot ^ && yarn ^ && yarn build:prod ``` -------------------------------- ### Configure Storage Device Layout Source: https://github.com/mauricenino/dashdot/blob/main/apps/docs/content/docs/configuration/storage.mdx Example structure for defining storage device properties such as device name, brand, size, and type within the Dashdot configuration. ```javascript storage: { layout: [ { device: 'nvme0n1', brand: 'Samsung', size: 500107862016, type: 'NVMe', raidGroup: '', }, { device: 'sda', brand: 'DELL', size: 4000225165312, type: 'HD', raidGroup: '', }, ]; } ``` -------------------------------- ### GET /info Source: https://github.com/mauricenino/dashdot/blob/main/apps/docs/content/docs/integration/api.mdx Retrieves static information about the running dash. instance, including network speed test results. ```APIDOC ## GET /info ### Description Gives information about the static data of the running instance. Mostly needed to read the speed-test result at `network.speedDown` and `network.speedUp`. ### Method GET ### Endpoint /info ### Parameters None ### Request Example None ### Response #### Success Response (200) - **network** (object) - Contains network speed information. - **speedDown** (number) - Download speed. - **speedUp** (number) - Upload speed. #### Response Example ```json { "network": { "speedDown": 1000, "speedUp": 500 } } ``` ``` -------------------------------- ### GET /info Source: https://context7.com/mauricenino/dashdot/llms.txt Retrieves static hardware and system information about the server, including OS details, CPU specifications, RAM configuration, storage layout, network interface data, and GPU information. ```APIDOC ## GET /info ### Description Retrieves static hardware and system information about the server. This endpoint is useful for obtaining system specifications that do not change frequently. ### Method GET ### Endpoint /info ### Parameters None ### Request Example curl -X GET "http://localhost:3001/info" ### Response #### Success Response (200) - **os** (object) - Operating system details - **cpu** (object) - CPU specifications - **ram** (object) - RAM configuration - **storage** (array) - Storage layout information - **network** (object) - Network interface data - **gpu** (object) - GPU information #### Response Example { "os": { "platform": "linux", "distro": "Ubuntu", "release": "22.04", "kernel": "5.15.0-generic", "arch": "x64", "uptime": 1234567, "dash_version": "6.3.4", "dash_buildhash": "abc123" }, "cpu": { "brand": "AMD", "model": "Ryzen 9 5900X", "cores": 12, "threads": 24, "frequency": 3.7 } } ``` -------------------------------- ### Get RAM Load Metrics - Bash Source: https://context7.com/mauricenino/dashdot/llms.txt Retrieves the current RAM usage as a percentage of total available memory. Requires `curl` to fetch data and `jq` for parsing the JSON response. An example demonstrates monitoring RAM usage over time. ```bash # Fetch current RAM load curl -X GET "http://localhost:3001/load/ram" # Expected response { "load": 67.5 } # Example: Monitor RAM usage with timestamp while true; do echo "$(date '+%H:%M:%S') - RAM: $(curl -s http://localhost:3001/load/ram | jq '.load')%" sleep 5 done ``` -------------------------------- ### Basic Dashdot Docker-Compose Setup Source: https://github.com/mauricenino/dashdot/blob/main/apps/docs/content/docs/installation/docker-compose.mdx This Docker-Compose configuration sets up the basic Dashdot service using the 'latest' image tag. It maps port 80 to the container's port 3001 and mounts the host's root directory read-only. The container is set to restart automatically unless stopped. ```yaml version: '3.5' services: dash: image: mauricenino/dashdot:latest restart: unless-stopped privileged: true ports: - '80:3001' volumes: - /:/mnt/host:ro ``` -------------------------------- ### Get CPU Load Metrics - Bash Source: https://context7.com/mauricenino/dashdot/llms.txt Fetches the current CPU load for each core, including load percentage and temperature readings. The response is an array with one entry per CPU core. Dependencies include `curl` and `jq` for processing the output. ```bash # Fetch current CPU load curl -X GET "http://localhost:3001/load/cpu" # Expected response - array of core loads [ { "core": 0, "load": 15.2, "temp": 45 }, { "core": 1, "load": 22.8, "temp": 47 }, { "core": 2, "load": 8.5, "temp": 44 }, { "core": 3, "load": 31.2, "temp": 48 }, { "core": 4, "load": 12.1, "temp": 46 }, { "core": 5, "load": 5.3, "temp": 43 }, { "core": 6, "load": 18.7, "temp": 45 }, { "core": 7, "load": 25.4, "temp": 49 } ] # Example: Calculate average CPU load curl -s "http://localhost:3001/load/cpu" | jq '[.[].load] | add / length' # Output: 17.4 ``` -------------------------------- ### GET /info - Fetch Static Server Information Source: https://context7.com/mauricenino/dashdot/llms.txt Retrieves static hardware and system information from the Dashdot server. This endpoint is useful for obtaining system specifications that do not change frequently. It requires a running Dashdot instance and uses a simple curl command for interaction. The output is a JSON object containing OS, CPU, RAM, storage, network, and GPU details. ```bash # Fetch static server information curl -X GET "http://localhost:3001/info" # Expected response { "os": { "platform": "linux", "distro": "Ubuntu", "release": "22.04", "kernel": "5.15.0-generic", "arch": "x64", "uptime": 1234567, "dash_version": "6.3.4", "dash_buildhash": "abc123" }, "cpu": { "brand": "AMD", "model": "Ryzen 9 5900X", "cores": 12, "ecores": 0, "pcores": 12, "threads": 24, "frequency": 3.7 }, "ram": { "size": 34359738368, "layout": [ { "brand": "Corsair", "type": "DDR4", "frequency": 3200 }, { "brand": "Corsair", "type": "DDR4", "frequency": 3200 } ] }, "storage": [ { "size": 500107862016, "disks": [ { "device": "nvme0n1", "brand": "Samsung", "type": "NVMe" } ] } ], "network": { "interfaceSpeed": 1000, "speedDown": 150000000, "speedUp": 50000000, "lastSpeedTest": 1699999999999, "type": "Wired", "publicIp": "123.123.123.123" }, "gpu": { "layout": [ { "brand": "NVIDIA", "model": "RTX 3080", "memory": 10737418240 } ] } } ``` -------------------------------- ### GET /load/cpu - CPU Load Metrics Source: https://context7.com/mauricenino/dashdot/llms.txt Retrieves the current CPU load for each core, including load percentage and temperature readings. The response is an array with one entry per CPU core. ```APIDOC ## GET /load/cpu - CPU Load Metrics ### Description Returns the current CPU load for each core including load percentage and temperature readings. The response is an array with one entry per CPU core. ### Method GET ### Endpoint /load/cpu ### Parameters None ### Request Example ```bash curl -X GET "http://localhost:3001/load/cpu" ``` ### Response #### Success Response (200) - **Array of objects** - Each object represents a CPU core with its load and temperature. - **core** (integer) - The CPU core number. - **load** (float) - The current CPU load percentage for the core. - **temp** (integer) - The current temperature of the CPU core. #### Response Example ```json [ { "core": 0, "load": 15.2, "temp": 45 }, { "core": 1, "load": 22.8, "temp": 47 }, { "core": 2, "load": 8.5, "temp": 44 }, { "core": 3, "load": 31.2, "temp": 48 }, { "core": 4, "load": 12.1, "temp": 46 }, { "core": 5, "load": 5.3, "temp": 43 }, { "core": 6, "load": 18.7, "temp": 45 }, { "core": 7, "load": 25.4, "temp": 49 } ] ``` ``` -------------------------------- ### GET /load/ram - RAM Load Metrics Source: https://context7.com/mauricenino/dashdot/llms.txt Retrieves the current RAM usage as a percentage of total available memory. ```APIDOC ## GET /load/ram - RAM Load Metrics ### Description Returns the current RAM usage as a percentage of total available memory. ### Method GET ### Endpoint /load/ram ### Parameters None ### Request Example ```bash curl -X GET "http://localhost:3001/load/ram" ``` ### Response #### Success Response (200) - **object** - Contains the current RAM load percentage. - **load** (float) - The current RAM usage percentage. #### Response Example ```json { "load": 67.5 } ``` ``` -------------------------------- ### GET /load/storage - Storage Load Metrics Source: https://context7.com/mauricenino/dashdot/llms.txt Retrieves the current storage usage for each mounted drive as an array of usage percentages. ```APIDOC ## GET /load/storage - Storage Load Metrics ### Description Returns the current storage usage for each mounted drive as an array of usage percentages. ### Method GET ### Endpoint /load/storage ### Parameters None ### Request Example ```bash curl -X GET "http://localhost:3001/load/storage" ``` ### Response #### Success Response (200) - **Array of floats** - Each float represents the usage percentage of a mounted drive. #### Response Example ```json [45.2, 78.9, 23.1] ``` ``` -------------------------------- ### GET / (Iframe Integration) Source: https://github.com/mauricenino/dashdot/blob/main/apps/docs/content/docs/integration/widgets.mdx Embed a Dashdot graph into your website using an iframe with various configuration parameters. ```APIDOC ## GET / ### Description Embeds a specific system monitoring graph into a webpage. The graph is rendered based on the provided query parameters. ### Method GET ### Endpoint https:/// ### Parameters #### Query Parameters - **graph** (string) - Required - The graph to display (cpu, storage, ram, network, gpu). - **multiView** (boolean) - Optional - Enables multi-device views for cpu and storage. - **filter** (string) - Optional - Filters specific views (e.g., 'up'/'down' for network, 'load'/'memory' for gpu). - **showPercentage** (boolean) - Optional - Displays the current percentage label. - **theme** (string) - Optional - Overrides theme (dark, light). - **color** (string) - Optional - Hex color string without #. - **surface** (string) - Optional - Background hex color string without #. - **innerRadius** (string) - Optional - CSS border-radius for graphs. - **gap** (string) - Optional - CSS gap between multiple graphs. - **textSize** (string) - Optional - CSS font-size for text elements. - **textOffset** (string) - Optional - CSS margin for text elements. ### Request Example ### Response #### Success Response (200) - **Content-Type** (text/html) - Returns the rendered graph widget within an HTML document. ``` -------------------------------- ### Get Storage Load Metrics - Bash Source: https://context7.com/mauricenino/dashdot/llms.txt Returns the current storage usage for each mounted drive as an array of usage percentages. Uses `curl` to fetch the data and `jq` to filter or process the results, such as alerting on high usage. ```bash # Fetch current storage load curl -X GET "http://localhost:3001/load/storage" # Expected response - array of storage loads (percentage used) [45.2, 78.9, 23.1] # Example: Alert if any storage exceeds 90% curl -s "http://localhost:3001/load/storage" | jq '.[] | select(. > 90)' ``` -------------------------------- ### Dashdot Docker-Compose Setup with GPU Support Source: https://github.com/mauricenino/dashdot/blob/main/apps/docs/content/docs/installation/docker-compose.mdx This Docker-Compose configuration enables GPU support for Dashdot. It uses the 'mauricenino/dashdot:nvidia' image tag and configures device reservations for GPUs. It also specifies the 'gpu' widget in the 'DASHDOT_WIDGET_LIST' environment variable. ```yaml version: '3.5' services: dash: image: mauricenino/dashdot:nvidia restart: unless-stopped privileged: true deploy: resources: reservations: devices: - capabilities: - gpu ports: - '80:3001' volumes: - /:/mnt/host:ro environment: DASHDOT_WIDGET_LIST: 'os,cpu,storage,ram,network,gpu' ``` -------------------------------- ### GET /load/network - Network Load Metrics Source: https://context7.com/mauricenino/dashdot/llms.txt Retrieves current network throughput for upload and download in bytes per second. ```APIDOC ## GET /load/network - Network Load Metrics ### Description Returns current network throughput for upload and download in bytes per second. ### Method GET ### Endpoint /load/network ### Parameters None ### Request Example ```bash curl -X GET "http://localhost:3001/load/network" ``` ### Response #### Success Response (200) - **object** - Contains the current network throughput for upload and download. - **up** (integer) - Upload speed in bytes per second. - **down** (integer) - Download speed in bytes per second. #### Response Example ```json { "up": 1523456, "down": 8234567 } ``` ``` -------------------------------- ### Get Network Load Metrics - Bash Source: https://context7.com/mauricenino/dashdot/llms.txt Retrieves current network throughput for upload and download in bytes per second. This endpoint requires `curl` for data retrieval and `jq` for transforming the output, for instance, converting bytes per second to Mbps. ```bash # Fetch current network load curl -X GET "http://localhost:3001/load/network" # Expected response { "up": 1523456, "down": 8234567 } # Example: Convert to Mbps and display curl -s "http://localhost:3001/load/network" | jq '{ upload_mbps: (.up * 8 / 1000000 | . * 100 | floor / 100), download_mbps: (.down * 8 / 1000000 | . * 100 | floor / 100) }' # Output: { "upload_mbps": 12.18, "download_mbps": 65.87 } ``` -------------------------------- ### GET /config - Fetch Dashboard Configuration Source: https://context7.com/mauricenino/dashdot/llms.txt Retrieves the current configuration settings of the Dashdot instance. This endpoint is useful for understanding how the dashboard is set up, including enabled widgets, styling options, and version details. It is accessed via a simple curl command. ```bash # Fetch current configuration curl -X GET "http://localhost:3001/config" ``` -------------------------------- ### Run Dashdot with Custom Speed Test via CLI Source: https://context7.com/mauricenino/dashdot/llms.txt Demonstrates how to launch the Dashdot container using the docker run command while mounting a custom speed test JSON file and configuring the application to read from it. ```bash docker container run -it \ -p 80:3001 \ -v /:/mnt/host:ro \ -v /path/to/speedtest.json:/mnt/host/speedtest.json:ro \ --privileged \ --env DASHDOT_SPEED_TEST_FROM_PATH="/mnt/host/speedtest.json" \ mauricenino/dashdot ``` -------------------------------- ### Enable Ookla Speedtest (Dashdot) Source: https://github.com/mauricenino/dashdot/blob/main/apps/docs/content/docs/configuration/network.mdx Switch to the more accurate Ookla speedtest tool instead of the legacy speedtest-cli. Accepting this option implies agreement with Ookla's EULA, Terms, and Privacy Policy. ```bash export DASHDOT_ACCEPT_OOKLA_EULA=true ``` -------------------------------- ### Configure Dash. Port via Environment Variable Source: https://github.com/mauricenino/dashdot/blob/main/apps/docs/content/docs/installation/from-source.mdx Demonstrates how to set the port for the Dash. application using environment variables. This allows customization of the network port the dashboard listens on. Provided for both Linux and Windows. ```bash export DASHDOT_PORT="8080" \ && sudo -E yarn start ``` ```bash set DASHDOT_PORT=8080 ^ && yarn start ``` -------------------------------- ### Configure Dashdot with Override Values Source: https://github.com/mauricenino/dashdot/blob/main/apps/docs/content/docs/installation/helm.mdx Demonstrates how to deploy Dashdot with custom configuration values using a YAML file. This is useful for enabling ingress controllers and setting specific hostnames. ```bash helm upgrade --install dashdot oci://ghcr.io/oben01/charts/dashdot --namespace dashdot --create-namespace -f override.yaml ``` ```yaml ingress: enabled: true className: 'traefik' annotations: hosts: - host: dashdot.homelab.dev paths: - path: / pathType: ImplementationSpecific tls: - hosts: - 'dashdot.homelab.dev' - 'www.dashdot.homelab.dev' secretName: homelab-dev-tls ``` -------------------------------- ### Configure Dashdot Docker Container with Environment Variables Source: https://github.com/mauricenino/dashdot/blob/main/apps/docs/content/docs/installation/docker.mdx This command demonstrates how to run the Dashdot Docker container with specific configuration options passed via environment variables. The DASHDOT_ENABLE_CPU_TEMPS variable is set to 'true' to enable CPU temperature monitoring. ```bash docker container run -it \ --env DASHDOT_ENABLE_CPU_TEMPS="true" \ # ... ``` -------------------------------- ### Update Dash. Project from Source Source: https://github.com/mauricenino/dashdot/blob/main/apps/docs/content/docs/installation/from-source.mdx Commands to update an existing Dash. instance to the latest version from the source repository. This involves pulling the latest changes, reinstalling dependencies, and rebuilding the project. ```bash git pull --rebase \ && yarn \ && yarn build:prod ``` ```bash git pull --rebase ^ && yarn ^ && yarn build:prod ``` -------------------------------- ### Accept Speedtest License Source: https://github.com/mauricenino/dashdot/blob/main/apps/docs/content/docs/installation/from-source.mdx This command is used to accept the license for the speedtest CLI tool, which is a prerequisite for certain functionalities within Dash. If you encounter speedtest-related errors, running this command might resolve the issue. ```bash speedtest --accept-license ``` -------------------------------- ### Display Network Speed in Bytes (Dashdot) Source: https://github.com/mauricenino/dashdot/blob/main/apps/docs/content/docs/configuration/network.mdx Configure the network widget to show upload and download speeds in bytes (e.g., MB/s) instead of bits (e.g., Mb/s). ```bash export DASHDOT_NETWORK_SPEED_AS_BYTES=true ``` -------------------------------- ### Use Local Speedtest Results File (Dashdot) Source: https://github.com/mauricenino/dashdot/blob/main/apps/docs/content/docs/configuration/network.mdx Provide a file path for Dashdot to read speed test results. This is an alternative to running live speed tests and can be used to disable speed tests by providing maximum values. The file must be in JSON format with 'unit', 'speedDown', 'speedUp', and 'publicIp' keys. For Docker, prepend the path with '/mnt/host'. ```json { "unit": "bit", "speedDown": 150000000, "speedUp": 50000000, "publicIp": "123.123.123.123" } ``` ```bash export DASHDOT_SPEED_TEST_FROM_PATH="/path/to/your/speedtest_results.json" ``` -------------------------------- ### Run Dashdot Docker Container with GPU Support Source: https://github.com/mauricenino/dashdot/blob/main/apps/docs/content/docs/installation/docker.mdx This command runs a Dashdot Docker container with GPU support enabled. It uses the 'nvidia' tag for the image, maps the necessary ports and volumes, and configures environment variables to include GPU information in the widget list. ```bash docker container run -it \ -p 80:3001 \ -v /:/mnt/host:ro \ --privileged \ --gpus all \ --env DASHDOT_WIDGET_LIST="os,cpu,storage,ram,network,gpu" \ mauricenino/dashdot:nvidia ``` -------------------------------- ### Connect to Dashdot Real-Time Events via Socket.IO Source: https://context7.com/mauricenino/dashdot/llms.txt Connect to the Dashdot server using Socket.IO to receive real-time system metrics. The client can subscribe to various events like CPU load, RAM usage, storage status, network traffic, and GPU information. Server information is provided upon connection. ```javascript // Browser or Node.js client import { io } from "socket.io-client"; const socket = io("http://localhost:3001", { path: "/socket" }); // Receive static server information on connect socket.on("static-info", (info) => { console.log("Server Info:", { os: `${info.os.distro} ${info.os.release}`, cpu: `${info.cpu.brand} ${info.cpu.model}`, ram: `${(info.ram.size / 1024 / 1024 / 1024).toFixed(0)} GB`, uptime: `${Math.floor(info.os.uptime / 3600)} hours` }); }); // Real-time CPU load updates (default: every 1000ms) socket.on("cpu-load", (cpuData) => { const avgLoad = cpuData.reduce((sum, core) => sum + core.load, 0) / cpuData.length; const maxTemp = Math.max(...cpuData.map(core => core.temp)); console.log(`CPU: ${avgLoad.toFixed(1)}% avg load, ${maxTemp}°C max temp`); }); // Real-time RAM load updates (default: every 1000ms) socket.on("ram-load", (ramLoad) => { console.log(`RAM: ${ramLoad.toFixed(1)}% used`); }); // Real-time storage load updates (default: every 60000ms) socket.on("storage-load", (storageData) => { storageData.forEach((usage, index) => { console.log(`Storage ${index}: ${usage.toFixed(1)}% used`); }); }); // Real-time network load updates (default: every 1000ms) socket.on("network-load", (networkData) => { console.log(`Network: ↑${(networkData.up / 1024).toFixed(1)} KB/s, ↓${(networkData.down / 1024).toFixed(1)} KB/s`); }); // Real-time GPU load updates (default: every 1000ms) socket.on("gpu-load", (gpuData) => { gpuData.layout.forEach((gpu, index) => { console.log(`GPU ${index}: ${gpu.load.toFixed(1)}% load, ${gpu.memory.toFixed(1)}% VRAM`); }); }); // Handle disconnection socket.on("disconnect", () => { console.log("Disconnected from dash. server"); }); ``` -------------------------------- ### Server Widget Configuration Source: https://github.com/mauricenino/dashdot/blob/main/apps/docs/content/docs/configuration/server.mdx Configuration options for controlling the data displayed within the Dashdot server widget. ```APIDOC ## Server Configuration Options ### DASHDOT_OS_LABEL_LIST - **Type**: string (comma separated list) - **Default**: os,arch,up_since - **Description**: Selects which data is shown in the server widget. Available options: os, arch, up_since, dash_version. ### DASHDOT_SHOW_HOST - **Type**: boolean - **Default**: false - **Description**: Toggles the display of the host part in the server widget. ### DASHDOT_CUSTOM_HOST - **Type**: string - **Default**: unset - **Description**: Sets a custom host string to display. Requires DASHDOT_SHOW_HOST to be true. ``` -------------------------------- ### Configure Dashdot Environment Variables Source: https://github.com/mauricenino/dashdot/blob/main/apps/docs/content/docs/installation/docker-compose.mdx This snippet demonstrates how to configure Dashdot using environment variables within the Docker-Compose file. The 'DASHDOT_ENABLE_CPU_TEMPS' variable is set to 'true' to enable CPU temperature monitoring. ```yaml services: dash: environment: DASHDOT_ENABLE_CPU_TEMPS: 'true' # ... ``` -------------------------------- ### Run Dashdot Docker Container Source: https://github.com/mauricenino/dashdot/blob/main/apps/docs/content/docs/installation/docker.mdx This command runs the default Dashdot Docker container, mapping port 80 to the container's port 3001 and mounting the host's root directory as read-only. It also grants privileged access to the container. ```bash docker container run -it \ -p 80:3001 \ -v /:/mnt/host:ro \ --privileged \ mauricenino/dashdot ``` -------------------------------- ### Routing Path Configuration Source: https://github.com/mauricenino/dashdot/blob/main/apps/docs/content/docs/configuration/basic.mdx Specify the base path for serving Dashdot, useful when running behind a reverse proxy. ```APIDOC ## `DASHDOT_ROUTING_PATH` ### Description The path where dash. is being served. This is useful if you want to run dash. behind a reverse proxy on a sub-path (e.g `https://example.com/dashdot` would need a value of `/dashdot`). ### Type `string` ### Default `/` ``` -------------------------------- ### GPU Widget Configuration Source: https://github.com/mauricenino/dashdot/blob/main/apps/docs/content/docs/configuration/gpu.mdx Configuration options for the GPU widget, including data selection, filtering, and styling. ```APIDOC ## GPU Widget Configuration ### Description This section details the configuration options available for the GPU widget in Dashdot. These options allow you to customize the data displayed, filter GPU information, adjust widget styling, and manually override automatically gathered data. ### Environment Variables #### `DASHDOT_GPU_LABEL_LIST` - **Description**: Selects which data is shown in the gpu widget. The available options are: `brand`, `model`, `memory`. - **Type**: `string (comma separated list)` - **Default**: `brand, model, memory` #### `DASHDOT_GPU_BRAND_FILTER` - **Description**: A comma-separated list of brands to show in the gpu widget. This is case sensitive. To find out the exact brand name, run the widget without filtering and look at the "Brand" label. - **Type**: `string (comma separated list)` - **Default**: `unset` #### `DASHDOT_GPU_MODEL_FILTER` - **Description**: A comma-separated list of models to show in the gpu widget. This is case sensitive. To find out the exact model name, run the widget without filtering and look at the "Model" label. - **Type**: `string (comma separated list)` - **Default**: `unset` ### Styles #### `DASHDOT_GPU_WIDGET_GROW` - **Description**: Adjusts the relative size of the GPU widget. - **Type**: `number` - **Default**: `6` #### `DASHDOT_GPU_WIDGET_MIN_WIDTH` - **Description**: Adjusts the minimum width of the GPU widget in pixels. - **Type**: `number` - **Default**: `700` #### `DASHDOT_GPU_SHOWN_DATAPOINTS` - **Description**: Sets the amount of datapoints shown in the GPU graph. - **Type**: `number` - **Default**: `20` #### `DASHDOT_GPU_POLL_INTERVAL` - **Description**: Sets the interval in milliseconds for reading the GPU load. - **Type**: `number` - **Default**: `1000` ### Overrides #### `DASHDOT_OVERRIDE_GPU_BRANDS` - **Description**: Manually set the brands of your GPUs. Pass a comma-separated list. You can skip correct GPUs by passing empty values (e.g., `Intel,,Nvidia` would result in `Intel` for GPU 1 and `Nvidia` for GPU 3). - **Type**: `string` - **Default**: `unset` #### `DASHDOT_OVERRIDE_GPU_MODELS` - **Description**: Manually set the models of your GPUs. Pass a comma-separated list. You can skip correct GPUs by passing empty values (e.g., `CometLake-H GT2,,GeForce GTX 1650 Ti` would result in `CometLake-H GT2` for GPU 1 and `GeForce GTX 1650 Ti` for GPU 3). - **Type**: `string` - **Default**: `unset` #### `DASHDOT_OVERRIDE_GPU_MEMORIES` - **Description**: Manually set the memory sizes of your GPUs. Pass a comma-separated list. You can skip correct GPUs by passing empty values (e.g., `4096,,256` would result in `4 GiB` for GPU 1 and `256 MiB` for GPU 3). - **Type**: `string` - **Default**: `unset` ### Usage Notes - To use the GPU widget, ensure it is included in the [`DASHDOT_WIDGET_LIST`](./basic#dashdot_widget_list). - If running the Docker image, use the `nvidia` tag for GPU support (see [Installation with Docker](../installation/docker#gpu-support)). ``` -------------------------------- ### Always Show Percentages Source: https://github.com/mauricenino/dashdot/blob/main/apps/docs/content/docs/configuration/basic.mdx Configure whether to always display graph percentages in the top-left corner, or only on smaller devices. ```APIDOC ## `DASHDOT_ALWAYS_SHOW_PERCENTAGES` ### Description To always show the current percentage of each graph in the top-left corner. Without enabling this, they will only be shown on lower resolution devices (mobile phones). ### Type `boolean` ### Default `false` ``` -------------------------------- ### Style and Override Configuration Source: https://github.com/mauricenino/dashdot/blob/main/apps/docs/content/docs/configuration/server.mdx Configuration options for adjusting the visual dimensions and data overrides of the Dashdot interface. ```APIDOC ## Style and Override Options ### DASHDOT_OS_WIDGET_GROW - **Type**: number - **Default**: 2.5 - **Description**: Adjusts the relative size of the OS widget. ### DASHDOT_OS_WIDGET_MIN_WIDTH - **Type**: number - **Default**: 300 - **Description**: Adjusts the minimum width of the OS widget in pixels. ### DASHDOT_OVERRIDE_OS - **Type**: string - **Default**: unset - **Description**: Manually override the detected OS string. ### DASHDOT_OVERRIDE_ARCH - **Type**: string - **Default**: unset - **Description**: Manually override the detected architecture string. ``` -------------------------------- ### Manually Override Network Data (Dashdot) Source: https://github.com/mauricenino/dashdot/blob/main/apps/docs/content/docs/configuration/network.mdx Manually set static values for network type, speed up, speed down, interface speed, and public IP. This is useful when automatic data gathering is not possible or desired. Speeds should be provided in bits, except for interface speed which uses Megabits. ```bash export DASHDOT_OVERRIDE_NETWORK_TYPE="ethernet" export DASHDOT_OVERRIDE_NETWORK_SPEED_UP=100000000 export DASHDOT_OVERRIDE_NETWORK_SPEED_DOWN=200000000 export DASHDOT_OVERRIDE_NETWORK_INTERFACE_SPEED=1000 export DASHDOT_OVERRIDE_NETWORK_PUBLIC_IP="192.168.1.1" ``` -------------------------------- ### Specify Network Interface (Dashdot) Source: https://github.com/mauricenino/dashdot/blob/main/apps/docs/content/docs/configuration/network.mdx Manually set the network interface name if Dashdot incorrectly detects the default gateway. This is useful for systems with complex network configurations. ```bash export DASHDOT_USE_NETWORK_INTERFACE="eth0" ``` -------------------------------- ### Embed Dashdot CPU Graph with iframe Source: https://github.com/mauricenino/dashdot/blob/main/apps/docs/content/docs/integration/widgets.mdx This HTML snippet demonstrates how to embed a CPU graph from a Dashdot instance into a webpage using an iframe. It includes basic styling and allows for configuration via query parameters like 'graph' and 'multiView'. ```html ``` -------------------------------- ### Widget Selection Source: https://github.com/mauricenino/dashdot/blob/main/apps/docs/content/docs/configuration/basic.mdx Configure which widgets are displayed on the dashboard. Supports a comma-separated list of available widget types. ```APIDOC ## `DASHDOT_WIDGET_LIST` ### Description Selects which widgets to show on the dashboard. ### Type `string (comma separated list)` ### Default `os,cpu,storage,ram,network` ### Available Options `os`, `cpu`, `storage`, `ram`, `network`, `gpu` ``` -------------------------------- ### Use Imperial Units Source: https://github.com/mauricenino/dashdot/blob/main/apps/docs/content/docs/configuration/basic.mdx Switch unit display to the imperial system (e.g., Fahrenheit) instead of the default metric system. ```APIDOC ## `DASHDOT_USE_IMPERIAL` ### Description Shows any units in the imperial system, instead of the default metric. ### Type `boolean` ### Default `false` ``` -------------------------------- ### Configure Speedtest Interval (Dashdot) Source: https://github.com/mauricenino/dashdot/blob/main/apps/docs/content/docs/configuration/network.mdx Set the interval in minutes for rerunning network speed tests. A cron string can also be provided for more precise scheduling, which will override the minute-based interval. ```bash export DASHDOT_SPEED_TEST_INTERVAL=60 export DASHDOT_SPEED_TEST_INTERVAL_CRON="0 */6 * * *" ``` -------------------------------- ### Socket.IO Real-Time Events Source: https://context7.com/mauricenino/dashdot/llms.txt Connect to the dash. server via Socket.IO to receive real-time system metrics updates. The server pushes updates at configurable intervals for each metric type. ```APIDOC ## Socket.IO Real-Time Events Connect to the dash. server via Socket.IO to receive real-time system metrics updates. The server pushes updates at configurable intervals for each metric type. ### Connection ```javascript import { io } from "socket.io-client"; const socket = io("http://localhost:3001", { path: "/socket" }); ``` ### Events - **static-info**: - Description: Receives static server information upon connection. - Payload Example: ```json { "os": { "distro": "string", "release": "string" }, "cpu": { "brand": "string", "model": "string" }, "ram": { "size": "number" }, "uptime": "number" } ``` - **cpu-load**: - Description: Real-time CPU load updates. - Payload Example: ```json [ { "load": "number", "temp": "number" } ] ``` - **ram-load**: - Description: Real-time RAM load updates. - Payload Example: ```json "number" // Percentage of RAM used ``` - **storage-load**: - Description: Real-time storage load updates. - Payload Example: ```json [ "number" // Percentage of storage used for each drive ] ``` - **network-load**: - Description: Real-time network load updates. - Payload Example: ```json { "up": "number", // Upload speed in bytes/sec "down": "number" // Download speed in bytes/sec } ``` - **gpu-load**: - Description: Real-time GPU load updates. - Payload Example: ```json { "layout": [ { "load": "number", "memory": { "used": "number", "total": "number" } } ] } ``` ### Disconnection - **disconnect**: - Description: Handles disconnection from the dash. server. ``` -------------------------------- ### Configure Network Data Display (Dashdot) Source: https://github.com/mauricenino/dashdot/blob/main/apps/docs/content/docs/configuration/network.mdx Control which network metrics are visible in the network widget. Options include type, speed up, speed down, interface speed, and public IP. The default setting displays type, speed up, and speed down. ```bash export DASHDOT_NETWORK_LABEL_LIST="type,speed_up,speed_down,interface_speed,public_ip" ``` -------------------------------- ### Page Title Configuration Source: https://github.com/mauricenino/dashdot/blob/main/apps/docs/content/docs/configuration/basic.mdx Customize the string displayed in the browser tab's title. ```APIDOC ## `DASHDOT_PAGE_TITLE` ### Description If you want to show a custom string in the browser page title. ### Type `string` ### Default `dash.` ``` -------------------------------- ### Integrate React-Specific ESLint Plugins Source: https://github.com/mauricenino/dashdot/blob/main/apps/view/README.md This snippet shows how to integrate eslint-plugin-react-x and eslint-plugin-react-dom into the ESLint configuration. These plugins provide specialized linting rules for React and React DOM components. ```javascript import reactX from 'eslint-plugin-react-x' import reactDom from 'eslint-plugin-react-dom' export default defineConfig([ globalIgnores(['dist']), { files: ['**/*.{ts,tsx}'], extends: [ reactX.configs['recommended-typescript'], reactDom.configs.recommended ], languageOptions: { parserOptions: { project: ['./tsconfig.node.json', './tsconfig.app.json'], tsconfigRootDir: import.meta.dirname } } } ]) ``` -------------------------------- ### Adjust Network Widget Size and Appearance (Dashdot) Source: https://github.com/mauricenino/dashdot/blob/main/apps/docs/content/docs/configuration/network.mdx Control the relative size, minimum width, and number of data points displayed in the network widget. These settings allow for visual customization of the network monitoring interface. ```bash export DASHDOT_NETWORK_WIDGET_GROW=8 export DASHDOT_NETWORK_WIDGET_MIN_WIDTH=700 export DASHDOT_NETWORK_SHOWN_DATAPOINTS=30 ```