Stephen_C
Neophyte
5 months agoProcess monitoring (Linux)
I have a requirement to monitoring Linux processes - and am really hoping that someone has done something similar. Initially I thought the datasource "LinuxNewProcesses_byProperty" would meet the re...
- 5 months ago
You wouldn't need to use the API. You could just build a property source that reads in the list of groups the device belongs to using `hostProps.get("system.groups")` or `hostProps.get("system.staticgroups")` and builds a single property to apply to the device. You wouldn't need the API at all.
It could look something like this:
propValue = [] hostProps.get("syste.groups").each{group-> switch(expression){ case "Applications/App A": propValue.add("app_a_service"); break; case "Another group/Tartanic": propValue.add("tartanic_process_name"); break; // etc. } } println(propValue.join("|")) return 0
This is off-the-cuff code; tweak as necessary.