You are here: Maschinenraum » jq Filter

jq Filter

jq

curl https://harvester.ffh.zone/nodes.json | jq '.'

Hostname + Domain

.nodes[] | { name: .nodeinfo.hostname, domain: .nodeinfo.system.site_code }

Supernode-Peers

.nodes[] | select( .nodeinfo.hostname == "freifunk-60e32736a538") | .statistics.mesh_vpn.groups.backbone.peers

Beispielbaum

{
  "firstseen": "2017-03-19T11:20:33+0100",
  "lastseen": "2018-09-06T00:25:38+0200",
  "flags": {
    "online": true,
    "gateway": false
  },
  "statistics": {
    "node_id": "18a6f7e58ad8",
    "clients": 1,
    "rootfs_usage": 0.4167,
    "loadavg": 0.28,
    "memory_usage": 0.6446641465542309,
    "uptime": 1832050.6,
    "idletime": 1376216.96,
    "gateway": "88:e6:40:20:a0:01",
    "gateway6": "88:e6:40:ba:a0:02",
    "processes": {
      "total": 48,
      "running": 2
    },
    "mesh_vpn": {
      "groups": {
        "backbone": {
          "peers": {
            "sn01": null,
            "sn02": null,
            "sn03": null,
            "sn04": null,
            "sn05": null,
            "sn06": null,
            "sn07": null,
            "sn08": null,
            "sn09": null,
            "sn10": {
              "established": 247235.59
            }
          },
          "groups": null
        }
      }
    },
    "traffic": {
      "tx": {
        "bytes": 2048492108,
        "packets": 13110502,
        "dropped": 27411
      },
      "rx": {
        "bytes": 36291731220,
        "packets": 222046893
      },
      "forward": {
        "bytes": 3552,
        "packets": 48
      },
      "mgmt_tx": {
        "bytes": 84532243024,
        "packets": 179772550
      },
      "mgmt_rx": {
        "bytes": 28974931934,
        "packets": 73603313
      }
    }
  },
  "nodeinfo": {
    "node_id": "18a6f7e58ad8",
    "network": {
      "mac": "18:a6:f7:e5:8a:d8",
      "addresses": [
        "2a02:790:ff:5:1aa6:f7ff:fee5:8ad8",
        "fe80::1aa6:f7ff:fee5:8ad8",
        "2a02:790:ff:10:1aa6:f7ff:fee5:8ad8",
        "fdca:ffee:8::1aa6:f7ff:fee5:8ad8",
        "2a02:790:ff:6:1aa6:f7ff:fee5:8ad8",
        "2a02:790:ff:9:1aa6:f7ff:fee5:8ad8",
        "2a02:790:ff:4:1aa6:f7ff:fee5:8ad8",
        "2a02:790:ff:2:1aa6:f7ff:fee5:8ad8"
      ],
      "mesh": {
        "bat0": {
          "interfaces": {
            "wireless": [
              "16:8a:15:00:79:09"
            ],
            "other": [
              "16:8a:15:00:79:0b"
            ],
            "tunnel": [
              "16:8a:15:00:79:0f"
            ]
          }
        }
      },
      "mesh_interfaces": null
    },
    "system": {
      "site_code": "ffh.legacy"
    },
    "hostname": "freifunk-empelde-sandweg",
    "location": {
      "longitude": 9.664145,
      "latitude": 52.344771
    },
    "software": {
      "autoupdater": {
        "enabled": true,
        "branch": "stable"
      },
      "batman-adv": {
        "version": "2018.1",
        "compat": 15
      },
      "babeld": {},
      "fastd": {
        "enabled": true,
        "version": "v18"
      },
      "firmware": {
        "base": "gluon-v2017.1-451-gd2091f58",
        "release": "vH8"
      },
      "status-page": {
        "api": 0
      }
    },
    "hardware": {
      "nproc": 1,
      "model": "TP-Link TL-WR841N/ND v11"
    },
    "vpn": false
  }
}
Impressum -- Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.