Add the ability to "steal" an alarm from another user

Description

At some client's, the NOC runs in shifts. If an issue spans a shift, they would like the ability to transfer the ownership of one alarm to another person - perhaps on the next shift.

I think it would be difficult for us to manage permission on a wide open "transfer" action, but what about "steal"? Could we add a "steal" button so that if someone is looking at an alarm they can take it - replacing the owner with their current login name.

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

Alejandro Galue May 20, 2011 at 2:55 PM

I made a very simple test from the command line, and I think I found a way to do that (without large changes in the code, just on the Alarms Controller): First unacknowledged the alarm, then acknowledge again. If that operation is done by the user interested to steal the alarm, the operation is done.

Suppose that exists an alarm with ID=100 which is owned by user1, and user2 want to steal the alarm. The user2 could do this from command line:

To unacknowledged from user1:
curl -d 'actionCode=unack&alarm=251' http://user2:xxxx@localhost:8980/opennms/alarm/acknowledge

To re-acknowledged as user2:
curl -d 'actionCode=ack&alarm=251' http://user2:xxxx@localhost:8980/opennms/alarm/acknowledge

So the change in the code could be just add a new action code called "steal", and the code will look like this:

...
} else if (action.equals("steal")) {
m_webAlarmRepository.unacknowledgeAlarms(alarmIds, request.getRemoteUser());
m_webAlarmRepository.acknowledgeAlarms(alarmIds, request.getRemoteUser(), new Date());
} else {
throw new ServletException("Unknown acknowledge action: " + action);
}

An improvement could be to put the steal processing inside WebAlarmRepository, in order to validate that the alarm should be already acknowledged and owned by a different user.

Thoughs ?

Alejandro Galue May 20, 2011 at 2:27 PM

If I understood correctly, the idea is, when a user is looking at the acknowledged alarms, and the user is interested on a particular alarm, it could be useful to include a "Steal Button" at the Alarms Details Page, to let the user change the ownership of the alarm with their current login name.

Is that right ?

Of course the "Steal Button" will be showed only for acknowledged alarms where the current user is different from the user who acknowledged the alarm in the first place.

Details

Assignee

Reporter

Affects versions

Priority

PagerDuty

Created January 28, 2011 at 12:10 PM
Updated July 26, 2023 at 2:19 PM

Flag notifications