web ui send-event

Description

Add a web page that supports all the functionality in send-event.pl.

The attached patch adds two new pages to the admin section of the OpenNMS Web UI.

/opennms/admin/sendevent.jsp - this page lets you select the uei from a drop down, and then enter text for other fields. The nodeid and interface fields uses the sched-outages json jsp pages to do nodeid and interface auto completion. If you select a nodeid, the interface selection does not trim the list down to just those interfaces for the node. There would need to be another jsp page to trim the list of interfaces down to just those for the node.

The form submission goes to the next page, /opennms/admin/postevent.jsp. The submitted event text is displayed back on the page inside pre tags as an xml looking string.

For reference, see issues https://opennms.atlassian.net/browse/NMS-1625#icft=NMS-1625, and https://opennms.atlassian.net/browse/NMS-2002#icft=NMS-2002.

Acceptance / Success Criteria

None

Attachments

4
  • 09 Sep 2012, 10:44 PM
  • 09 Sep 2012, 10:43 PM
  • 09 Sep 2012, 10:41 PM
  • 09 Sep 2012, 10:40 PM

Lucidchart Diagrams

Activity

Show:

Benjamin Reed October 12, 2012 at 5:31 PM

I'm convinced. slightly smiling face

Ron Roskens September 29, 2012 at 2:14 PM

I believe the reason the event id is 0 is that this particular event (uei.opennms.org/internal/authentication/successfulLogin) is flagged as a "donotpersist". Since its not being saved to the database, an event id is not generated for this. See JdbcEventWriter:process(). According to AbstractJdbcPersister:checkEventSanityAndDoWeProcess(), events that are flagged as "suppress" also do not get saved.

When I look at eventd.log, I see rtc logins that cause the same messages to be logged.

Benjamin Reed September 28, 2012 at 12:51 PM

I tried this out, but it looks like it always ends up sending the events as eventID 0, which makes me think something is going wrong in this code.

2012-09-28 12:48:26,600 DEBUG [Event TCP Receiver[5817][127.0.0.1:55523]] TcpStreamHandler: handling event: org.opennms.netmgt.xml.event.Event@1959fe58[uuid=<null>,dbid=<null>,dist-poller=<null>,creation-time=<null>,master-station=<null>,mask=<null>,uei=uei.opennms.org/internal/authentication/successfulLogin,source=Web UI,nodeid=<null>,time=Friday, September 28, 2012 4:48:26 PM GMT,host=<null>,interface=<null>,snmphost=<null>,service=<null>,snmp=<null>,parms=<null>,descr=<null>,logmsg=<null>,severity=Indeterminate,pathoutage=<null>,correlation=<null>,operinstruct=<null>,autoaction=[],operaction=[],autoacknowledge=<null>,loggroup=[],tticket=<null>,forward=[],script=[],ifIndex=<null>,ifAlias=<null>,mouseovertext=<null>,alarm-data=<null>]
2012-09-28 12:48:26,601 DEBUG [Event TCP Receiver[5817][127.0.0.1:55523]] TcpStreamHandler: stopping record handler
2012-09-28 12:48:26,601 DEBUG [Event TCP Receiver[5817][127.0.0.1:55523]] TcpRecordHandler: Interrupting thread TCPRecord Chunker[127.0.0.1:55523]
2012-09-28 12:48:26,601 DEBUG [Event TCP Receiver[5817][127.0.0.1:55523]] TcpRecordHandler: Joining Thread TCPRecord Chunker[127.0.0.1:55523]
2012-09-28 12:48:26,601 DEBUG [Event TCP Receiver[5817][127.0.0.1:55523]] TcpRecordHandler: Thread TCPRecord Chunker[127.0.0.1:55523] Joined
2012-09-28 12:48:26,601 DEBUG [Event TCP Receiver[5817][127.0.0.1:55523]] TcpStreamHandler: record handler stopped
2012-09-28 12:48:26,601 DEBUG [Event TCP Receiver[5817][127.0.0.1:55523]] TcpStreamHandler: closing connnection
2012-09-28 12:48:26,603 DEBUG [EventIpcManagerDefaultImpl-Thread-2-of-5] DefaultEventHandlerImpl: Event {
2012-09-28 12:48:26,603 DEBUG [EventIpcManagerDefaultImpl-Thread-2-of-5] DefaultEventHandlerImpl: uuid = <not-set>
2012-09-28 12:48:26,603 DEBUG [EventIpcManagerDefaultImpl-Thread-2-of-5] DefaultEventHandlerImpl: uei = uei.opennms.org/internal/authentication/successfulLogin
2012-09-28 12:48:26,603 DEBUG [EventIpcManagerDefaultImpl-Thread-2-of-5] DefaultEventHandlerImpl: src = Web UI
2012-09-28 12:48:26,603 DEBUG [EventIpcManagerDefaultImpl-Thread-2-of-5] DefaultEventHandlerImpl: iface = null
2012-09-28 12:48:26,603 DEBUG [EventIpcManagerDefaultImpl-Thread-2-of-5] DefaultEventHandlerImpl: time = Friday, September 28, 2012 4:48:26 PM GMT
2012-09-28 12:48:26,603 DEBUG [EventIpcManagerDefaultImpl-Thread-2-of-5] DefaultEventHandlerImpl: }
2012-09-28 12:48:26,603 DEBUG [EventIpcManagerDefaultImpl-Thread-2-of-5] EventConfData: Match found using key: EventKey
[
uei = [uei.opennms.org/internal/authentication/successfulLogin]

]

2012-09-28 12:48:26,604 DEBUG [EventIpcManagerDefaultImpl-Thread-2-of-5] JdbcEventWriter: JdbcEventWriter: uei 'uei.opennms.org/internal/authentication/successfulLogin' marked as 'donotpersist'; not processing event.
2012-09-28 12:48:26,604 DEBUG [Event TCP Receiver[5817][127.0.0.1:55523]] TcpStreamHandler: connnection closed
2012-09-28 12:48:26,604 DEBUG [EventIpcManagerDefaultImpl-Thread-2-of-5] EventIpcManagerDefaultImpl: Event ID 0 to be broadcasted: uei.opennms.org/internal/authentication/successfulLogin
2012-09-28 12:48:26,604 DEBUG [Event TCP Receiver[5817][127.0.0.1:55523]] TcpStreamHandler: Thread exiting
2012-09-28 12:48:26,613 DEBUG [EventIpcManagerDefaultImpl-Thread-2-of-5] EventIpcManagerDefaultImpl: No listener interested in event ID 0: uei.opennms.org/internal/authentication/successfulLogin

Fixed

Details

Assignee

Reporter

Labels

Components

Fix versions

Priority

PagerDuty

Created September 9, 2012 at 10:40 PM
Updated January 27, 2017 at 4:20 PM
Resolved October 12, 2012 at 5:31 PM

Flag notifications