Scenario:
- Create a custom poller for sysUpTime.
- Add a node to NPM using the non-FQDN.
- Assign Poller sysUpTime to node.
- Time goes by and data gets collected.
- Edit the node and change the caption from the non-FQDN to the FQDN
- Time goes by and no data gets collected.
Dissection of problem:
- It appears that the relationship between the node and the custom poller is stored in the database in the CustomPollerAssignment table
- This sql will return the relationship between the custom poller and the node
select nodes.caption,nodes.nodeid
from nodes,CustomPollerAssignment
where nodes.nodeid=CustomPollerAssignment.nodeid and CustomPollerAssignment.AssignmentName='sysUpTime on hostname';
- Notice that the AssignmentName contains the caption of the node.
- When the caption of the node changes to FQDN the CustomPollerAssignment table doesn't get updated with the change in the AssignmentName name.
Work Around:
- Unassign the custom poller from the node
- Assign the custom poller to the node
- The CustomPollerAssignment table gets updated with a new AssignmentName that includes the FQDN caption. example AssignmentName = 'sysUpTime on hostname.example.com'
- Data starts collecting again.
- Use CustomPollerAssignmentView instead of CustomPollerAssignment when writing sql
select nodes.caption,nodes.nodeid
from nodes,CustomPollerAssignmentView
where nodes.nodeid=CustomPollerAssignmentView.nodeid and CustomPollerAssignmentView.AssignmentName='sysUpTime on hostname.example.com'
Unresolved issues:
- Detecting the situation is difficult.
- Historical data is lost when the poller is re-assigned.
- Node pages that display graphs for Custom pollers never finish loading data.
- Node pages are not using the CustomPollerAssignmentView for rendering custom poller graphs.
- The CustomPollerAssignmentView has poor performance.
- When running a sample query against the CustomPollerAssignment table the execution time is around 10ms
- When running a sample query against the CustomPollerAssignmentView the execution time is around 6 seconds
Is this a bug ?