Package org.opennms.netmgt.syslogd
Class SyslogConfigBean
- java.lang.Object
-
- org.opennms.netmgt.syslogd.SyslogConfigBean
-
- All Implemented Interfaces:
SyslogdConfig
public final class SyslogConfigBean extends Object implements SyslogdConfig
This is a bean container that can be used as aSyslogdConfigservice.
-
-
Constructor Summary
Constructors Constructor Description SyslogConfigBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetBatchIntervalMs()Messages are aggregated in batches before being dispatched.intgetBatchSize()Messages are aggregated in batches before being dispatched.StringgetDiscardUei()getDiscardUeiStringgetForwardingRegexp()getForwardingRegexpList<HideMatch>getHideMessages()A collection of Strings we do not want to attach to the event.StringgetListenAddress()getListenAddressIntegergetMatchingGroupHost()getMatchingGroupHostIntegergetMatchingGroupMessage()getMatchingGroupMessagebooleangetNewSuspectOnMessage()getNewSuspectOnMessageintgetNumThreads()Number of threads used for consuming/dispatching messages.StringgetParser()getParserintgetQueueSize()Maximum number of messages to keep in memory while waiting to be dispatched.intgetSyslogPort()getSyslogPortTimeZonegetTimeZone()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 usedList<UeiMatch>getUeiList()A collection of Strings->UEI'svoidreload()reload configurationvoidsetBatchIntervalMs(int batchIntervalMs)voidsetBatchSize(int batchSize)voidsetDiscardUei(String discardUei)voidsetForwardingRegexp(String forwardingRegexp)voidsetIncludeRawSyslogmessage(boolean includeRawSyslogmessage)voidsetListenAddress(String listenAddress)voidsetMatchingGroupHost(int matchingGroupHost)voidsetMatchingGroupMessage(int matchingGroupMessage)voidsetNewSuspectOnMessage(boolean newSuspectOnMessage)voidsetNumThreads(int numThreads)voidsetParser(String parser)voidsetQueueSize(int queueSize)voidsetSyslogPort(int syslogPort)voidsetTimeZone(TimeZone timeZone)booleanshouldIncludeRawSyslogmessage()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:SyslogdConfiggetSyslogPort
- Specified by:
getSyslogPortin interfaceSyslogdConfig- Returns:
- a int.
-
setSyslogPort
public void setSyslogPort(int syslogPort)
-
getListenAddress
public String getListenAddress()
Description copied from interface:SyslogdConfiggetListenAddress
- Specified by:
getListenAddressin interfaceSyslogdConfig- Returns:
- a
Stringobject.
-
setListenAddress
public void setListenAddress(String listenAddress)
-
getNewSuspectOnMessage
public boolean getNewSuspectOnMessage()
Description copied from interface:SyslogdConfiggetNewSuspectOnMessage
- Specified by:
getNewSuspectOnMessagein interfaceSyslogdConfig- Returns:
- a boolean.
-
setNewSuspectOnMessage
public void setNewSuspectOnMessage(boolean newSuspectOnMessage)
-
getForwardingRegexp
public String getForwardingRegexp()
Description copied from interface:SyslogdConfiggetForwardingRegexp
- Specified by:
getForwardingRegexpin interfaceSyslogdConfig- Returns:
- a
Stringobject.
-
setForwardingRegexp
public void setForwardingRegexp(String forwardingRegexp)
-
getMatchingGroupHost
public Integer getMatchingGroupHost()
Description copied from interface:SyslogdConfiggetMatchingGroupHost
- Specified by:
getMatchingGroupHostin interfaceSyslogdConfig- Returns:
- a int.
-
setMatchingGroupHost
public void setMatchingGroupHost(int matchingGroupHost)
-
getMatchingGroupMessage
public Integer getMatchingGroupMessage()
Description copied from interface:SyslogdConfiggetMatchingGroupMessage
- Specified by:
getMatchingGroupMessagein interfaceSyslogdConfig- Returns:
- a int.
-
setMatchingGroupMessage
public void setMatchingGroupMessage(int matchingGroupMessage)
-
getParser
public String getParser()
Description copied from interface:SyslogdConfiggetParser
- Specified by:
getParserin interfaceSyslogdConfig- Returns:
- the parser class to use when parsing syslog messages, as a string.
-
setParser
public void setParser(String parser)
-
getUeiList
public List<UeiMatch> getUeiList()
Description copied from interface:SyslogdConfigA collection of Strings->UEI's- Specified by:
getUeiListin interfaceSyslogdConfig
-
getHideMessages
public List<HideMatch> getHideMessages()
Description copied from interface:SyslogdConfigA collection of Strings we do not want to attach to the event.- Specified by:
getHideMessagesin interfaceSyslogdConfig
-
getDiscardUei
public String getDiscardUei()
Description copied from interface:SyslogdConfiggetDiscardUei
- Specified by:
getDiscardUeiin interfaceSyslogdConfig- Returns:
- a
Stringobject.
-
setDiscardUei
public void setDiscardUei(String discardUei)
-
getNumThreads
public int getNumThreads()
Description copied from interface:SyslogdConfigNumber of threads used for consuming/dispatching messages.- Specified by:
getNumThreadsin interfaceSyslogdConfig- Returns:
- number of threads
-
setNumThreads
public void setNumThreads(int numThreads)
-
getQueueSize
public int getQueueSize()
Description copied from interface:SyslogdConfigMaximum number of messages to keep in memory while waiting to be dispatched.- Specified by:
getQueueSizein interfaceSyslogdConfig- Returns:
- queue size
-
setQueueSize
public void setQueueSize(int queueSize)
-
getBatchSize
public int getBatchSize()
Description copied from interface:SyslogdConfigMessages are aggregated in batches before being dispatched. When the batch reaches this size, it will be dispatched.- Specified by:
getBatchSizein interfaceSyslogdConfig- Returns:
- batch size
-
setBatchSize
public void setBatchSize(int batchSize)
-
getBatchIntervalMs
public int getBatchIntervalMs()
Description copied from interface:SyslogdConfigMessages 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:
getBatchIntervalMsin interfaceSyslogdConfig- Returns:
- interval in ms
-
getTimeZone
public TimeZone getTimeZone()
Description copied from interface:SyslogdConfigOptional: - 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:
getTimeZonein interfaceSyslogdConfig
-
setTimeZone
public void setTimeZone(TimeZone timeZone)
-
shouldIncludeRawSyslogmessage
public boolean shouldIncludeRawSyslogmessage()
Description copied from interface:SyslogdConfigIndicates 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:
shouldIncludeRawSyslogmessagein 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 IOExceptionDescription copied from interface:SyslogdConfigreload configuration- Specified by:
reloadin interfaceSyslogdConfig- Throws:
IOException
-
-