campus.syslog
Class SyslogSource
java.lang.Object
|
+--solar.service.dan.GraphNode
|
+--solar.service.dan.Source
|
+--campus.syslog.SyslogSource
- All Implemented Interfaces:
- DanConstants, Identifiable, SyslogConstants
- public class SyslogSource
- extends Source
- implements SyslogConstants
A syslog source that produces events from syslog messages.
It parses the syslog msg stream, and produces syslog events.
It generates and publishes an event every time it receives
a new event from the server.
The published events contain following attributes:
- 1. timestamp (when the event is received)
- 2. year (year of the timestamp)
- 3. month (year of the timestamp)
- 4. day (year of the timestamp)
- 5. time (year of the timestamp)
- 6. msgtype (type of the message get from syslog)
- 7. apname (name of Access point)
- 4. clienthost (client hostname or IP address)
- 5. clientmac (client's MAC address)
- 6. action (such as authorized, roamed, etc...)
- 7. note (explanation for the action)
- Version:
- $Id: SyslogSource.java,v 1.5 2003/09/19 00:38:24 glchen Exp $
- Author:
- Guanling Chen, Yurong Xu
Fields inherited from interface campus.syslog.SyslogConstants |
BASE, EVT_ACTION, EVT_APNAME, EVT_CLIENTHOST, EVT_CLIENTMAC, EVT_DAY, EVT_MONTH, EVT_MSGTYPE, EVT_NOTE, EVT_TIME, EVT_TIMESTAMP, EVT_YEAR, IDX_ACTION, IDX_APNAME, IDX_CLIENTHOST, IDX_CLIENTMAC, IDX_DAY, IDX_MONTH, IDX_MSGTYPE, IDX_NOTE, IDX_TIME, IDX_TIMESTAMP, IDX_YEAR, TAG_ASSOCIATED, TAG_AUTHENTICATED, TAG_DEASSOCIATING, TAG_DEASSOCIATION, TAG_DEAUTHENTICATING, TAG_DEAUTHENTICATION, TAG_FATAL, TAG_INACTIVITY, TAG_INFO, TAG_REASSOCIATED, TAG_REPEAT_LAST_MSG, TAG_ROAMED, TAG_SYSLOG, TAG_WARNING |
Method Summary |
java.lang.Object |
handleQuery(Request query)
Handle the query being actively pulled by downstream operators. |
static void |
main(java.lang.String[] args)
Read the configuration from command line and start the source
as Syslog client or a standalone program. |
void |
run()
The execution body of this source. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_standalone
private boolean _standalone
SyslogSource
public SyslogSource(boolean standalone)
handleQuery
public java.lang.Object handleQuery(Request query)
throws java.lang.Exception
- Description copied from class:
GraphNode
- Handle the query being actively pulled by downstream operators.
- Specified by:
handleQuery
in class GraphNode
java.lang.Exception
run
public void run()
throws java.lang.Exception
- Description copied from class:
Source
- The execution body of this source.
- Specified by:
run
in class Source
java.lang.Exception
main
public static void main(java.lang.String[] args)
throws java.lang.Exception
- Read the configuration from command line and start the source
as Syslog client or a standalone program. The recognized options
are:
-standalone: whether to run the source without Solar.
-host: the host address of the connecting Planet.
-port: the port number of the connecting Planet.
The Solar name assigned for this source is:
[source=syslog, wlan=campus]
java.lang.Exception