### Install Mapgl Pro panel with grafana-cli Source: https://mapgl.org/sign Installs the Mapgl Pro panel plugin from a .zip file URL using the grafana-cli tool. The plugin is installed into the default plugins directory /var/lib/grafana/plugins. Requires Grafana to be run behind a reverse proxy for metric updates via Grafana Live websocket connection. ```bash grafana cli --pluginUrl <.zip file url> plugins install vaduga-mapglpro-panel ``` -------------------------------- ### Ordered multi-row route example dataframe Source: https://mapgl.org/reference Shows a dataframe with rows that form a supported ordered route because they are consecutive and connect at payment-service. Rows sharing an Edge ID must be adjacent and in datasource order; the start of each later row must match the final node of the preceding row. ```text Vertex A Vertex B Edge ID duration_ms status api-gateway payment-service trace-42 18 ok payment-service postgres-primary trace-42 41 warn ``` -------------------------------- ### Vertex B path examples Source: https://mapgl.org/reference Shows three Vertex B configurations: a direct target, a graph route through intermediate nodes, and a geo route with a longitude/latitude waypoint. Each line is a separate example of how to set Vertex B and optionally Edge ID. ```text # Direct target Vertex A=A, Vertex B=B # Graph route through intermediate nodes Vertex A=A, Vertex B=["A", "B", "C"], Edge ID=route-1 # Geo route through a longitude/latitude waypoint Vertex A=A, Vertex B=["A", [15, 55], "B"], Edge ID=geo-route-1 ``` -------------------------------- ### Zabbix MySQL query for problem severity Source: https://mapgl.org/zabbix Example query to fetch problem names and severity from the Zabbix problem table, limited to 50 rows. Used as a reference for generating your own queries. ```sql SELECT name, severity FROM zabbix.problem LIMIT 50 ``` -------------------------------- ### Trace route example: consecutive rows with shared Edge ID Source: https://mapgl.org/documentation Shows two consecutive rows that form one routed link. The second row starts where the first ends, and both share Edge ID trace-42. Fields like duration_ms remain available for the matching route portion in the edge tooltip. ```text Vertex A Vertex B Edge ID duration_ms api-gateway payment-service trace-42 18 payment-service postgres-primary trace-42 41 ``` -------------------------------- ### Link configuration examples: direct, routed, geo-routed Source: https://mapgl.org/documentation Shows three link configurations: a direct link, a routed graph link, and a geo-routed link through a waypoint. Use Vertex B as a path array for routed links; Edge ID is required for routed links. ```text # Direct link Vertex A=A, Vertex B=B # One routed graph link Vertex A=A, Vertex B=["A", "B", "C"], Edge ID=route-1 # One Geo link through a longitude/latitude waypoint Vertex A=A, Vertex B=["A", [15, 55], "B"], Edge ID=geo-route-1 ``` -------------------------------- ### Records for duplicate node example Source: https://mapgl.org/reference Two records with the same vertex A but different roles and labels. The first record's properties are used for the node, while the second can still create a link if it has a Vertex B. ```text 1. Vertex A=node-1, role=router, label=Core 2. Vertex A=node-1, role=switch, label=Changed ``` -------------------------------- ### Zabbix MySQL query for problem events with acknowledgements Source: https://mapgl.org/zabbix Query Zabbix MySQL database to get problem events with status, last update time, message, severity, and event name. Uses UNION to include hosts with ICMP ping status from history_uint. COALESCE sets severity to 0 for null values. Filters for problems with severity > 2 and active triggers. ```sql SELECT switchIp, status, clock as lastUpd, message, COALESCE(severity, 0) as severity, event FROM ( SELECT hosts.host as switchIp, CASE WHEN triggers.value = 1 THEN 0 ELSE 1 END AS status , events.clock as clock, a.message AS message, p.severity as severity, events.name as event FROM events JOIN triggers ON events.objectid = triggers.triggerid JOIN functions ON functions.triggerid = triggers.triggerid JOIN items ON items.itemid = functions.itemid JOIN hosts ON items.hostid = hosts.hostid JOIN problem p on events.eventid = p.eventid LEFT JOIN acknowledges a on events.eventid = a.eventid WHERE events.source = 0 AND p.severity > 2 AND triggers.value = 1 UNION SELECT hosts.host as switchIp, history_uint.value as status, history_uint.clock as clock, '' AS message, null AS severity, null AS event FROM hosts, items, history_uint WHERE hosts.hostid = items.hostid and items.itemid = history_uint.itemid and items.name = 'ICMP ping' and history_uint.clock between (unix_timestamp() - 90) and unix_timestamp() ) as combined_result ORDER BY clock DESC; ``` -------------------------------- ### Record for threshold-driven group match Source: https://mapgl.org/reference A single record used in the threshold-driven group match example. The record defines a vertex with severity and role fields that are used by the configuration to determine icon and color. ```text Vertex A=node-1, severity=2, role=router ``` -------------------------------- ### Zabbix MySQL query for host inventory with coordinates Source: https://mapgl.org/zabbix Query Zabbix MySQL/PostgreSQL database to fetch host group, visible name, location latitude/longitude, and location from host inventory. Useful when coordinates are stored in the host inventory. ```sql SELECT hstgrp.name AS "Host Group", h.name AS "Visible name", hi.location_lat, hi.location_lon, hi_inventory.location FROM zabbix.hstgrp hstgrp JOIN hosts_groups hg ON hstgrp.groupid = hg.groupid JOIN hosts h ON hg.hostid = h.hostid JOIN zabbix.host_inventory hi ON h.hostid = hi.hostid LEFT JOIN zabbix.host_inventory hi_inventory ON h.hostid = hi_inventory.hostid; ``` -------------------------------- ### MySQL query for city list for Grafana variable Source: https://mapgl.org/zabbix Query to populate a Grafana variable with city names and an 'All' option. Used to filter the switch coordinates query. ```sql SELECT name FROM TCC.cities UNION SELECT 'All' AS name; ``` -------------------------------- ### MySQL query for switch coordinates and location Source: https://mapgl.org/zabbix Query a separate MySQL database to fetch switch IP, vendor, topology level, city, street, house, parent switch IP, and coordinates (longitude/latitude). Uses a Grafana variable $city to filter by city, with an IF condition to return all when $city is 'All'. ```sql SELECT sw.addr switchIp, sw.vendor_id vendorId, sw.topology_level topologyLevel, c.name city, s.name street, h.name house, psw.addr parentSwitchIp, ST_X(h.coordinate) longitude, ST_Y(h.coordinate) latitude, FROM TCC.switch_a sw WHERE c.name = "$city" OR IF("$city"="All",1,0) = 1 ``` -------------------------------- ### Records for repeated link without Edge ID Source: https://mapgl.org/reference Two records with the same endpoints and no Edge ID. Only one logical link is created, and its properties come from the first record. ```text 1. Vertex A=A, Vertex B=B, bandwidth=10G 2. Vertex A=A, Vertex B=B, bandwidth=100G ``` -------------------------------- ### Records for repeated Edge ID Source: https://mapgl.org/reference Two records with the same endpoints and the same Edge ID. Only one logical link is created, and its properties come from the first record. ```text 1. Vertex A=A, Vertex B=B, Edge ID=xe-0/0/0, bandwidth=10G 2. Vertex A=A, Vertex B=B, Edge ID=xe-0/0/0, bandwidth=100G ``` -------------------------------- ### Records for repeated link with unique Edge ID Source: https://mapgl.org/reference Two records with the same endpoints but unique Edge IDs. Two parallel links are created, each keeping properties from its own record. ```text 1. Vertex A=A, Vertex B=B, Edge ID=xe-0/0/0, bandwidth=10G 2. Vertex A=A, Vertex B=B, Edge ID=xe-0/0/1, bandwidth=100G ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.