Class Monitor

java.lang.Object
org.frankframework.monitoring.Monitor
All Implemented Interfaces:
IConfigurable, IConfigurationAware, INamedObject, IScopeProvider, org.springframework.beans.factory.Aware, org.springframework.beans.factory.DisposableBean, org.springframework.context.ApplicationContextAware

@FrankDocGroup(MONITORING) public class Monitor extends Object implements IConfigurable, org.springframework.beans.factory.DisposableBean

Example configuration:


 
 <monitor name="Receiver Shutdown" destinations="MONITOR_LOG">
    <trigger className="org.frankframework.monitoring.Alarm" severity="WARNING">
        <event>Receiver Shutdown</event>
    </trigger>
    <trigger className="org.frankframework.monitoring.Clearing" severity="WARNING">
        <event>Receiver Shutdown</event>
    </trigger>
 </monitor>
 

 
Since:
4.9
Version:
2.0
Author:
Gerrit van Brakel, Niels Meijer
  • Field Details

    • log

      protected org.apache.logging.log4j.Logger log
  • Constructor Details

    • Monitor

      public Monitor()
  • Method Details

    • configure

      public void configure() throws ConfigurationException
      Specified by:
      configure in interface IConfigurable
      Throws:
      ConfigurationException
    • changeState

      public void changeState(boolean alarm, Severity severity, MonitorEvent event) throws MonitorException
      Throws:
      MonitorException
    • changeMonitorState

      public void changeMonitorState(EventType eventType, Severity severity, String eventCode, MonitorEvent event) throws MonitorException
      Throws:
      MonitorException
    • clearEvents

      protected void clearEvents(boolean alarm)
    • toXml

      public XmlBuilder toXml()
    • getDestinationsAsString

      public String getDestinationsAsString()
    • setDestinations

      public void setDestinations(String newDestinations)
    • getDestinationSet

      public Set<String> getDestinationSet()
    • setDestinationSet

      public void setDestinationSet(Set<String> newDestinations)
    • registerTrigger

      public void registerTrigger(ITrigger trigger)
    • removeTrigger

      public void removeTrigger(ITrigger trigger)
    • getLogPrefix

      public String getLogPrefix()
    • setManager

      public void setManager(MonitorManager manager)
    • getTriggers

      public List<ITrigger> getTriggers()
    • getTrigger

      public ITrigger getTrigger(int index)
    • setName

      public void setName(String string)
      Specified by:
      setName in interface INamedObject
    • setRaised

      public void setRaised(boolean b)
    • isRaised

      public boolean isRaised()
    • setAdditionalHitCount

      public void setAdditionalHitCount(int i)
    • getAdditionalHitCount

      public int getAdditionalHitCount()
    • destroy

      public void destroy()
      Destroy the monitor and all registered triggers
      Specified by:
      destroy in interface org.springframework.beans.factory.DisposableBean
    • getConfigurationClassLoader

      public ClassLoader getConfigurationClassLoader()
      Description copied from interface: IScopeProvider
      This ClassLoader is set upon creation of the object, used to retrieve resources configured by the Ibis application.
      Specified by:
      getConfigurationClassLoader in interface IScopeProvider
      Returns:
      returns the ClassLoader created by the ClassLoaderManager.
    • getName

      public String getName()
      Specified by:
      getName in interface IConfigurationAware
      Specified by:
      getName in interface INamedObject
    • getType

      public EventType getType()
    • setType

      public void setType(EventType type)
    • getStateChanged

      public Instant getStateChanged()
    • getLastHit

      public Instant getLastHit()
    • getAlarmSeverity

      public Severity getAlarmSeverity()
    • setAlarmSeverity

      public void setAlarmSeverity(Severity alarmSeverity)
    • getRaisedBy

      public EventThrowing getRaisedBy()
    • getApplicationContext

      public org.springframework.context.ApplicationContext getApplicationContext()
      Specified by:
      getApplicationContext in interface IConfigurationAware
    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware