DX NetOps

  • 1.  Can we get event message data into the "alarm Type"?

    Posted Jun 04, 2018 12:21 PM

    We have a custom event based on a trap from CA Workload Automation (Autosys).  When a job fails, we need an alarm and notification.  We're looking for a way to get the "alarmJobName = {s 4}" into the "Type" field so the alarm shows as "Autosys Job Failed - alarmJobName = jobname".  There are a lot of possible job names that could fail.

     

    Thanks

    Steve Moore



  • 2.  Re: Can we get event message data into the "alarm Type"?
    Best Answer

    Posted Jun 04, 2018 02:18 PM

    You can use an Event Procedure How to Use Procedures in Event Processing - CA Spectrum - 10.2 to 10.2.3 - CA Technologies Documentation  to populate and append the trap varbind information to the dynamic alarm title variable Working with Events and Alarms - CA Spectrum - 10.2 to 10.2.3 - CA Technologies Documentation 


    These are also several knowledge documents on using different Event Procedures and the dynamic alarm title.

     

    Joe



  • 3.  Re: Can we get event message data into the "alarm Type"?

    Posted Jun 04, 2018 03:08 PM

    Great, thanks!  This looks like what I’m looking for.

     

     

     

    Thanks

    Steve Moore



  • 4.  Re: Can we get event message data into the "alarm Type"?

    Posted Jun 12, 2018 02:58 PM

    This has been helpful.  I also found a YouTube video showing some of what I need as well.  I’ve created the following entry in the EventDisp file.  It doesn’t seem to be working, and I can’t figure out what I’ve done wrong.  I was hoping someone could look at it and maybe tell me what’s off.

     

    0xffff0204 E 0 P "CreateEventWithVariables({C CURRENT_MODEL}, {H 0xffff0210}, SetEventVariable(GetEventVariableList(), {H 0x00012b4c}, Append({S\"Scheduling Application TestEnv Job Failue. Job Name "}, GetEventVariable({U 4}))))"

     

     

    Basically, we receive an event trap from an application.  That event has Event Rules to evaluate what device sent the trap, and what are the conditions of the trap, what job failed.  If it is one type of job, just an email, but if it is another type, we want to send an email and create a ticket.  We want to get the job name into the alarm title so it is available to the operators who monitor the console.

     

    What I expect to happen is that when alarm 0xffff0204, it will run the “CreateEventWithVariables” procedure for the current model, and create a new alarm 0xffff0210.  The alarm title {H 0x00012b4c} will be “Scheduling Application TestEnv Job Failure. Job name (variable 4).  The text of the alarm message would be the same as what we have in 0xffff0204.  Does the supplied procedure look like I should be getting what I expect, or do I just have a bunch of garbage in that line?

     

    Thanks

    Steve



  • 5.  Re: Can we get event message data into the "alarm Type"?

    Posted Jun 12, 2018 03:34 PM

    Steve,

     

    Whenever I work with Event procedures, I set the "event_disp_error_file=EventDisp_Error_File.txt" in the $SPECROOT/SS/.vnmrc file and restart the SpectroSERVER process. Then, when you click on the "Update Event Configuration" button in the SpectroSERVER Control subview of the VNM model or restart the SpectroSERVER process, any errors will be printed in this file.

     

    I put your Event Procedure in my $SPECROOT/custom/Events/EventDisp file and updated the Event Configuration. I see the following error in the $SPECROOT/SS/EventDisp_Error_File.txt:

     

    Error: parse failed: Procedure parsing failure
    Procedure did not parse successfully (error reason: Procedure parsing failure) for event 0xffff0204 on line 4 of event disposition file ../custom/Events/EventDisp
    0xffff0204 E 0 P "CreateEventWithVariables({C CURRENT_MODEL}, {H 0xffff0210}, SetEventVariable(GetEventVariableList(), {H 0x00012b4c}, Append({S\"Scheduling Application TestEnv Job Failue. Job Name "}, GetEventVariable({U 4}))))"
    Error: parse failed: syntax error. Parsing failed at position 0, the unparsed remainder is "

     

    Taking a closer looks at your Event Procedure, I see you are missing a "\" in your Append parameter for the second " character. So, I changed it to the following:

     

    0xffff0204 E 0 P "CreateEventWithVariables({C CURRENT_MODEL}, {H 0xffff0210}, SetEventVariable(GetEventVariableList(), {H 0x00012b4c}, Append({S \"Scheduling Application TestEnv Job Failue. Job Name \"}, GetEventVariable({U 4}))))"

     

    Saved the file and updated the Event Configuration. No errors in your Event Procedure.

     

    Joe



  • 6.  Re: Can we get event message data into the "alarm Type"?

    Posted Jun 12, 2018 03:40 PM

    Man, thanks!  I wasn’t aware of the EventDisp error file.  That was part of my problem, I couldn’t come up with a way of getting any kind of output to figure out what I had wrong.

     

    Thanks again, and with this additional information, I should be able to work it from here.

     

    Thanks

    Steve