DX NetOps

 View Only
  • 1.  Creating a boolean watch - Help

    Posted May 08, 2019 04:34 PM

    Hello everybody,


    I'm trying to create a watch expressions that verify if the interface is up (ifAdminStatus) and verify if the interface is in half-duplex mode (dot3StatsDuplexStatus). If both are true, generate an alarm.


    Doing this because whenever an interface is down, it's in half-duplex mode.
    I don't need alarms regarding half-duplex when an interface is down. Only need when interface is UP and in half-duplex mode.


    So I created two watches, everything following manual examples (https://docops.ca.com/ca-spectrum/10-3-0/en/managing-network/watches/alarm-script-and-watch-type-examples/watch-type-examples)



    First Watch:

    Name: True_Ref
    Data Type: Boolean


    Expression: 1
    Instance: None


    Default Activation: Inactive
    Evaluate: On Demand
    Threshold: None

    Second watch:

    Name: TesteDuplex1
    Data Type: Boolean


    Expression: ((ifAdminStatus.# == 1) & (dot3StatsDuplexStatus.# == 2))
    Instance: All


    Default Activation: Inactive
    Evaluate: By Polling
    Poll Interval: 60 seconds


    Threshold violated if value: == True_Ref
    Threshold reset if value: != True_Ref


    Alarm Severity: Minor
    Alarm Description: DuplexTest
    Script: None

    When activating both True_Ref and TesteDuplex1 watches:
    The True_Ref comes Active, with attribute value = Yes.
    The TesteDuplex1 is getting status: Internal Failure, with attributes varying between "true" and "false", like the image below.


    What am I doing wrong or what steps I'm missing ?


    Thanks in advance,

    Bruno Ogasawara

  • 2.  Re: Creating a boolean watch - Help

    Posted May 08, 2019 04:48 PM



    I see a dot3StatsDuplexStatus attribute id 0x12b28 but no dot3StatsDuplexState attribute on the interface model. 



  • 3.  Re: Creating a boolean watch - Help

    Posted May 08, 2019 04:58 PM



    Sorry, just wrote the wrong attribute in the post.

    In fact I'm using the dot3StatsDuplexStatus attribute.

  • 4.  Re: Creating a boolean watch - Help

    Posted May 08, 2019 05:56 PM



    No worries. Just wanted to verify.


    I think the issue may be that the dot3StatsDuplexStatus attribute id 0x12b28 is configured as a list attribute for the interface model type. This is seen by the blue table hot spot in the Attributes tab:



    I have seen something similar to this before.


    How I resolved it was to create a custom attribute on the interface model type using the Model Type Editor (MTE) and configure it to use the same index as the other interface attributes like ifAdminStatus and ifOperStatus.


    Here is how you can do that:


    1. Log into the SpectroSERVER system as the user that owns the Spectrum installation

    2. If on Windows, start a bash shell by running "bash -login"

    3. Shutdown the SpectroSERVER process

    4. cd to the $SPECROOT/SS directory and launch MTE by entering the following command:




    NOTE: If you SS is on Linux, you will need to have an Xterm running on your Windows client and set the DISPLAY on the Linux system to re-display to your Windows client. I use Xming.


    5. In the Navigation panel, click on the Model Types tab find and select the port model type. For this I am choosing Gen_IF_Port

    6. In the Contents panel, Click on the Attributes tab and create a new attribute by clicking on the "+" icon. Here is what I entered for the data:



    7. Click OK 

    8. Select File -> Commit to Database from the top level menu to save the changes and then File -> Exit to exit MTE

    9. Start the SS

    10. Log into OneClick 


    Now I see the following:



    Try creating your watch with your custom attribute.








  • 5.  Re: Creating a boolean watch - Help

    Posted May 09, 2019 11:14 AM

    Hi Joe,


    I've done the procedure you made.
    It seems to be working fine for Gen_If_Port model-type.
    I can see it getting the attribute value and storing it under the MyDot3StatDuplexStatus custom attribute, and also the Watcher is working fine.


    I'm trying to do the same to the other interface's model types that I have.
    They are Serial_IF_Port and VLAN_If.


    Both of them were created following your procedure, and both of them have the dot3StatsDuplexStatus attribute. ( The Model Type says Gen_If

    However, they are not getting any data like the attribute created on Gen_If_Port model type.



    My questions are:
    Does this procedure works for others model types ? (Not working for Serial_If_Port and VLAN_If. Both of them have the dot3StatsDuplexStatus attribute)
    Does the group influences in this custom attribute, or it's just to organize the attributes ? (In VLAN_If, there isn't a group 'datarelayprt')


    Thank you for your help, already learn a lot from your reply.



  • 6.  Re: Creating a boolean watch - Help
    Best Answer

    Posted May 09, 2019 01:22 PM

    The custom attribute is only for the Gen_IF_Port model type.


    I recommend using MIB Tools to query the dot3StatsDuplexStatus to verify if it has a value for the same instance as the ifIndex of the Serial_IF_Port is in this table. I think you will find it is not.


    The reason you see a value when reading dot3StatsDuplexStatus using the attribute editor for the model is because that attribute is setup in the database to read the entire table.