Class OpsviewProvider
java.lang.Object
ecmwf.common.monitor.module.OpsviewProvider
- All Implemented Interfaces:
MonitorInterface
The Class OpsviewProvider.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
OpsviewProvider
public OpsviewProvider()
-
-
Method Details
-
sendMessage
public void sendMessage(String hostname, String service, int status, String message) throws MonitorException Sends the message. Send message.- Specified by:
sendMessagein interfaceMonitorInterface- Parameters:
hostname- the nameservice- the servicestatus- the statusmessage- the message- Throws:
MonitorException
-
addNotes
Adds/replaces the notes attached to a destination/host. Adefaultmethod (rather than a second abstract one) so thatMonitorInterface.sendMessage(String, String, int, String)remains this interface's only abstract method - existing providers set up as a lambda (a single-method functional interface, e.g. a DataMover relayingsendMessagecalls to the MasterServer over its REST proxy) keep compiling unchanged, and simply don't support notes: the default throwsUnsupportedOperationException, whichMonitorManager.addNotes(String, int, String)turns into aMonitorExceptionfor the caller. Adds/replaces the notes attached to a destination/host. UnlikesendMessage(String, String, int, String), errors are propagated (wrapped in aMonitorException) rather than swallowed: this is invoked from a direct, user-initiated action (the "Export Notes" button on the Destination Metadata page), so the caller needs to know whether it actually succeeded.- Specified by:
addNotesin interfaceMonitorInterface- Parameters:
destination- the destinationtype- the destination's type (ecmwf.ecpds.master.transfer.DestinationOption), used by providers that group destinations by type (e.g. Opsview's Acquisition/Dissemination/Other filters)metadata- the metadata- Throws:
MonitorException
-