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.

Select and Count from Custom Poller Chart

FormerMember
FormerMember

I'm using the ifNumber MIB in a custom poller to get a total count of ports, but now I need to get a total number of UP interfaces. I can't seem to find a MIB that supports such a request, but I found ifOperStatus. The problem I have is that it is in chart from. Is there a way to use the report writer to only select rows from that poller that are UP and then count the total?

  • if you know the values expected it would look something like this:

    Select COUNT(ifOperStatus) as cnt, ifOperStatus

    from <table getting info from>

    where ifOperStatus=<value looking for>

    group by ifOperStatus

  • FormerMember
    0 FormerMember in reply to njoylif

    Where would the custom poller chart results be stored as a table?

  • lets go another way for a minute...are all your interfaces being monitored by Orion?

    If so, it would probably be much easier to hit the interfaces table and get the info.  Let me know.

  • FormerMember
    0 FormerMember in reply to njoylif

    Unfortunately they are not.

  • can you export and attach UnDP here and what type of device are you running it against?

  • FormerMember
    0 FormerMember in reply to njoylif

    I'm running it against Cisco and Brocade switches. Well I'm not currently using it until I can get it's output into a report.

    IfOperStatus2.UnDP
  • try this to get you started.

    select p.uniquename, a.assignmentname, a.nodeid, count(s.status) as countOfStatus2, s.status

    FROM custompollers p left join custompollerassignment a

            on p.custompollerid=a.custompollerid

        left join custompollerstatus s

            on a.custompollerassignmentid=s.custompollerassignmentid

    where p.uniquename='ifOperStatus2' and s.status='2'

    group by p.uniquename, a.assignmentname, a.nodeid, s.status

    let me know.

    Message was edited by: Larry J Rice figured out error - status field is varchar not in.  had to put '' around 2

  • FormerMember
    0 FormerMember in reply to njoylif

    Ahh!!! You're a genius!! I changed s.status to '1', since that is the "Up" status. But other than that it appears to work.

    Also I'm not sure why, but when I test the Custom Poller as I assign it, I get many responses, but when I run the report, I only see a fraction of those nodes listed in the report. For example, normally I'd have 18 pages of nodes in a report, however when I run this report I'm only getting 4 pages worth of nodes.

  • that should be because you are taking a count of all interfaces on a given node now.  Before you were listing all interfaces per node.  now, you only have 1 line per node.

  • FormerMember
    0 FormerMember in reply to njoylif

    No I'm missing nodes in this report. But I have found the problem.

    When I go to UnDP and test the assignment of the poller on the nodes I get responses for all interfaces. However, when I go to the web interface and view the poller results it only displays results for interfaces that I'm managing, not a chart of all interfaces and their statuses (which is what I was expecting).

    Is this a behavior of SW or did I create the poller incorrectly?