Surveillance/Dashboard information incoherent

Description

In both Surveillance and Dashboard, I've got several cells with the information suggested by the attachment file: yellow or red color with "0 of X" text.

Since color means the number of services down (view source-code "SurveillanceStatus" and "NodeDaoHibernate$SimpleSurveillanceStatus"), I don't understand why "0 of X". I should see a number greater than 0 in the text, right?

Environment

OpenNMS 1.8.16 CentOS 5.4 / RHEL 5.4 Java 1.6.23

Acceptance / Success Criteria

None

Attachments

2

Lucidchart Diagrams

Activity

Show:

Seth Leger March 20, 2012 at 4:02 PM

This Hibernate query does have some issues... basically the "0 of 11" means that zero nodes are COMPLETELY unreachable. If they have ANY services that are up, they are not considered down.

We need to enhance the UI so that the meaning is clearer. This issue also causes the confusion in bug .

Vitor Moreira February 27, 2012 at 1:32 PM

Ok, check the code and found the "AggregatorStatus".
After all, I think the meaning of dashboard is:

  • colors:

    • green: 0 services down

    • yellow: 1 service down

    • red: >1 service down

  • numbers:

    • left number: number of nodes that are actually down

    • right number: total number of nodes

Vitor Moreira February 27, 2012 at 7:27 AM

I've analyzed the source code from version 1.8.16 and 1.10.0 and found the following:
"NodeDaoHibernate$SimpleSurveillanceStatus.getDownEntityCount()" returns "m_nodeCount - m_upNodeCount". So, m_nodeCount => total number of nodes and m_upNodeCount => number of nodes without any outage, where "getDownEntityCount" returns the number of nodes with problems.

In "NodeDaoHibernate", in SQL statement:
– original source code –
count(distinct case when outages.outageid is null and monSvc.status = 'A' then node.nodeid else null end) as upNodeCount,
– original source code –

Shouldn't be?
– proposed source code –
count(distinct case when outages.outageid is not null and monSvc.status = 'A' then node.nodeid else null end) as downEntityCount,
– proposed source code –

In method "getDownEntityCount", instead of returning "m_nodeCount-m_upNodeCount", we should return m_downEntityCount directly.

Applying the patch, both Surveillance and Dashboard looks very nice but, when I link in the new "1 of 11", there are any node in the list. I'm working in that now.

Vitor Moreira February 27, 2012 at 7:18 AM

Patch for class NodeDaoHibernate

Details

Assignee

Reporter

Labels

Components

Affects versions

Priority

PagerDuty

Created February 27, 2012 at 7:17 AM
Updated September 21, 2021 at 6:23 PM