DX NetOps

 View Only
Expand all | Collapse all

SPECTRUM - Need to create a locater filter or a GC by attribute "ifadminstatus" (10e3f)

  • 1.  SPECTRUM - Need to create a locater filter or a GC by attribute "ifadminstatus" (10e3f)

    Posted Apr 14, 2021 12:18 PM
    Hi Guys,

    Need some help in creating a Locater search in interfaces of some devices by attribute IfAdminStatus, but couldn´t find that attribute in the available list to build the filter, do you have any idea of how to achieve that?

    Another way i was trying is to create a GC with all the interfaces of those devices but filtered by adminstatus, again didn´t find that attribute.

    Any ideas?

    thanks for your attention.

    BR


  • 2.  RE: SPECTRUM - Need to create a locater filter or a GC by attribute "ifadminstatus" (10e3f)

    Broadcom Employee
    Posted Apr 15, 2021 08:52 AM
    Edited by Silvio Okamoto Apr 15, 2021 09:21 AM
    Hi Vasco,

    Note that ifAdminStatus is an external attribute. Use this search with caution to avoid performance issues.



    You can find the ifAdminStatus (0x10e3f) attribute ID under the Port Gen_IF_Port model type:


    ------------------------------
    Technical Support Engineer IV
    Broadcom Inc
    ------------------------------



  • 3.  RE: SPECTRUM - Need to create a locater filter or a GC by attribute "ifadminstatus" (10e3f)

    Posted Apr 15, 2021 09:58 AM

    Hi Silvio

     

    Thanks again for your attention and advise ��

    I´ve been searching only at root of ports folder thinking that should get all attributes of all subfolders like the GEN_IF_PORT, but understood now that I need to go  into all categories to search inside them .

     

    Thanks again.

     

    BR

    Cmpts

    ___________________________________________________________________________________________

     

     

    A picture containing writing implement, pencil, stationary, pen  Description automatically generated

    Vasco Lobão Pereira

    Operations Support Systems

     

    M: +351 914 762 211

    A picture containing graphical user interface  Description automatically generated

    AVISO: A informação contida neste e-mail e ficheiros anexos são confidenciais e deverão ser lidos exclusivamente pela pessoa ou entidade a quem se dirigem. Se recebeu esta comunicação por engano, por favor, informe de imediato o remetente e apague a mensagem e os ficheiros anexos sem os ler, copiar, gravar, distribuir ou divulgar ou fazer qualquer outro uso da informação. Lembre-se da sua Responsabilidade Social Ambiental antes de decidir imprimir este e-mail.

     

     

     






  • 4.  RE: SPECTRUM - Need to create a locater filter or a GC by attribute "ifadminstatus" (10e3f)

    Posted Apr 15, 2021 11:13 AM
    I would advise you not to create a search based on an external attribute. As Silvio was showing, Memory Attributes should be used first, then Database Attributes.

    ------------------------------
    Senior Consultant
    SolvIT Networks
    ------------------------------



  • 5.  RE: SPECTRUM - Need to create a locater filter or a GC by attribute "ifadminstatus" (10e3f)

    Posted Apr 16, 2021 07:15 AM

    Hy Guys,

     

    Let me explain why of this thread, i have a customer request that needs to have the data from Operstatus and Adminstatus each 5 minutes from 100 000 interfaces, so i´ve been trying to get this info through the API (created a GC with teh needed interfaces) and retrieve the atributes from GC, but  those are external attributes, so i´m getting around 10 to 15 m to retrieve this data because he query each one at that moment.

    Using SRM, but info is old, so is not a solution

    Maybe creating a X_OperStatus with the value of last poll that should be in DB, like happens with X_IfAlias and couple moe X_Attributes ? Is this possible to do ?

     

    Any ideas of how could retrieve this data more quick less then 5 minutes ?

     

    Appreciate your help and thanks for your attention

    BR




  • 6.  RE: SPECTRUM - Need to create a locater filter or a GC by attribute "ifadminstatus" (10e3f)

    Posted Apr 16, 2021 09:24 AM
    Edited by Catalin Farcasanu Apr 16, 2021 09:25 AM
    That is exactly what I had in mind: poor design for a solution. That's not the way to monitor IfAdminStatus and IfOperStatus.

    What's the benefit of having every 5 minutes the value of ifAdminStatus and ifOperStatus? I'll tell you, there's none. If you want to see a change in this parameter, monitor it using PM and add it to the attributes that the Interfaces MF polls. I believe these are not polled there either by default. There ifAdminStatus  is evaluated every 24 hours. 

    For interfaces monitoring SPECTRUM relies mainly on traps sent by the devices. Based on those traps, the status of the interfaces is changed and bad link alarms are created. Maybe you should use that system to create/manage a separate attribute that would update value of an attibute to match the current OperStatus/AdminStatus of an interface. Then run that GC based on this attribute.

    Do you know why it takes 15 minutes to evaluate the GC? Cause all statuses have to be read from all interfaces. That's exactly what you shouldn't do.  

    You have to understand what the client wants, and not to be afraid to say No, if the customer asks some dumb things.

    ------------------------------
    Senior Consultant
    SolvIT Networks
    ------------------------------



  • 7.  RE: SPECTRUM - Need to create a locater filter or a GC by attribute "ifadminstatus" (10e3f)

    Posted Apr 16, 2021 09:52 AM
    Hi Catalin,

    You are right, but some times, the answer doesn´t depend only from us :-), anyway thanks for the advice.

    Regarding what you said :
    "...Maybe you should use that system to create/manage a separate attribute that would update value of an attribute to match the current OperStatus/AdminStatus of an interface..."

    That was the path i was thinking to follow, but need some help from your expert in how to do achieve this in spectrum, can you guide me please?
    From my understanding, the idea should be... each time we receive a trap related to interface status, update a new attribute of that interface with that value, this should be done to traps of adminstatus and operstatus probably and this way i have the info from interfaces status :-)

    Appreciate your help and time :-)
    Thanks


    BR


  • 8.  RE: SPECTRUM - Need to create a locater filter or a GC by attribute "ifadminstatus" (10e3f)

    Posted Apr 19, 2021 04:49 AM
    That is exactly what I mean. There are several steps:

    1) Expand the ModelType with new attibutes: InternalIffOperStatus, LastInternalIffOperStatusTime, InternalIfAdminStatus, LastInternalIfAdminStatusTime. Make sure you have at least 2 attributes (InternalIffOperStatus, LastInternalIffOperStatusTime) marked with Memory, so you'd get fast response on the GC defined query. I think it would be a good idea to store the timestamp of the last recorded/processed change of each attribute.

    2) Use Event Procedures to modify the default events for modifying the newly created attributes to corresponding values. You should use WriteAttribute and GetCurrentTime Event Procedures. Create new events for this process, avoid changing default events. 

    3) Verify the change of the attributes based on multiple tests.

    4) Create your required GCs based on the new created attributes. 

    You can take as reference for your new attributes some of the existing ones. You'll find at least one Attribute that is of type TimeTicks or status. You can have the external ones as reference, only to map them to new ones. There's a Last_Successful_Poll attribute of type Time Ticks. 

    You'll have a way to display those values at interface level, in a new subview for the interface.

    I did something similar for a customer of mine. 


    ------------------------------
    Senior Consultant
    SolvIT Networks
    ------------------------------



  • 9.  RE: SPECTRUM - Need to create a locater filter or a GC by attribute "ifadminstatus" (10e3f)

    Posted Apr 20, 2021 12:01 PM

    Hi Catalin

     

    I´ve could crete those attributes in our lab environment, but now i´m lost with the mapping is needed to do:

     

     

    Can you help me with the event procedure and were I needed to do? (this is the 1st time i´m doing this task �� )

     

     

    BR

    Cmpts

    ___________________________________________________________________________________________

     

     

    A picture containing writing implement, pencil, stationary, pen  Description automatically generated

    Vasco Lobão Pereira

    Operations Support Systems

     

    M: +351 914 762 211

    A picture containing graphical user interface  Description automatically generated

    AVISO: A informação contida neste e-mail e ficheiros anexos são confidenciais e deverão ser lidos exclusivamente pela pessoa ou entidade a quem se dirigem. Se recebeu esta comunicação por engano, por favor, informe de imediato o remetente e apague a mensagem e os ficheiros anexos sem os ler, copiar, gravar, distribuir ou divulgar ou fazer qualquer outro uso da informação. Lembre-se da sua Responsabilidade Social Ambiental antes de decidir imprimir este e-mail.

     

     

     






  • 10.  RE: SPECTRUM - Need to create a locater filter or a GC by attribute "ifadminstatus" (10e3f)

    Posted Apr 22, 2021 04:38 AM
    Hi catalin,

    I´m created the new attributes inMTE, on ModelType "Gen_If_Port" (thas the type of interfaces i want to have those attributes showing), and they appear on interface attribute list, but i´m confused on next steps... created already the bellow entries in /$SPECROOT/custom/Events/EventDisp file:

    0x00010e3f E 50 P "WriteAttribute( { C CURRENT_MODEL }, { H 0x00010e3f }, { H 0xffff0766 } )" For ifAdminstatus
    0x00010e40 E 50 P "WriteAttribute( { C CURRENT_MODEL }, { H 0x00010e40 }, { H 0xffff0767 } )" for ifoperstatus

    But nothing happens, were i´m failing ? wrong file to create the entry? the procedure is not well formed?

    Appreciated for some help
    Thanks again  for your time

    Best Regards




  • 11.  RE: SPECTRUM - Need to create a locater filter or a GC by attribute "ifadminstatus" (10e3f)

    Posted Apr 22, 2021 05:17 AM
    I think the syntax is wrong. If you want to write to an attribute the value of another attribute, you'd have to use the GetAttributeValue Event Procedure first (to actually read the value that you want to copy), in conjunction with WriteAttributeValue (to actually write the value).

    You don't have to use the value of the other attribute. You can make up for yourself a coding for your attributes, so you'd know what the value means, or you can use the coding that the system uses by default. 

    Instead of doing a GetAttributeValue (which in your case means a snmp poll on the device) followed by an WriteAttributeValue, you can use directly WriteAttributeValue with the coding that I was mentioning earlier. For example, for AdminStatus, the default coding used by the system is:
    ---
    0x00000001 up
    0x00000002 down
    0x00000003 testing
    ---
    So, for modifying the value of IfAdminStatus to up, you'd have to do this:
    ---
    0x00010e3f  E50 P "\
    WriteAttribute (\
    {C CURRENT_MODEL},\
    {H 0xffff0766},\
    {I 1})"
    ---
    For the timestamp that i was mentioning earlier you should do smothing similar with:
    ---
    0x00010e3f  E50 P "\
    WriteAttribute (\
    {C CURRENT_MODEL},\
    {H $ATTRIBUTE_HANDLE_OF_TS},\
    GetCurrentTime())"
    ---
    What you should do, is to minimize the work that the system should perform, as if you have many interfaces. 

    Default coding for statuses comes from:
    $SPECROOT/SG-Support/CsEvFormat/EventTables/ifAdminStatus_en_US
    $SPECROOT/SG-Support/CsEvFormat/EventTables/ifOperStatus_en_US

    ------------------------------
    Senior Consultant
    SolvIT Networks
    ------------------------------



  • 12.  RE: SPECTRUM - Need to create a locater filter or a GC by attribute "ifadminstatus" (10e3f)

    Posted Apr 22, 2021 09:27 AM
    Thanks for your help,

    I´ve created this entries in SPECROOT/custom/Events/EventDisp, but with no effect to the new attributes:

    0x00010e3f E 50 P "WriteAttribute({C CURRENT_MODEL},{H0xffff0768},GetAttributeValue({H 0x00010e3f}))"
    0x00010e3f E 50 P "WriteAttribute({C CURRENT_MODEL}, {H 0xffff076a},GetCurrentTime())"

    0x00010e40 E 50 P "WriteAttribute({C CURRENT_MODEL},{H 0xffff0769},GetAttributeValue({ H 0x00010e40}))"
    0x00010e40 E 50 P "WriteAttribute({C CURRENT_MODEL}, {H 0xffff076b},GetCurrentTime())"

    This entries are in the right location? custom EventDisp ?


    Thanks for your time

    BR


  • 13.  RE: SPECTRUM - Need to create a locater filter or a GC by attribute "ifadminstatus" (10e3f)

    Posted Apr 23, 2021 05:59 AM
    Hi catalin,

    Do you know were i can find the AlertMap or EventDisp file of 10e3f ?

    My idea is, when a trap or polling of 10e3f (ifAdminStatus) is received, copy the state to a memory/BD attribute i already created (ffff0768), this way i will query the interfaces on the GC by the internal new attribute (created in ModelType gen_if_port).

    i know that when a trap/poll is received or made, the SS maps the TrapType to a Event code and then with that event code finds the Procedure to execute in a EventDisp, till here no problem, the difficult i´m facing is that, from my understanding (maybe wrong :-) ) , i should append the new procedure (to copy the value to the new internal attribute) in the procedure were 10e3f is defined (think in a EventDisp) and this way i don´t need to ask again the interface state, but i can´t find nothing related with 10e3f in any place.

    Already tried creating a procedure in the custom EventDisp:
    0xfff00049 E 50 P "WriteAttribute({C CURRENT_MODEL},{H0xffff0768},GetAttributeValue({H 0x00010e3f}))
    This created a new event but the new attribue is not updated.

    Can you help me please? i´m getting desperate

    Thanks for your attention
    BR


  • 14.  RE: SPECTRUM - Need to create a locater filter or a GC by attribute "ifadminstatus" (10e3f)

    Posted Apr 23, 2021 06:38 AM
    I gave you the code to use earlier. Everything that is for events in $SPECROOT/custom/Events takes precedence over existing configuration, so it does not matter where the event is configured. 

    For searching for a event code in the EventDisp files you can run a find command in $SPECROOT: "find . -type f -name EventDisp|xargs egrep $EVENT_CODE". This will return all fines that contain the specified event code. You can use a similar command for finding all AlertMap files that contain a certain event code. 

    ---
    [nmsadmin@spectrum spectrum]$ find . -type f -name AlertMap |xargs egrep 10e3f
    ./Install-Tools/LOGS/10.2.3.0.107_20200304/UnInstallData.16.01/SS/CsVendor/Cisco_Router/AlertMap:1.3.6.1.4.1.9.9.198888.0.3.6.2 0x00210e3f 1.3.6.1.4.1.9.9.198888.0.1.15(1,0)\
    ./SS/CsVendor/Cisco_Router/AlertMap:1.3.6.1.4.1.9.9.198888.0.3.6.2 0x00210e3f 1.3.6.1.4.1.9.9.198888.0.1.15(1,0)\
    [nmsadmin@spectrum spectrum]$ find . -type f -name EventDisp |xargs egrep 10e3f
    ./Install-Tools/LOGS/10.2.3.0.107_20200304/UnInstallData.16.01/SS/CsVendor/Cisco_Router/EventDisp:0x00210e3f E 20
    ./SS/CsVendor/Cisco_Router/EventDisp:0x00210e3f E 20
    [nmsadmin@spectrum spectrum]$
    ---

    Not all events are created by traps received from devices. There are also internal events, created by the system that do not show up in any EventDisp or AlertMap.


    I'm assuming you instruct both SpectroSERVER and OneClick server to reload the Event Configuration files, after you make changes to any of the event configuration files. 

    Again, your code is doing an unnecessary request to the device for the value of 0x00010e3f. There's a procedure to debug Event Processing and one for Event Procedures.


    ------------------------------
    Senior Consultant
    SolvIT Networks
    ------------------------------