Source

opennms-mirror / PollerNotes.txt

Generating Status Change Events

These are the operations that are required to generate the correct events and outages

X Procedure A element - processStatusChanged
1. On a service going down - processGoingDown
	processGoingDown
3. On a service coming up - processComingUp
	processComingUp
	
X Procedure A container - processStatusChanged
2. On a container going down - processGoingDown
	processGoingDown
4. On a container coming up - processComingUp
	processComingUp
5. On a container being up but unchanged
	perform these steps for each of its members
	
X processComingUp
	Event upEvent = sendEvent(createUpEvent(date))
	PollEvent resolution = new PollEvent(upEvent, date);
	processResolution(getCause(), resolution);
	
X processResolution - element
	resolveOutage
	
X processResolution - container
	resolveOutage
	for each member procedureB(cause, resolution)
	
X resolveOutage - element
	setCause(null);
	
X resolveOutage - service
	super.resolveOutage
	close outage in db
	
X processGoingDown
	Event downEvent = sendEvent(createDownEvent(date));
	PollEvent cause = new PollEvent(downEvent, date);
	processCause(cause);
	
X processCause - element
	createOutage(cause)
	
X processCause - container
	super.processCause(cause);
	for each member
		member.processCause(cause);

X createOutage - element
	setCause(cause)
	
X createOutage - service
	super.createOutage(cause);
	open outage in db
	
X resolveAllOutages(cause, resolution) - element
	if (cause.equals(getCause())
		resolveOutage(resolution)
	
X resolveAllOutages(cause, resolution) - container
	super.resolveAllOutages(cause, resolution)
	for each member
		member.resolveAllOutages(cause, resolution)
	
	
X Procecure B - processLingeringCauses
2. On a container down with the cause the same as resolvedCause
	resolveAllOutages
	processGoingDown

4. On a container down with a different cause
	do nothing

6. On a container up with a cause the same as resolvedCause
	processResolution

8. On a container up with a cause different than resolvedCause
	processComingUp
	
	
	
	
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.