Forum Discussion
On 11/16/2022 at 6:07 AM, mnagel said:LinuxNewProcesses does not require the PID in the wildvalue, at least I see nowhere in the code it would be used as in input parameter (nor should that ever be needed -- that would be super fragile). It requires (in the current buggy version) the full process path AND the process arguments (the latter is the bug -- code should hopefully be fixed in the repo soon as I did receive confirmation from support they were able to see the problem). If you want to fix it locally in the meantime, the impacted code is in the run() method (changes highlighted with >>> prefixes.
static run(String hostname, String processName, out) { def startTime = new Date().getTime() def processArg = processName.tokenize( \"||\") >>> def processParam; def processPath = processArg[0] if(processArg.size() == 2) { processParam = processArg[1] } // Get all of the data at the same time to minimize def processPaths = Snmp.walkAsMap(hostname, OID_NAME, null, 20000) def processParams = Snmp.walkAsMap(hostname, OID_PARAM, null, 20000) List<String> cpuValues List<String> memValues List<String> statusValues List<String> pids = []; processPaths.each { pid, name -> >>> if((name == processPath) && (processParam == null || processParams[pid] == processParam)) { pids << pid } }
I was saddened to find that the developers rejected this fix to allow for optional argument matching, claiming it represents a desire on my part for "a wide reaching application monitoring solution". I feel like they have perhaps hit their collective heads, but I have no option but to never import that module again. And before anyone says "CSM" -- been there, no help (no response actually).
Related Content
- 11 months ago
- 8 months ago
- 7 months ago
- 11 months ago