Hello,
I am having an issue when I try to create multiple events that are derived from different program sources in one threshold monitoring policy.
This is that my sources look like:
Source type: Program source
Short name: memory
Description: Checks the percentage of memory used in the system using the opcmon
Program: /home/dslesarenko/mem_check.sh
Source type: Program source
Short name: cpu
Description: CPU used on the system
Program: /home/dslesarenko/cpu_check.sh
This is what my Pearl script looks like for creating a memory threshold event:
my $Src = $Policy->Source("memory");
if ($Src->Value >= 40 ) {
$Rule->Status(TRUE);
} else {
$Rule->Status(FALSE);
}
my $SrcValue = $Src->Value;
$Session->Value('AlertString',$SrcValue);
This is what my Pearl script looks like for creating a cpu threshold event:
my $Src = $Policy->Source("cpu");
if ($Src->Value >= 40 ) {
$Rule->Status(TRUE);
} else {
$Rule->Status(FALSE);
}
my $SrcValue = $Src->Value;
$Session->Value('AlertString',$SrcValue);
Now, If there is only a memory threshold event, It runs perfectly fine and catches all the opcmon commands I send to it. The issue arises when I try to add the CPU threshold event. The CPU event can be triggered via opcmon right after the deployment of the policy, but after the memory threshold event has been triggered, CPU threshold stops working and does not return anything or show up in the event browser.
What is going on with my policy? Why doesn't the CPU threshold monitor send events after the memory monitor triggers? Is OBM supposed to have such functionality, or is this not the intended use?
Thanks in advance,
Daniil