Files
librenms-librenms/tests/data/linux_logsize-v1.json
Zane C. Bowers-Hadley 2ac9a634b4 Logsize monitoring for LibreNMS (#15137)
* add logsize poller

* add set size info

* add more stats

* add min size

* more logsize files

* add logsize

* fix creating log file links

* add two new graphs

* add some graphs

* add no_minus_d

* add no minus d to app page

* add count of log files

* save logsizes in app data

* rename title log sizes

* only show top 12

* add mean median and mode

* cleanup naming a bit

* the values for the files hash is now a int instead of another hash

* add new stats and correct median name

* now properly handle unseen

* fix logsize bits

* add combined

* update metrics and add some tests

* add logsize graphs to apps page

* add the logsize bit

* add logszie docs

* add some example alert rules

* style cleanup

* more style cleanup

* fix a few things for metrics and update the test

* fix a variable name in the test and update the data
2023-07-19 22:02:23 -05:00

105 lines
3.9 KiB
JSON

{
"applications": {
"discovery": {
"applications": [
{
"app_type": "logsize",
"app_state": "UNKNOWN",
"discovered": 1,
"app_state_prev": null,
"app_status": "",
"app_instance": "",
"data": null
}
]
},
"poller": {
"applications": [
{
"app_type": "logsize",
"app_state": "OK",
"discovered": 1,
"app_state_prev": "UNKNOWN",
"app_status": "",
"app_instance": "",
"data": "{\"sets\":{\"var_log\":{\"files\":[\"daemon\",\"mount\",\"devd\",\"utx\",\"setuid\",\"maillog\",\"Xorg.0\",\"xferlog\",\"mail\",\"snmpd\",\"bsdisks\",\"userlog\",\"ppp\",\"cron\",\"messages\",\"xdm\",\"dmesg\",\"security\",\"debug\",\"auth\"],\"max_size\":212661,\"mean_size\":32019.9,\"median_size\":2273.5,\"mode_size\":\"62\",\"min_size\":0,\"size\":640398,\"log_sizes\":{\"mail\":212661,\"maillog\":164271,\"Xorg.0\":64927,\"setuid\":48325,\"daemon\":46208,\"bsdisks\":38084,\"dmesg\":30308,\"cron\":25531,\"snmpd\":3796,\"userlog\":3488,\"xdm\":1059,\"auth\":724,\"mount\":371,\"messages\":331,\"xferlog\":64,\"ppp\":64,\"devd\":62,\"security\":62,\"debug\":62,\"utx\":0}}},\"no_minus_d\":null}"
}
],
"application_metrics": [
{
"metric": "max_size",
"value": 640398,
"value_prev": null,
"app_type": "logsize"
},
{
"metric": "mean_size",
"value": 640398,
"value_prev": null,
"app_type": "logsize"
},
{
"metric": "median_size",
"value": 640398,
"value_prev": null,
"app_type": "logsize"
},
{
"metric": "min_size",
"value": 640398,
"value_prev": null,
"app_type": "logsize"
},
{
"metric": "mode_size",
"value": 640398,
"value_prev": null,
"app_type": "logsize"
},
{
"metric": "set_var_log_max_size",
"value": 212661,
"value_prev": null,
"app_type": "logsize"
},
{
"metric": "set_var_log_mean_size",
"value": 32019.9,
"value_prev": null,
"app_type": "logsize"
},
{
"metric": "set_var_log_median_size",
"value": 2273.5,
"value_prev": null,
"app_type": "logsize"
},
{
"metric": "set_var_log_min_size",
"value": 0,
"value_prev": null,
"app_type": "logsize"
},
{
"metric": "set_var_log_mode_size",
"value": 62,
"value_prev": null,
"app_type": "logsize"
},
{
"metric": "set_var_log_size",
"value": 640398,
"value_prev": null,
"app_type": "logsize"
},
{
"metric": "size",
"value": 640398,
"value_prev": null,
"app_type": "logsize"
}
]
}
}
}