This article is second part of the article Setup Rsyslog with MySQL and LogAnalyzer on CentOS/RHEL systems. In the first part we have integrated Rsyslog with MySQL database server, and all the logs are now saving in database. For recalling below is few configuration details which we used in part-1 to setup it.

Advertisement
    Rsyslog MySQL Database: Syslog
    Rsyslog MySQL Username: rsyslog
    Rsyslog MySQL Password: MYSQLPASSWORD

Let’s start the setup of LogAnalyzer on your Linux system with rsyslog database using following steps.

Step 1 – Download LogAnalyzer Source

Download the LogAnalyzer latest version from its official download site or use the following command to download 4.1.5 (Current latest version) version and extract it.

$ cd /tmp
$ wget http://download.adiscon.com/loganalyzer/loganalyzer-4.1.5.tar.gz
$ tar xzf loganalyzer-4.1.5.tar.gz

After extracting copy the required files to web server default document root as below.

$ mv loganalyzer-4.1.5/src /var/www/html/loganalyzer

Step 2 – Create Config File

Now create a blank configuration file named config.php in loganalyzer directory and setup write permission to apache user.

$ cd /var/www/html/loganalyzer
$ touch config.php
$ chown www-data:www-data config.php     # Use apache for redhat system
$ chmod 777 config.php

Step 3 – Start Loganalyzer Web Installer

After completing above steps open following url in your favorite web browser to start LogAnalyzer web installer.

http://tecadmin.net/loganalyzer/intall.php

Now follow the web installer steps as per below given screen shots.

Step 3.1: Just click Next.

install LogAnalyzer 1

Step 3.2: Make sure config.php is writable and click Next.

Step 3.3: Fill the database details for loganalyzer, we can also use same database used for Rsyslog and click Next.

Step 3.4: In this step installer will create database table, if tables already found, you will get an warning of data overwritten. We just need to click Next.

Step 3.5: This screen will show the result of table creation’s. Just click Next

Step 3.6: Create an Administrator account and click Next.

Step 3.7: Fill the Rsyslog database details and click Next.

Step 3.8: LogAnalyzer installation has been completed. We just need to click Finish.

Step 3.9: Login to LogAnalyzer using Administrator credentials created in Step 3.6.

Congratulation’s! on successful configuration of LogAnalyzer with Rsyslog MySQL database. Read other article to configure Rsyslog to collect logs on central server. So we can monitor all server logs at on place using LogAnalyzer.

Share.

26 Comments

  1. Hello,
    my loganalyzer server collects logs, suddenly in the web interface shows me this erreur : “”

    While reading the logstream, the php script timeout forced me to abort at this point.

    If you want to avoid this, please increase the LogAnalyzer script timeout in your config.php. If the user system is installed, you can do that in Admin center. “”

    Please help.

  2. hello dear ,

    have installed rsyslog with lognanalyzer

    am getting this error in browser:No syslog records found – Error Details:

    Could not find the configured table, maybe misspelled or the tablenames are case sensitive

    even i have changed systemevents to SytemEvents

  3. hi team,
    I have configure loganalyzer with centos7, its working fine, but in loganalyzer records are showing more than 21 lakh, more records will affect log analyzer, or how can i set it for only one, or two day or for hour bases.

    Regards

  4. On Cent OS 7 error
    [root@localhost loganalyzer]# chown www-data:www-data config.php
    chown: invalid user: ‘www-data:www-data’

    • If you are running HTTPD on CentOS. The HTTPD uses apache and default user and group. Try the following command:

      chown apache:apache config.php

  5. I’ve adapted your tutorial to rh 7 and mariaDB without many problems, thank you for the tutorial.

    I am missing how to make log rotation when logging to mysql.

    regards

  6. centos 7 :
    -rw-rw-rw-. 1 root root 0 1月 26 17:33 config.php
    or
    -rw-rw-rw-. 1 apache:apache 0 1月 26 17:33 config.php

    ERROR: At least one file or directory (or more) is not writeable, please check the file permissions (chmod 666)!

    why?

  7. How do I set my servers to send their logfiles to the mysql database?
    I’m struggling to get other data than the localhosts to my Loganalyzer – any ideas?

  8. Thank for this good tutorial.
    In order to help someone who meet the same problem as me, i post the solution
    Problem :
    “Could not find the configured table, maybe misspelled or the table names are case sensitive”

    Solution :
    edit the file config.php and change this :
    $CFG[‘Sources’][‘Source1’][‘DBTableName’] = ‘systemevents’; => ‘SystemEvents’

    and update the database :
    mysql -uuser -p
    mysql> update logcon_sources set DBTableName =’SystemEvents’ where ID=1;
    Query OK, 1 row affected (0.00 sec)
    Rows matched: 1 Changed: 1 Warnings: 0

  9. I use the link in your website on my Oracle Linux but I don’t get the same screens you show above. It’s talking about installing Composer and then nothing else.
    Am I doing something wrong?

    • Figured out that I need to change permission to the loganalyzer directory as well as the config.php file. I also needed to set it to allow edits:
      semanage fcontext -a -t httpd_sys_rw_content_t “/var/www/html/loganalyzer-3.6.6/src/config.php”
      restorecon -F -R -v /var/www/html/loganalyzer-3.6.6/src/config.php

  10. Ranjeet Ranjan on

    I am getting error.
    I double check table, its perfect.

    No syslog records found – Error Details:
    Could not find the configured table, maybe misspelled or the tablenames are case sensitive

Exit mobile version