Serviceguard
Showing results for 
Search instead for 
Do you mean 

Email notifications about ServiceGuard events

SOLVED
Go to Solution
Super Advisor Super Advisor

Email notifications about ServiceGuard events

Hi,

I'd like to get email notifications in case of package failover. What is your favourite way to configure it?

Thanks and points in advance for your comments!

BR,
Mihails
KISS - Keep It Simple Stupid
1 ACCEPTED SOLUTIONS
Honored Contributor Honored Contributor

Re: Email notifications about ServiceGuard events

Use the customer_defined_halt_cmds section to email you when a pkg is halting (including the nodename it's halting on) and the customer_defined_run_cmds to email you when a package starts on

Example of how to code the package control scripts:

---[ snip ]---
function customer_defined_run_cmds
{
# ADD customer defined run commands.

HOSTNAME=`uname -n`
echo "Package starting on $HOSTNAME" \
| elm -s "ACLK PACKAGE STARTING ON $HOSTNAME" yourname@yourco

test_return 51
}


-StephenD.
5 REPLIES
Honored Contributor Honored Contributor

Re: Email notifications about ServiceGuard events

We don't send e-mails but do alert to openview.

We have a very simple approach. We add the commands to alert to openview, though "mailx" would work fine in your case to the "customer_defined_run_cmds" and the "customer_defined_halt_cmds" functions in the package control files.
Never preceed any demonstration with anything more predictive than "watch this"
Honored Contributor Honored Contributor

Re: Email notifications about ServiceGuard events

Hi Mihails,

You need that EMS HA Monitors product - B5736A.
This is an add-on to the standard Event Monitoring Sysstem (EMS) that's included in the Online Diagnostics bundle.
It cam monitor disk, cluster, network & system resources.
It is not a free product however, but is exactly what you're looking for, I'd say.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Respected Contributor Respected Contributor

Re: Email notifications about ServiceGuard events

Here is a simple solution:

Write a script that performs a 'cmviewcl -v' and the does a diff on the output comparing known good values.

If there is a change, mail or page the admin.

Put the script in cron every minutes.

Of course, simple things like adding a line in package start/stop scripts that mails the admin would work too.

Hope this helps!
Respected Contributor Respected Contributor

Re: Email notifications about ServiceGuard events

Mihails,

Here is an example of the script I mentioned ...

Hope this helps!
Honored Contributor Honored Contributor

Re: Email notifications about ServiceGuard events

Use the customer_defined_halt_cmds section to email you when a pkg is halting (including the nodename it's halting on) and the customer_defined_run_cmds to email you when a package starts on

Example of how to code the package control scripts:

---[ snip ]---
function customer_defined_run_cmds
{
# ADD customer defined run commands.

HOSTNAME=`uname -n`
echo "Package starting on $HOSTNAME" \
| elm -s "ACLK PACKAGE STARTING ON $HOSTNAME" yourname@yourco

test_return 51
}


-StephenD.