Syslog Relay Controller から受け取った SyslogInfo をデータベースに保存します。
For a list of all members of this type, see SimpleDbWriter Members.
System.Object
SimpleDbWriter
下記のようなスキーマを持つデータベース テーブルに Syslog メッセージを保存します。
列名 | 説明 |
---|---|
RecievedTime | datetime 型。 |
CollectorId | nvarchar 型。 列のサイズは 256 バイト。 |
LocalInterfaceAddress | nvarchar 型。 列のサイズは 40 バイト。 |
LocalInterfacePort | int 型。 |
RemoteHostname | nvarchar 型。 列のサイズは 256 バイト。 |
RemoteAddress | nvarchar 型。 列のサイズは 40 バイト。 |
RemotePort | int 型。 |
Facility | int 型。 |
Severity | int 型。 |
ReceivedTimestamp | datetime 型。 |
Hostname | nvarchar 型。 列のサイズは 64 バイト。 |
Tag | nvarchar 型。 列のサイズは 32 バイト。 |
Content | nvarchar 型。 列のサイズは 1024 バイト。 |
CREATE TABLE [SyslogDetails] ( SyslogID int IDENTITY(1, 1), ReceivedTime datetime NOT NULL, CollectorId nvarchar(256) NOT NULL, LocalInterfaceAddress nvarchar(40) NOT NULL, LocalInterfacePort int NOT NULL, RemoteHostname nvarchar(256) NOT NULL, RemoteAddress nvarchar(40) NOT NULL, RemotePort int NOT NULL, Facility int NOT NULL, Severity int NOT NULL, ReceivedTimestamp datetime NOT NULL, Hostname nvarchar(64) NOT NULL, Tag nvarchar(32) NULL, Content nvarchar(1024) NULL, CONSTRAINT pk_syslogid PRIMARY KEY NONCLUSTERED (SyslogID) )
App.config 設定例。
<db connectionString=" Provider=SQLOLEDB; Data Source=.; Initial Catalog=tempdb; Integrated Security=SSPI" table="##SyslogDetails" collectorId="Central Collector" />
Namespace: Syslog.Collector.Writer
Assembly: mlog_coll (in mlog_coll.dll)
SimpleDbWriter Members | Syslog.Collector.Writer Namespace