How to create a monitoring map of hosts in Grafana?

How can I create a dynamic map in Grafana (preferably using Zabbix as data source) that shows hosts distributed across a region, with lines connecting them based on physical network routes — where each line changes color based on status (e.g. online, offline, redundant, near capacity, etc.)? Is there a plugin or panel that supports this kind of visualization with dynamic line states?

1 Like

You can consider this approach for creating a monitoring map of hosts. I hope it proves helpful to you.

                                 OR

Ensure the following are set up:

Grafana (version 8+ recommended)
Zabbix as a data source in Grafana (via the Zabbix plugin)
Zabbix items created for:
Host status (e.g., availability or ping)
Network metrics (e.g., bandwidth, latency, packet loss)
Host Inventory data with coordinates (Latitude & Longitude)


Step 1: Install Required Plugin (if using Flowcharting)

To gain advanced control over diagram interactions and status visualization:

grafana-cli plugins install agenty-flowcharting-panel
sudo systemctl restart grafana-server

Step 2: Prepare Host & Metric Data in Zabbix

  1. Host Inventory:
    Assign Latitude and Longitude to each host.
    Go to: Zabbix → Host → Inventory
  2. Zabbix Items:
    Create items for:
    Host availability (e.g., icmpping)
    Interface metrics (e.g., net.if.in[eth0], net.if.out[eth0])

Step 3: Create Network Link Data

Option A: Use GeoJSON (for Geomap Panel)

Create a links.geojson file:

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "LineString",
        "coordinates": [
          [2.35, 48.85],     // Host A (Paris)
          [12.49, 41.89]     // Host B (Rome)
        ]
      },
      "properties": {
        "name": "Link A-B",
        "status": "online"   // Used for coloring
      }
    }
  ]
}

You can script GeoJSON generation if the network topology changes frequently.

Step 4: Visualize in Grafana

A: Geomap Panel (Recommended for maps)

Create a new panel >Select >Geomap
Layers>Add Layer>GeoJSON
Source: Load your links.geojson via URL or paste directly
Style Settings:
Bind color to properties.status
Define colors:
online → Green offline → Red near_capacity → Yellow redundant → Blue
Add another Point Layer for host markers (from Zabbix or a static file)

B: Flowcharting Panel (For network diagrams)

new panel>Flowcharting
Upload or design a custom network diagram (e.g., SVG background)
Bind to a Zabbix host item
Bind to an interface metric

Configure color thresholds for each metric:
Green = Online / Normal
Yellow = High usage
Red = Offline / Critical

Step 5: Configure Queries in Grafana
add a Zabbix data source query
Select:
Type: Item or Trigger
Host: Select from dropdown or use a variable
Key: Use appropriate item keys like icmpping, net.if.*
Use query results to bind values to nodes or links

Step 6: Set Status Thresholds

Use panel settings in Grafana to define thresholds for color changes:

Host online-Green
Host offline-Red
Bandwidth > 80%|Yellow
Redundant connectionBlue


Step 7: Automate and Update

If your network environment is dynamic:

Automate GeoJSON or diagram generation using scripts
Use Grafana’s HTTP data source or an external API to feed updates
In Zabbix:
Use calculated items to simplify complex status logic
Use Grafana Variables to:
Filter by region, device type, or status
Enable dynamic user interaction
Use Transformations to join host and link data

there’s a dedicated Mapgl plugin for network diagrams with a more straightforward required dataframe for nodes and edges than native Geomap plugin.
sort of a zabbix tutorial Zabbix tutorial - Mapgl Grafana plugin

1 Like