DX Infrastructure Manager

Expand all | Collapse all

Assign to a USM-user from UIM (Infrastructure Manager)

Jump to Best Answer
  • 1.  Assign to a USM-user from UIM (Infrastructure Manager)

    Posted 10-01-2015 10:17 AM

    Hi,

     

    I'm trying to create an auto-profile in NAS, that triggers on a specific alarm if the alarm is assigned to a user, which is created under an account in USM/UMP.
    The problem here is that you can't see the users from USM in NAS.

    Is there any workaround here? I've before tried to change the user directly in the NAS.cfg. But that really messed things up later when I tried to do changes on the same profile again from the NAS-gui.



  • 2.  Re: Assign to a USM-user from UIM (Infrastructure Manager)

    Posted 10-01-2015 12:36 PM

    Hi rith,

     

    If you look at using just AO's to find the assignment event rather than adding triggers into the mix,

     

    I would go with an AO set to run on "Message assigned to" with "<any>" as the condition, have the "Action Type" as "Script", Action Mode as "On Overdue Age" of 5 seconds (i ran into some issues testing with "on arrival"...seemed like it wanted a few seconds to digest the change, but that could be me).  See below sample:

     

    2015-10-01_12-26-24.png

     

    The script can then do all you need in terms of evaluating the alarm (as Marco_Ippati indicated), setting anything you have for the emailgtw, etc.  I assume the code you have now sets all those correctly as you outlined in your first post?

     

    Just a thought.



  • 3.  Re: Assign to a USM-user from UIM (Infrastructure Manager)
    Best Answer

    Broadcom Employee
    Posted 10-01-2015 10:51 AM

    You might be able to do that using a LUA script as below:

     

    a = alarm.get()

    if a.assigned_to == "<AccountA/UserA>"

    then

    nimbus.alarm  ( SeverityLevel, MessageText [, SuppressionKey [, SubsystemId [, Source]]] )

    end



  • 4.  Re: Assign to a USM-user from UIM (Infrastructure Manager)

    Posted 10-05-2015 06:33 AM

    Guys, thank you! It worked! No need for the trigger

     

    I used "on overdue age = 1 min", and it works perfectly.

     

    Script then looks like this:

     

    a = alarm.get()

    if a.assigned_to == "test/test1"

    then

    myArgs=pds.create()

    pds.putString(myArgs,"name", "emailgtw")

    pds.putString(myArgs,"section", "/profiles/RESURSTEKNIK")

    pds.putString(myArgs,"key", "email")

    pds.putString(myArgs,"value", "email@test.se, email2@test.se")

     

    response, retcode = nimbus.request("/Enterprise/nimsoft/hubnim1", "probe_config_set", myArgs)

     

    local resp,rc = nimbus.request ("/Enterprise/nimsoft/hubnim1/emailgtw", "_restart")

     

    print (retcode," ", response)

     

    end

     

     

    if a.assigned_to == "test/test2"

    then

    then

    myArgs=pds.create()

    pds.putString(myArgs,"name", "emailgtw")

    pds.putString(myArgs,"section", "/profiles/RESURSTEKNIK")

    pds.putString(myArgs,"key", "email")

    pds.putString(myArgs,"value", "email3@test.se, email4@test.se")

     

    response, retcode = nimbus.request("/Enterprise/nimsoft/hubnim1", "probe_config_set", myArgs)

     

    local resp,rc = nimbus.request ("/Enterprise/nimsoft/hubnim1/emailgtw", "_restart")

     

    print (retcode," ", response)

     

    end

     

    end so on....

     

    What I'm trying to create here is:

    First I created a rawalarm, scheduled every day (or whenever) which say something like: "Assign this message to he who has the standby duty".

    The one (or someone else) who has the "standby duty" will then assign this message to a specific account/user, and then this script will change the emailgtw-profile so that other important AO-profile will send mail/SMS to the correct person on duty.

    It's also an easy way for our monitoring/operation-staff to see who's on duty, if they've switch days/weeks in the standby-schedule.

    This might be useful for someone else.



  • 5.  Re: Assign to a USM-user from UIM (Infrastructure Manager)

    Posted 10-01-2015 11:30 AM

    Thx for your reply, Marco!

     

    I'm not sure that will work in my case, but I hope I'm wrong.?

    What I'm trying to create is that you should be able to assign the alarm to a user. After that I have a trigger that detects when this alarm is assigned. When the trigger is activated, then an auto-profile run a script, this script needs to know who the assigned user is, and then change an e-mail address on a profile in the emailgtw-probe, to the assigned user's e-mail adress.

     

    I've tried to use a variant of your script. But it I don't get it to work :/

    Does the trigger bring back the information in the alarm to the auto-profile?



  • 6.  Re: Assign to a USM-user from UIM (Infrastructure Manager)

    Broadcom Employee
    Posted 10-05-2015 12:01 PM

    Hi rith, Thanks for sharing your solution!

     

    Marco

    CA Support