JP5746585B2 - Log management system, log management method, application server, and log server - Google Patents

Log management system, log management method, application server, and log server Download PDF

Info

Publication number
JP5746585B2
JP5746585B2 JP2011170450A JP2011170450A JP5746585B2 JP 5746585 B2 JP5746585 B2 JP 5746585B2 JP 2011170450 A JP2011170450 A JP 2011170450A JP 2011170450 A JP2011170450 A JP 2011170450A JP 5746585 B2 JP5746585 B2 JP 5746585B2
Authority
JP
Japan
Prior art keywords
log
unit
server
file
application server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2011170450A
Other languages
Japanese (ja)
Other versions
JP2013037403A (en
Inventor
峻輔 太田
峻輔 太田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2011170450A priority Critical patent/JP5746585B2/en
Publication of JP2013037403A publication Critical patent/JP2013037403A/en
Application granted granted Critical
Publication of JP5746585B2 publication Critical patent/JP5746585B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

クラウド環境における、ログの管理を行うログ管理システム、ログ管理方法、アプリケーションサーバ、およびログサーバに関する。   The present invention relates to a log management system, a log management method, an application server, and a log server that manage logs in a cloud environment.

近年、クラウドコンピューティングシステムと呼ばれる技術が注目を集めている。クラウドコンピューティングシステムにおいて、クラウドサービスベンダーは、インターネット上に、仮想的なサーバ(VM:Virtual Machine)やストレージ、また種々のサービスを提供する。アプリケーション開発者は、クラウドサービスベンダーに利用料を支払い、それらのサービスを使用することで、クラウドアプリケーションの開発が可能となる。   In recent years, a technology called a cloud computing system has attracted attention. In a cloud computing system, a cloud service vendor provides a virtual server (VM), storage, and various services on the Internet. An application developer pays a usage fee to a cloud service vendor and uses those services to develop a cloud application.

ここで、クラウドコンピューティングシステムにおける、ログの管理方法について考える。クラウドサービスでは、複数のサーバ(VM)上でサービスが提供されており、それぞれのサービスで、ログが出力される。特許文献1では、サーバ上に実装されたクライアントが、各サーバ上で出力されたログをログ管理サーバに送信する。これにより、ログの一元的な管理が可能となり、ログの集計や、表示、出力といった作業のパフォーマンス、および効率を上げることが出来る。   Here, a log management method in a cloud computing system is considered. In the cloud service, services are provided on a plurality of servers (VMs), and a log is output from each service. In Patent Document 1, a client mounted on a server transmits a log output on each server to a log management server. As a result, unified management of logs is possible, and performance and efficiency of operations such as log aggregation, display, and output can be improved.

特開2010−072984号公報JP 2010-072984 A

クラウドサービスのように、多くのユーザが使用し、かつ、異なる人物が、同じユーザID(アカウント)等を用いてログイン可能なシステムを考える。このとき、各ユーザが同一のイベント(例えば、プリント等)の処理を行うことが可能であるため、イベントを特定する項目からのみでは、収集したログが、すでに保持管理しているログと重複しているかどうかの判断はできない。   Consider a system that can be used by many users and logged in using different user IDs (accounts) or the like, such as a cloud service. At this time, since each user can process the same event (for example, printing), the collected log overlaps with the log that is already held and managed only from the item specifying the event. Judgment is not possible.

また、あるクライアントがログを送信できない状態に陥っている場合に、サーバがログの集計を行うと、あるクライアントから集めるべきログが収集できないため、その間のログの記録漏れが発生する。   In addition, when a certain client falls into a state in which logs cannot be transmitted, if the server performs log aggregation, logs to be collected from a certain client cannot be collected, and log recording during that time occurs.

上記課題を解決するために、本願発明は以下の構成を有する。すなわち、ユーザからの要求に応じてサービスを提供するアプリケーションサーバと、前記アプリケーションサーバが提供したサービスのログを蓄積するログサーバとを含むログ管理システムであって、前記アプリケーションサーバは、ユーザからの要求に応じて行った処理のログをファイルに出力するログファイル出力手段と、前記ログファイル出力手段にてログが出力されたファイルのうち、収集対象となるファイルから前記ログを収集して前記ログサーバに送信する1以上のログデータ収集手段と、前記1以上のログデータ収集手段を一意に特定するための識別子を生成し、当該識別子を前記ログサーバに提供する提供手段とを有し、前記ログサーバは、前記アプリケーションサーバから送信されたログを受信し、記憶部に記憶する記憶手段を有し、前記記憶手段は、受信したログに対応付けられた前記アプリケーションサーバから提供された識別子とすでに前記記憶部に記憶されているログに対応付けられた識別子とが一致し、かつ受信したログに含まれる当該ログを一意に特定するための他の情報とすでに前記記憶部に記憶されているログに含まれる当該ログを一意に特定するための他の情報とが一致している場合に当該受信したログを記憶させず、それ以外の場合に当該受信したログを記憶することを特徴とするログ管理システム。   In order to solve the above problems, the present invention has the following configuration. That is, a log management system including an application server that provides a service in response to a request from a user and a log server that accumulates a log of the service provided by the application server, the application server receiving a request from the user Log file output means for outputting a log of processing performed according to the file, and the log server that collects the log from the files to be collected among the files output by the log file output means One or more log data collecting means for transmitting to the log, and an providing means for generating an identifier for uniquely identifying the one or more log data collecting means and providing the identifier to the log server. The server receives the log transmitted from the application server and stores it in the storage unit. And the storage means receives an identifier provided by the application server associated with the received log and an identifier associated with the log already stored in the storage unit, and receives The other information for uniquely identifying the log included in the recorded log matches the other information for uniquely identifying the log included in the log already stored in the storage unit The log management system is characterized in that the received log is not stored in, and the received log is stored in other cases.

本発明により、複数のユーザからの要求に応じて並行して処理を行うシステムにおいて、処理を行った結果としてのログに対し、重複したログの保存を防止し、かつ、ログの記録漏れを避けることが可能となる。   According to the present invention, in a system that performs processing in parallel in response to requests from a plurality of users, it is possible to prevent duplicate logs from being saved and avoid omission of log recording for logs as a result of processing. It becomes possible.

システム構成図。System Configuration. アプリケーションサーバ102のハードウェア構成図。The hardware block diagram of the application server 102. FIG. 機能ブロック図。Functional block diagram. ログ収集部の設定ファイルの記述例を示す図。The figure which shows the example of a description of the setting file of a log collection part. ログフィルタのI/FおよびLogDataクラスの定義例を示す図。The figure which shows the definition example of I / F of a log filter, and a LogData class. IDファイルの記述例を示す図。The figure which shows the example of a description of ID file. レコードを初期登録した際のレコードファイルの記述例を示す図。The figure which shows the example of a description of the record file at the time of initial registration of a record. ログDBの構成例を示す図。The figure which shows the structural example of log DB. ステータスDBの構成例を示す図。The figure which shows the structural example of status DB. アーカイブアプリケーションの設定ファイルの記述例を示す図。The figure which shows the example of a description of the setting file of an archive application. ログ収集部の起動、およびIDファイルの作成に関するフローチャート。The flowchart regarding starting of a log collection part, and preparation of ID file. ログ収集部のログ収集に関するフローチャート。The flowchart regarding the log collection of a log collection part. バッチアプリケーションサーバのログ出力に関するフローチャート。The flowchart regarding the log output of a batch application server. フェールオーバー時のアプリケーションサーバの処理のフローチャートApplication server processing flowchart for failover

以下に、本発明の好ましい実施の形態を、添付の図面に基づいて詳細に説明する。   Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings.

[システム構成]
図1は、本発明の一実施形態に係るログ管理システムの全体構成を示している。ネットワーク100を介して、PC101、アプリケーションサーバ102、ログサーバ103、ストレージサーバ104、およびバッチアプリケーションサーバ105が接続されている。アプリケーションサーバ102は、PC101からのネットワーク100を介して送信されるリクエストを受信し、処理を行う。ログサーバ103は、アプリケーションサーバ102から送信されるログを受信し、ストレージサーバ104に保存させる機能、および、バッチアプリケーションサーバ105からのログデータの出力要求を受信し、該当の処理を行う機能を備える。ストレージサーバ104は、ログサーバ103が収集したログを保存する。
[System configuration]
FIG. 1 shows the overall configuration of a log management system according to an embodiment of the present invention. A PC 101, application server 102, log server 103, storage server 104, and batch application server 105 are connected via the network 100. The application server 102 receives a request transmitted from the PC 101 via the network 100 and performs processing. The log server 103 has a function of receiving a log transmitted from the application server 102 and storing it in the storage server 104, and a function of receiving a log data output request from the batch application server 105 and performing a corresponding process. . The storage server 104 stores the logs collected by the log server 103.

ネットワーク100は、上述の各装置間での情報をやりとりのための通信回線として働き、有線、無線と回線の形態は問わない。また、ネットワーク100は、インターネットなどの外部ネットワークやLANなどの内部ネットワークを組み合わせて構成されるものとする。   The network 100 functions as a communication line for exchanging information between the devices described above, and the form of wired, wireless, and line is not limited. The network 100 is configured by combining an external network such as the Internet and an internal network such as a LAN.

また、図1において、2台のアプリケーションサーバ102を示しているが、これに限定するものではない。同様に各サーバも1台構成に限定するものではなく、複数台の物理的な構成を備えていても構わない。また、本実施形態において、各サーバを機能ごとに別個の装置として示しているが、単一の装置にて実現するようにしても構わない。例えば、ログサーバ103、ストレージサーバ104、およびバッチアプリケーションサーバ105を1台の装置にて構成するようにしても構わない。また、物理的に1台の装置において複数のVMが動作するように構成してもよいし、複数の物理的な装置が協働して複数のVMが動作するように構成してもよい。   In FIG. 1, two application servers 102 are shown, but the present invention is not limited to this. Similarly, each server is not limited to a single configuration, and a plurality of physical configurations may be provided. In this embodiment, each server is shown as a separate device for each function, but may be realized by a single device. For example, the log server 103, the storage server 104, and the batch application server 105 may be configured by a single device. In addition, a plurality of VMs may be configured to physically operate in one device, or a plurality of VMs may operate in cooperation with a plurality of physical devices.

[ハードウェア構成]
図2は、本発明の一実施形態に係るハードウェア構成を示している。なお、図1に示した各装置も同様の構成を有するものとし、ここではアプリケーションサーバ102を例にとって説明する。
[Hardware configuration]
FIG. 2 shows a hardware configuration according to an embodiment of the present invention. It is assumed that each device shown in FIG. 1 has the same configuration, and here, the application server 102 will be described as an example.

アプリケーションサーバ102は、CPU(Central Processing Unit)201、直接記憶部202、間接記憶部203、およびネットワークインタフェース204を備える。CPU201は、各記憶部に格納された所定のプログラムを実行し、アプリケーションサーバ102の各種制御を指示するユニットである。直接記憶部202は、CPU201がプログラムを実行する際に使用するワークメモリであり、CPU201が実行するプログラムは直接記憶部202にロードされる。直接記憶部202は、RAM(Randam Access Memory)により実現される。間接記憶部203は、アプリケーションプログラム、およびOS(Operating System)を含む各種プログラムが記憶されている。   The application server 102 includes a CPU (Central Processing Unit) 201, a direct storage unit 202, an indirect storage unit 203, and a network interface 204. The CPU 201 is a unit that executes a predetermined program stored in each storage unit and instructs various controls of the application server 102. The direct storage unit 202 is a work memory used when the CPU 201 executes a program, and the program executed by the CPU 201 is loaded into the direct storage unit 202. The direct storage unit 202 is realized by a RAM (Random Access Memory). The indirect storage unit 203 stores application programs and various programs including an OS (Operating System).

間接記憶部203に記憶されている各種プログラムは、CPU201がプログラムを実行する際に直接記憶部202へ読みだされる。間接記憶部203は、ROM(Read Only Memory)、HDD(Hard Disc Drive)、または、SSD(Solid State Drive)により実現される。なお、CPU201は、マルチプロセッサでも良い。また、アプリケーションサーバ102内の各構成要素は、内部バス(不図示)によって互いに通信可能なように接続されている。ネットワークインタフェース204は、ネットワーク100に接続されており、ネットワーク100に接続されている他の装置と通信が可能となる。PC101、ログサーバ103、ストレージサーバ104、およびバッチアプリケーションサーバ105も同様のハードウェア構成をしているため、説明は割愛する。また、各装置は、ここに示していない構成要素を備えていても構わず、汎用的なコンピュータにて実現可能である。   Various programs stored in the indirect storage unit 203 are read directly to the storage unit 202 when the CPU 201 executes the programs. The indirect storage unit 203 is realized by a ROM (Read Only Memory), a HDD (Hard Disc Drive), or an SSD (Solid State Drive). Note that the CPU 201 may be a multiprocessor. Each component in the application server 102 is connected to be communicable with each other via an internal bus (not shown). The network interface 204 is connected to the network 100 and can communicate with other devices connected to the network 100. Since the PC 101, the log server 103, the storage server 104, and the batch application server 105 have the same hardware configuration, description thereof is omitted. In addition, each device may include components not shown here, and can be realized by a general-purpose computer.

[ソフトウェア構成]
図3は、本発明の一実施形態に係るシステムを構成する各装置の機能ブロック図(ソフトウェア構成)を示す。まず、PC101についての説明を行う。PC101は、ネットワーク通信部313、ユーザインタフェース312、ウェブブラウザ311から構成される。ユーザインタフェース312は、ユーザが、PC101によって提供される各種アプリケーション(不図示)を使用するためのインタフェースである。これを介して入力されるユーザ操作に従って、PC101は、各種アプリケーションを実行する。アプリケーションの1種であるウェブブラウザ311は、ネットワーク100を介して、ネットワーク通信部313から送受信される情報に応じて、各種情報の表示を行う。
Software configuration
FIG. 3 is a functional block diagram (software configuration) of each device constituting the system according to the embodiment of the present invention. First, the PC 101 will be described. The PC 101 includes a network communication unit 313, a user interface 312, and a web browser 311. The user interface 312 is an interface for the user to use various applications (not shown) provided by the PC 101. The PC 101 executes various applications in accordance with user operations input via this. A web browser 311, which is a type of application, displays various types of information according to information transmitted and received from the network communication unit 313 via the network 100.

ウェブブラウザ311は、図2の間接記憶部203に保存されているプログラムが、直接記憶部202にロードされ、CPU201により実行されることで実現される。本実施形態では、PC101を操作するユーザが、ユーザインタフェース312、ネットワーク通信部313を介してアプリケーションサーバ102のリクエスト処理部3211と通信を行い、データの送受信を行う。   The web browser 311 is realized by a program stored in the indirect storage unit 203 in FIG. 2 being loaded into the direct storage unit 202 and executed by the CPU 201. In this embodiment, a user who operates the PC 101 communicates with the request processing unit 3211 of the application server 102 via the user interface 312 and the network communication unit 313 to transmit and receive data.

次に、アプリケーションサーバ102上に実装されるアプリケーション部321に含まれるリクエスト処理部3211、ログファイル出力部3212、リクエスト処理部状態監視部3213に関して説明する。リクエスト処理部3211は、PC101からのリクエストを受信し、受信した内容に応じた処理を行う。例えば、アプリケーションサーバ102がオンライン上でのプリントサービスを実現しているとする。ユーザは、PC101を用いて印刷をする対象のドキュメントを選択し、また印刷設定などを指定し、アプリケーションサーバ102に対して、印刷処理のリクエストを送信する。アプリケーションサーバ102は、受信したリクエストに従ってドキュメントを印刷可能な形式に変換し、プリントサーバ(不図示)に送信するといった処理を行う。   Next, the request processing unit 3211, the log file output unit 3212, and the request processing unit state monitoring unit 3213 included in the application unit 321 mounted on the application server 102 will be described. The request processing unit 3211 receives a request from the PC 101 and performs processing according to the received content. For example, assume that the application server 102 implements an online print service. The user selects a document to be printed using the PC 101, designates print settings and the like, and transmits a print processing request to the application server 102. The application server 102 performs processing such as converting the document into a printable format in accordance with the received request and transmitting the document to a print server (not shown).

ここでは、一例としてプリントシステムの例を述べたが、アプリケーションサーバ102にて実現される機能に制限は存在しない。リクエスト処理部3211は、一般的なWebサーバと同等の機能を持ち、同期処理を行うことが可能である。リクエスト処理部3211は、ネットワーク100を介して、別のアプリケーションサーバ102と通信することも可能である。また、リクエスト処理部3211は、定期的にリクエスト処理部状態監視部3213に対して、動作中を表すパケットを送信する。   Here, an example of a print system has been described as an example, but there is no limitation on the functions realized by the application server 102. The request processing unit 3211 has a function equivalent to that of a general Web server and can perform synchronization processing. The request processing unit 3211 can communicate with another application server 102 via the network 100. In addition, the request processing unit 3211 periodically transmits a packet indicating that it is operating to the request processing unit state monitoring unit 3213.

ログファイル出力部3212は、リクエスト処理部3211の処理内容に応じて、その処理のログをファイルに出力する。この際、出力されるログには、そのリクエストに対する処理が行われた時間が記録されている必要がある。その他の項目(例えば、ユーザカウントや、処理の内容に関するログ)に関しては、任意の項目を出力してもよい。ログのフォーマットに関する制約は特に存在せず、任意のフォーマット、例えばコンマ区切りやタブ区切り等、種々の形式での出力が可能である。また、処理内容やアプリケーションごとに、異なるファイルにログを出力することができる。   The log file output unit 3212 outputs the processing log to a file according to the processing content of the request processing unit 3211. At this time, the output log needs to record the time at which the request was processed. Regarding other items (for example, a user count and a log relating to the contents of processing), arbitrary items may be output. There are no particular restrictions on the log format, and output in various formats such as a comma-delimited or tab-delimited format is possible. In addition, logs can be output to different files for each processing content and application.

リクエスト処理部状態監視部3213は、リクエスト処理部3211から定期的にパケットが送信されてくるか否かを監視する。パケットが送信されてこなかった場合には、リクエスト処理部状態監視部3213は、リクエスト処理部3211が動作継続不能状態になっているものとし、フェールオーバーを行う。フェールオーバーのフローに関しては、図14を用いて後述する。   The request processing unit state monitoring unit 3213 monitors whether or not a packet is periodically transmitted from the request processing unit 3211. If a packet has not been transmitted, the request processing unit state monitoring unit 3213 assumes that the request processing unit 3211 is in an operation continuation impossible state and performs failover. The failover flow will be described later with reference to FIG.

次に、アプリケーションサーバ102上に実現されるログ収集エージェント部322に関して説明する。ログ収集エージェント部322は、複数の処理部(ログデータ収集部3221、ログデータ送信部3222、ステータス送信部3223、ログフィルタ部3224、およびID管理部3225)から構成される。以下に、各処理部の説明を記載する。   Next, the log collection agent unit 322 implemented on the application server 102 will be described. The log collection agent unit 322 includes a plurality of processing units (a log data collection unit 3221, a log data transmission unit 3222, a status transmission unit 3223, a log filter unit 3224, and an ID management unit 3225). Below, description of each process part is described.

まず、ログデータ収集部3221は、ログファイル出力部3212がファイルに出力したログファイルから、ログを読み込む。前述したようにログファイル出力部3212は、任意のフォーマットで記述されたログをファイルに出力する。ストレージサーバ104のログDB部341に定義されたスキーマに沿ってログを保存するためには、任意のフォーマットで記載されたログを、スキーマに従った形式に変換する必要がある。そこで、ログフィルタ部3224を用いて、ファイルに記載されたログのフォーマットを、スキーマに適する形式に変換する。   First, the log data collection unit 3221 reads a log from the log file output to the file by the log file output unit 3212. As described above, the log file output unit 3212 outputs a log described in an arbitrary format to a file. In order to save the log in accordance with the schema defined in the log DB unit 341 of the storage server 104, it is necessary to convert the log described in an arbitrary format into a format according to the schema. Therefore, the log filter unit 3224 is used to convert the log format described in the file into a format suitable for the schema.

ログフィルタ部3224は、ログデータ収集部3221から渡されたログをスキーマに従った形式に変換し、ログデータ収集部3221に返す。ログフィルタ部3224が適切な形式に変換することにより、任意のフォーマットへの対応が可能となる。ログフィルタ部3224の詳細については図5を用いて説明する。ここで、1つのアプリケーションサーバ102には、複数のログ収集エージェント部322を動作させることが出来る。ログ収集エージェント部322は、設定ファイルを備え、それぞれに対して、収集対象とするログファイルの名前等を定義することが出来る。   The log filter unit 3224 converts the log passed from the log data collection unit 3221 into a format according to the schema, and returns it to the log data collection unit 3221. By converting the log filter unit 3224 into an appropriate format, it is possible to cope with an arbitrary format. Details of the log filter unit 3224 will be described with reference to FIG. Here, a plurality of log collection agent units 322 can be operated in one application server 102. The log collection agent unit 322 includes setting files and can define the name of the log file to be collected for each.

また、ログフィルタ部3224も、それぞれに対して設定することが出来る。これにより、例えばログファイル出力部3212が複数のログファイルを、異なるフォーマットで出力する場合にも、対応することが出来る。   The log filter unit 3224 can also be set for each. Thus, for example, the case where the log file output unit 3212 outputs a plurality of log files in different formats can be handled.

ログデータ収集部3221は、ログフィルタ部3224によって変換されたログデータを、ログデータ送信部3222に渡す。ログデータ送信部3222は、ログデータ収集部3221から渡された、ログデータをログDBリクエスト処理部331に送信する。ログDBリクエスト処理部331は、受信したログデータをログDB部341に保存する。ログDB部341に保存されるログデータには、時刻やログを発生させる処理を行ったユーザID、処理の内容等の情報が記載されており、それらの情報を基にユーザに対して、サービスの使用量に応じた請求をすることも可能である。ログDB部341のスキーマについては後述する。   The log data collection unit 3221 passes the log data converted by the log filter unit 3224 to the log data transmission unit 3222. The log data transmission unit 3222 transmits the log data passed from the log data collection unit 3221 to the log DB request processing unit 331. The log DB request processing unit 331 stores the received log data in the log DB unit 341. The log data stored in the log DB unit 341 includes information such as the time and the user ID that performed the process for generating the log, the contents of the process, and the service based on the information. It is also possible to make a charge according to the usage amount. The schema of the log DB unit 341 will be described later.

また、ログデータ収集部3221は、ログデータの送信処理が正常に終了した場合には、ステータス送信部3223に対して、ログファイルからログを収集した時刻を通知する。ステータス送信部3223は、その時刻をステータスDBリクエスト処理部333に送信する。この際、ログ収集エージェント部322を識別するための情報として、各ログ収集エージェント部に対して割り当てられたIDを対応付けて送信する。ステータスDBリクエスト処理部333は、受信したIDと時刻との組を、ストレージサーバ104のステータスDB部342に保存する。このIDと時刻との組をステータスとして扱い、ステータスはステータスに含まれるIDを備えるログ収集エージェント部322が何時までのログを保存しているかを示す情報となる。   In addition, when the log data transmission process ends normally, the log data collection unit 3221 notifies the status transmission unit 3223 of the time when the log is collected from the log file. The status transmission unit 3223 transmits the time to the status DB request processing unit 333. At this time, as information for identifying the log collection agent unit 322, an ID assigned to each log collection agent unit is transmitted in association with each other. The status DB request processing unit 333 stores the received ID and time pair in the status DB unit 342 of the storage server 104. This pair of ID and time is treated as a status, and the status is information indicating the time until which the log collection agent unit 322 having the ID included in the status is stored.

また、ログ収集エージェント部322には、IDを発行するための処理部として、ID管理部3225が存在する。ID管理部3225は、ログ収集エージェント部322の起動と同時に処理を開始し、当該ログ収集エージェント部に固有のIDを発行し、ログデータ収集部3221にそのID情報を通知する。このIDは、アプリケーションサーバ102上のファイル(IDファイル)として管理される。IDファイルのフォーマット、ファイル名、および保存パス等に関しては図6を用いて後述する。   The log collection agent unit 322 includes an ID management unit 3225 as a processing unit for issuing an ID. The ID management unit 3225 starts processing simultaneously with the activation of the log collection agent unit 322, issues a unique ID to the log collection agent unit, and notifies the log data collection unit 3221 of the ID information. This ID is managed as a file (ID file) on the application server 102. The format, file name, storage path, etc. of the ID file will be described later with reference to FIG.

次に、バッチアプリケーションサーバ105に含まれる各処理部を説明する。バッチアプリケーションサーバ105上では、ログDB部341に格納されたログを出力するためのアプリケーション(アーカイブアプリケーション)が実装されている。まず、取得日時指定部351では、ログDB部341から取得する時刻の範囲を指定し、その範囲を、ログデータ取得部353に対して通知する。   Next, each processing unit included in the batch application server 105 will be described. On the batch application server 105, an application (archive application) for outputting a log stored in the log DB unit 341 is implemented. First, the acquisition date / time specifying unit 351 specifies a time range to be acquired from the log DB unit 341 and notifies the log data acquisition unit 353 of the range.

次に、ステータス確認部352は、ログサーバ103のステータスDBリクエスト処理部333に対して、ステータス取得のリクエストを送信する。また、ステータス確認部352は、ログサーバ103のログDBリクエスト処理部331に対して、ログDB部341に保存されているログの中で、最も古い時刻を持つログの時刻の取得リクエストを送信する。ログDBリクエスト処理部331はリクエストを受信したら、ログDB部341に格納されているログの時刻から、最も古い時刻を取得し、ステータス確認部352に送信する。その後、ステータス確認部352は、受信した最も古い時刻のログの時刻と、ステータスに記録されている時刻とをログデータ取得部353に通知する。   Next, the status confirmation unit 352 transmits a status acquisition request to the status DB request processing unit 333 of the log server 103. Also, the status confirmation unit 352 transmits an acquisition request for the time of the log having the oldest time among the logs stored in the log DB unit 341 to the log DB request processing unit 331 of the log server 103. . When receiving the request, the log DB request processing unit 331 acquires the oldest time from the time of the log stored in the log DB unit 341 and transmits the acquired time to the status confirmation unit 352. Thereafter, the status confirmation unit 352 notifies the log data acquisition unit 353 of the log time of the oldest received time and the time recorded in the status.

ログデータ取得部353は、取得日時指定部351、およびステータス確認部352から通知された時刻を比較する。比較のロジックに関しては、後述のフローチャートの説明にて詳細に述べる。比較の結果、取得日時指定部351より通知された範囲のログデータの取得が可能と判断した場合には、ログDBリクエスト処理部331に対してログ取得要求のリクエストを送信する。ログDBリクエスト処理部331は、リクエストを受信したら、ログDB部341からログを取得し、ログデータ取得部353に送信する。ログデータ取得部353は、受信したデータをログデータ出力部354に渡す。ログデータ出力部354は、受け取ったログデータの形式を整形し、ファイルに出力する。   The log data acquisition unit 353 compares the times notified from the acquisition date / time specifying unit 351 and the status confirmation unit 352. The comparison logic will be described in detail in the explanation of the flowchart described later. As a result of the comparison, if it is determined that the log data in the range notified by the acquisition date / time specifying unit 351 can be acquired, a log acquisition request is transmitted to the log DB request processing unit 331. When receiving the request, the log DB request processing unit 331 acquires a log from the log DB unit 341 and transmits the log to the log data acquisition unit 353. The log data acquisition unit 353 passes the received data to the log data output unit 354. The log data output unit 354 formats the format of the received log data and outputs it to a file.

次に、ログサーバ103について説明する。まず、ログDBリクエスト処理部331は、アプリケーションサーバ102、およびバッチアプリケーションサーバ105から送信されるストレージサーバ104のログDB部341に対する処理に関するリクエストを受信する。そして、ログDBリクエスト処理部331は、受信したリクエストに応じた処理を行う。また、ログDBリクエスト処理部331は、リクエストを受信した際には、ログDBI/O部332に対して、処理のリクエストを送信する。ログDBI/O部332は、ログDBリクエスト処理部331から受信したリクエストに応じた処理をログDB部341に対して実行する。同様に、ステータスDBリクエスト処理部333は、アプリケーションサーバ102、およびバッチアプリケーションサーバ105から送信されるステータスDB部342に対する処理に関するリクエストを受信する。そして、ステータスDBリクエスト処理部333は、受信したリクエストに応じた処理を行う。また、ステータスDBリクエスト処理部333は、リクエストを受信した際には、ステータスDBI/O部334に対して、処理のリクエストを行う。ステータスDBI/O部334は、ステータスDBリクエスト処理部333から受信したリクエストに応じた処理をステータスDB部342に対して実行する。   Next, the log server 103 will be described. First, the log DB request processing unit 331 receives a request regarding processing to the log DB unit 341 of the storage server 104 transmitted from the application server 102 and the batch application server 105. Then, the log DB request processing unit 331 performs processing according to the received request. In addition, when receiving the request, the log DB request processing unit 331 transmits a processing request to the log DB I / O unit 332. The log DB I / O unit 332 executes processing for the log DB unit 341 according to the request received from the log DB request processing unit 331. Similarly, the status DB request processing unit 333 receives a request regarding processing for the status DB unit 342 transmitted from the application server 102 and the batch application server 105. Then, the status DB request processing unit 333 performs processing according to the received request. Further, when receiving the request, the status DB request processing unit 333 makes a processing request to the status DB I / O unit 334. The status DB I / O unit 334 executes processing corresponding to the request received from the status DB request processing unit 333 with respect to the status DB unit 342.

次に、ストレージサーバ104について説明する。ログDB部341は、ログサーバ103を介して収集した各ログを蓄積し、保存する。ステータスDB部342は、アプリケーションサーバ102が有する各ログ収集エージェント部のステータスとIDとを対応付けて保持する。ここでのデータ構造に関しては、図8を用いて後述する。また、各DB(データベース)部は、ストレージサーバ104が備える間接記憶部等によって実現される。   Next, the storage server 104 will be described. The log DB unit 341 accumulates and stores each log collected via the log server 103. The status DB unit 342 holds the status and ID of each log collection agent unit included in the application server 102 in association with each other. The data structure here will be described later with reference to FIG. Each DB (database) unit is realized by an indirect storage unit provided in the storage server 104.

[ログ収集エージェント部の設定ファイル]
図4を用いて、各ログ収集エージェント部が備える設定ファイルに設定可能な項目の説明を行う。まずログフィルタ部3224に関する設定項目であるフィルタ名4011、およびアセンブリ名4012に関して説明する。本実施形態において、アプリケーションサーバ102は、VMの技術を利用して物理的な1台の装置において、複数の仮想的に異なるサーバを提供することができる。この場合には、設定ファイルも1台の装置の中に複数保持することとなる。前述したようにログ収集エージェント部322はログフィルタ部3224を備える。ログフィルタ部3224は、収集対象のログファイルのフォーマットによって変わりうるため、ログデータ収集部3221を変更することなく、ログフィルタ部3224を変更可能なようにすることが望ましい。そこで、実行時にリンクすることが可能な形式(例えば、Windows(登録商標)であればdll(Dynamic Link Library)ファイル)で、ログフィルタ部3224を実装する。
[Setting file for log collection agent section]
The items that can be set in the setting file included in each log collection agent unit will be described with reference to FIG. First, the filter name 4011 and the assembly name 4012 which are setting items related to the log filter unit 3224 will be described. In the present embodiment, the application server 102 can provide a plurality of virtually different servers in one physical device using the VM technology. In this case, a plurality of setting files are held in one apparatus. As described above, the log collection agent unit 322 includes the log filter unit 3224. Since the log filter unit 3224 can change depending on the format of the log file to be collected, it is desirable that the log filter unit 3224 can be changed without changing the log data collection unit 3221. Therefore, the log filter unit 3224 is mounted in a format that can be linked at the time of execution (for example, a DLL (Dynamic Link Library) file in the case of Windows (registered trademark)).

また、設定ファイルに、そのアセンブリパスを記載し、ログデータ収集部3221が実行時に、動的に読み込むことが出来るようにすることで、ログフィルタ部3224を容易に変更可能とする。ここで、設定ファイル中のlogFilterタグは複数作成することが出来、複数のログフィルタ部に関する設定を1つの設定ファイルに記述することが出来る。その際、各logFilterタグに割り振られたフィルタ名4011は一意となるように設定する必要がある。   In addition, the assembly path is described in the setting file so that the log data collection unit 3221 can dynamically read it at the time of execution, so that the log filter unit 3224 can be easily changed. Here, a plurality of logFilter tags in the setting file can be created, and settings related to a plurality of log filter units can be described in one setting file. At that time, the filter name 4011 assigned to each log Filter tag needs to be set to be unique.

次にagentタグについて説明する。agentタグには、ログデータ収集部3221に関する設定を記述する。以下に設定項目に関する説明を述べる。Agent名4013は、agentを一意に識別する名前である。agentタグは、複数記述することが出来、各agentタグに割り当てられたAgent名4013はログデータ収集部3221を特定するために一意となる必要がある。   Next, the agent tag will be described. In the agent tag, settings related to the log data collection unit 3221 are described. The following describes the setting items. The Agent name 4013 is a name that uniquely identifies the agent. A plurality of agent tags can be described, and the agent name 4013 assigned to each agent tag needs to be unique in order to identify the log data collection unit 3221.

次に、interval4014には、agent(ログデータ収集部3221)の起動間隔を設定する。指定された間隔に応じて、ログデータ収集部3221は、各サービスのログファイルからのログの読み込み処理を行う。dir4015は、ログデータ収集部3221が、収集を行う対象のログファイルが存在するフォルダパスを記述する。また、filenameRegEx4017は、収集対象のファイル名の正規表現を記載する。ログデータ収集部3221は、dir4015に存在し、filenameRegEx4017に一致する全てのファイルを収集対象とする。   Next, in interval 4014, the activation interval of the agent (log data collection unit 3221) is set. In accordance with the specified interval, the log data collection unit 3221 performs log reading processing from the log file of each service. The dir 4015 describes a folder path where a log file to be collected by the log data collection unit 3221 exists. Further, filenameRegEx 4017 describes a regular expression of a collection target file name. The log data collection unit 3221 collects all files that exist in the dir 4015 and match the filenameRegEx 4017.

includeSubDir4016には、dir4015以下に存在するサブフォルダに含まれるログも、収集対象とする否かを設定する。logFilter−ref4018には、使用するフィルタ名4011を設定する。ここで設定したlogFilter名に一致するアセンブリをロードし、ログフィルタ部3224を作成する。logServer4019、およびstatuServer4020には、ログデータ収集部3221が接続するログDBリクエスト処理部331、およびステータスDBリクエスト処理部333のアドレスを設定する。ログ収集エージェント部322は、その起動時にこの設定ファイルを読み込み、その設定に従って処理を行う。詳細な処理フローに関しては、図12を用いて後述する。   In the includeSubDir 4016, it is set whether or not the logs included in the subfolders existing under the dir 4015 are to be collected. A log name 4011 to be used is set in logFilter-ref 4018. The assembly that matches the logFilter name set here is loaded, and the log filter unit 3224 is created. In logServer 4019 and statusServer 4020, the addresses of the log DB request processing unit 331 and the status DB request processing unit 333 to which the log data collection unit 3221 is connected are set. The log collection agent unit 322 reads this setting file at the time of activation and performs processing according to the setting. A detailed processing flow will be described later with reference to FIG.

[ログフィルタI/F]
図5(a)に、ログフィルタI/Fの定義例を示す。ログ収集エージェント部322のログフィルタ部3224を作成する場合には、ログフィルタI/F501を実装したモジュールを作成する必要がある。図5(a)に示した例では、プログラミング言語としてC#を選択し、C#に基づいたI/F定義の例を記載している。しかしながら、プログラミング言語を限定するものではなく、ログ収集エージェント部322がロードできるモジュールの作成が可能であれば、いずれのプログラム言語を用いても構わない。
[Log Filter I / F]
FIG. 5A shows a definition example of the log filter I / F. When creating the log filter unit 3224 of the log collection agent unit 322, it is necessary to create a module in which the log filter I / F 501 is mounted. In the example shown in FIG. 5A, C # is selected as the programming language, and an example of I / F definition based on C # is described. However, the programming language is not limited, and any programming language may be used as long as a module that can be loaded by the log collection agent unit 322 can be created.

プログラム言語としてC#を用いた場合、図5(a)に示すようにインタフェース定義部分は、クラス5011、戻り値5012、関数5013、引数5014から構成される。ログフィルタ部3224の作成者は、クラス5011を継承したクラスを作成したクラスを作成し、そのクラスで関数5013を備える関数を実装する。この関数には、ログ収集エージェント部322がログファイルから読みだした1行の文字列が引数5014に与えられる。ログフィルタ部3224の作成者は、引数5014を解析し、図5(b)に示す様なプロパティを備えるクラスを作成し、戻り値5012として返す関数を実装する。   When C # is used as the program language, the interface definition portion is composed of a class 5011, a return value 5012, a function 5013, and an argument 5014 as shown in FIG. The creator of the log filter unit 3224 creates a class in which a class that inherits the class 5011 is created, and implements a function including the function 5013 in the class. In this function, a one-line character string read from the log file by the log collection agent unit 322 is given to the argument 5014. The creator of the log filter unit 3224 analyzes the argument 5014, creates a class having properties as shown in FIG. 5B, and implements a function that is returned as a return value 5012.

図5(b)に、LogDataクラスのプロパティの定義例を示す。本プロパティの定義も同様に、プログラミング言語としてC#を用いた場合の定義例を示している。   FIG. 5B shows a definition example of properties of the LogData class. Similarly, the definition of this property shows a definition example when C # is used as a programming language.

以下に、各プロパティの説明を記載する。TimeStamp5021は、ログに記載されている時刻(タイムスタンプ)を設定するためのプロパティである。TenantId5022には、ログを出力するきっかけとなった操作を行ったユーザが所属するテナント(会社、組織)を識別するためのIDを設定するためのプロパティである。UserId5023は、ログを出力する起因となった操作を行ったユーザを識別するためのIDを設定するためのプロパティである。ServiceId5024は、ユーザが行った操作の内容、例えば、Print、Scanといった操作の種類を表すためのIDである。最後に、ObjetctID5025には、処理の対象、例えばプリントの場合であれば、プリントしたドキュメントの名前などを設定するためのプロパティである。   A description of each property is given below. TimeStamp 5021 is a property for setting the time (time stamp) described in the log. TenantId 5022 is a property for setting an ID for identifying the tenant (company, organization) to which the user who performed the operation that triggered the log output belongs. UserId 5023 is a property for setting an ID for identifying the user who performed the operation that caused the log to be output. ServiceId 5024 is an ID for representing the type of operation performed by the user, for example, the type of operation such as Print or Scan. Finally, ObjectID 5025 is a property for setting a processing target, for example, in the case of printing, the name of a printed document.

図5(b)における本定義例では、上記5つのプロパティを定義したが、これに限定するものではない。その他の項目をログとして記録したい場合には、LogDataクラス502にプロパティを追加し、関数5013の実装にて、その項目に値を設定するように、ログフィルタ部3224の実装を行う。また、TimeStamp5021以外の項目をログとして記録しない場合には、プロパティをクラスの定義から削除しても構わない。   In this definition example in FIG. 5B, the above five properties are defined, but the present invention is not limited to this. When other items are to be recorded as a log, a property is added to the LogData class 502, and the log filter unit 3224 is implemented so that a value is set for the item when the function 5013 is implemented. If items other than TimeStamp 5021 are not recorded as a log, the property may be deleted from the class definition.

[IDファイル]
図6を用いて、IDファイルの説明を行う。本実施形態に係るIDファイルは図6に示す様なスキーマによって構成される。IDファイルはagentId6011タグから構成され、その属性であるidには、ログ収集エージェント部322を一意に識別するための識別子(GUID:Global Unique IDentifier)を設定する。GUIDは、ログ収集エージェント部322が起動する際に、ログ収集エージェント部322自身で作成する。この作成されるIDファイルは、前述したログ収集エージェント部322の設定ファイルにおいてdir4015が示すフォルダに保存される。もし、フォルダが存在しない場合には、ログ収集エージェント部322は起動しない。また、IDファイルのファイル名は、設定ファイルのfilenameRegEx4017から生成される文字列を使用する。
[ID file]
The ID file will be described with reference to FIG. The ID file according to the present embodiment is configured by a schema as shown in FIG. The ID file is composed of an agentId 6011 tag, and an identifier (GUID: Global Unique IDentifier) for uniquely identifying the log collection agent unit 322 is set in the attribute id. The GUID is created by the log collection agent unit 322 itself when the log collection agent unit 322 is activated. The created ID file is stored in the folder indicated by dir 4015 in the setting file of the log collection agent unit 322 described above. If the folder does not exist, the log collection agent unit 322 is not activated. The file name of the ID file uses a character string generated from filenameRegEx 4017 of the setting file.

前述したようにfilenameRegEx4017には正規表現が設定されるため、「?」や「¥」等のファイル名には指定出来ない文字列が設定される可能性がある。そのため、filenameRegEx4017に指定された文字列から、ファイル名に使用できる文字列への変換処理を行う。具体的には、Base64エンコーディングを用いて文字列変換することや、「¥」などの文字列を「bs」などの文字列に置き換えることがあげられる。ここで、変換の際の条件として、変換前の文字列と変換後の文字列が写像関係になっていることが挙げられる。   Since a regular expression is set in filenameRegEx 4017 as described above, a character string that cannot be specified in a file name such as “?” Or “¥” may be set. Therefore, a conversion process is performed from a character string specified in filenameRegEx 4017 to a character string that can be used as a file name. Specifically, character string conversion using Base64 encoding or replacement of a character string such as “¥” with a character string such as “bs” can be given. Here, as a condition at the time of conversion, there is a mapping relationship between the character string before conversion and the character string after conversion.

なお、本実施形態では、1台の物理的な装置の中に複数のVM(アプリケーションサーバ)を動作させている場合には、各VMそれぞれのログ収集エージェント部322ごとにIDファイルが生成されることとなる。   In this embodiment, when a plurality of VMs (application servers) are operated in one physical device, an ID file is generated for each log collection agent unit 322 of each VM. It will be.

[レコードファイル]
前述したように、ログデータ収集部3221は、定期的にログファイルを読み込む。そして、ログデータ収集部3221は、新規に追加されたログのみに対して、ログフィルタ部3224を用いて整形し、ストレージサーバ104のログDB部341にログデータを格納する。このように新規に追加されたログのみを対象とすることで、パフォーマンスを向上させることが出来る。新規に追加されたログのみを対象とするために、前回の収集時に、ログデータ収集部3221が収集を行ったファイルの位置や、収集を行った時間などを記録する必要がある。そのデータを、ログの収集状況を示すレコードファイルと呼ばれるファイルに記載する。ここで、レコードファイルはログ収集エージェント部322が存在するフォルダに、動的に作成される。また、レコードファイルのファイル名は、ログ収集エージェント部322の設定ファイルにおいて、Agent名4013の末尾に「.xml」を追記したファイル名とする。
[Record file]
As described above, the log data collection unit 3221 periodically reads a log file. Then, the log data collection unit 3221 shapes only the newly added log using the log filter unit 3224, and stores the log data in the log DB unit 341 of the storage server 104. In this way, it is possible to improve performance by targeting only newly added logs. In order to target only newly added logs, it is necessary to record the location of the files collected by the log data collection unit 3221 and the time of collection at the time of the previous collection. The data is described in a file called a record file indicating the log collection status. Here, the record file is dynamically created in the folder where the log collection agent unit 322 exists. The file name of the record file is a file name in which “.xml” is added to the end of the Agent name 4013 in the setting file of the log collection agent unit 322.

図7を用いて、本実施形態に係るレコードファイルの説明を行う。レコードファイルは、図7に示す様な形式のファイルである。recordタグは、filename7011、updateTime7012、offset7013、lineNumber7014の4つの属性から構成される。recordタグは、ログデータ収集部3221が収集対象とするファイルの数だけ作成される。filename7011は、ログデータ収集部3221が収集しているログファイルの名称が設定される。updateTime7012には、ログデータ収集部3221が、前回の収集を行った時間を設定する。filename7011が示すファイルに対して、過去に収集処理を行っていない場合には、初期値として“1970/01/01 00:00:00”が設定される。   The record file according to the present embodiment will be described with reference to FIG. The record file is a file having a format as shown in FIG. The record tag is composed of four attributes: filename 7011, updateTime 7012, offset 7013, and lineNumber 7014. The record tags are created for the number of files to be collected by the log data collection unit 3221. The file name 7011 is set with the name of the log file collected by the log data collection unit 3221. In updateTime 7012, the log data collection unit 3221 sets the time when the previous collection was performed. If the file indicated by filename 7011 has not been collected in the past, “1970/01/01 00:00:00” is set as the initial value.

offset7013には、ログデータ収集部3221が収集が完了した個所への、ファイル先頭からのバイト数(データサイズ)が設定される。最後に、lineNumber7014には、収集が完了したログの行番号が設定される。filename7011が示すファイルに対して、収集処理を行っていない場合には、offset7013、およびlineNumber7014には、“0”が設定される。ログデータ収集部3221は、前述したinterval4014毎に起動し、レコードファイルを読み込む。その後、filename7011の更新時間をチェックし、その時間とupdateTime7012とを比較する。updateTime7012の方が古い場合には、ログデータ収集部3221は、ファイル先頭からoffset7013が示すバイト数だけファイルを移動し、ログの収集を開始する。ログの収集が完了した場合には、各項目の更新を行う。このようにすることで、新規に追加されたログのみを収集することが出来る。図7にはXML(extensible Markup Language)のフォーマットで各情報が記載されているが、XML形式である必要はなく。コンマ区切り(CSV形式)等で、各項目が記載されていても問題はない。   In offset 7013, the number of bytes (data size) from the beginning of the file to the location where the log data collection unit 3221 has completed collection is set. Finally, the line number 7014 is set with the line number of the log that has been collected. When collection processing is not performed on the file indicated by filename 7011, “0” is set in offset 7013 and lineNumber 7014. The log data collection unit 3221 is activated for each interval 4014 described above and reads a record file. Thereafter, the update time of filename 7011 is checked, and the time is compared with updateTime 7012. If the updateTime 7012 is older, the log data collection unit 3221 moves the file by the number of bytes indicated by the offset 7013 from the beginning of the file, and starts collecting logs. When log collection is completed, each item is updated. In this way, only newly added logs can be collected. Although each information is described in FIG. 7 in an XML (extensible Markup Language) format, it is not necessary to be in the XML format. There is no problem even if each item is described in comma delimited (CSV format) or the like.

[ログDB]
図8を用いて、本実施形態に係るログDB部341にて保持されるログDB801の説明をする。まず、ログDB801に必要な項目としては、TimeStamp8011、AgentID8012、FileName8013、LineNumber8014の4つの項目が存在する。TimeStamp8011には、そのログに記録されている事象が発生していた時間が格納される。AgentID8012には、そのログを収集したログ収集エージェント部322が有する、IDファイルに記載されているIDが格納される。FileName8013には、そのログが記録されていたログファイルのファイルパスが記載される。最後にLineNumber8014には、そのログのログファイルに置ける行番号が格納される。
[Log DB]
The log DB 801 held in the log DB unit 341 according to the present embodiment will be described with reference to FIG. First, there are four items required for the log DB 801: TimeStamp 8011, AgentID 8012, FileName 8013, and LineNumber 8014. TimeStamp 8011 stores the time when the event recorded in the log has occurred. The Agent ID 8012 stores an ID described in the ID file of the log collection agent unit 322 that collected the log. FileName 8013 describes the file path of the log file in which the log is recorded. Finally, LineNumber 8014 stores a line number that can be placed in the log file of the log.

これらの4つの項目は、ログDB部341のログDB801への、同じログを2度以上重複して記録すること(以下、2重記録)を防ぐために必要となる。例えば、前述したレコードファイルが、何らかの理由で読み込めなくなった場合、ログデータ収集部3221は、収集対象のフォルダに存在する全てのファイルの先頭から、再度収集を行ってしまう。その際、すでに収集したログをログDB部341に再度格納するため、その結果として2重記録が発生する。そこで、本実施形態では、上記4つの項目が一意となるようにログDB801に制約を張る。例えば、RDBMS(Relatinal DataBase Managemenet System)の場合には、上記4つの項目をUniqueとなるように制約を張ることで、2重記録防止の対応が可能となる。また、Key−Value Storeの場合には、上記4つの文字列の組み合わせをキーとして定義することで、同じキーを持つデータの格納が出来なくなり、重複した記録を防止する対応が可能となる。   These four items are necessary to prevent the same log from being recorded twice or more in the log DB 801 of the log DB unit 341 (hereinafter referred to as double recording). For example, when the record file described above cannot be read for some reason, the log data collection unit 3221 collects again from the beginning of all the files existing in the collection target folder. At this time, since the already collected logs are stored again in the log DB unit 341, double recording occurs as a result. Therefore, in the present embodiment, the log DB 801 is restricted so that the above four items are unique. For example, in the case of RDBMS (Relativistic DataBase Management System), it is possible to prevent double recording by restricting the above four items to be Unique. In the case of the key-value store, by defining the combination of the above four character strings as a key, data having the same key cannot be stored, and it is possible to prevent duplicate recording.

上記4つの項目以外の項目に関しては、ログとして残す必要がある項目に応じて、任意に追加することが可能である。例えば、図8の場合、TenantID8015、UserID8016、ServiceID8017、ObjectID8018がログの項目として列挙されている。TenantID8015には、その処理を行ったユーザが所属する組織(例えば会社等)が記録される。UserID8016には、その処理を行ったユーザを特定するための情報が記録される。ここで、UserIDのみでそのユーザが特定される必要はなく、例えばTenantIDとの組み合わせでそのユーザを一意に特定できればよい。   Items other than the above four items can be arbitrarily added depending on the items that need to be left as a log. For example, in the case of FIG. 8, Tenant ID 8015, User ID 8016, Service ID 8017, and Object ID 8018 are listed as log items. In the TenantID 8015, an organization (for example, a company) to which the user who performed the process belongs is recorded. In UserID 8016, information for specifying the user who performed the process is recorded. Here, the user does not need to be specified only by UserID. For example, it is sufficient that the user can be uniquely specified by a combination with TenantID.

ServiceID8017には、そのユーザが使用したサービスのIDが記録される。例えばユーザ追加機能や、Print、Scanといった機能のサービスIDが記録される。最後に、ObjectID8018には、処理を行った対象が記録される。例えばユーザの追加処理(Add User)であれば、追加されたユーザIDが記録される。また、Printや、Scanであれば、その対象のドキュメント名などが記録される。上記で上げた項目以外を記録した場合には、その項目のカラムなどを追加することで、新しい項目を記録することが可能となる。   Service ID 8017 records the ID of the service used by the user. For example, a service ID of a function such as a user addition function, Print, or Scan is recorded. Finally, in ObjectID 8018, the target to be processed is recorded. For example, in the case of a user addition process (Add User), the added user ID is recorded. In the case of Print or Scan, the name of the target document is recorded. When an item other than the items listed above is recorded, a new item can be recorded by adding a column of the item.

なお、本実施形態では、TimeStamp8011、AgentID8012、FileName8013、LineNumber8014の4つの項目をキーとして、ログを格納するか否かを判定している。しかし、これに限定するものではなく、AgentID8012以外の項目については、これらの項目のうちのいずれかであってもよいし、更に別の項目を追加するようにしてもよい。つまり、AgentID8012を必須のキー項目とし、更に1以上の他のキー項目の情報を用いて、ログの特定を行うようにすることができる。なお、ここで用いる項目を変更する場合には、図5(b)に示すLogDataクラス502にて取得する情報も変更する必要が有る。   In this embodiment, it is determined whether or not to store a log using four items of TimeStamp 8011, AgentID 8012, FileName 8013, and LineNumber 8014 as keys. However, the present invention is not limited to this, and any item other than AgentID 8012 may be any of these items, or another item may be added. That is, it is possible to specify the log by using AgentID 8012 as an essential key item and further using information of one or more other key items. In addition, when changing the item used here, it is necessary to also change the information acquired in the LogData class 502 shown in FIG.5 (b).

[ステータスDB]
図9(a)、(b)を用いて、本実施形態に係るステータスDB部342にて保持されるステータスDBの説明を行う。ストレージサーバ104のステータスDB部342には、ステータスDBとしてログ収集エージェント部322のID(AgentID9011、9021)と、そのログ収集エージェント部322がログの収集をした時刻(LastCrawlTime9012、9022)とが記録される。このLastCrawlTimeに記録されている時刻は、この時刻までにログファイルに出力されていたログは、全てログDB部341に格納されている、という事を保証するための値である。
[Status DB]
The status DB held by the status DB unit 342 according to the present embodiment will be described with reference to FIGS. In the status DB unit 342 of the storage server 104, the ID of the log collection agent unit 322 (AgentID 9011, 9021) and the time when the log collection agent unit 322 collected the log (LastCrawlTime 9012, 9022) are recorded as the status DB. The The time recorded in the LastCrawlTime is a value for guaranteeing that all logs that have been output to the log file up to this time are stored in the log DB unit 341.

まず図9(a)を用いて、初回登録時に、ステータスDB部342に登録される内容についての説明を行う。ログ収集エージェント部322は、その起動時にIDファイルを読み込む(または作成する)。そこで作成したIDをステータスDB部342に送信することで、自身のIDに対応するデータをステータスDB部342に登録する。その際、LastCrawlTime9012は、初期登録ステータスを表す時刻(1970/01/01 00:00:00)が登録される。本実施形態では、初期登録時刻として、“1970/01/01 00:00:00”を使用しているが、例えば現在時刻より1年以上過去の値を使っても特に問題はない。ここで用いられる初期登録の値としての条件は、このシステムを使用する日時とは、等しくならないことである。   First, the contents registered in the status DB unit 342 at the time of initial registration will be described with reference to FIG. The log collection agent unit 322 reads (or creates) an ID file at the time of activation. Therefore, by transmitting the created ID to the status DB unit 342, data corresponding to its own ID is registered in the status DB unit 342. At that time, the LastCrawlTime 9012 is registered with a time (1970/01/01 00:00:00) representing the initial registration status. In this embodiment, “1970/01/01 00:00:00” is used as the initial registration time, but there is no particular problem even if, for example, a value more than one year past the current time is used. The condition as the value of the initial registration used here is that the date and time when this system is used is not equal.

ログ収集エージェント部322は初期登録後、ログデータ収集部3221がログの収集処理を行う。ログ収集エージェント部322は、ログDB部341へのログの格納処理が成功した後に、ステータスDBリクエスト処理部333に対して、自身のIDと、現在時刻を対応付けて送信する。ステータスDBリクエスト処理部333は、受信したデータからIDを取出し、IDと等しいAgentID9011、9021を有するエンティティのLastCrawlTime9022を受信した時刻で更新する。このように、ログ収集エージェント部322はステータスDB部342の更新を行う。   After initial registration of the log collection agent unit 322, the log data collection unit 3221 performs log collection processing. The log collection agent unit 322 transmits the ID and the current time in association with each other to the status DB request processing unit 333 after the log storage processing in the log DB unit 341 is successful. The status DB request processing unit 333 extracts the ID from the received data, and updates it with the time when the LastCrawlTime 9022 of the entity having Agent IDs 9011 and 9021 equal to the ID is received. Thus, the log collection agent unit 322 updates the status DB unit 342.

[アーカイブアプリケーションの設定ファイル]
図10を用いて、本実施形態に係るバッチアプリケーションサーバ105で動作する、アーカイブアプリケーション(不図示)の設定ファイル10000の定義を示す。ここで、アーカイブアプリケーションは、ログDB部341に格納されているログデータをファイルに出力する機能を備えるアプリケーションである。アーカイブアプリケーションの設定ファイルは、図10に記載されているように、XML形式で記載される。ここで、設定ファイルのフォーマットは、XML形式のみではなく、例えばコンマ等で各項目が区切られたCSV形式(Comma Separated Values)などでも良い。
[Archive application settings file]
The definition of the setting file 10000 of the archive application (not shown) that operates on the batch application server 105 according to the present embodiment will be described with reference to FIG. Here, the archive application is an application having a function of outputting log data stored in the log DB unit 341 to a file. The setting file of the archive application is described in XML format as described in FIG. Here, the format of the setting file is not limited to the XML format but may be, for example, a CSV format (Comma Separated Values) in which each item is separated by a comma or the like.

アーカイブアプリケーションは、設定ファイル10000にて、まずarchiveSettingタグを有する。このタグは、saveDirectory10001、logDbUri10002、statusDbUri10003、startDate10004、およびendDate10005から構成される。saveDirectory10001は、アーカイブアプリケーションが出力するファイルを保存するディレクトリパスを示す。アーカイブアプリケーションは、日付毎にログを取得し、その取得した日付をファイル名としたファイルを作成する。   The archive application first has an archiveSetting tag in the setting file 10000. This tag is composed of saveDirectory 10001, logDbUri10002, statusDbUri10003, startDate10004, and endDate10005. The saveDirectory 10001 indicates a directory path for saving a file output by the archive application. The archive application acquires a log for each date and creates a file with the acquired date as a file name.

例えば、2011年1月1日のログを、DBから取得した場合には、「20110101.csv」の様なファイル名を有するファイルをsaveDirectory10001が示すフォルダに保存する。logDbUri10002には、ログDBリクエスト処理部331のアドレスを記述する。statusDbUri10003には、ステータスDBリクエスト処理部333のアドレスを記載する。startDate10004には、ログを保管する期間の開始日を記載する。図10に示した例の場合、ログDB部341に格納されているログのTimeStamp8011が「2011年1月5日0時0分0秒」以降のログを対象とする。endDate10005は、ログを保管する期間の終了日を記載する。図10に示した例の場合、ログDB部341に格納されているログのTimeStamp8011が「2011年1月20日0時0分0秒」未満のログを対象とする。   For example, when the log of January 1, 2011 is acquired from the DB, a file having a file name such as “201110101.csv” is stored in the folder indicated by the saveDirectory 10001. In logDbUri10002, the address of the log DB request processing unit 331 is described. In statusDbUri10003, the address of the status DB request processing unit 333 is described. The startDate 10004 describes the start date of the period for storing the log. In the case of the example illustrated in FIG. 10, the log whose TimeStamp 8011 of the log stored in the log DB unit 341 is “January 5, 2011 0: 0: 0” or later is targeted. The endDate 10005 describes the end date of the period for storing the log. In the case of the example illustrated in FIG. 10, a log whose TimeStamp 8011 of the log stored in the log DB unit 341 is less than “01.20.2011 0: 0: 0” is targeted.

アーカイブアプリケーションを用いて、ログDB部341に格納されているログを外部に保管することが出来る。保管されたログはログDB部341からの削除が可能となるため、ストレージ容量の確保、およびストレージの仕様に関するコストを削減することが出来る。また、図10には示されていないが、設定ファイル10000内に、AgentIDを指定するようにしても構わない。この場合には、特定のログ収集エージェント部が収集したログのみを出力するようにもできる。   The log stored in the log DB unit 341 can be stored outside using an archive application. Since the stored log can be deleted from the log DB unit 341, it is possible to secure storage capacity and reduce costs related to storage specifications. Although not shown in FIG. 10, an Agent ID may be specified in the setting file 10000. In this case, it is possible to output only the logs collected by a specific log collection agent unit.

[フローチャート]
図11乃至図14を用いて、本発明における、アプリケーションサーバ102、ログサーバ103、バッチアプリケーションサーバ105、ストレージサーバ104の処理の流れを詳細に説明する。
[flowchart]
The flow of processing of the application server 102, log server 103, batch application server 105, and storage server 104 in the present invention will be described in detail with reference to FIGS.

[ログ収集エージェント部の起動]
まず、図11を用いて、ログ収集エージェント部322の起動時の処理の流れについて説明する。本処理フローは、本実施形態において、アプリケーションサーバ102、およびログサーバ103がそれぞれ備えるCPUが、間接記憶部に記憶されたプログラムを直接記憶部に読み出し、実行することで実現される。
[Start Log Collection Agent]
First, the flow of processing when the log collection agent unit 322 is activated will be described with reference to FIG. In the present embodiment, this processing flow is realized by the CPU provided in each of the application server 102 and the log server 103 reading and executing the program stored in the indirect storage unit directly into the storage unit.

S1101では、アプリケーションサーバ102のOS(不図示)は、ログ収集エージェント部322を起動する。   In step S <b> 1101, the OS (not shown) of the application server 102 activates the log collection agent unit 322.

S1102では、ログ収集エージェント部322は、図4に示すような設定ファイルを読み込む。設定ファイルの読み込みに失敗した場合には(S1103にてNO)、S1123に遷移する。設定ファイルの読み込みが成功した場合には(S1103にてYES)、S1104に遷移する。   In S1102, the log collection agent unit 322 reads a setting file as shown in FIG. If reading of the setting file has failed (NO in S1103), the process proceeds to S1123. If the setting file has been successfully read (YES in S1103), the process proceeds to S1104.

S1104では、ログ収集エージェント部322は、設定ファイルに記載されたagentsタグに含まれる全agentタグの設定に基づいて全てのagentを生成したかどうかをチェックする。つまり、ログ収集エージェント部322は、設定ファイルのagentsタブに定義された全てのログデータ収集部を生成したか否かを判定する。全てのagentタグに基づいてagentを生成した場合には(S1104にてYES)、S1118に遷移する。全てのagentを生成していない場合には(S1104にてNO)、S1105に遷移する。   In S1104, the log collection agent unit 322 checks whether all agents have been generated based on the settings of all agent tags included in the agents tag described in the setting file. That is, the log collection agent unit 322 determines whether all the log data collection units defined in the agents tab of the setting file have been generated. If an agent is generated based on all agent tags (YES in S1104), the process proceeds to S1118. If not all agents have been generated (NO in S1104), the process proceeds to S1105.

S1105では、ログ収集エージェント部322は、設定ファイルに記載されたdir4015で示されたagent(ログデータ収集部)によるログの収集対象となるフォルダが存在するかどうかをチェックする。フォルダが存在しない場合には(S1105にてNO)、S1123に遷移する。フォルダが存在していない場合には(S1105にてYES)、S1106に遷移する。S1106では、ログ収集エージェント部322は、存在しているフォルダ内にfilenameRegEx4017から生成されるファイル名を有するIDファイルが存在しているかチェックする。IDファイルが存在していない場合には(S1106にてNO)、S1109に遷移する。また、IDファイルが存在している場合には(S1106にてYES)、S1107に遷移する。   In step S1105, the log collection agent unit 322 checks whether there is a folder to be collected by the agent (log data collection unit) indicated by dir4015 described in the setting file. If the folder does not exist (NO in S1105), the process proceeds to S1123. If the folder does not exist (YES in S1105), the process proceeds to S1106. In S1106, the log collection agent unit 322 checks whether an ID file having a file name generated from filenameRegEx 4017 exists in the existing folder. If the ID file does not exist (NO in S1106), the process proceeds to S1109. If the ID file exists (YES in S1106), the process proceeds to S1107.

S1109では、ログ収集エージェント部322は、IDファイルを作成し、ファイルにIDを記載する。このとき、ファイルの作成に失敗した場合には(S1110にてNO)、S1123に遷移する。ファイルの作成に成功した場合には(S1110にてYES)、S1111に遷移する。   In S1109, the log collection agent unit 322 creates an ID file and writes the ID in the file. At this time, if the file creation fails (NO in S1110), the process proceeds to S1123. If the file has been successfully created (YES in S1110), the process proceeds to S1111.

S1107では、ログ収集エージェント部322は、図6に示すようなIDファイルから当該ログ収集エージェント部に対応するIDの情報を読み込む。このとき、IDファイルの読み込み処理に失敗した場合には(S1108にてNO)、S1123に遷移する。IDファイルの読み込み処理に成功した場合には(S1108にてYES)、S1111に遷移する。   In step S1107, the log collection agent unit 322 reads ID information corresponding to the log collection agent unit from the ID file as illustrated in FIG. At this time, if the ID file reading process has failed (NO in S1108), the process proceeds to S1123. If the ID file reading process is successful (YES in S1108), the process proceeds to S1111.

S1111では、ログ収集エージェント部322は、図4の設定ファイルに記載されているアセンブリ名4012が示すモジュールをロードし、図5に示すログフィルタ部3224を作成する。   In S1111, the log collection agent unit 322 loads the module indicated by the assembly name 4012 described in the setting file of FIG. 4 and creates the log filter unit 3224 shown in FIG.

S1112では、ログ収集エージェント部322は、ログデータ収集部3221を生成する。S1113では、ログ収集エージェント部322は、図4の設定ファイルのAgent名4013の末尾に「.xml」が追記されたファイル、例えば図7に示すようなレコードファイル、が存在するか否かをチェックする。レコードファイルが存在する場合には(S1113にてYES)、S1114に遷移する。レコードファイルが存在しない場合には(S1113にてNO)、S1115に遷移する。   In S1112, the log collection agent unit 322 generates a log data collection unit 3221. In S1113, the log collection agent unit 322 checks whether a file with “.xml” appended to the end of the Agent name 4013 of the setting file in FIG. 4, for example, a record file as shown in FIG. To do. If the record file exists (YES in S1113), the process proceeds to S1114. If the record file does not exist (NO in S1113), the process proceeds to S1115.

S1114では、ログ収集エージェント部322は、レコードファイルを読みこむ。S1115では、ログ収集エージェント部322は、レコードファイルを作成する。ここで、レコードファイルには、設定ファイルのdir4015に指定されたフォルダパスに存在し、filenameRegEx4017に一致するファイル名を持つ全ログファイルを、レコードファイルに初期登録する。つまり、図7のレコードファイル701に示すrecordタブから構成される要素がログファイルの数だけ登録される。   In S1114, the log collection agent unit 322 reads the record file. In S1115, the log collection agent unit 322 creates a record file. Here, in the record file, all log files that exist in the folder path specified in the dir 4015 of the setting file and have a file name that matches the filenameRegEx 4017 are initially registered in the record file. That is, as many elements as the record tab shown in the record file 701 in FIG. 7 are registered for the number of log files.

S1116では、ログ収集エージェント部322は、図6に示すような自身のエージェントIDをログサーバ103のステータスDBリクエスト処理部333に送信する。S1112では、ログサーバ103は、受信したステータスIDを用いて、ストレージサーバ104のステータスDB部342に初期登録する。   In S <b> 1116, the log collection agent unit 322 transmits its own agent ID as illustrated in FIG. 6 to the status DB request processing unit 333 of the log server 103. In S1112, the log server 103 performs initial registration in the status DB unit 342 of the storage server 104 using the received status ID.

S1118では、ログ収集エージェント部322は、設定ファイルから生成された全てのログデータ収集部3221の処理を開始したか否かを確認する。全てログデータ収集部3221が処理を開始していない場合には(S1118にてNO)、S1119に遷移する。全てのagentタグから生成されたログデータ収集部3221が処理開始済みである場合には(S1118にてYES)、S1123に遷移する。   In S1118, the log collection agent unit 322 confirms whether or not the processing of all the log data collection units 3221 generated from the setting file has been started. If all log data collection units 3221 have not started processing (NO in S1118), the process proceeds to S1119. If log data collection unit 3221 generated from all agent tags has already started processing (YES in S1118), the process proceeds to S1123.

S1119では、ログ収集エージェント部322は、ログデータ収集部3221の処理を開始する。S1120では、ログ収集エージェント部322は、ログを収集し、ログサーバ103に送信する。この処理の詳細に関しては、図12を用いたフローチャートの説明にて行う。S1121では、ログサーバ103は、受信したデータをストレージサーバ104のログDB部341に格納する。   In step S <b> 1119, the log collection agent unit 322 starts processing of the log data collection unit 3221. In S <b> 1120, the log collection agent unit 322 collects logs and transmits them to the log server 103. Details of this processing will be described with reference to the flowchart of FIG. In S <b> 1121, the log server 103 stores the received data in the log DB unit 341 of the storage server 104.

S1122では、ログ収集エージェント部322は、設定ファイルのinterval4014にて設定された秒数後に、ログデータ収集部3221が、処理を再開するようにタイマーを設定し、待機する。そして、所定の時間が経過した場合には、ログデータ収集部3221は処理を再開する。S1123では、ログ収集エージェント部322は、処理中にエラーが発生したものとし、処理を停止する。   In S1122, the log collection agent unit 322 sets a timer so that the log data collection unit 3221 restarts the process after the number of seconds set in the interval 4014 of the setting file, and waits. Then, when a predetermined time has elapsed, the log data collection unit 3221 resumes the processing. In S1123, the log collection agent unit 322 assumes that an error has occurred during the processing, and stops the processing.

[ログデータ収集部の処理の流れ]
図12を用いて、ログデータ収集部3221の処理の流れについて説明する。本処理フローは、本実施形態において、アプリケーションサーバ102、およびログサーバ103がそれぞれ備えるCPUが、間接記憶部に記憶されたプログラムを直接記憶部に読み出し、実行することで実現される。
[Processing flow of the log data collection unit]
The processing flow of the log data collection unit 3221 will be described with reference to FIG. In the present embodiment, this processing flow is realized by the CPU provided in each of the application server 102 and the log server 103 reading and executing the program stored in the indirect storage unit directly into the storage unit.

S1201では、アプリケーションサーバ102のOS/タイマーは、ログデータ収集部3221の処理の再開命令を発行する。ここで、再開命令を発行する場合とは、図11の1122にて示したように、待機状態にあるログデータ収集部3221の処理を再開させる場合が該当する。S1202では、ログデータ収集部3221は、ログ収集エージェント部322の停止命令の有無をチェックする。停止命令があった場合には(S1202にてYES)、S1217に遷移する。また、停止命令がなかった場合は(S1202にてNO)、S1203に遷移する。   In step S <b> 1201, the OS / timer of the application server 102 issues a process restart instruction for the log data collection unit 3221. Here, the case where the restart command is issued corresponds to the case where the processing of the log data collection unit 3221 in the standby state is restarted as indicated by 1122 in FIG. In step S <b> 1202, the log data collection unit 3221 checks whether there is a stop instruction for the log collection agent unit 322. If there is a stop command (YES in S1202), the process proceeds to S1217. If there is no stop command (NO in S1202), the process proceeds to S1203.

S1203では、ログデータ収集部3221は、図4に示す設定ファイルのdir4015に記載のフォルダパスに存在し、かつ、filenameRegEx4017に一致するファイル名を有するファイルの一覧を取得する。S1204では、ログデータ収集部3221は、S1203で取得したファイルの一覧の中で、レコードファイルに記録されていないファイル名を有するファイルを、レコードファイルに初期登録する。   In step S1203, the log data collection unit 3221 acquires a list of files that exist in the folder path described in the dir 4015 of the setting file illustrated in FIG. 4 and have file names that match the filenameRegEx 4017. In S1204, the log data collection unit 3221 initially registers, in the record file, a file having a file name that is not recorded in the record file in the file list acquired in S1203.

S1205では、ログデータ収集部3221は、レコードファイルに記録された、updateTime7012と、ファイルの更新時間とを比較し、updateTime7012が示す時間以降に更新されたファイルの一覧を取得する。S1206では、ログデータ収集部3221は、S1205で取得したファイルの一覧の数を確認する。ファイルの数が“0”、つまり更新されたログファイルが存在しない場合には(S1206にてNO)、S1213に遷移する。また、ファイルの数が1以上、つまり更新されたファイルが存在する場合には(S1206にてYES)、S1207に遷移する。   In step S1205, the log data collection unit 3221 compares updateTime 7012 recorded in the record file with the update time of the file, and acquires a list of files updated after the time indicated by updateTime 7012. In step S1206, the log data collection unit 3221 confirms the number of file lists acquired in step S1205. If the number of files is “0”, that is, if an updated log file does not exist (NO in S1206), the process proceeds to S1213. If the number of files is 1 or more, that is, if an updated file exists (YES in S1206), the process proceeds to S1207.

S1207では、ログデータ収集部3221は、S1205で取得したファイルの一覧に対して、S1208乃至S1211の処理を行ったかどうかを確認する。つまり、ログデータ収集部3221は、全ログファイルを収集済みか否かを判定する。S1208乃至S1211の処理を行っていない場合には(S1207にてNO)、S1208に遷移する。ファイルの一覧に含まれる全てのファイルに対して、S1208乃至S1211の処理を行った場合には(S1207にてYES)、S1212に遷移する。   In step S1207, the log data collection unit 3221 confirms whether the processing in steps S1208 to S1211 has been performed on the file list acquired in step S1205. That is, the log data collection unit 3221 determines whether or not all log files have been collected. If the processes of S1208 to S1211 are not performed (NO in S1207), the process proceeds to S1208. If the processing from S1208 to S1211 has been performed on all the files included in the file list (YES in S1207), the process proceeds to S1212.

S1208では、ログデータ収集部3221は、S1205で取得したファイルの一覧に含まれる一つのファイルから、ログを読み込む。そして、ログデータ収集部3221は、ログフィルタ部3224を用いてログを整形し、ログサーバ103のログDBリクエスト処理部331に対して、整形したログを送信する。送信の際には、ログフィルタ部3224によって整形されたデータに、ログデータ収集部3221が読み込んだファイル名、ログの行数、および自身に割り当てられたIDを対応付けて送信する。   In step S1208, the log data collection unit 3221 reads a log from one file included in the file list acquired in step S1205. Then, the log data collection unit 3221 shapes the log using the log filter unit 3224 and transmits the shaped log to the log DB request processing unit 331 of the log server 103. At the time of transmission, the data shaped by the log filter unit 3224 is associated with the file name read by the log data collection unit 3221, the number of log lines, and the ID assigned to itself.

S1209では、ログサーバ103は、S1208にてログデータ収集部3221より送信されたログデータを受信し、そのデータをストレージサーバ104のログDB部341に格納する。そして、ログサーバ103は、ログDB部341に格納が成功したかどうかをログデータ収集部3221に送信する。   In S1209, the log server 103 receives the log data transmitted from the log data collection unit 3221 in S1208, and stores the data in the log DB unit 341 of the storage server 104. Then, the log server 103 transmits to the log data collection unit 3221 whether the storage in the log DB unit 341 is successful.

S1210では、ログデータ収集部3221は、ログサーバ103から送信された処理結果を受信し、ログサーバ103によるログの格納が成功したか否かを判定する。処理結果が格納が成功した旨を示す正常終了であれば(S1210にてYES)、S1211に遷移する。処理結果が異常終了を示すものであれば(S1210にてNO)、S1207に遷移する。   In step S <b> 1210, the log data collection unit 3221 receives the processing result transmitted from the log server 103 and determines whether the log storage by the log server 103 is successful. If the processing result is a normal end indicating that the storage was successful (YES in S1210), the process proceeds to S1211. If the processing result indicates abnormal termination (NO in S1210), the process proceeds to S1207.

S1211では、ログデータ収集部3221は、レコードファイルを更新する。具体的には、updateTime7012を現在時刻とし、offset7013をファイル末尾のバイト数、lineNumber7014をファイルの最後の行の行番号とする。レコードファイルの更新後、S1207に遷移する。   In S1211, the log data collection unit 3221 updates the record file. Specifically, updateTime 7012 is the current time, offset 7013 is the number of bytes at the end of the file, and lineNumber 7014 is the line number of the last line of the file. After updating the record file, the process proceeds to S1207.

S1212では、ログデータ収集部3221は、S1205で取得した全てのファイルに対して、S1208乃至S1211の処理が成功したかどうかを確認する。全てのファイルに対して、S1208乃至S1211の処理が成功した場合には(S1212にてYES)、S1213に遷移する。一つ以上のログファイルに対して、S1208乃至S1211の処理が失敗していた場合には(S1212にてNO)、S1215に遷移する。   In step S1212, the log data collection unit 3221 checks whether the processing in steps S1208 to S1211 has been successful for all the files acquired in step S1205. If the processing of S1208 to S1211 has succeeded for all files (YES in S1212), the process proceeds to S1213. If the processes in S1208 to S1211 have failed for one or more log files (NO in S1212), the process proceeds to S1215.

S1213では、ログデータ収集部3221は、ログサーバ103のステータスDBリクエスト処理部333に対して、LastCrawlTimeを表す時刻と、自身のIDとを関連付けたデータを送信する。ここで、送信するLastCrawlTimeを表す時刻は、S1208にてログファイルからログを読み込む前に取得した時刻とする。   In step S <b> 1213, the log data collection unit 3221 transmits data that associates the time representing the LastCrawlTime with its own ID to the status DB request processing unit 333 of the log server 103. Here, the time representing the LastCrawlTime to be transmitted is the time acquired before reading the log from the log file in S1208.

S1214では、ログサーバ103は、ログデータ収集部3221より送信された、IDとLastCrawlTimeとが関連付けられたデータを受信する。受信した後に、ログサーバ103は、受信したIDと等しいAgentIDを有するステータスDBのエンティティに含まれるLastCrawlTimeを、受信したLastCrawlTimeで更新する。   In S <b> 1214, the log server 103 receives data associated with the ID and the LastCrawlTime transmitted from the log data collection unit 3221. After receiving, the log server 103 updates the LastCrawlTime included in the entity of the status DB having the Agent ID equal to the received ID with the received LastCrawlTime.

S1215では、ログデータ収集部3221は、ログ収集エージェント部322の停止命令の有無をチェックする。停止命令があった場合には(S1215にてYES)、S1217に遷移する。また、停止命令がなかった場合は(S1215にてNO)、S1216に遷移する。   In step S1215, the log data collection unit 3221 checks whether the log collection agent unit 322 has a stop command. If there is a stop command (YES in S1215), the process proceeds to S1217. If there is no stop command (NO in S1215), the process proceeds to S1216.

S1216では、ログデータ収集部3221は、設定ファイルのinterval4014に記載されていた秒数後に、S1201の処理が呼び出されるように、タイマーを設定する。S1217では、ログデータ収集部3221は、処理を停止する。   In S1216, the log data collection unit 3221 sets a timer so that the process of S1201 is called after the number of seconds described in the interval 4014 of the setting file. In S1217, the log data collection unit 3221 stops the process.

[バッチアプリケーションサーバ105の処理の流れ]
図13を用いて、バッチアプリケーションサーバ105に存在する、アーカイブアプリケーション(不図示)の処理フローについて説明する。本処理フローは、本実施形態において、ログサーバ103、およびバッチアプリケーションサーバ105がそれぞれ備えるCPUが、間接記憶部に記憶されたプログラムを直接記憶部に読み出し、実行することで実現される。
[Processing flow of batch application server 105]
A processing flow of an archive application (not shown) existing in the batch application server 105 will be described with reference to FIG. In the present embodiment, this processing flow is realized by the CPU included in each of the log server 103 and the batch application server 105 reading and executing the program stored in the indirect storage unit directly into the storage unit.

S1301では、アーカイブアプリケーションは、図10に示す設定ファイルに記載されているStartDate10004、およびEndDate10005から、ログを保管する期間を取得する。以下の説明においては、StartDate10004が表す時間を「ログ取得開始日」、EndDate10005が示す時間を「ログ取得終了日」と記載する。S1302では、アーカイブアプリケーションは、ログサーバ103のステータスDBリクエスト処理部333に対して、ログ取得可能範囲の終了日の取得要求を発行する。   In S1301, the archive application obtains a log storage period from StartDate 10004 and EndDate 10005 described in the setting file shown in FIG. In the following description, the time indicated by StartDate 10004 is referred to as “log acquisition start date”, and the time indicated by EndDate 10005 is referred to as “log acquisition end date”. In S <b> 1302, the archive application issues a request for acquiring the end date of the log acquirable range to the status DB request processing unit 333 of the log server 103.

S1303では、ログサーバ103のステータスDBリクエスト処理部333は、ストレージサーバ104のステータスDB部342からLastCrawlTime9022の一覧を取得する。S1304では、ステータスDBリクエスト処理部333は、取得したLastCrawlTimeの一覧に要素が含まれるかどうかを確認する。取得したLastCrawlTimeの一覧に要素が含まれていない場合には(S1304にてNO)、S1316に遷移する。また、要素が含まれている場合には(S1304にてYES)、S1305に遷移する。   In S <b> 1303, the status DB request processing unit 333 of the log server 103 acquires a list of LastCrawlTime 9022 from the status DB unit 342 of the storage server 104. In step S1304, the status DB request processing unit 333 checks whether an element is included in the acquired list of LastCrawlTime. If no element is included in the acquired LastCrawlTime list (NO in S1304), the process proceeds to S1316. If an element is included (YES in S1304), the process proceeds to S1305.

S1305では、ステータスDBリクエスト処理部333は、S1303で取得したLastCrawlTimeの一覧の中に、初期値(本実施形態では、「1970/01/01」)が存在するか否かを確認する。一覧の中に初期値が存在する場合には(S1305にてYES)、S1316に遷移する。また、一覧の中に初期値が存在しない場合には(S1305にてNO)、S1306に遷移する。   In S1305, the status DB request processing unit 333 checks whether or not an initial value (“1970/01/01” in the present embodiment) exists in the list of LastCrawlTime acquired in S1303. If an initial value exists in the list (YES in S1305), the process proceeds to S1316. If there is no initial value in the list (NO in S1305), the process proceeds to S1306.

S1306では、ステータスDBリクエスト処理部333は、S1303で取得したLastCrawlTimeの一覧の中で、最も古い時間を取得する。そして、ステータスDBリクエスト処理部333は、取得した時間を、バッチアプリケーションサーバ105のアーカイブアプリケーションに対して送信する。   In S1306, the status DB request processing unit 333 acquires the oldest time in the list of LastCrawlTime acquired in S1303. Then, the status DB request processing unit 333 transmits the acquired time to the archive application of the batch application server 105.

S1307では、アーカイブアプリケーションは、受信した時間と、ログ取得終了日とを比較する。ここで、S1306で取得した時間が、ログ取得終了日が示す時間よりも新しい場合には(S1308にてYES)、S1321に遷移する。また、S1306で取得した時間が、ログ取得終了日が示す時間よりも古い場合には(S1308にてNO)、S1309に遷移する。   In step S1307, the archive application compares the received time with the log acquisition end date. If the time acquired in S1306 is newer than the time indicated by the log acquisition end date (YES in S1308), the process proceeds to S1321. If the time acquired in S1306 is older than the time indicated by the log acquisition end date (NO in S1308), the process proceeds to S1309.

S1309では、アーカイブアプリケーションは、ログサーバ103のログDBリクエスト処理部331に対し、ストレージサーバ104のログDB部341に存在するログの中で最も古いTimeStampを持つログのTimeStampの取得要求を発行する。   In S <b> 1309, the archive application issues a request for acquiring a TimeStamp of a log having the oldest TimeStamp among logs existing in the log DB unit 341 of the storage server 104 to the log DB request processing unit 331 of the log server 103.

S1310では、ログDBリクエスト処理部331は、ログDB部341の中でも最も古いTimeStampを有するログのTimeStampを取得し、バッチアプリケーションサーバ105に対して送信する。   In step S <b> 1310, the log DB request processing unit 331 acquires the TimeStamp of the log having the oldest TimeStamp among the log DB units 341, and transmits it to the batch application server 105.

S1311では、アーカイブアプリケーションは、ログサーバ103から取得した時間と、ログ取得開始日とを比較する。ここで、ログ取得開始日の方が新しい場合には(SS1312にてYES)、S1313に遷移する。また、ログ取得開始日が、取得した時間よりも古い場合には(S1312にてNO)、S1321に遷移する。   In S1311, the archive application compares the time acquired from the log server 103 with the log acquisition start date. If the log acquisition start date is newer (YES in SS 1312), the process proceeds to S1313. If the log acquisition start date is older than the acquired time (NO in S1312), the process proceeds to S1321.

S1313では、アーカイブアプリケーションは、ログサーバ103のログDBリクエスト処理部331に対して、ログ取得開始日からログ取得終了日の間のログの取得要求を発行する。S1314では、ログサーバ103のログDBリクエスト処理部331は、受信したログ取得開始日からログ取得終了日に該当するTimeStampを有するログを、ログDB部341から全て取得する。   In S1313, the archive application issues a log acquisition request between the log acquisition start date and the log acquisition end date to the log DB request processing unit 331 of the log server 103. In S <b> 1314, the log DB request processing unit 331 of the log server 103 acquires all the logs having the TimeStamp corresponding to the log acquisition end date from the received log acquisition start date from the log DB unit 341.

S1314では、ログサーバ103のログDBリクエスト処理部331は、終了コードに正常終了を示す値を設定する。ここで、正常終了を示すコードに対する値の制約は特にない。つまり、正常終了を示すものであれば、コードをどのように定義しても構わない。S1316では、ログDBリクエスト処理部331は、終了コードに異常終了を示すコードを設定する。   In S <b> 1314, the log DB request processing unit 331 of the log server 103 sets a value indicating normal termination to the termination code. Here, there is no particular value restriction on the code indicating normal termination. In other words, any code may be defined as long as it indicates normal termination. In S1316, the log DB request processing unit 331 sets a code indicating abnormal termination as the termination code.

S1317では、ログDBリクエスト処理部331は、S1314で取得した全ログデータと、S1315、もしくはS1316で設定した終了コードとの組をバッチアプリケーションサーバ105のアーカイブアプリケーションに送信する。   In S1317, the log DB request processing unit 331 transmits a set of all log data acquired in S1314 and the end code set in S1315 or S1316 to the archive application of the batch application server 105.

S1318では、バッチアプリケーションサーバ105のアーカイブアプリケーションは、ログサーバ103のログDBリクエスト処理部331から送信されたログデータの集合と、終了コードとの組を受信する。S1319では、アーカイブアプリケーションは、受信した終了コードがエラーコードであるか、否かを確認する。終了コードが異常終了を示すものである場合には(S1319にてNO)、S1321に遷移する。また、終了コードが正常終了コードである場合は(S1319にてYES)、S1320に遷移する。   In S <b> 1318, the archive application of the batch application server 105 receives a set of the log data set and the end code transmitted from the log DB request processing unit 331 of the log server 103. In S1319, the archive application confirms whether or not the received end code is an error code. If the end code indicates an abnormal end (NO in S1319), the process proceeds to S1321. If the end code is a normal end code (YES in S1319), the process proceeds to S1320.

S1320では、アーカイブアプリケーションは、受信したログデータを、CSV形式に整形して、ファイルに出力する。ここで、出力ファイルのフォーマットはCSV形式である必要はなく、任意のフォーマットで出力してもよい。S1321にて、アーカイブアプリケーションは、処理を終了する。   In S1320, the archive application formats the received log data into the CSV format and outputs it to a file. Here, the format of the output file need not be the CSV format, and may be output in an arbitrary format. In S1321, the archive application ends the process.

[フェールオーバー時の処理の流れ]
フェールオーバーした際の、アプリケーションサーバ102の処理の流れについて説明する。ここで、フェールオーバーとは、一般的にコールドスタンバイや、ホットスタンバイと呼ばれる形式の仕組みを指す。上記の方式では、例えば、あるアプリケーションサーバにおいて処理の継続が不能状態に陥った場合、そのアプリケーションサーバを再起動することで、状態を回復させるのではなく、異なるアプリケーションサーバに処理を移譲する。これにより、システム全体としての処理を継続させ、サービスの提供を復旧させる。
[Flow of processing during failover]
A process flow of the application server 102 at the time of failover will be described. Here, failover refers to a mechanism of a form generally called cold standby or hot standby. In the above method, for example, when a certain application server is unable to continue processing, the application server is restarted, and the state is not recovered, but the processing is transferred to a different application server. As a result, the processing of the entire system is continued and the service provision is restored.

本システムでは、図9に示すように、ストレージサーバ104のステータスDB部342に、AgentIDをキーとし、そのAgentIDと等しいIDを有するログ収集エージェント部322が記録されている。また、当該ログ収集エージェント部322に対応付けて、収集を完了した日時がLastCrawlTimeに記録されている。   In this system, as shown in FIG. 9, the status DB unit 342 of the storage server 104 records a log collection agent unit 322 having the same ID as the Agent ID, using the Agent ID as a key. Further, the date and time when the collection is completed is recorded in the LastCrawlTime in association with the log collection agent unit 322.

ここで、異なるアプリケーションサーバにて、ログ収集エージェント部322が起動したとする。ログ収集エージェント部322は、図11のS1109にて、新しいIDを作成し、S1116にて、ログサーバ103のステータスDBリクエスト処理部333に対して、作成したIDを送信し、登録作業を行う。この場合において、図9(c)に示す様に、新しいエンティティ(AgentID「CE209997・・・」)がストレージサーバ104のステータスDB903に登録される。   Here, it is assumed that the log collection agent unit 322 is activated on a different application server. The log collection agent unit 322 creates a new ID in S1109 of FIG. 11, transmits the created ID to the status DB request processing unit 333 of the log server 103 in S1116, and performs registration work. In this case, as shown in FIG. 9C, a new entity (AgentID “CE2099797...”) Is registered in the status DB 903 of the storage server 104.

ここで、AgentID「BE209997・・・」を有するエンティティのLastCrawlTime9032は、更新されずに古い値を保持したままとなる。バッチアプリケーションサーバ105のアーカイブアプリケーションは、ストレージサーバ104のステータスDB部342に記録されている全てのLastCrawlTimeのうち、最も古い時刻までのTimeStampを持つログを出力可能とする。図9(c)の場合、最も古い時刻は、「2011/01/03 01:00:00」であり、またこの値は更新されないため、永久にアーカイブアプリケーションは「2011/01/03 01:00:00」までのログしか出力できないことになる。   Here, the LastCrawlTime 9032 of the entity having the Agent ID “BE209997...” Is not updated and retains the old value. The archive application of the batch application server 105 can output a log having a TimeStamp up to the oldest time among all LastCrawlTimes recorded in the status DB unit 342 of the storage server 104. In the case of FIG. 9C, the oldest time is “2011/01/03 01:00:00”, and since this value is not updated, the archive application is permanently “2011/01/03 01:00. : 0 "only can be output.

そこで、本実施形態では、フェールオーバーの際に、異なるアプリケーションサーバに処理が委譲された場合においても、フェールオーバの前後でIDが引き継がれ、LastCrawlTimeが更新されるための、アプリケーションサーバのフローを以下に記述する。つまり、フェールオーバーの際に処理が委譲された場合にも、図9(c)に示すように新たなAgentIDが追加されることなく、図9(b)のように委譲元のAgentIDに対応するLastCrawlTimeが更新されるようにする。また、下記フローにおいて、アプリケーションサーバ1は、動作不能となりフェールオーバーする対象のサーバとし、アプリケーションサーバ2は、処理が移譲されるサーバとする。また、アプリケーションサーバ1と、アプリケーションサーバ2のログ収集エージェント部が有する設定ファイルに記載されるDir4015とFilenameRegEx4017の文字列は、同じものとする。   Therefore, in this embodiment, even when processing is delegated to a different application server at the time of failover, the application server flow for updating the LastCrawlTime after the ID is taken over before and after the failover is as follows. Describe. In other words, even when the process is delegated at the time of failover, a new Agent ID is not added as shown in FIG. 9C, and it corresponds to the Agent ID of the delegation source as shown in FIG. 9B. LastCrawlTime is updated. Also, in the following flow, the application server 1 is a server that is inoperable and fails over, and the application server 2 is a server to which processing is transferred. The character strings of Dir 4015 and FilenameRegEx 4017 described in the setting file included in the log collection agent unit of the application server 1 and the application server 2 are the same.

なお、本処理フローは、本実施形態において、各アプリケーションサーバが備えるCPUが、間接記憶部に記憶されたプログラムを直接記憶部に読み出し、実行することで実現される。   In the present embodiment, this processing flow is realized by the CPU included in each application server reading and executing the program stored in the indirect storage unit directly into the storage unit.

S1401では、アプリケーションサーバ1上のリクエスト処理部状態監視部3213は、アプリケーションサーバ1の動作継続不能を検知する。S1402では、アプリケーションサーバ1は、ログファイルを出力していたフォルダに存在する全てのファイルを、アプリケーションサーバ2上の同一フォルダパス上に存在するフォルダにコピーする。ここで、アプリケーションサーバ1に対応するIDファイルも同一フォルダ上に存在するため、IDファイルも同様にコピーされる。   In step S1401, the request processing unit state monitoring unit 3213 on the application server 1 detects that the operation of the application server 1 cannot be continued. In S1402, the application server 1 copies all files existing in the folder where the log file was output to a folder existing on the same folder path on the application server 2. Here, since the ID file corresponding to the application server 1 also exists in the same folder, the ID file is similarly copied.

S1403では、アプリケーションサーバ2は、コピーの成否をアプリケーションサーバ1に通知する。S1404では、アプリケーションサーバ1は、アプリケーションサーバ1から通知されたコピーの成否を確認する。そして、コピーが成功していた場合には(S1404にてYES)、S1405に遷移する。また、コピーが失敗していた場合には(S1404にてNo)、S1407に遷移し、フェールオーバー失敗とする。   In S1403, the application server 2 notifies the application server 1 of the success or failure of copying. In step S <b> 1404, the application server 1 confirms the success / failure of the copy notified from the application server 1. If the copying has succeeded (YES in S1404), the process proceeds to S1405. If the copy has failed (No in S1404), the process proceeds to S1407, and a failover failure is assumed.

S1405では、アプリケーションサーバ2は、ログ収集エージェント部322を起動する。ログ収集エージェント部322が、起動した後のフローは、図11にて示したフローと同じであるため、説明は割愛する。S1406では、アプリケーションサーバ2は、アプリケーション部321を起動する
以上説明したように、図11乃至図14に従って処理することにより、アプリケーションサーバとログサーバとが独立して構築され、複数のユーザから依頼を並列して処理するような大規模システムにおいて、ログを重複して記録することを防止することができる。更に、記録しているログのうち、ある期間のログを出力する際に、重複したログの出力を防止することが可能となる。また、フェールオーバーなどによって、異なるアプリケーションサーバに処理が委譲され、別のログ収集エージェント部が動作した場合にも、委譲元に対応するIDを用いることで、ログを漏れなく収集、管理することが出来る。
In step S1405, the application server 2 activates the log collection agent unit 322. Since the flow after the log collection agent unit 322 is activated is the same as the flow shown in FIG. 11, the description thereof is omitted. In S1406, the application server 2 starts the application unit 321. As described above, the application server and the log server are independently constructed by performing processing according to FIGS. 11 to 14, and requests from a plurality of users are received. In a large-scale system that processes in parallel, it is possible to prevent the logs from being recorded in duplicate. Furthermore, it is possible to prevent duplicate logs from being output when a log for a certain period is output. In addition, when a process is delegated to a different application server due to a failover or the like, and another log collection agent unit operates, it is possible to collect and manage logs without omission by using an ID corresponding to the delegation source. I can do it.

<その他の実施形態>
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。
<Other embodiments>
The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, or the like) of the system or apparatus reads the program. It is a process to be executed.

Claims (16)

ユーザからの要求に応じてサービスを提供するアプリケーションサーバと、前記アプリケーションサーバが提供したサービスのログを蓄積するログサーバとを含むログ管理システムであって、
前記アプリケーションサーバは、
ユーザからの要求に応じて行った処理のログをファイルに出力するログファイル出力手段と、
前記ログファイル出力手段にてログが出力されたファイルのうち、収集対象となるファイルから前記ログを収集して前記ログサーバに送信する1以上のログデータ収集手段と、
前記1以上のログデータ収集手段を一意に特定するための識別子を生成し、当該識別子を前記ログサーバに提供する提供手段と
を有し、
前記ログサーバは、
前記アプリケーションサーバから送信されたログを受信し、記憶部に記憶する記憶手段を有し、
前記記憶手段は、受信したログに対応付けられた前記アプリケーションサーバから提供された識別子とすでに前記記憶部に記憶されているログに対応付けられた識別子とが一致し、かつ受信したログに含まれる当該ログを一意に特定するための他の情報とすでに前記記憶部に記憶されているログに含まれる当該ログを一意に特定するための他の情報とが一致している場合に当該受信したログを記憶させず、それ以外の場合に当該受信したログを記憶することを特徴とするログ管理システム。
A log management system including an application server that provides a service in response to a request from a user, and a log server that accumulates a log of the service provided by the application server,
The application server is
Log file output means for outputting a log of processing performed in response to a request from a user to a file;
One or more log data collection means for collecting the logs from the files to be collected out of the files whose logs are output by the log file output means, and transmitting the logs to the log server;
Providing means for generating an identifier for uniquely identifying the one or more log data collection means, and providing the identifier to the log server;
The log server
Receiving a log transmitted from the application server, and storing the storage unit in a storage unit;
The storage means includes an identifier provided from the application server associated with the received log and an identifier associated with the log already stored in the storage unit, and is included in the received log. The log received when the other information for uniquely identifying the log matches the other information for uniquely identifying the log included in the log already stored in the storage unit A log management system that stores the received log in other cases without storing
当該ログを一意に特定するための他の情報とは、収集対象となったログのファイルの名称、当該ファイルにおいてログが出力された行番号、およびログが出力された際のタイムスタンプのうち少なくとも1つの情報が含まれることを特徴とする請求項1に記載のログ管理システム。   Other information for uniquely identifying the log includes at least the name of the log file to be collected, the line number where the log was output in the file, and the time stamp when the log was output The log management system according to claim 1, wherein one piece of information is included. 前記アプリケーションサーバが処理の継続が不能になった際に、他のアプリケーションサーバへフェールオーバーを行う場合、当該他のアプリケーションサーバは、自身が有するログデータ収集手段を動作させ、当該他のアプリケーションサーバが有する提供手段は、当該動作させたログデータ収集手段を一意に特定するための識別子を新たに生成し、当該識別子を前記ログサーバに提供することを特徴とする請求項1に記載のログ管理システム。   When the application server is unable to continue processing, when performing a failover to another application server, the other application server operates its own log data collection means, and the other application server The log management system according to claim 1, wherein the providing means includes a new identifier for uniquely identifying the operated log data collecting means and provides the identifier to the log server. . 前記ログデータ収集手段は、ログの収集状況の情報を更に有し、当該ログの収集状況の情報に従って、収集が終了していないログを収集することを特徴とする請求項1または2に記載のログ管理システム。   The log data collection unit further includes log collection status information, and collects logs that have not been collected according to the log collection status information. Log management system. 前記ログデータ収集手段は、収集対象となるログのファイルが格納されているフォルダの位置、当該収集対象となるログのファイルの名称、収集する時間の間隔の情報を、設定ファイルとして保持することを特徴とする請求項1または2に記載のログ管理システム。   The log data collecting means holds the information on the location of the folder storing the log file to be collected, the name of the log file to be collected, and the interval of the collection time as a setting file. The log management system according to claim 1 or 2, characterized by the above. 前記提供手段は、前記設定ファイルにて指定される、収集対象となるログのファイルが格納されているフォルダに、生成した前記識別子を指定するデータを格納することを特徴とする請求項5に記載のログ管理システム。   The said provision means stores the data which specify the produced | generated said identifier in the folder where the file of the log used as the collection object designated by the said setting file is stored. Log management system. 前記提供手段は、前記設定ファイルにて収集対象となるログのファイルが格納されているフォルダに前記識別子を指定するデータがすでに格納されている場合には、当該データにて指定された識別子を前記ログサーバに提供することを特徴とする請求項6に記載のログ管理システム。   When the data specifying the identifier is already stored in the folder in which the log file to be collected is stored in the setting file, the providing unit uses the identifier specified by the data as the identifier. The log management system according to claim 6, wherein the log management system is provided to a log server. 前記アプリケーションサーバは、処理の継続が不能になった際に、他のアプリケーションサーバへフェールオーバーを行う場合、前記ログデータ収集手段による収集対象となるログのファイルが格納されているフォルダに含まれているデータを、前記提供手段にて格納された識別子を指定するデータと共に、前記他のアプリケーションサーバの同じフォルダの位置にコピーさせるコピー手段をさらに有し、
前記他のアプリケーションサーバの提供手段は、当該コピーされたデータにて指定された識別子を前記ログサーバに提供することを特徴とする請求項7に記載のログ管理システム。
When the application server fails over to another application server when processing cannot be continued, it is included in the folder in which the log file to be collected by the log data collecting means is stored. And copy means for copying the existing data together with data specifying the identifier stored in the providing means to the same folder location of the other application server,
8. The log management system according to claim 7, wherein the providing unit of the other application server provides the log server with an identifier specified by the copied data.
前記ログの収集状況の情報は、前回のログを収集した時刻、ログのファイルにおける収集が終了した個所までの先頭からのデータサイズ、ログのファイルにおける収集が終了した行番号、を示す情報であることを特徴とする請求項4乃至8のいずれか一項に記載のログ管理システム。   The log collection status information is information indicating the time at which the previous log was collected, the data size from the beginning of the log file at the end of collection, and the line number at which collection in the log file was completed. The log management system according to any one of claims 4 to 8. 前記収集対象となるログのファイルの名称は、正規表現にて指定されることを特徴とする請求項5乃至9のいずれか一項に記載のログ管理システム。   The log management system according to any one of claims 5 to 9, wherein a name of the log file to be collected is specified by a regular expression. 前記アプリケーションサーバは、前記ログデータ収集手段の識別子と、当該ログデータ収集手段がログの収集を最後に行った時刻とを対応付けた情報を、前記ログサーバに送信するステータス送信手段を更に有し、
前記記憶手段は更に、前記記憶部に、前記ステータス送信手段から受信した情報を記憶することを特徴とする請求項1乃至10のいずれか一項に記載のログ管理システム。
The application server further includes a status transmission unit that transmits, to the log server, information that associates the identifier of the log data collection unit with the time when the log data collection unit last collected the log. ,
The log management system according to claim 1, wherein the storage unit further stores information received from the status transmission unit in the storage unit.
前記ログ管理システムは、指定された期間における、前記記憶部に記憶されたログを出力する出力手段を更に含み、
前記出力手段は、前記記憶部に記憶された前記ログデータ収集手段がログの収集を最後に行った時刻が、前記指定された期間を経過している場合にログの出力を行うことを特徴とする請求項11に記載のログ管理システム。
The log management system further includes output means for outputting a log stored in the storage unit for a specified period,
The output means outputs the log when the log data collection means stored in the storage unit last collects the log when the specified period has passed. The log management system according to claim 11.
ユーザからの要求に応じてサービスを提供するアプリケーションサーバと、前記アプリケーションサーバが提供したサービスのログを蓄積するログサーバとを含むログ管理システムにおけるアプリケーションサーバであって、
ユーザからの要求に応じて行った処理のログをファイルに出力するログファイル出力手段と、
前記ログファイル出力手段にてログが出力されたファイルのうち、収集対象となるファイルから前記ログを収集して前記ログサーバに送信する1以上のログデータ収集手段と、
前記1以上のログデータ収集手段を一意に特定するための識別子を生成し、当該識別子を前記ログサーバに提供する提供手段と
を有し、
前記ログデータ収集手段は、当該ログデータ収集手段の識別子、およびログを一意に特定するための他の情報を当該ログのデータに含めることを特徴とするアプリケーションサーバ。
An application server in a log management system including an application server that provides a service in response to a request from a user and a log server that accumulates a log of the service provided by the application server,
Log file output means for outputting a log of processing performed in response to a request from a user to a file;
One or more log data collection means for collecting the logs from the files to be collected out of the files whose logs are output by the log file output means, and transmitting the logs to the log server;
Providing means for generating an identifier for uniquely identifying the one or more log data collection means, and providing the identifier to the log server;
The log data collection unit includes an identifier of the log data collection unit and other information for uniquely identifying the log in the data of the log.
他のアプリケーションサーバが処理の継続が不能になった際に、当該他のアプリケーションサーバからフェールオーバーの依頼を受けた場合、前記ログデータ収集手段を動作させ、前記提供手段は、当該動作させたログデータ収集手段を一意に特定するための識別子を新たに生成し、当該識別子を前記ログサーバに提供することを特徴とする請求項13に記載のアプリケーションサーバ。   When another application server becomes unable to continue processing and receives a failover request from the other application server, the log data collection unit is operated, and the providing unit operates the log that has been operated. 14. The application server according to claim 13, wherein an identifier for uniquely identifying the data collection unit is newly generated and the identifier is provided to the log server. ユーザからの要求に応じてサービスを提供した際に実行した処理のログをログサーバに送信する1以上のログデータ収集手段と前記1以上のログデータ収集手段を一意に特定するための識別子を前記ログサーバに提供する提供手段とを有するアプリケーションサーバと、前記アプリケーションサーバが提供したサービスのログを蓄積する前記ログサーバとを含むログ管理システムにおけるログサーバであって、
アプリケーションサーバから送信されたログを受信し、記憶部に記憶する記憶手段を有し、
前記記憶手段は、受信したログに対応付けられた前記アプリケーションサーバから提供された識別子とすでに前記記憶部に記憶されているログに対応付けられた識別子とが一致し、かつ受信したログに含まれる当該ログを一意に特定するための他の情報とすでに前記記憶部に記憶されているログに含まれる当該ログを一意に特定するための他の情報とが一致している場合に当該受信したログを記憶させず、それ以外の場合に当該受信したログを記憶することを特徴とするログサーバ。
One or more log data collection means for transmitting a log of processing executed when a service is provided in response to a request from a user to a log server, and an identifier for uniquely identifying the one or more log data collection means A log server in a log management system comprising: an application server having a providing means for providing to a log server; and the log server for accumulating logs of services provided by the application server,
Receiving a log transmitted from the application server and storing in a storage unit;
The storage means includes an identifier provided from the application server associated with the received log and an identifier associated with the log already stored in the storage unit, and is included in the received log. The log received when the other information for uniquely identifying the log matches the other information for uniquely identifying the log included in the log already stored in the storage unit A log server characterized by storing the received log in other cases without storing the log.
ユーザからの要求に応じてサービスを提供するアプリケーションサーバと、前記アプリケーションサーバが提供したサービスのログを蓄積するログサーバとを含むログ管理システムにおけるログ管理方法であって、
前記アプリケーションサーバにおいて、
ログファイル出力手段が、ユーザからの要求に応じて行った処理のログをファイルに出力するログファイル出力工程と、
1以上のログデータ収集手段がそれぞれ、前記ログファイル出力手段にてログを出力されたファイルのうち、収集対象となるファイルから前記ログを収集して前記ログサーバに送信するログデータ収集工程と、
提供手段が、前記1以上のログデータ収集手段を一意に特定するための識別子を生成し、当該識別子を前記ログサーバに提供する提供工程と
を有し、
前記ログサーバにおいて、
記憶手段が、前記アプリケーションサーバから送信されたログを受信し、記憶部に記憶する記憶工程を有し、
前記記憶工程において、受信したログに対応付けられた前記アプリケーションサーバから提供された識別子とすでに前記記憶部に記憶されているログに対応付けられた識別子とが一致し、かつ受信したログに含まれる当該ログを一意に特定するための他の情報とすでに前記記憶部に記憶されているログに含まれる当該ログを一意に特定するための他の情報とが一致している場合に当該受信したログを記憶させず、それ以外の場合に当該受信したログを記憶することを特徴とするログ管理方法
A log management method in a log management system including an application server that provides a service in response to a request from a user and a log server that accumulates a log of the service provided by the application server,
In the application server,
A log file output step in which the log file output means outputs a log of processing performed in response to a request from the user to a file;
One or more log data collection means each collects the log from a file to be collected out of the files output by the log file output means, and sends the log data to the log server; and
Providing means for generating an identifier for uniquely identifying the one or more log data collection means, and providing the identifier to the log server;
In the log server,
The storage means has a storage step of receiving the log transmitted from the application server and storing it in the storage unit,
In the storage step, the identifier provided from the application server associated with the received log matches the identifier associated with the log already stored in the storage unit, and is included in the received log. The log received when the other information for uniquely identifying the log matches the other information for uniquely identifying the log included in the log already stored in the storage unit A log management method characterized by storing the received log in other cases without storing the log .
JP2011170450A 2011-08-03 2011-08-03 Log management system, log management method, application server, and log server Expired - Fee Related JP5746585B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011170450A JP5746585B2 (en) 2011-08-03 2011-08-03 Log management system, log management method, application server, and log server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011170450A JP5746585B2 (en) 2011-08-03 2011-08-03 Log management system, log management method, application server, and log server

Publications (2)

Publication Number Publication Date
JP2013037403A JP2013037403A (en) 2013-02-21
JP5746585B2 true JP5746585B2 (en) 2015-07-08

Family

ID=47886992

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011170450A Expired - Fee Related JP5746585B2 (en) 2011-08-03 2011-08-03 Log management system, log management method, application server, and log server

Country Status (1)

Country Link
JP (1) JP5746585B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10244075B2 (en) * 2014-03-20 2019-03-26 Rakuten, Inc. Information processing device, information processing method, program and storage medium
JP6562980B2 (en) * 2017-07-27 2019-08-21 キヤノン株式会社 System, system control method, information processing apparatus, information processing apparatus control method, and program
CN110019054B (en) * 2017-12-29 2023-01-31 阿里巴巴集团控股有限公司 Log duplicate removal method and system, and content distribution network system
JP2020154381A (en) * 2019-03-18 2020-09-24 ヤフー株式会社 Information processing system, information processing device, information processing method, and program
CN110209553B (en) * 2019-06-11 2023-06-20 湖南快乐阳光互动娱乐传媒有限公司 Data acquisition method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4462163B2 (en) * 2005-10-12 2010-05-12 日本電気株式会社 Log management system, log management manager, log management method and program
JP4881760B2 (en) * 2007-02-16 2012-02-22 株式会社野村総合研究所 Log management apparatus, log management method, program, and recording medium
JP2009110102A (en) * 2007-10-26 2009-05-21 Chugoku Electric Power Co Inc:The Log monitoring system and log monitoring method

Also Published As

Publication number Publication date
JP2013037403A (en) 2013-02-21

Similar Documents

Publication Publication Date Title
JP6522812B2 (en) Fast Crash Recovery for Distributed Database Systems
JP6619406B2 (en) Log record management
JP6196368B2 (en) Avoiding system-wide checkpoints in distributed database systems
US7933872B2 (en) Database backup, refresh and cloning system and method
US20180018241A1 (en) Visualizing restoration operation granularity for a database
EP2545472B1 (en) Distributed catalog, data store, and indexing
JP5068062B2 (en) System, method, and program for integrating databases
US10146629B1 (en) Extensible workflow manager for backing up and recovering microsoft shadow copy compatible applications
US8019727B2 (en) Pull model for file replication at multiple data centers
JP5360978B2 (en) File server and file operation notification method in file server
US7676503B2 (en) Hybrid computer restore using network service
US11010267B2 (en) Method and system for automatic maintenance of standby databases for non-logged workloads
JP5746585B2 (en) Log management system, log management method, application server, and log server
US10949413B2 (en) Method and system for supporting data consistency on an active standby database after DML redirection to a primary database
JP2016511486A (en) Database system with database engine and separate distributed storage service
US10747732B2 (en) Virtual database administrator
US8190947B1 (en) Method and system for automatically constructing a replica catalog for maintaining protection relationship information between primary and secondary storage objects in a network storage system
JP2016045930A (en) Management system and method for controlling management system
JP2008310591A (en) Cluster system, computer, and failure recovery method
JP5535998B2 (en) Data management system and data management method
US11561681B2 (en) System and method of smart framework for troubleshooting performance issues
CN113934575A (en) Big data backup system and method based on distributed copy
JP2007086987A (en) Data base duplex system, center server, remote server, data base duplex method and program
CN113792022A (en) Gene data-oriented federal analysis system, method, equipment and medium
JP2012181759A (en) Server system, control method thereof, and program therefor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140725

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150226

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150313

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150319

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20150410

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150508

R151 Written notification of patent or utility model registration

Ref document number: 5746585

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

LAPS Cancellation because of no payment of annual fees