LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 07-08-2020, 04:51 AM   #1
z_haseeb
Member
 
Registered: Jun 2008
Posts: 137

Rep: Reputation: 1
Centralized log server


ENVIRONMENT
CENTOS = 7.8

vi /etc/rsyslog.conf

# Load the MySQL Module
module(load="ommysql")
#*.* : ommysql:127.0.0.1,Syslog_Database,syslog_user,password
*.* : ommysql:127.0.0.1,Syslog,rsyslog,MYSQLPASSWORD


$template TmplAuth, "/var/log/%HOSTNAME%/%PROGRAMNAME%.log"
*.* ?TmplAuth




CASE SUMMARY
I have configured centralized log server on centos for my windows servers thru SolarWinds_Event_LogForwarder agent. I am able to forward the logs with hostname under /var/log folder. Everyday I see current day logs and previous day logs disappear.
 
Old 07-08-2020, 05:27 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Perhaps you have a misconfigured logrotate?
 
Old 07-08-2020, 05:29 AM   #3
z_haseeb
Member
 
Registered: Jun 2008
Posts: 137

Original Poster
Rep: Reputation: 1
I did not configured any log rotate. Its a default file

[root@CentralizedLog /]# vi /etc/logrotate.conf
# see "man logrotate" for details
# rotate log files weekly
weekly

# keep 4 weeks worth of backlogs
rotate 4

# create new (empty) log files after rotating old ones
create

# use date as a suffix of the rotated file
dateext

# uncomment this if you want your log files compressed
#compress

# RPM packages drop log rotation information into this directory
include /etc/logrotate.d

# no packages own wtmp and btmp -- we'll rotate them here
/var/log/wtmp {
monthly
create 0664 root utmp
minsize 1M
rotate 1
}

/var/log/btmp {
missingok
monthly
create 0600 root utmp
rotate 1
}

# system-specific logs may be also be configured here.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to log internal-sftp chroot jailed users access log to /var/log/sftp.log file LittleMaster Linux - Server 0 09-04-2018 03:45 PM
LXer: Install a Centralized Log Server with Rsyslog in Debian 9 LXer Syndicated Linux News 0 10-18-2017 09:21 PM
LXer: Centralized log setup awesant elasticsearch logstash and kibana3 LXer Syndicated Linux News 0 01-26-2014 06:12 PM
Centralized log server with web gui kaplan71 Linux - Software 2 09-27-2010 09:34 AM
LXer: Build a centralized log management and monitoring system LXer Syndicated Linux News 0 10-25-2006 01:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 05:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration