Forum Discussion
Firstly, as you describe the behaviour of VCS somehow mangling the setting of the MonitorProcesses attribute to:
MonitorProcesses={ "" }
after you do a dump of the configuration:
haconf -dump makero
Well, that is a big bad ugly bug that you should report and escalate to Tech Support.
Secondly, as Mike suggests, use MonitorProgram instead of MonitorProcesses to avoid the bug. Create a simple script that will allow you to reliably match the unique process via appropriate egrep regular expression-match, such as:
procUSER="$( hares -value pricemakerResourceName User )" [[ -n $procUSER ]] && procUSER="root" /bin/ps -u $procUSER -wwo args | egrep '^java .*jar com.rii.pricemaker.engine.RatingEngine$' if [[ $? == 0 ]] ; then # indicate to VCS ONLINE exit 0 else # indicate to VCS OFFLINE exit 1 fi
Modify the pattern-matching portion until it will reliably AND uniquely matches ONLY the process you are monitoring.
Double-check what the appropriate exit code should be for your version of VCS and Application agent documentation...
This method will both avoid the bug you are witnessing and it will provide you a much more resonable main.cf file, as you will be avoiding using such a large MonitorProcesses definition.
2015-01-08: Updated and fixed above code snippet to work properly on Linux....
Related Content
- 12 years ago
- 11 years ago
- 10 years ago