XpoLog help - Add SQL on Log 
 

XpoLog allows you to treat any log you define as a database table, thus enabling more elaborated filtering as well as aggregation functions not supported by Xpolog log filters. For that end Xpolog writes the selected log(s) to either it's default database or to a user selected database, performs the query on the created tables and returns the result, just as if it was performed on any other database table

 


Defining SQL queries on logs

  1. Open the Administration menu in the top menu and click on the "Add log" option.
  2. Click on the Add SQL on log link.
  3. In the General Section, enter the parent folder, the log name and the log description.
  4. In the Database Details section select the database account you want to use for this log. This account describes the database and the connection parameters needed to connect to it. For more details on database account definitions, see defining database accounts.
    Select the desired refresh rate, if any.
  5. In the Time Zone section select the log time zone. If you want Xpolog to automatically update the data it displays, check the "Automatic data update" option. If you leave this option unchecked, Xpolog will use the latest downloaded data and will not attempt to re-read it every time the log will be accessed.
  6. In the database administration query page, select first the database table you want to query.
  7. In the Logs section, select the logs you want to participate in the SQL query. Each log / filter combination is unique, so you can use the same log with different filters, but you cannot use the same log with the same filter twice. Once all desired logs are added, press next for the Database administration query page. If the connection of the given database account could not be established, Xpolog will display the appropriate error message.
  8. Xpolog will automatically display the default query (select * from Table1,...,Tablen) and will display the result log analysis in the lower section of the screen. The first table (Table1) stands for the first log selected in the previous page, Table2 stands for the second log selected and so forth. If the query is erroneous an appropriate message will be displayed. You can now change the query as you would like, as long as it conforms with the SQL syntax of the database of the given account, and even use more advanced syntax like aggregate functions. When finished entering the query, press the verify query link to check the validity of your query.
  9. Press the show advanced pattern definition to open the fields pattern section, in which you can assign each of the table's database columns an Xpolog pattern. Press the verify patterns and query link to check again your entries.

  10. To enhance performance during administration, Xpolog uses only a portion of the logs for the query and for display. You can change the default number of log records in the preview settings section.

  11. If the query verification was successful you can now either save the log by clicking on the save link, or go to Log field admin page, where you can name the log columns and set the log for indexing prior to saving the log.

 

Additional links

      Defining database accounts
      Log View help