-
Notifications
You must be signed in to change notification settings - Fork 0
husnain114/syslogtomariadb
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
syslog-ng.conf file is configured to take the logs and insert the data to MariaDB using our script called syslogtomysql.sh PROCESS: 1. Download syslog-ng.conf file and place it under /etc/syslog-ng/ 2. Download syslogtomysql.sh and place it under /home/scripts/ 3. Make the script from step-2 executable with "chmod +x" command 4. create a file called "mysql.pipe" under /var/log/ folder touch /var/log/mysql.pipe 5. Download the file "SysLogToMariaDB.service" under "/etc/systemd/system" and make it executable with "chmod +x" 6. Connect to MariaDB and add a DB called "syslog" with the table structure as e.g. as: (host,facility,priority,level,tag,datetime,program,msg) OR can be as per your requirements. Once done, you are good to go and start the service with the following command: systemctl start SysLogToMariaDB.service Check the status with: systemctl status SysLogToMariaDB.service ------------------------------- HOW TO CHECK THE LOGS WITH WEB ------------------------------- 1. Install httpd on your linux system e.g. yum install httpd -y systemct enable httpd systemctl start httpd 2. Download fetch.php and index.php and place them under /var/www/html 3. Make the file executable 4. Edit fetch.php and change the connection detals of myself as per your environment Once done, you can connect to the Web GUI using http://<Your Server IP>/index.php
About
How to move syslog data to mariadb
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published