「[[マイクロソフト系技術情報 Wiki>http://techinfoofmicrosofttech.osscons.jp/]]」は、「[[Open棟梁Project>https://github.com/OpenTouryoProject/]]」,「[[OSSコンソーシアム .NET開発基盤部会>https://www.osscons.jp/dotNetDevelopmentInfrastructure/]]」によって運営されています。

-[[戻る>ログ収集いろいろ]]

* 目次 [#edeb0e97]
#contents

*概要 [#p19a551b]
-イベント・ログについてのあれこれ。
-OSやミドルウェア、アプリケーションなど様々なプログラムから利用される。

*詳細 [#zff4f62e]

**参照 [#t16c3ee8]

***イベントビューアー [#be3fbf99]
起動方法

Windows 7, Windows Server 2008 R2, Windows Vista

-イベント ビューアーを起動する [Longhorn]~
https://technet.microsoft.com/ja-jp/library/cc766401.aspx

Windows Server 2012R2, Windows Server 2012

-http://faq.mypage.otsuka-shokai.co.jp/app/answers/detail/a_id/216148/~/%5Bwindows-2012%5D-%E3%82%A4%E3%83%99%E3%83%B3%E3%83%88%E3%83%93%E3%83%A5%E3%83%BC%E3%82%A2%E3%82%92%E8%B5%B7%E5%8B%95%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95

***ファイルの場所 [#sd1da65e]
%SystemDrive%\Windows\System\winevt\Logs

***イベントID [#ee291801]
上手く纏まっている情報はなさそうです(製品ごとに確認)。

-アプリケーションログのイベントID一覧~
http://social.technet.microsoft.com/Forums/ja-JP/windowsserver2008ja/thread/e16a1828-4860-4f31-a2b8-1d5162413960
--Events and Errors~
http://technet.microsoft.com/ja-jp/library/dd299434.aspx

-イベントIDの解析ついて~
http://social.technet.microsoft.com/Forums/ja-JP/w7itprohardwareja/thread/7873fa69-ce9f-49a5-83bc-e47561f42c9e
--イベントとエラー メッセージ センター 高度な検索~
http://www.microsoft.com/technet/support/ee/ee_advanced.aspx

-ミドルウェア毎に定義がある。
--「Windowsイベントログの一覧 日立」で検索
---JP1/Base~
http://www.hitachi.co.jp/Prod/comp/soft1/manual/pc/d3R7230/BSRE0028.HTM
---JP1/Integrated Management~
http://www.hitachi.co.jp/Prod/comp/soft1/manual/pc/d3R8151/IMMS0028.HTM
---JP1/Performance Management - Agent Option for HiRDB~
http://www.hitachi.co.jp/Prod/comp/soft1/manual/pc/d3K7020/PCAB0204.HTM
---JP1/Performance Management - Agent Option for OpenTP1~
http://www.hitachi.co.jp/Prod/comp/soft1/manual/pc/d3K7460/PCAH0173.HTM
---JP1/Performance Management - Agent Option for uCosminexus Application Server~
http://www.hitachi.co.jp/Prod/comp/soft1/manual/pc/d3R6300/PCAC0349.HTM
---JP1/Performance Management - Agent Option for Enterprise Applications~
http://www.hitachi.co.jp/Prod/comp/soft1/manual/pc/d3K6640/PCAM0190.HTM
---JP1/Performance Management - Agent Option for IBM WebSphere Application Server~
http://www.hitachi.co.jp/Prod/comp/soft1/manual/pc/d3R6101/PCA20150.HTM
---JP1/Power Monitor~
http://www.hitachi.co.jp/Prod/comp/soft1/manual/pc/d3K5400/PW0334.HTM
---Tuning Manager - Agent for SAN Switch~
http://www.hitachi.co.jp/Prod/comp/soft1/manual/pc/d3W4660/PCAW0232.HTM
---.etc.etc

**ログ出力のテスト [#wdd724b5]

***イベント・ログの出力 [#j7206a6a]
以下で出力可能。
 eventcreate /T INFORMATION /id 100 /d "これはログ出力のテストです。"

***セキュリティ・ログの出力 [#fd1c8318]
-BAT~
下の感じの bat で出力可能(検証用環境でない環境相手にはやらないように)
 @setlocal
 for /L %%i in (1,1,100) do (
   net use \\[IPアドレス若しくはホスト名]\c$ /user:[ユーザID] [パスワード]
   net use \\[IPアドレス若しくはホスト名]\c$ /d
 )
 @endlocal
 ※ ローカルポリシー等でログオンイベントの成功の監査が必要。

--管理者必見! ネットワーク・コマンド集 - net useコマンド:ITpro~
http://itpro.nikkeibp.co.jp/article/COLUMN/20060725/244263/
--仕事に役立つコマンド入門 - 別のユーザー名で共有フォルダを利用する「net use」:ITpro~
http://itpro.nikkeibp.co.jp/article/COLUMN/20080125/292051/

-API~
新しいOS(XP以降)では出力出来なくなっている模様。
--Writing in Security log on WinXP - Sysinternals Forums~
http://forum.sysinternals.com/writing-in-security-log-on-winxp_topic2804.html

**機能と役割 [#w430ad9d]

***[[IIS]] [#gb9c8910]
-IIS の Windows イベント~
https://msdn.microsoft.com/ja-jp/library/cc338087.aspx

***[[Active Directory]], [[LDAP>LDAPプロトコルでのディレクトリ・エントリ検索処理]] [#o9b6b01b]

-Active Directory Diagnostic Logging~
https://technet.microsoft.com/en-us/library/cc961809.aspx

-Active Directory で LDAP API を使った操作をログに記録する - Qiita~
http://qiita.com/FmtWeisszwerg/items/be36003fef2f106218bd

--Active DirectoryのLDAP処理のログ | Works | URAMIRAIKAN~
https://www.uramiraikan.net/Works/entry-1804.html

--[ Windows / ActiveDirectory ] LDAP インターフェイスへの~
アクセスをログに記録する方法: Fomalhaut of Piscis Australis~
http://foma-zakki.cocolog-nifty.com/zakki/2012/05/windows-actived.html

***[[SQL Server]] [#d6c28200]
-Windows アプリケーション ログの表示~
https://technet.microsoft.com/ja-jp/library/ms191446.aspx


*その他 [#m1d68b30]

**FailureAuditが出力されない。 [#x694e751]
-以下を見ると、

--内部的には、FailureAuditだけど、
--イベントビューアには、Informationで表示される

>みたいな話のようです。

-参考

--Windows Server 2008 Event log problem:~
SuccessAudit and FailureAudit not recognized | The ASP.NET Forums ~
https://forums.asp.net/t/1494360.aspx?Windows+Server+2008+Event+log+problem+SuccessAudit+and+FailureAudit+not+recognized

--Log Analyticsでイベントログ収集時に収集されないログがある~
https://social.msdn.microsoft.com/Forums/sqlserver/ja-JP/096f7e11-bf5c-4695-9c15-31530b4624c3/log?forum=windowsazureja
---Error=1, Warning=2, Information=4, SuccessAudit=8, FailureAudit=16~
となっていますが、Orは取れないので、Error=1, Warning=2, Information=4~
しか選択肢がないと選択できないのでしょう。
---イベントビューアでは、便宜上「情報」となっていますが、~
Information=4以上であることを指しているに過ぎないと思います。

**メッセージテーブルDLL云々 [#p9a82756]

***イベントIDのメッセージ [#mad75dbb]
イベントログのイベントIDに対応するメッセージは、

-NTイベントログに、任意のソースで任意のイベントIDのメッセージを出力する~
http://www.monyo.com/technical/products/evt_messages/

メッセージテーブルDLLなどを使用しているらしく、古い仕組みを踏襲していそう。

***カテゴリ(分類) [#w26d7882]
カテゴリとは、分類を指すもよう。

-https://togarasi.wordpress.com/2008/05/24/%E3%82%A4%E3%83%99%E3%83%B3%E3%83%88%E3%83%AD%E3%82%B0%E3%81%A7%E4%BD%BF%E3%81%86%E3%83%A1%E3%83%83%E3%82%BB%E3%83%BC%E3%82%B8%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB-dll%E3%82%92%E4%BD%9C%E6%88%90/
  WORD wCategory,      // イベントの分類

以下の例では、分類に1000を指定するとデバイスと表示されている。

-イベントログにエントリを書き込む - .NET Tips (VB.NET,C#...)~
https://dobon.net/vb/dotnet/system/writeeventlog.html

以下では、

-Customizing Event Log Categories | Dr Dobb's~
http://www.drdobbs.com/customizing-event-log-categories/184405714

--イベントログビューアを開くと、このイベントのカテゴリ列に「デバイス」という説明が表示される。~
その理由は、イベントログビューアがこの特定のソースのカテゴリを見つけられないため、デフォルトのカテゴリを使用するため。 

--これらのデフォルトのカテゴリは次のように定義されている。
 - 0 : None
 - 1 : Devices
 - 2 : Disk
 - 3 : Printers
 - 4 : Services
 - 5 : Shell
 - 6 : System Event
 - 7 : Network

--また、この続きを読むと、ソースのカテゴリを拡張するにも、 メッセージテーブルDLLを使用するもよう。

などと説明されている。

*参考 [#tb1bba16]
-【コラム】にわか管理者のためのWindowsサーバ入門 (85)~
イベントログの確認と保存  エンタープライズ  マイナビニュース~
http://news.mynavi.jp/column/winserver/085/index.html

**監査の管理 [#lab1b72b]
-概要~
http://technet.microsoft.com/ja-jp/library/dd362983.aspx
-セキュリティ ログの表示~
http://technet.microsoft.com/ja-jp/library/dd362984.aspx
-イベント ログの設定~
http://technet.microsoft.com/ja-jp/library/dd362985.aspx
-イベント ログの保存~
http://technet.microsoft.com/ja-jp/library/dd362986.aspx
-既定のイベント ビューア ログ ファイルの場所の変更~
http://technet.microsoft.com/ja-jp/library/dd362987.aspx

**イベント ビューアー [#r001fbf0]
-イベント ビューアーの操作方法~
https://technet.microsoft.com/ja-jp/library/cc749408.aspx
--イベント ビューアーを起動する~
https://technet.microsoft.com/ja-jp/library/cc766401.aspx
--カスタム ビューを作成して管理する~
https://technet.microsoft.com/ja-jp/library/cc766238.aspx
--イベントの表示方法を構成する~
https://technet.microsoft.com/ja-jp/library/cc765959.aspx
--イベント ログを管理する~
https://technet.microsoft.com/ja-jp/library/cc766178.aspx
--サブスクリプションを管理する~
https://technet.microsoft.com/ja-jp/library/cc749140.aspx
--リモート コンピューター上のイベント ログを操作する~
https://technet.microsoft.com/ja-jp/library/cc766438.aspx
--特定のイベントに応じてタスクを実行する~
https://technet.microsoft.com/ja-jp/library/cc748900.aspx

----
Tags: [[:Windows]]


トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS