librenms/tests/data/linux_dhcp-stats-v3.json
Zane C. Bowers-Hadley 56471e63d7
add dhcp-stats tests and update for v3 of the extend (#15378)
* update dhcp polling for version 3 of the extend

* add initial lease display for dhcp

* note where I copied it from

* document the new ISC DHCP stuff

* add in displaying pool and subnet info

* finalize the docs the new dhcpd stuff

* rework the dhcp page to display more information in a cleaner manner

* now display port and device info if known for a lease

* minor comment cleanup for the dhcp page

* add tests

* do not display the optionbar if the extend is not 3+

* update dhcp-stats doc for -w

* poke includes/html/functions.inc.php with php-cs-fixer

* poke includes/html/pages/device/apps/dhcp-stats.inc.php with php-cs-fixer

* derp... add the tests and not the snmprec twice

* strftime -> date

* fix naming of the linux dhcp-stats test data files

* minor tweaks to the rest results

* test fix

* more test cleanup

* minor test fix

* set the data value for v3

* minor test tweak

* add sortable_table blade template

* no longer need render_table

* formatting fix

* add regexp to make sure the mac is sane

* style fix

* formatting cleanup

* some more formatting fixes
2024-02-21 21:33:17 +01:00

125 lines
4.6 KiB
JSON

{
"applications": {
"discovery": {
"applications": [
{
"app_type": "dhcp-stats",
"app_state": "UNKNOWN",
"discovered": 1,
"app_state_prev": null,
"app_status": "",
"app_instance": "",
"data": null,
"deleted_at": null
}
]
},
"poller": {
"applications": [
{
"app_type": "dhcp-stats",
"app_state": "OK",
"discovered": 1,
"app_state_prev": "UNKNOWN",
"app_status": "1/65",
"app_instance": "",
"data": "{\"all_networks\":{\"cur\":\"1\",\"max\":\"65\",\"percent\":\"1.538\"},\"leases\":{\"abandoned\":0,\"active\":3,\"backup\":0,\"bootp\":0,\"expired\":0,\"free\":52,\"released\":0,\"reset\":0,\"total\":52},\"networks\":[{\"cur\":\"1\",\"max\":\"65\",\"network\":\"192.168.14.0\\\/23\",\"percent\":\"1.538\"}],\"pools\":[{\"cur\":\"1\",\"first_ip\":\"192.168.15.128\",\"last_ip\":\"192.168.15.192\",\"max\":\"65\",\"percent\":\"1.538\"}]}",
"deleted_at": null
}
],
"application_metrics": [
{
"metric": "192.168.14.0_23_networks_current",
"value": 1,
"value_prev": null,
"app_type": "dhcp-stats"
},
{
"metric": "192.168.14.0_23_networks_max",
"value": 65,
"value_prev": null,
"app_type": "dhcp-stats"
},
{
"metric": "192.168.14.0_23_networks_percent",
"value": 1.538,
"value_prev": null,
"app_type": "dhcp-stats"
},
{
"metric": "192.168.15.128_-_192.168.15.192_pools_current",
"value": 1,
"value_prev": null,
"app_type": "dhcp-stats"
},
{
"metric": "192.168.15.128_-_192.168.15.192_pools_max",
"value": 65,
"value_prev": null,
"app_type": "dhcp-stats"
},
{
"metric": "192.168.15.128_-_192.168.15.192_pools_percent",
"value": 1.538,
"value_prev": null,
"app_type": "dhcp-stats"
},
{
"metric": "dhcp-stats_stats_dhcp_abandoned",
"value": 0,
"value_prev": null,
"app_type": "dhcp-stats"
},
{
"metric": "dhcp-stats_stats_dhcp_active",
"value": 3,
"value_prev": null,
"app_type": "dhcp-stats"
},
{
"metric": "dhcp-stats_stats_dhcp_backup",
"value": 0,
"value_prev": null,
"app_type": "dhcp-stats"
},
{
"metric": "dhcp-stats_stats_dhcp_bootp",
"value": 0,
"value_prev": null,
"app_type": "dhcp-stats"
},
{
"metric": "dhcp-stats_stats_dhcp_expired",
"value": 0,
"value_prev": null,
"app_type": "dhcp-stats"
},
{
"metric": "dhcp-stats_stats_dhcp_free",
"value": 52,
"value_prev": null,
"app_type": "dhcp-stats"
},
{
"metric": "dhcp-stats_stats_dhcp_released",
"value": 0,
"value_prev": null,
"app_type": "dhcp-stats"
},
{
"metric": "dhcp-stats_stats_dhcp_reset",
"value": 0,
"value_prev": null,
"app_type": "dhcp-stats"
},
{
"metric": "dhcp-stats_stats_dhcp_total",
"value": 52,
"value_prev": null,
"app_type": "dhcp-stats"
}
]
}
}
}