DX Unified Infrastructure Management

 View Only
  • 1.  e2e_appmon E-Mail alerts

    Posted May 13, 2010 08:50 PM

    Hello all,

     

    I'm currently working on creating scripts for my team to help us monitor some logins to ensure that they work.  I have several points of content matching in place at major checkpoints (initial load, login, logout).  The issue I'm facing however, is the lack of information the e-mails we receive actually give us.  At this point it just tells us that the script timed out.  What we would like is for an e-mail to be sent telling us at what point in the script that it failed.  Because currently we would have to login to the Infrastructure Manager and look at the screenshot that was dumped on the error.

     

    Hopefully I was clear in what I'm looking for, and any suggestions would be helpful.

     

    Thanks.



  • 2.  Re: e2e_appmon E-Mail alerts

    Posted May 13, 2010 09:10 PM

    The best way to do this is to code the E2E script to detect the problems and generate an alarm directly. At the checkpoints where you check for content, you can set a timeout. If the content does not appear before the timeout, you can send an alarm. Here is how I have done this sort of error detection before:

     

    Pause 120 secs Until
        (...put check here...)
    PauseFalse
        nimAlarmSimple(4, "Timeout waiting for login screen")
        End(0)
    EndPause

     

    In order to send alarms, make sure you are doing this in your script:

     

    Include "NimBUS-functions.src"

     

    You can also make your exit code unique for each checkpoint, but you can give much better detail by sending your own alarms right from the script.

     

    -Keith



  • 3.  Re: e2e_appmon E-Mail alerts

    Posted May 13, 2010 09:20 PM
    Thanks for such a quick response. is the "4" Within the nimAlarmSimple() stand for anything in particular when generating the alarm?


  • 4.  Re: e2e_appmon E-Mail alerts

    Posted May 13, 2010 09:27 PM

    That is the severity (4 = major). The NimBUS-functions.src file might import some contants that would let you use names rather than numbers for the severity levels. If it does, I would go that route, as that would definitely be easier to understand later.

     

    I believe there might be documentation for the NimBUS-functions.src file, but I do not remember for certain where you would find it...

     

    -Keith



  • 5.  Re: e2e_appmon E-Mail alerts

    Posted May 13, 2010 10:18 PM
    Information on it was exactly where you said it probably would be. And this appears as it will be doing what I want it to, but currently, it isn't working within the PauseFalse portion. The msgbox takes precedence of it for some reason, and the message never gets sent.

    But when i have the nimAlarmSimple() outside of anything, the alarm gets sent.


  • 6.  Re: e2e_appmon E-Mail alerts

    Posted May 13, 2010 10:56 PM

    If I recall correctly, using a msbox in a script does not work well because it waits for acknowledgement. Unless there is some way of making it timeout...

     

    Can you forgo the msgbox? Why do you need it?

     

    -Keith



  • 7.  Re: e2e_appmon E-Mail alerts

    Posted Jan 24, 2011 04:45 PM

    Hello!

     

    Sorry about comming back to that one here...

     

    Just tried the clue:

     

    Pause until
         StartBrowser("IE", "http://www.abcdef.gh")
    PauseFalse
         nimAlarmSimple(4,"Timeout waiting for http://www.abcdef.gh")
         close_app()
         End(0)
    EndPause

     

     

    With a #pausetimeout=10 or even w/o and a Pause 10 secs until ....

     

    And receive a "Since Version 2.6 if a Puase x ticks is found just above the until line, an EndPause is needed between hte Pause x ticks line and the until line."

     

    Err...whaaat? ... even in the nimrec 3.7a Documentation I would discover this in the example code.

     

    Well the script-language is a litte glimpse out off **** and the documentation said:

    Remarks

    NOTE : If a PAUSE n SECS or n TICKS is the last line just before an UNTIL, the compiler gives an error, so insert the EndPause statement just before the Until.


    And the expamples below
     pause timeout seconds until
    Text("toto")
    InWindow("NOTEPAD.EXE|Edit|Untitled - Notepad|1",1)
     PauseFalse
    Res=0
     EndPause

     

    err... have I problems to see the forrest because of all that trees or is there somethin courius ?

     

    cheers

    Matt




  • 8.  Re: e2e_appmon E-Mail alerts

    Posted Jan 24, 2011 05:57 PM

    Hi!

     

    Ahh...this StartBrowser thing seems to be the problem...who the heck wrote that lex-Rule or that compiler... anyway...working with rc of the StartBrowser(), seems to work

     

    Cheers

    Matt