Skip to content

Commit

Permalink
Merge pull request #281 from WebPlatformForEmbedded/development/METRO…
Browse files Browse the repository at this point in the history
…L-826

Monitor: update configuration details
  • Loading branch information
volkan-aslan authored Jan 19, 2024
2 parents 0fc4d60 + 844c1f1 commit b71e25c
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 2 deletions.
50 changes: 50 additions & 0 deletions Monitor/MonitorPlugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -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#"
}
Expand Down
14 changes: 12 additions & 2 deletions Monitor/doc/MonitorPlugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 | <sup>*(optional)*</sup> |
| configuration?.observables | array | <sup>*(optional)*</sup> List of observable plugin details |
| configuration?.observables[#] | object | <sup>*(optional)*</sup> |
| configuration?.observables[#]?.callsign | string | <sup>*(optional)*</sup> Callsign of the plugin to be monitored |
| configuration?.observables[#]?.memory | integer | <sup>*(optional)*</sup> Interval(in seconds) for a memory measurement |
| configuration?.observables[#]?.memorylimit | integer | <sup>*(optional)*</sup> Memory threshold in bytes |
| configuration?.observables[#]?.operational | integer | <sup>*(optional)*</sup> Interval(in seconds) to check the monitored processes |
| configuration?.observables[#]?.restart | object | <sup>*(optional)*</sup> Restart limits for failures applying to the plugin |
| configuration?.observables[#]?.restart?.window | integer | <sup>*(optional)*</sup> Time period(in seconds) within which failures must happen for the limit to be considered crossed |
| configuration?.observables[#]?.restart?.limit | integer | <sup>*(optional)*</sup> Maximum number or restarts to be attempted |

<a name="head.Interfaces"></a>
# Interfaces
Expand Down Expand Up @@ -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 |

Expand Down

0 comments on commit b71e25c

Please sign in to comment.