Package org.opennms.netmgt.syslogd
Class SyslogConfigBean
- java.lang.Object
-
- org.opennms.netmgt.syslogd.SyslogConfigBean
-
- All Implemented Interfaces:
SyslogdConfig
public final class SyslogConfigBean extends java.lang.Object implements SyslogdConfig
This is a bean container that can be used as aSyslogdConfig
service.
-
-
Constructor Summary
Constructors Constructor Description SyslogConfigBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getBatchIntervalMs()
Messages are aggregated in batches before being dispatched.int
getBatchSize()
Messages are aggregated in batches before being dispatched.java.lang.String
getDiscardUei()
getDiscardUeijava.lang.String
getForwardingRegexp()
getForwardingRegexpjava.util.List<HideMatch>
getHideMessages()
A collection of Strings we do not want to attach to the event.java.lang.String
getListenAddress()
getListenAddressjava.lang.Integer
getMatchingGroupHost()
getMatchingGroupHostjava.lang.Integer
getMatchingGroupMessage()
getMatchingGroupMessageboolean
getNewSuspectOnMessage()
getNewSuspectOnMessageint
getNumThreads()
Number of threads used for consuming/dispatching messages.java.lang.String
getParser()
getParserint
getQueueSize()
Maximum number of messages to keep in memory while waiting to be dispatched.int
getSyslogPort()
getSyslogPortjava.util.TimeZone
getTimeZone()
Optional: - if not null it will be used as default time zone if no time zone is given - if not set the system time zone will be usedjava.util.List<UeiMatch>
getUeiList()
A collection of Strings->UEI'svoid
reload()
reload configurationvoid
setBatchIntervalMs(int batchIntervalMs)
void
setBatchSize(int batchSize)
void
setDiscardUei(java.lang.String discardUei)
void
setForwardingRegexp(java.lang.String forwardingRegexp)
void
setIncludeRawSyslogmessage(boolean includeRawSyslogmessage)
void
setListenAddress(java.lang.String listenAddress)
void
setMatchingGroupHost(int matchingGroupHost)
void
setMatchingGroupMessage(int matchingGroupMessage)
void
setNewSuspectOnMessage(boolean newSuspectOnMessage)
void
setNumThreads(int numThreads)
void
setParser(java.lang.String parser)
void
setQueueSize(int queueSize)
void
setSyslogPort(int syslogPort)
void
setTimeZone(java.util.TimeZone timeZone)
boolean
shouldIncludeRawSyslogmessage()
Indicates whether or not to include the raw syslog message as an event parameter on events generated by Syslogd.
-
-
-
Method Detail
-
getSyslogPort
public int getSyslogPort()
Description copied from interface:SyslogdConfig
getSyslogPort
- Specified by:
getSyslogPort
in interfaceSyslogdConfig
- Returns:
- a int.
-
setSyslogPort
public void setSyslogPort(int syslogPort)
-
getListenAddress
public java.lang.String getListenAddress()
Description copied from interface:SyslogdConfig
getListenAddress
- Specified by:
getListenAddress
in interfaceSyslogdConfig
- Returns:
- a
String
object.
-
setListenAddress
public void setListenAddress(java.lang.String listenAddress)
-
getNewSuspectOnMessage
public boolean getNewSuspectOnMessage()
Description copied from interface:SyslogdConfig
getNewSuspectOnMessage
- Specified by:
getNewSuspectOnMessage
in interfaceSyslogdConfig
- Returns:
- a boolean.
-
setNewSuspectOnMessage
public void setNewSuspectOnMessage(boolean newSuspectOnMessage)
-
getForwardingRegexp
public java.lang.String getForwardingRegexp()
Description copied from interface:SyslogdConfig
getForwardingRegexp
- Specified by:
getForwardingRegexp
in interfaceSyslogdConfig
- Returns:
- a
String
object.
-
setForwardingRegexp
public void setForwardingRegexp(java.lang.String forwardingRegexp)
-
getMatchingGroupHost
public java.lang.Integer getMatchingGroupHost()
Description copied from interface:SyslogdConfig
getMatchingGroupHost
- Specified by:
getMatchingGroupHost
in interfaceSyslogdConfig
- Returns:
- a int.
-
setMatchingGroupHost
public void setMatchingGroupHost(int matchingGroupHost)
-
getMatchingGroupMessage
public java.lang.Integer getMatchingGroupMessage()
Description copied from interface:SyslogdConfig
getMatchingGroupMessage
- Specified by:
getMatchingGroupMessage
in interfaceSyslogdConfig
- Returns:
- a int.
-
setMatchingGroupMessage
public void setMatchingGroupMessage(int matchingGroupMessage)
-
getParser
public java.lang.String getParser()
Description copied from interface:SyslogdConfig
getParser
- Specified by:
getParser
in interfaceSyslogdConfig
- Returns:
- the parser class to use when parsing syslog messages, as a string.
-
setParser
public void setParser(java.lang.String parser)
-
getUeiList
public java.util.List<UeiMatch> getUeiList()
Description copied from interface:SyslogdConfig
A collection of Strings->UEI's- Specified by:
getUeiList
in interfaceSyslogdConfig
-
getHideMessages
public java.util.List<HideMatch> getHideMessages()
Description copied from interface:SyslogdConfig
A collection of Strings we do not want to attach to the event.- Specified by:
getHideMessages
in interfaceSyslogdConfig
-
getDiscardUei
public java.lang.String getDiscardUei()
Description copied from interface:SyslogdConfig
getDiscardUei
- Specified by:
getDiscardUei
in interfaceSyslogdConfig
- Returns:
- a
String
object.
-
setDiscardUei
public void setDiscardUei(java.lang.String discardUei)
-
getNumThreads
public int getNumThreads()
Description copied from interface:SyslogdConfig
Number of threads used for consuming/dispatching messages.- Specified by:
getNumThreads
in interfaceSyslogdConfig
- Returns:
- number of threads
-
setNumThreads
public void setNumThreads(int numThreads)
-
getQueueSize
public int getQueueSize()
Description copied from interface:SyslogdConfig
Maximum number of messages to keep in memory while waiting to be dispatched.- Specified by:
getQueueSize
in interfaceSyslogdConfig
- Returns:
- queue size
-
setQueueSize
public void setQueueSize(int queueSize)
-
getBatchSize
public int getBatchSize()
Description copied from interface:SyslogdConfig
Messages are aggregated in batches before being dispatched. When the batch reaches this size, it will be dispatched.- Specified by:
getBatchSize
in interfaceSyslogdConfig
- Returns:
- batch size
-
setBatchSize
public void setBatchSize(int batchSize)
-
getBatchIntervalMs
public int getBatchIntervalMs()
Description copied from interface:SyslogdConfig
Messages are aggregated in batches before being dispatched. When the batch has been created for longer than this interval it will be dispatched, regardless of the size.- Specified by:
getBatchIntervalMs
in interfaceSyslogdConfig
- Returns:
- interval in ms
-
getTimeZone
public java.util.TimeZone getTimeZone()
Description copied from interface:SyslogdConfig
Optional: - if not null it will be used as default time zone if no time zone is given - if not set the system time zone will be used- Specified by:
getTimeZone
in interfaceSyslogdConfig
-
setTimeZone
public void setTimeZone(java.util.TimeZone timeZone)
-
shouldIncludeRawSyslogmessage
public boolean shouldIncludeRawSyslogmessage()
Description copied from interface:SyslogdConfig
Indicates whether or not to include the raw syslog message as an event parameter on events generated by Syslogd.Default behavior is false unless configured otherwise.
- Specified by:
shouldIncludeRawSyslogmessage
in interfaceSyslogdConfig
- Returns:
- whether or not to include the raw syslog message as an event parameter on events generated by Syslogd
-
setIncludeRawSyslogmessage
public void setIncludeRawSyslogmessage(boolean includeRawSyslogmessage)
-
setBatchIntervalMs
public void setBatchIntervalMs(int batchIntervalMs)
-
reload
public void reload() throws java.io.IOException
Description copied from interface:SyslogdConfig
reload configuration- Specified by:
reload
in interfaceSyslogdConfig
- Throws:
java.io.IOException
-
-