This discussion is archived
1 Reply Latest reply: Dec 5, 2011 1:08 PM by MikeKirk RSS

Destination Email Address for fscan+syslog.dat

djc72uk Newbie
Currently Being Moderated
Hi,

SunMC newbie here. I’ve had a quick search through the previous posts and can’t seem to find the answer to my question.

I want to know whether it’s possible to include more than one destination email address or a UNIX sendmail alias within fscan+syslog.dat? Currently, the relevant lines within my fscan+syslog.dat file reads as follows: -

+value:actionCommand(change) = "sh -u ROOT -c {sh {-c} {var/opt/SUNWsymon/bin/email.sh v2 %statusfmt %statusstringfmt {''} 'sys@mycompany.com'}}"+
+value:rawActionCommand(change) = "email.sh:sys@mycompany.com:"+

Can I include a second email address? I’m not 100% certain on the syntax, but I’d image the relevant lines should read as follows: -

v+alue:actionCommand(change) = "sh -u ROOT -c {sh {-c} {var/opt/SUNWsymon/bin/email.sh v2 %statusfmt %statusstringfmt {''} 'sys@mycompany.com operators@mycompany.com'}}"+
+value:rawActionCommand(change) = "email.sh:sys@mycompany.com operators@mycompany.com':"+

Preferably, I’d like to use concatenate both of the destination email addresses into a single UNIX sendmail alias as follows: -

+value:actionCommand(change) = "sh -u ROOT -c {sh {-c} {var/opt/SUNWsymon/bin/email.sh v2 %statusfmt %statusstringfmt {''} 'Administrators'}}"+
+value:rawActionCommand(change) = "email.sh:Administrators:"+

Thanks in advance,
Dan C.
  • 1. Re: Destination Email Address for fscan+syslog.dat
    MikeKirk Newbie
    Currently Being Moderated
    Hi Dan,

    You should try to restrict your changes to those that can be done through the SunMC Console (i.e Attribute Editor), that way you know the formatting of the .dat files will always be correct. But I understand wanting to edit the dats if you want automation (even then Managed Jobs may be more maintainable).

    I've seen other customers simply change the email script (/var/opt/SUNWsymon/bin/email.sh) to tack on a second/third/fourth email before it hits sendmail or simply run the mail line in the script more than once. Are you going to want the multiple email accounts for all alarms, or only for some of them? It may be better to edit email.sh than fscan+syslog.dat.

    Finally, if you have any of the Halcyon integrations for SunMC (i.e http://www.halcyoninc.com/products/NeuronIntegration/index.php) you can avoid email.sh altogether and have as many email targets as you need, but it may not be obvious how to set it up. Contact support and they would be happy to help.

    Regards,

    Mike.Kirk@HalcyonInc.com

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points