org.jboss.soa.esb.nagios
Class MonitorManager
java.lang.Object
org.jboss.soa.esb.nagios.MonitorManager
public class MonitorManager
- extends java.lang.Object
The MonitorManager is the core of the Java Nagios client software. It provides
the infrastructure for reporting information and the background process for sending
those reports to the NSCA daemon process on the Nagios server.
When instantiated without a valid nagiosHost, it will sit and do nothing until a
host has been provided - at which point it will begin cycling to send information
to that Nagios server.
The no-argument constructer is used in JMX environments where JMX systems aren't
able to initialize the MonitorManager except through calling Setter methods for
the core parameters such as nagiosHost.
Typical usage in stand-alone applications:
MonitorManager mm = new MonitorManager("XXXXXXXXXXXX", 5667);
ServiceMonitor heartbeat = new HeartbeatMonitor("hostname", "servicename");
mm.addMonitor(heartbeat);
mm.start();
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MonitorManager
public MonitorManager()
MonitorManager
public MonitorManager(java.lang.String nagiosHost,
int nagiosPort)
getStatus
public java.lang.String getStatus()
getNagiosHost
public java.lang.String getNagiosHost()
setNagiosHost
public void setNagiosHost(java.lang.String nagiosHost)
getNagiosPort
public int getNagiosPort()
setNagiosPort
public void setNagiosPort(int nagiosPort)
addMonitor
public void addMonitor(ServiceMonitor monitor)
removeMonitor
public void removeMonitor(ServiceMonitor monitor)
start
public void start()
stop
public void stop()
getInterval
public long getInterval()
setInterval
public void setInterval(long interval)