DX NetOps

Expand all | Collapse all

Availability according a variable

Jump to Best Answer
  • 1.  Availability according a variable

    Posted 03-07-2017 08:57 AM

    Hi there,

     

    I am trying to extend a vendor certification but until now I only catch a new variable value but I don't know how to perform a calculation to give me the availability.

    I explain:
    The OperStatus must be 2, how can I calculate the availability of a device component (or anything else) according this variable? It must be 2, if not the availability is affected....

     

    Thank you in advanced.



  • 2.  Re: Availability according a variable

    Posted 03-08-2017 03:03 PM

    Hello Diogo,

     

    I don't believe ifOperStatus is a pollable MIB OID. We can query it during discovery and updates to see if it changed, but its a static value that we don't support as a pollable OID.

     

    I wonder what your goal is here? Curious how you'll use ifOperStatus value 2, which is a down interface, to provide Availability?

     

    I would assume any interface set to ifOperStatus=2 isn't going to be Available.

     

    Thanks,

    Mike



  • 3.  Re: Availability according a variable

    Posted 03-09-2017 04:53 AM

    The goal is to measure the availability of a "Wireless Interface" aka Cisco AP. So, polling the OperStatus or AdminStatus I could get this metric.

    I am searching and I found something. Can I use something like below?

     

    <Expression destAttr="AdminStatus"><![CDATA[
    if ( (isdef bsnAPAdminStatus) && (bsnAPAdminStatus==1) ) {
    return 100;
    }
    else {
    return 0;
    }
    ]]>
    </Expression>



  • 4.  Re: Availability according a variable

     
    Posted 03-09-2017 12:32 PM

    Take a look at IfTableMib, it is doing something like this already - Availability is set to 100% when ifOperStatus = 1. There are three destAttrs to look at: OperStatus, OperStatusPollable, and Availability. There are two status attributes for historical reasons; OperStatus is used for discovery & filtering, OperStatusPollable is a polled metric you can report on.

     

     

    Here are the expressions from IfTableMib:

     

    <Expression destAttr="OperStatus">ifOperStatus</Expression>

    <Expression destAttr="AdminStatus">ifAdminStatus</Expression>

    <Expression destAttr="OperStatusPollable">ifOperStatus</Expression>

    <Expression destAttr="AdminStatusPollable">ifAdminStatus</Expression>

    <Expression destAttr="Availability">(ifOperStatus == 1) ? 100 : 0</Expression>

     

    The expression you found is the same thing, only with an isdef included for safety, and on a different attribute.



  • 5.  Re: Availability according a variable

    Posted 03-16-2017 12:40 PM

    Hi Diogo,

     

    I was curious if the information Gerald provided above helped with this request. Does this remain unresolved for you?

     

    Thanks,

    Mike



  • 6.  Re: Availability according a variable
    Best Answer

    Posted 03-16-2017 01:00 PM

    I solved that using the tip above:

    <Expression destAttr="Availability">(bsnDot11EssAdminStatus == 1) ? 100 : 0</Expression>

     

    But in this case I applied some cases like:

    And also for Channel Availability:

    <Expression destAttr="Availability">
    <![CDATA[
    if ( (isdef wlanAPRadioChannel) && (wlanAPRadioChannel>0) ) {
    return 100;
    }
    else {
    return 0;
    }
    ]]>
    </Expression>



  • 7.  Re: Availability according a variable

    Posted 03-16-2017 01:03 PM

    Thanks for the follow up Diogo!!

     

    Now if other users search for the same thing hopefully they'll find the answer.