This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Can NPM create a custom table for a view that displays APC UPS Runtime and sorts ascending?

I'd like to replace my APC Struxureware application with NPM's snmp-discovered information about my APC UPS's.  One of the items of functionality that would allow me to do this is configuring NPM to display the top X UPS's by remaining Runtime in ascending order.

StruxureWare does this via snmp.  Here's a screen shot of their view:

pastedImage_0.png

I NPM can display the UPS Runtime remaining on any individual UPS,  along with a lot of other information that I don't want in the custom table:

pastedImage_1.png

Can you help me build a custom table to enter into a window of a View that collects all APC UPS RunTimeRemaining numbers, sorts them ascending, and displays the Top X in the view?  Or that displays any UPS's which have < X minutes of RunTimeRemaining?

Rick Schroeder

  • I'd be curious to know if anyone has been able to get the MIBs for these devices.  I contacted the company and they don't seem to be able to provide the MIB file SolarWinds requires.

  • I can think of only two options:

    • Do a MIB walk or SNMP discovery of one of your devices using NPM or the Toolset, then analyze the results and see what was discovered that can intuitively offer you the data you need.  Then create a custom report that leverage a UnDP that targets the MIBs you want displayed.
    • Check out this thread--I've leveraged its content heavily and have had excellent luck with customizing NPM to do what I need: APC SmartUPS Universal Device Pollers
  • Hi Rick,

    A couple ways. emoticons_happy.png Depending on NPM version might decide which one works best for you.

    First a custom table to do it, certainly the easiest. Add the data source...

    data-source.PNG

    Then add your columns ('Current Numeric Value' of the UnDP) and Node Name from the Node.

    custom-table.PNG

    Then voila!

    view.PNG

    If that for some reason doesn't work, here's a SWQL query for a custom query resource that does just this.

    #####################################################################################

    SELECT TOP 10 n.Caption, undp.CurrentValue, undp.DisplayName FROM

    (

        SELECT CustomPollerAssignmentOnNode.CurrentValue, CustomPollerAssignmentOnNode.NodeID, CustomPollerAssignmentOnNode.DisplayName FROM Orion.NPM.CustomPollerAssignmentOnNode AS       CustomPollerAssignmentOnNode

        WHERE CustomPollerAssignmentOnNode.DisplayName='upsAdvBatteryRunTimeRemaining'

    ) AS undp

    INNER JOIN Orion.Nodes n

    ON n.NodeID=undp.NodeID

    ORDER BY undp.CurrentValue ASC

    #####################################################################################

    This is basically the SWQL query from this link, just edited a bit: Understanding the Custom SLA Report SWQL query - SolarWinds Worldwide, LLC. Help and Support

  • I like what you've done here, but my NPM version 12.0.1 doesn't have a "RUN TIME REMAINING" option to select for the second column, therefore I can't complete the table properly.

    What version of NPM are you using?

  • Ahh just saw I renamed the column -- sorry about that emoticons_silly.png, it's actually 'Current Numeric Value' when looking for it.

    EDIT: That or 'Current Value'. I believe depending on how you want to see the data. Current Value may look better and be more NOC friendly.

    pastedImage_0.png

  • With help from others, I was able to build a useful View this way:

    pastedImage_0.png

    pastedImage_1.png

    The Custom Query is:

    SELECT

      N.NODEID,

      N.CAPTION AS 'DEVICE',

      N.LOCATION AS 'LOCATION',

      CPS.STATUS AS 'CURRENT STATUS',

      CPS.DATETIME AS 'LAST POLLED'

    FROM NODES N

    JOIN CUSTOMPOLLERASSIGNMENT CPA ON N.NODEID = CPA.NODEID

    JOIN CUSTOMPOLLERSTATUS CPS ON CPA.CUSTOMPOLLERASSIGNMENTID =

    CPS.CUSTOMPOLLERASSIGNMENTID

    WHERE CPA.CUSTOMPOLLERID IN (SELECT CUSTOMPOLLERID FROM CUSTOMPOLLERS WHERE

    UNIQUENAME = 'UPSADVBATTERYREPLACEINDICATOR')

    AND CPS.STATUS = 'batteryNeedsReplacing'

    ORDER BY CPS.STATUS, N.LOCATION, N.CAPTION

    The output is inserted into my NOC view:

    pastedImage_2.png

    Now I can at least see which batteries need replacing.  But I'd like to use your process to show which UPS's have the least amount of run time available.  Let me know your NPM version, please?  Or, if you have suggestions for accomplishing this with 12.0.1, I'd enjoy reading them.

  • I'm on NPM 12.1 right now. Nice! Not sure why, but I love custom queries.

  • Perfect--that did it.

    Now my NOC view has this Resource in it, thanks to your help:

    pastedImage_0.png

    And now my UPS team has a new way to prioritize their work.  I wish I could mark your response as the Correct Answer--that's not an option.  But you got me going--thank you very much, @sum_giais!