| Importing Log Files To Databases |
| Categories: User Guide Ch5: Call Services Logging |
| Article ID: | 181 |
| Last updated: | November 02, 2006 |
| User Opinions |
|
No users have voted.
|
|
Thank you for rating this answer.
|
SUMMARY
This article explains how to import log files into a database so that they can be analyzed.
SYMPTOMS
N/A
RESOLUTION
Analyzing data is best performed when in a database. With activity logs stored separately for each application and rotated on a daily basis, is it not trivial to import this content to a database. Audium Call Services provides a Windows batch file named importLogs.bat and a Linux/Solaris shell script named importLogs.sh that help with this. They are found in the admin directory of Call Services and export to a database the content of the rotated activity logs of a single application. To export the data for multiple applications, this script must be called separately for each application.
The scripts can run in two ways. The first is as an interactive system that asks questions about the database and application to import. The second way is to pre-fill a property file residing in the same directory as the script named activity_log_import.properties with the desired data and run the script. If a property file exists, the script will use the data from the property file, if it does not exist, the script will run interactively. The property file content looks like this:
application_name=[APPNAME]
database_type=[DATABASE]
driver_path=[DRIVERPATH]
driver_class=[DRIVER]
database_url=[DATABASEURL]
database_user=[DBUSER]
database_password=[DBPASS]
where:
- APPNAME is the name of the application to import.
- DATABASE is the type of database to use. The script supports two types: MySql and SqlServer.
- DRIVERPATH is the location of the Java database driver. Since the script is written in Java, a driver to the database is required to interface with Java. This driver should then be placed somewhere in the Java classpath.
- DRIVER is the name of the driver class, e.g., org.gjt.mm.mysql.Driver.
- DATABASEURL. This is the URL used to access the database. For example: jdbc:mysql://myserver:3306/ActivityLogging.
- DBUSER. The username of the user needed to log into the database.
- DBPASS. The password of the user needed to log into the database.
|
| Visitor Comments |
|
No visitor comments posted. Post a comment
|
| Related Questions |
|
No related questions were found.
|
| Attachments |
|
No attachments were found.
|