librenms/tests/data/linux_fail2ban-legacy.json
VVelox c3007b483a add json_app_get and convert fail2ban over to JSON (#8571)
* add json_app_get function

* add numeric testing and version support

* now use json_app_get

* remove some unneeded code

* update the docs for json_app_get some more

* make the format checker happy

* add in min version support and now take extend name instead of the partial OID

* hmm... don't make min version optional

* add Exception usage for this all make min version actually work

* minor formatting cleanup

* minor style cleanup

* update json_app_get with $throw_me setting

* Use exceptions to fully handle errors.
Always update the application.  Include error message for use in UI.
Move data to data key for easier parsing.
Add test data

* make a few changes to the lovely changes from @murrant

* style cleanup

* now attempt parsing it the old way if a error of -5 is returned

* add new exceptions and rework them all

* add new exceptions and min version 0 no longer bypasses the key checks

* redo the error codes a bit and improve the comment about it all

* fix a a bit of formatting

* added JsonAppException and make the other JsonApp stuff a sub of it

* note JsonAppException

* fix class creation

* JsonAppBlank now extends JsonApp

* doh! add <?php

* update the poller to properly use the new exceptions

* no longer check for error twice and make sure the data key is present

* cleanup processing of legacy scripts

* tweak this a bit

* white space fix

* fix the tests for fail2ban
2018-05-25 21:16:16 -05:00

50 lines
1.4 KiB
JSON

{
"applications": {
"discovery": {
"applications": [
{
"app_type": "fail2ban",
"app_state": "UNKNOWN",
"discovered": "1",
"app_state_prev": null,
"app_status": "",
"app_instance": ""
}
],
"application_metrics": []
},
"poller": {
"applications": [
{
"app_type": "fail2ban",
"app_state": "OK",
"discovered": "1",
"app_state_prev": "UNKNOWN",
"app_status": "",
"app_instance": ""
}
],
"application_metrics": [
{
"metric": "jail_dovecot",
"value": "0",
"value_prev": null,
"app_type": "fail2ban"
},
{
"metric": "jail_sshd",
"value": "0",
"value_prev": null,
"app_type": "fail2ban"
},
{
"metric": "total",
"value": "0",
"value_prev": null,
"app_type": "fail2ban"
},
]
}
}
}