<< アクションのテスト >>

1. nop アクション
  1.1. 何もしない
2. execute アクション
  2.1. exe起動
  2.2. bat起動
  2.3. 起動エラー
3. smtp アクション
  3.1. メール送信成功
  3.2. サーバーなし
4. syslog アクション
  4.1. Linuxのsyslogサーバーへの送信
  4.2. 自分に送信
  4.3. サーバーなし
5. mantis アクション
  5.1. 障害登録成功
  5.2. ログインエラー
  5.3. プロジェクトなし
  5.4. 404エラー
  5.5. サーバーなし

		Application: [
			{ logLevel:'E', match:'nop', ignore:null, actions:[{ type:'nop' }]},
			{ logLevel:'E', match:'exec.*exe', ignore:null, actions:[{ type:'execute', CommandLine:'notepad.exe "C:\\Windows\\System32\\Drivers\\etc\\hosts"' }]},
			{ logLevel:'E', match:'exec.*bat', ignore:null, actions:[{ type:'execute', CommandLine:'C:\\test.bat "$timestamp" "$hostname" "$source" "$level" "$code" "$message"' }]},
			{ logLevel:'E', match:'exec.*err', ignore:null, actions:[{ type:'execute', CommandLine:'C:\\notfound.bat "$timestamp" "$hostname" "$source" "$level" "$code" "$message"' }]},
			{ logLevel:'E', match:'smtp.*success', ignore:null, actions:[{ type:'smtp', FromAddress:'a@a.com', ToAddress:'a@a.com,b@b.com', ServerHost:'localhost:25' }]},
			{ logLevel:'E', match:'smtp', ignore:null, actions:[{ type:'smtp', FromAddress:'a@a.com', ToAddress:'a@a.com,b@b.com', ServerHost:'localhost:25000' }]},
			{ logLevel:'E', match:'syslog.*linux', ignore:null, actions:[{ type:'syslog', RemoteHost:'SYSLOG' }]},
			{ logLevel:'E', match:'syslog.*local', ignore:null, actions:[{ type:'syslog', RemoteHost:'localhost' }]},
			{ logLevel:'E', match:'syslog', ignore:null, actions:[{ type:'syslog', RemoteHost:'NotFound' }]},
			{ logLevel:'E', match:'mantis.*success', ignore:null, actions:[{ type:'mantis', BaseUrl:'http://MANTIS/mantis/', UserID:'ewatch', Password:'ewatch', Project:'テスト' }]},
			{ logLevel:'E', match:'mantis.*login', ignore:null, actions:[{ type:'mantis', BaseUrl:'http://MANTIS/mantis/', UserID:'ewatch2', Password:'ewatch', Project:'テスト' }]},
			{ logLevel:'E', match:'mantis.*project', ignore:null, actions:[{ type:'mantis', BaseUrl:'http://MANTIS/mantis/', UserID:'ewatch', Password:'ewatch', Project:'そんなプロジェクトは存在しない' }]},
			{ logLevel:'E', match:'mantis.*404', ignore:null, actions:[{ type:'mantis', BaseUrl:'http://MANTIS/mantis2/', UserID:'ewatch', Password:'ewatch', Project:'テスト' }]},
			{ logLevel:'E', match:'mantis', ignore:null, actions:[{ type:'mantis', BaseUrl:'http://MANTIS_/mantis/', UserID:'ewatch', Password:'ewatch', Project:'テスト' }]},
		]

<< 条件のテスト >>

1. 共通の条件(match,ignore)
  1.1. matchなし、ignoreなし
  1.2. matchあり、ignoreなし
  1.3. matchなし、ignoreあり
  1.4. matchあり、ignoreあり
2. イベントログの条件(logLevel,source,eventId)
  2.1. logLevelあり
  2.2.　sourceあり
  2.3. eventIdあり
  
		Application: [
			/* 2.1 */
			{ logLevel:'W', match:null, ignore:null, actions:[{ type:'execute', Command:'C:\\test.bat "$level" "$message"' }]},
			/* 2.2 */
			{ logLevel:'', source:'EWatchTest', match:null, ignore:null, actions:[{ type:'execute', Command:'C:\\test.bat "$source" "$message"' }]},
			/* 2.3 */
			{ logLevel:'', eventId:999, match:null, ignore:null, actions:[{ type:'execute', Command:'C:\\test.bat "$code" "$message"' }]},
			/* 1.4 */
			{ logLevel:'', match:'マッチパターン', ignore:'無視パターン', actions:[{ type:'execute', Command:'C:\\test.bat "あり,あり" "$message"' }]},
			/* 1.3 */
			{ logLevel:'', match:null, ignore:'無視パターン', actions:[{ type:'execute', Command:'C:\\test.bat "なし,あり" "$message"' }]},
			/* 1.2 */
			{ logLevel:'', match:'マッチパターン', ignore:null, actions:[{ type:'execute', Command:'C:\\test.bat "あり,なし" "$message"' }]},
			/* 1.1 */
			{ logLevel:'', match:null, ignore:null, actions:[{ type:'execute', Command:'C:\\test.bat "なし,なし" "$message"' }]},
		]

<< 監視のテスト >>

1. イベントログ監視
  1.1. Applicationログ
  1.2. Systemログ
2. ログファイル監視
  2.1. 追加書き込み
  2.2. ログファイルクリア後の書き込み
3. syslog待ち受け
  3.1. Linuxからの受信
  3.2. 自分からの受信

	EventLog: {
		Application: [
			{ logLevel:'', match:'syslog', ignore:null, actions:[{ type:'syslog', RemoteHost:'localhost' }]},
			{ logLevel:'E', match:'ERROR', ignore:null, actions:[{ type:'execute', CommandLine:'C:\\test.bat "Application" "$message"' }]},
		],
		System: [
			{ logLevel:'E', match:'ERROR', ignore:null, actions:[{ type:'execute', CommandLine:'C:\\test.bat "System" "$message"' }]},
		]
	},
	File: {
		"C:\\ewtest.log": [
			{ match:'ERROR', ignore:null, actions:[{ type:'execute', CommandLine:'C:\\test.bat "ewtest.log" "$message"' }]},
		]
	},
	Syslog: {
		"514" : [
			{ match:'ERROR', ignore:null, actions:[{ type:'execute', CommandLine:'C:\\test.bat "syslog" "$message"' }]},
		]
	}
