Topic
  • 11 replies
  • Latest Post - ‏2011-10-31T05:14:57Z by AparnaSV
pethom
pethom
32 Posts

Pinned topic Sending an email from ITM without using external product

‏2008-07-04T16:05:13Z |
Here is a method that you can use on most Windows, UNIX or Linux TEMS to send an email when a situation fire.

1 - define a SOAP server with the name of "soap" (this is fully described in the Administrator's Guide for ITM 6.2 page 154)- For the hub hostname specify localhost where the hub tems is running and for the port use 1918. Add a user sysadmin with update access. Restart the TEMS if necessary.

2 - open a text editor and save the following file (c:\IBM\ITM\cms\url.txt) with the only one line :
http://localhost:1920///cms/soap

3 - open a text editor and save the following file (c:\IBM\ITM\cms\SEND_EMAIL.bat) with the content of the attached file.
In the content of the file, you will see the 5 parameters necessary to send an email. The most important parameter is the first one : the name or the IP@ of the SMTP server.

4 - use the command in a take action, or in the action of a situation or in any activity of a policy. For example :
SEND_EMAIL.bat SMTPserver phil@ibm.com joe@ibm.com "this is my subject" "this is the text of my message"

5 - If you want to send an email for each raised event in the TEMS, you can post a situation for the universal message :
IF Category == KO41041 TRUE

You can adjust a little this situation so that you get only some kind of messages.
Enjoy.

Philippe.
Updated on 2011-10-31T05:14:57Z at 2011-10-31T05:14:57Z by AparnaSV
  • SystemAdmin
    SystemAdmin
    6056 Posts

    Re: Sending an email from ITM without using external product

    ‏2008-08-15T15:19:10Z  
    Hi,
    I want to thank you for creating this and helping others - it was a real Godsend.
    Right now I have used the .bat file inside the ITM Situation Config but now I need to know how to embed attributes into the message to be sent. Is there anyway you can help?
    Thanks in advance
    Daydah
  • SystemAdmin
    SystemAdmin
    6056 Posts

    Re: Sending an email from ITM without using external product

    ‏2009-01-19T17:31:43Z  
    Please, I wanna to send an email for each raised event in the TEMS, like you said, But I couldn't understand item five.

    Thanks!
  • NNA
    NNA
    39 Posts

    Re: Sending an email from ITM without using external product

    ‏2011-05-07T16:49:54Z  
    hi,
    please i've a problem configuring the soap in my Hub TEMS (centos server). when executing itmcmd manage i have this message: KCI0412E A problem occurred. see logs/CandleManage.logs for details
    in the attached file i've replied what it says in this log; the problem is that i don't know what i'm about to do
    thanks everybody
  • NNA
    NNA
    39 Posts

    Re: Sending an email from ITM without using external product

    ‏2011-05-07T18:11:21Z  
    • NNA
    • ‏2011-05-07T16:49:54Z
    hi,
    please i've a problem configuring the soap in my Hub TEMS (centos server). when executing itmcmd manage i have this message: KCI0412E A problem occurred. see logs/CandleManage.logs for details
    in the attached file i've replied what it says in this log; the problem is that i don't know what i'm about to do
    thanks everybody
    SORRY...
    I've forgotten to attach my file
    here you have it
    thanks
  • NNA
    NNA
    39 Posts

    Re: Sending an email from ITM without using external product

    ‏2011-05-07T18:27:09Z  
    • NNA
    • ‏2011-05-07T18:11:21Z
    SORRY...
    I've forgotten to attach my file
    here you have it
    thanks
    it seems i've a problem to attach my file so i'm going to write what it says in candlemanage.log;
    i'm really sorry

    << Exception in thread "main" java.awt.HeadlessException:
    NO X11 DISPLAY variable was set, but this program performed an operation which requires it
    at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:197)
    at java.awt.Window.<init>(window.java:346)
    at java.awt.Frame.<init>(Frame.java:452)
    at java.awt.Frame.<init>(Frame.java:417)
    at javax.swing.JFrame.<init>(JFrame.java:180)
    at ITMInstall.JFrame1.<init>(JFrame.java:324)
    at ITMInstall.JFrame1.main(window.java:1551) >>
  • ateo.duran
    ateo.duran
    342 Posts

    Re: Sending an email from ITM without using external product

    ‏2011-05-08T19:31:14Z  
    • NNA
    • ‏2011-05-07T18:27:09Z
    it seems i've a problem to attach my file so i'm going to write what it says in candlemanage.log;
    i'm really sorry

    << Exception in thread "main" java.awt.HeadlessException:
    NO X11 DISPLAY variable was set, but this program performed an operation which requires it
    at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:197)
    at java.awt.Window.<init>(window.java:346)
    at java.awt.Frame.<init>(Frame.java:452)
    at java.awt.Frame.<init>(Frame.java:417)
    at javax.swing.JFrame.<init>(JFrame.java:180)
    at ITMInstall.JFrame1.<init>(JFrame.java:324)
    at ITMInstall.JFrame1.main(window.java:1551) >>
    You need to export your DISPLAY to your workstation or you need to ssh and forward your display thru the connection, you would run the command:
    ssh -fX host xterm
    or
    ssh -fY host xterm

    then you can run the itmcmd manage from the xterm

    Of course you need an X server running in your workstation to be able to open X windows, something like eXceed from Hummingbird or the free X server from cygwin.
  • NNA
    NNA
    39 Posts

    Re: Sending an email from ITM without using external product

    ‏2011-05-09T19:38:20Z  
    You need to export your DISPLAY to your workstation or you need to ssh and forward your display thru the connection, you would run the command:
    ssh -fX host xterm
    or
    ssh -fY host xterm

    then you can run the itmcmd manage from the xterm

    Of course you need an X server running in your workstation to be able to open X windows, something like eXceed from Hummingbird or the free X server from cygwin.
    THANKS for your answ.
    i try what you said but i've a problem when typing ssh -fx host xterm
    there is a new message from the console: ssh: connect to host host 22: Connection timed out
    please is there any solution for this situation?
    thanks
  • ateo.duran
    ateo.duran
    342 Posts

    Re: Sending an email from ITM without using external product

    ‏2011-05-09T20:06:00Z  
    • NNA
    • ‏2011-05-09T19:38:20Z
    THANKS for your answ.
    i try what you said but i've a problem when typing ssh -fx host xterm
    there is a new message from the console: ssh: connect to host host 22: Connection timed out
    please is there any solution for this situation?
    thanks
    The message you posted seems to indicate that you literally used host. I am sorry I was not clear. host in (ssh -fX host xterm) is your Hub TEMS server hostname or IP address. I just gave you an example on how to connect. You need to find out how to connect to your system and tunnel or forward the X window to your workstation.

    Have you tried just to export the DISPLAY variable to point to a workstation running an X server software ?
  • NNA
    NNA
    39 Posts

    Re: Sending an email from ITM without using external product

    ‏2011-05-10T10:35:35Z  
    The message you posted seems to indicate that you literally used host. I am sorry I was not clear. host in (ssh -fX host xterm) is your Hub TEMS server hostname or IP address. I just gave you an example on how to connect. You need to find out how to connect to your system and tunnel or forward the X window to your workstation.

    Have you tried just to export the DISPLAY variable to point to a workstation running an X server software ?
    yes;
    i try to export the display variable to my PC typing export DISPLAY = my machine IP address:0
    then i follow by xeyes & or xterm &, but now i've this result: -bash: xeyes or xterm: command not found
    first i though it was a problem of directories where each of them are installed but nothing change
    please any idea about this? i also first though it's a centos command problem but it not true...
    very sorry to bother you,
    thanks
  • ateo.duran
    ateo.duran
    342 Posts

    Re: Sending an email from ITM without using external product

    ‏2011-05-10T12:48:53Z  
    • NNA
    • ‏2011-05-10T10:35:35Z
    yes;
    i try to export the display variable to my PC typing export DISPLAY = my machine IP address:0
    then i follow by xeyes & or xterm &, but now i've this result: -bash: xeyes or xterm: command not found
    first i though it was a problem of directories where each of them are installed but nothing change
    please any idea about this? i also first though it's a centos command problem but it not true...
    very sorry to bother you,
    thanks
    May be you do not have the PATH setup or the xterm is not installed in your server.
    These problems you have are not ITM related at all, but if you solve these then you can use itmcmd manage
    Would it be possible for you to find someone in your site to help your with these X related problems ?
  • AparnaSV
    AparnaSV
    37 Posts

    Re: Sending an email from ITM without using external product

    ‏2011-10-31T05:14:57Z  
    I tried all steps except Step 5, but the mail is not being sent.
    Can you please help me in this issue?