[ST OMU] OVO agent selfmonitoring policy OA-SelfMonVerifyMon shows warning message when agent starts

PROBLEM:

After deploying the Self-Monitoring policies on a Solaris agent v11.13.007,
when the agent starts warning alerts are shown.  

Warning  opcmona   (Monitor Agent)  "An error occurred in the processing of the policy 'OA-SelfMonTstAll'. Please check the following errors and take corrective actions. (OpC30-797) Monitor program 'OA_selfmon_run OA-SelfMonTstAll' of source Source failed. Result=1. Output of monitor program: /var/opt/OV/bin/instrumentation/OA_selfmon_run: LC_ALL=C: is not an identifier  (OpC30-732)"

Warning opcmona   (Monitor Agent) "An error occurred in the processing of the policy 'OA-SelfMonVerifyMon'. Please check the following errors and take corrective actions. (OpC30-797) Monitor program 'OA_selfmon_verify 180 OA-SelfMonVerifyMon' of source Source failed. Result=1. Output of monitor program: /var/opt/OV/bin/instrumentation/OA_selfmon_verify: LC_ALL=C: is not an identifier  (OpC30-732)"


CAUSE:

Problematic scripts are (on managed node):
/var/opt/OV/bin/instrumentation/OA_selfmon_verify
/var/opt/OV/bin/instrumentation/OA_selfmon_run

On mgmt srv (in instrum dir, after agent registration):
/var/opt/OV/share/databases/OpC/mgd_node/instrumentation/HPOpsAgt/Unix/Solaris/OA_selfmon_run
/var/opt/OV/share/databases/OpC/mgd_node/instrumentation/HPOpsAgt/Unix/Solaris/OA_selfmon_verify

Which is part of HPOpsAgt Category that is shipped with OA.

For example if script is executed in cmdline on the agent, it fails like:
 cd /var/opt/OV/bin/instrumentation/
 ./OA_selfmon_verify 180 OA-SelfMonVerifyMon
./OA_selfmon_verify: LC_ALL=C: is not an identifier


SOLUTION:

Modify both scripts on mgmt srv side (see below) and redistribute instrumentation to such Solaris agent:
LC_ALL=C
LANG=C
export LC_ALL
export LANG


change the two scripts on management server:

/var/opt/OV/share/databases/OpC/mgd_node/instrumentation/HPOpsAgt/Unix/Solaris/OA_selfmon_run
/var/opt/OV/share/databases/OpC/mgd_node/instrumentation/HPOpsAgt/Unix/Solaris/OA_selfmon_verify

The two lines below:
export LC_ALL=C
export LANG=C

to the following:
LC_ALL=C
LANG=C
export LC_ALL
export LANG

Then redeploy the policies.

After doing this, no warning messages occur and SelfMon functionality should work fine.


This is documented in the following KCS document: http://support.openview.hp.com/selfsolve/document/KM01001122