Process 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 requirements as you just need to specify the process/processes to monitor. However I need a solution that would allow me to almost concatenate processes. eg. a resource could exist in multiple groups where group one may configure monitoring for process x, but the other group may configured monitoring for process y.
Effectively it shouldn't be overwriting the property field, but just adding to it.
The one way I can think of doing this is multiple datasources - but that seems very very clunky.
Alternatively a combination of group properties and using the API to build the contents of another property... to make it just a little bit more interesting the processes MUST be running on the servers. So if they are not found during discovery, an alert must be raised.
- Anonymous8 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.