librenms/tests/data/linux_chronyd.json
Zane C. Bowers-Hadley 2618a99be5
Application Soft Delete (#15270)
* add the softdeletes migrations for applications

* add working migration file

* add deleted_at to db schema.yaml for applications

* update includes/html/forms/application-update.inc.php to work with softdeletes

* update includes/html/pages/device/edit/apps.inc.php for softdelete

* update includes/discovery/applications.inc.php to work with softdelete

* minor updates to application-update.inc.php for disabling

* style cleanup

* set discovered when running discovery

* update application tests to include deleted_at

* add deleted_at to a missed test

* a few more tweaks for opensips

* add a missing deleted_at for linux_suricata_extract-v1

* fix fillable for Application model

* massive cleanup of the application update widget thingy

* improve the code for discovery and using Laravel

* add a missing line to app/Models/Application

* add a missing include to app/Models/Application.php

* record includes for Application model

* remove apps from the applications table when a device is deleted

* revert to using upcert and where for discovery to fix CI

* make discovered fillable and set it when running discovery... convert back to firstOrNew

* clean up application discovery a bit and use observer

* style fix

* spelling fix... disablaed -> disabled

* rever removal to just use where

* cleanup app removal on delete

* add restored to ModuleModelObserver

* delete -> forcedelete fix

* apply the suggested changes

* use murrants other suggestion

* style fix
2023-09-06 16:34:39 -05:00

140 lines
4.6 KiB
JSON

{
"applications": {
"discovery": {
"applications": [
{
"app_type": "chronyd",
"app_state": "UNKNOWN",
"discovered": 1,
"app_state_prev": null,
"app_status": "",
"app_instance": "",
"data": null,
"deleted_at": null
}
]
},
"poller": {
"applications": [
{
"app_type": "chronyd",
"app_state": "OK",
"discovered": 1,
"app_state_prev": "UNKNOWN",
"app_status": "",
"app_instance": "",
"data": "{\"sources\":[\"PPS\",\"GPS\"]}",
"deleted_at": null
}
],
"application_metrics": [
{
"metric": "tracking_frequency",
"value": -9.845,
"value_prev": null,
"app_type": "chronyd"
},
{
"metric": "tracking_last_offset",
"value": 1.5e-8,
"value_prev": null,
"app_type": "chronyd"
},
{
"metric": "tracking_leap_status",
"value": 0,
"value_prev": null,
"app_type": "chronyd"
},
{
"metric": "tracking_reference_name",
"value": 50505300,
"value_prev": null,
"app_type": "chronyd"
},
{
"metric": "tracking_reference_time",
"value": 1613135374.7654,
"value_prev": null,
"app_type": "chronyd"
},
{
"metric": "tracking_reference_type",
"value": 0,
"value_prev": null,
"app_type": "chronyd"
},
{
"metric": "tracking_residual_frequency",
"value": 0,
"value_prev": null,
"app_type": "chronyd"
},
{
"metric": "tracking_rms_offset",
"value": 9.5e-8,
"value_prev": null,
"app_type": "chronyd"
},
{
"metric": "tracking_root_delay",
"value": 1.0e-9,
"value_prev": null,
"app_type": "chronyd"
},
{
"metric": "tracking_root_dispersion",
"value": 8.054e-6,
"value_prev": null,
"app_type": "chronyd"
},
{
"metric": "tracking_skew",
"value": 0.006,
"value_prev": null,
"app_type": "chronyd"
},
{
"metric": "tracking_stratum",
"value": 1,
"value_prev": null,
"app_type": "chronyd"
},
{
"metric": "tracking_system_time",
"value": -1.6e-8,
"value_prev": null,
"app_type": "chronyd"
},
{
"metric": "tracking_update_interval",
"value": 8,
"value_prev": null,
"app_type": "chronyd"
}
]
}
},
"os": {
"discovery": {
"devices": [
{
"sysName": "<private>",
"sysObjectID": ".1.3.6.1.4.1.8072.3.2.10",
"sysDescr": "Linux time.theswissbay.ch 5.4.83-v7+ #1379 SMP Mon Dec 14 13:08:57 GMT 2020 armv7l",
"sysContact": "<private>",
"version": "5.4.83-v7+",
"hardware": "Generic ARMv7",
"features": null,
"location": null,
"os": "linux",
"type": "server",
"serial": null,
"icon": "linux.svg"
}
]
},
"poller": "matches discovery"
}
}