From 844c1f196b8b19976b52febe263c9417b1289d7f Mon Sep 17 00:00:00 2001 From: HaseenaSainul Date: Fri, 19 Jan 2024 01:58:03 -0500 Subject: [PATCH] Monitor: update configuration details --- Monitor/MonitorPlugin.json | 50 ++++++++++++++++++++++++++++++++++++ Monitor/doc/MonitorPlugin.md | 14 ++++++++-- 2 files changed, 62 insertions(+), 2 deletions(-) diff --git a/Monitor/MonitorPlugin.json b/Monitor/MonitorPlugin.json index 82972298..c56067f4 100644 --- a/Monitor/MonitorPlugin.json +++ b/Monitor/MonitorPlugin.json @@ -8,6 +8,56 @@ "description": "The Monitor plugin provides a watchdog-like functionality for framework processes.", "version": "1.0" }, + "configuration": { + "type": "object", + "properties": { + "configuration": { + "type": "object", + "required": [], + "properties": { + "observables": { + "type": "array", + "description": "List of observable plugin details", + "items": { + "type": "object", + "properties": { + "callsign": { + "type": "string", + "description": "Callsign of the plugin to be monitored" + }, + "memory": { + "type": "number", + "description": "Interval(in seconds) for a memory measurement" + }, + "memorylimit": { + "type": "number", + "description": "Memory threshold in bytes" + }, + "operational": { + "type": "number", + "description": "Interval(in seconds) to check the monitored processes" + }, + "restart": { + "type": "object", + "description": "Restart limits for failures applying to the plugin", + "properties": { + "window": { + "type": "number", + "description": "Time period(in seconds) within which failures must happen for the limit to be considered crossed" + }, + "limit": { + "type": "number", + "description": "Maximum number or restarts to be attempted" + } + } + } + } + } + } + } + } + } + }, "interface": { "$ref": "{interfacedir}/Monitor.json#" } diff --git a/Monitor/doc/MonitorPlugin.md b/Monitor/doc/MonitorPlugin.md index 36340a2d..50451cb6 100644 --- a/Monitor/doc/MonitorPlugin.md +++ b/Monitor/doc/MonitorPlugin.md @@ -76,7 +76,17 @@ The table below lists configuration options of the plugin. | callsign | string | Plugin instance name (default: *Monitor*) | | classname | string | Class name: *Monitor* | | locator | string | Library name: *libWPEFrameworkMonitor.so* | -| startmode | string | Determines if the plugin shall be started automatically along with the framework | +| startmode | string | Determines in which state the plugin should be moved to at startup of the framework | +| configuration | object | *(optional)* | +| configuration?.observables | array | *(optional)* List of observable plugin details | +| configuration?.observables[#] | object | *(optional)* | +| configuration?.observables[#]?.callsign | string | *(optional)* Callsign of the plugin to be monitored | +| configuration?.observables[#]?.memory | integer | *(optional)* Interval(in seconds) for a memory measurement | +| configuration?.observables[#]?.memorylimit | integer | *(optional)* Memory threshold in bytes | +| configuration?.observables[#]?.operational | integer | *(optional)* Interval(in seconds) to check the monitored processes | +| configuration?.observables[#]?.restart | object | *(optional)* Restart limits for failures applying to the plugin | +| configuration?.observables[#]?.restart?.window | integer | *(optional)* Time period(in seconds) within which failures must happen for the limit to be considered crossed | +| configuration?.observables[#]?.restart?.limit | integer | *(optional)* Maximum number or restarts to be attempted | # Interfaces @@ -108,7 +118,7 @@ Sets new restart limits for a service. | :-------- | :-------- | :-------- | | params | object | | | params.callsign | string | The callsign of a service to reset measurements snapshot of | -| params.restart | object | | +| params.restart | object | Restart limits for failures applying to the service | | params.restart.limit | integer | Maximum number or restarts to be attempted | | params.restart.window | integer | Time period (in seconds) within which failures must happen for the limit to be considered crossed |