Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inventory: advanced usage statistics #68

Merged
merged 2 commits into from
Oct 4, 2024
Merged

Inventory: advanced usage statistics #68

merged 2 commits into from
Oct 4, 2024

Conversation

stephdl
Copy link
Contributor

@stephdl stephdl commented Sep 23, 2024

Add more statistics to the inventory

the json object output

json sample

    "netifyd": {
      "enabled": false
    },
    "snmp": {
      "enabled": true
    },
    "ddns": {
      "enabled": true
    },
    "nathelpers": {
      "count": 2,
      "enabled": true
    },
    "certificates_info": {
      "custom_certificates": {
        "count": 1
      },
      "acme_certificates": {
        "count": 1,
        "issued": 0,
        "pending": 1
      }
    },
    "database_stats": {
      "main": {
        "users": 2
      }
    },
    "dhcp_server": {
      "count": 1,
      "static_leases": 1,
      "dynamic_leases": 0,
      "dns_records_count": 2,
      "dns_forwarder_enabled": true
    },
    "firewall_stats": {
      "firewall": {
        "port_forward": 1,
        "nat": {
          "masquerade": 1,
          "snat": 1,
          "accept": 1
        },
        "netmap": {
          "source": 1,
          "destination": 1
        },
        "rules": {
          "forward": 1,
          "input": 9,
          "output": 1
        }
      },
      "objects": {
        "domains": 1,
        "hosts": 1,
        "port_forward": {
          "allowed_from": 0,
          "destination_to": 1
        },
        "mwan_rules": 1,
        "rules": {
          "forward": 1,
          "input": 1,
          "output": 1
        }
      }
    },
    "hotspot": {
      "enabled": true,
      "server": "https://my.nethspot.com/api",
      "interface": "eth3"
    },
    "network": {
      "zones": [
        {
          "name": "lan",
          "ipv4": 1,
          "ipv6": 0
        },
        {
          "name": "wan",
          "ipv4": 1,
          "ipv6": 0
        },
        {
          "name": "rwopenvpn",
          "ipv4": 0,
          "ipv6": 0
        },
        {
          "name": "openvpn",
          "ipv4": 1,
          "ipv6": 0
        },
        {
          "name": "hotspot",
          "ipv4": 0,
          "ipv6": 0
        },
        {
          "name": "blue",
          "ipv4": 2,
          "ipv6": 0
        }
      ],
      "interface_counts": {
        "vlans": 1,
        "bridges": 1,
        "bonds": 1
      },
      "zone_network_counts": {
        "lan": 1,
        "wan": 1,
        "rwopenvpn": 1,
        "openvpn": 1,
        "hotspot": 1,
        "blue": 2
      },
      "route_info": {
        "count_ipv6_route": 2,
        "count_ipv4_route": 2
      }
    },

    "openvpn_rw": {
      "enabled": 1,
      "server": 1,
      "instances": [
        {
          "section": "ns_roadwarrior1",
          "authentication": "certificate",
          "user_database": "main",
          "mode": "tun"
        }
      ]
    },
    "openvpn_tun": {
      "client": 0,
      "server": 1,
      "tunnels": [
        {
          "section": "ns_openvpn1",
          "mode": "tun"
        }
      ]
    },

    "qos": {
      "count": 1,
      "rules": [
        {
          "enabled": true,
          "upload": 9,
          "download": 10
        }
      ]
    },

NethServer/nethsecurity#790

@stephdl stephdl marked this pull request as draft September 23, 2024 16:52
@stephdl stephdl self-assigned this Sep 23, 2024
@stephdl stephdl force-pushed the sdl_inventory branch 6 times, most recently from bd519a7 to fb6126d Compare September 30, 2024 13:56
@stephdl stephdl force-pushed the sdl_inventory branch 3 times, most recently from 4f14b9d to f2b8823 Compare October 1, 2024 13:10
@stephdl stephdl requested a review from gsanchietti October 1, 2024 13:12
@stephdl stephdl marked this pull request as ready for review October 1, 2024 13:13
@gsanchietti gsanchietti merged commit ad91814 into main Oct 4, 2024
2 checks passed
@gsanchietti gsanchietti deleted the sdl_inventory branch October 4, 2024 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants