Grafana dashboard: IP2Location - ICMP Monitoring 
Description: a simple dashboard for using this tool to monitor your hosts. It might gives you a chance to get the idea behind IP2Location Tool. You might want to make more effective dashboard and share it with others.

# Step 1: Download binaries
Download IP2Location binary for your platform:

1. **Windows**:
      - [ip2location.exe (i386)](https://github.com/javadmohebbi/IP2Location/raw/master/dist/windows/386/ip2location.exe)
      - [ip2location.exe (amd64)](https://github.com/javadmohebbi/IP2Location/raw/master/dist/windows/amd64/ip2location.exe)
1. **Linux**:
      - [ip2location (i386)](https://github.com/javadmohebbi/IP2Location/raw/master/dist/linux/386/ip2location)
      - [ip2location (amd64)](https://github.com/javadmohebbi/IP2Location/raw/master/dist/linux/amd64/ip2location)
1. **Mac**:
      - [ip2location (i386)](https://github.com/javadmohebbi/IP2Location/raw/master/dist/darwin/386/ip2location)
      - [ip2location (amd64)](https://github.com/javadmohebbi/IP2Location/raw/master/dist/darwin/amd64/ip2location)


# Step 2: How to get metrics & use this dashboard? 

You can find a how to guide in [this article](http://mjmohebbi.com/how-to-monitor-ip-addresses-using-influxdb-telegraf-and-grafana/) to Monitor your hosts using InfluxDB, Telegraf & Granfana. 





{
  "__inputs": [
    {
      "name": "DS_INFLUXDB",
      "label": "InfluxDB",
      "description": "Metrics collected using Telegraf and inserted into InfluxDB",
      "type": "datasource",
      "pluginId": "influxdb",
      "pluginName": "InfluxDB"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "6.2.5"
    },
    {
      "type": "panel",
      "id": "grafana-worldmap-panel",
      "name": "Worldmap Panel",
      "version": "0.2.0"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "influxdb",
      "name": "InfluxDB",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "singlestat",
      "name": "Singlestat",
      "version": ""
    },
    {
      "type": "panel",
      "id": "table",
      "name": "Table",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "gnetId": 10964,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1570339148222,
  "links": [
    {
      "icon": "external link",
      "keepTime": false,
      "tags": [],
      "targetBlank": true,
      "title": "# Grafana",
      "type": "link",
      "url": "http://mjmohebbi.com/en/hashtag/grafana"
    }
  ],
  "panels": [
    {
      "circleMaxSize": "2",
      "circleMinSize": "2",
      "colors": [
        "#C4162A",
        "#C4162A",
        "#37872D"
      ],
      "decimals": 0,
      "esMetric": "Count",
      "gridPos": {
        "h": 10,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "hideEmpty": true,
      "hideZero": true,
      "id": 74,
      "initialZoom": 1,
      "interval": "",
      "links": [],
      "locationData": "table",
      "mapCenter": "(0°, 0°)",
      "mapCenterLatitude": 0,
      "mapCenterLongitude": 0,
      "maxDataPoints": 1,
      "mouseWheelZoom": false,
      "options": {},
      "showLegend": true,
      "stickyLabels": false,
      "tableQueryOptions": {
        "geohashField": "geohash",
        "labelField": "city",
        "latitudeField": "latitude",
        "longitudeField": "longitude",
        "metricField": "online",
        "queryType": "coordinates"
      },
      "targets": [
        {
          "alias": "",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "host"
              ],
              "type": "tag"
            },
            {
              "params": [
                "StateTag"
              ],
              "type": "tag"
            },
            {
              "params": [
                "none"
              ],
              "type": "fill"
            }
          ],
          "measurement": "ip2loc",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "latitude"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [
                  "latitude"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "longitude"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [
                  "longitude"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "online"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [
                  "online"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "country_long"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [
                  "country_long"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "city"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [
                  "city"
                ],
                "type": "alias"
              }
            ]
          ],
          "tags": [
            {
              "key": "host",
              "operator": "=~",
              "value": "/^$HostVar$/"
            },
            {
              "condition": "AND",
              "key": "onlineTag",
              "operator": "=~",
              "value": "/^$Online$/"
            }
          ]
        }
      ],
      "thresholds": "1,2",
      "timeFrom": null,
      "timeShift": null,
      "title": "Map View",
      "transparent": true,
      "type": "grafana-worldmap-panel",
      "unitPlural": "",
      "unitSingle": "",
      "valueName": "max"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 10
      },
      "id": 4,
      "panels": [],
      "title": "Overal Status",
      "type": "row"
    },
    {
      "columns": [],
      "fontSize": "90%",
      "gridPos": {
        "h": 10,
        "w": 24,
        "x": 0,
        "y": 11
      },
      "hideTimeOverride": false,
      "id": 2,
      "interval": "",
      "links": [],
      "options": {},
      "pageSize": null,
      "scroll": true,
      "showHeader": true,
      "sort": {
        "col": null,
        "desc": false
      },
      "styles": [
        {
          "alias": "Time",
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "pattern": "Time",
          "type": "hidden"
        },
        {
          "alias": "Host",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "decimals": 2,
          "link": false,
          "pattern": "Metric",
          "sanitize": false,
          "thresholds": [],
          "type": "string",
          "unit": "short"
        },
        {
          "alias": "Status",
          "colorMode": "row",
          "colors": [
            "#56A64B",
            "#C4162A",
            "#C4162A"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "Value",
          "thresholds": [
            "2",
            "3"
          ],
          "type": "string",
          "unit": "short",
          "valueMaps": [
            {
              "text": "N/A",
              "value": "null"
            },
            {
              "text": "Online",
              "value": "1"
            },
            {
              "text": "Unreachable",
              "value": "2"
            }
          ]
        }
      ],
      "targets": [
        {
          "alias": "$tag_host ($tag_countryShortTag - $tag_CityTag)",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "host"
              ],
              "type": "tag"
            },
            {
              "params": [
                "countryShortTag"
              ],
              "type": "tag"
            },
            {
              "params": [
                "CityTag"
              ],
              "type": "tag"
            },
            {
              "params": [
                "none"
              ],
              "type": "fill"
            }
          ],
          "limit": "1",
          "measurement": "ip2loc",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT last(\"online\") FROM \"ip2loc\" WHERE (\"host\" =~ /^$HostVar$/ AND \"online\" =~ /^$Online$/) AND $timeFilter GROUP BY time($__interval), \"host\", \"countryShortTag\", \"CityTag\" fill(none) LIMIT 1",
          "rawQuery": false,
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "online"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              }
            ]
          ],
          "tags": [
            {
              "key": "host",
              "operator": "=~",
              "value": "/^$HostVar$/"
            },
            {
              "condition": "AND",
              "key": "onlineTag",
              "operator": "=~",
              "value": "/^$Online$/"
            }
          ]
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Last Status",
      "transform": "timeseries_to_rows",
      "type": "table"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 21
      },
      "id": 6,
      "panels": [],
      "repeat": "HostVar",
      "title": "$HostVar",
      "type": "row"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "fill": 1,
      "gridPos": {
        "h": 6,
        "w": 10,
        "x": 0,
        "y": 22
      },
      "hideTimeOverride": true,
      "id": 16,
      "interval": "",
      "legend": {
        "alignAsTable": true,
        "avg": true,
        "current": true,
        "max": true,
        "min": true,
        "rightSide": true,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "options": {},
      "percentage": false,
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "$col",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "host"
              ],
              "type": "tag"
            },
            {
              "params": [
                "none"
              ],
              "type": "fill"
            }
          ],
          "measurement": "ip2loc",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "maxRtt"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [
                  "Max Rtt"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "minRtt"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [
                  "Min Rtt"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "avgRtt"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [
                  "Avf Rtt"
                ],
                "type": "alias"
              }
            ]
          ],
          "tags": [
            {
              "key": "host",
              "operator": "=~",
              "value": "/^$HostVar$/"
            }
          ]
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": "2m",
      "title": "RRT Status",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "ms",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "cacheTimeout": null,
      "colorBackground": true,
      "colorValue": false,
      "colors": [
        "#37872D",
        "#FA6400",
        "#C4162A"
      ],
      "decimals": null,
      "format": "percent",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 6,
        "w": 2,
        "x": 10,
        "y": 22
      },
      "hideTimeOverride": true,
      "id": 26,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "options": {},
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false
      },
      "tableColumn": "",
      "targets": [
        {
          "alias": "$col",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "previous"
              ],
              "type": "fill"
            }
          ],
          "measurement": "ip2loc",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "packetLost"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [
                  "Packet Lost"
                ],
                "type": "alias"
              }
            ]
          ],
          "tags": [
            {
              "key": "host",
              "operator": "=~",
              "value": "/^$HostVar$/"
            }
          ]
        }
      ],
      "thresholds": "10,30",
      "timeFrom": null,
      "timeShift": "2m",
      "title": "Lost Packet",
      "type": "singlestat",
      "valueFontSize": "70%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "aliasColors": {
        "Packet Received": "dark-red",
        "Packet Sent": "dark-yellow"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "fill": 0,
      "gridPos": {
        "h": 6,
        "w": 12,
        "x": 12,
        "y": 22
      },
      "hideTimeOverride": true,
      "id": 40,
      "interval": "",
      "legend": {
        "alignAsTable": true,
        "avg": true,
        "current": true,
        "max": true,
        "min": true,
        "rightSide": true,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "options": {},
      "percentage": false,
      "pointradius": 4,
      "points": true,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "$col",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "none"
              ],
              "type": "fill"
            }
          ],
          "measurement": "ip2loc",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "packetRecv"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [
                  "Packet Received"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "packetSent"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [
                  "Packet Sent"
                ],
                "type": "alias"
              }
            ]
          ],
          "tags": [
            {
              "key": "host",
              "operator": "=~",
              "value": "/^$HostVar$/"
            }
          ]
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": "2m",
      "title": "Packet Overview",
      "tooltip": {
        "shared": true,
        "sort": 1,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "decimals": 0,
          "format": "pps",
          "label": "",
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "none",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    }
  ],
  "refresh": "1m",
  "schemaVersion": 18,
  "style": "dark",
  "tags": [
    "ip2location",
    "monitor",
    "icmp",
    "ip monitor"
  ],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_INFLUXDB}",
        "definition": "SHOW TAG VALUES FROM ip2loc WITH KEY=host",
        "hide": 0,
        "includeAll": true,
        "label": "Hosts",
        "multi": true,
        "name": "HostVar",
        "options": [],
        "query": "SHOW TAG VALUES FROM ip2loc WITH KEY=host",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_INFLUXDB}",
        "definition": "SHOW TAG VALUES FROM ip2loc WITH KEY=onlineTag",
        "hide": 2,
        "includeAll": true,
        "label": "Is Online",
        "multi": false,
        "name": "Online",
        "options": [],
        "query": "SHOW TAG VALUES FROM ip2loc WITH KEY=onlineTag",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-15m",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ]
  },
  "timezone": "",
  "title": "IP2Location - ICMP Monitoring ",
  "uid": "KrUVRJ2Wk",
  "version": 47,
  "description": "a simple dashboard for using this tool to monitor your hosts. It might gives you a chance to get the idea behind IP2Location Tool. You might want to make more effective dashboard and share it with others."
}