LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 03-13-2014, 04:17 AM   #1
yzT!
Member
 
Registered: Jan 2013
Distribution: Debian
Posts: 168

Rep: Reputation: 2
Empty logs on /var/log/


Implementing a SIEM I just noticed that one of our servers is not logging anything, and I don't know why. The logs seem to rotate but no one has data.

For instance:

Code:
-rw------- 1 root root        0 Mar  9 04:04 cron
-rw------- 1 root root        0 Mar  2 04:04 cron.1
-rw------- 1 root root        0 Feb 23 04:04 cron.2
-rw------- 1 root root   272947 Jul  8  2012 cron.4

-rw------- 1 root root        0 Mar  9 04:04 messages
-rw------- 1 root root        0 Mar  2 04:04 messages.1
-rw------- 1 root root        0 Feb 23 04:04 messages.2
-rw------- 1 root root   446484 Jul  8  2012 messages.4

-rw------- 1 root root        0 Mar  9 04:04 secure
-rw------- 1 root root        0 Mar  2 04:04 secure.1
-rw------- 1 root root        0 Feb 23 04:04 secure.2
-rw------- 1 root root   123532 Jul  8  2012 secure.4
 
Old 03-13-2014, 04:23 AM   #2
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,475

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
Check syslogd / rsyslogd is running
 
Old 03-13-2014, 04:28 AM   #3
yzT!
Member
 
Registered: Jan 2013
Distribution: Debian
Posts: 168

Original Poster
Rep: Reputation: 2
yes, that was the first thing I did...
 
Old 03-13-2014, 04:39 AM   #4
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,475

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
Quote:
Originally Posted by yzT! View Post
yes, that was the first thing I did...
Try posting what ELSE you've tried, we're not psychic.
 
Old 03-13-2014, 05:00 AM   #5
yzT!
Member
 
Registered: Jan 2013
Distribution: Debian
Posts: 168

Original Poster
Rep: Reputation: 2
Anything else because I don't know where to look, but that one was obvious, wasn't it?

Content of logrotate.d/syslog-ng

Code:
/var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron {
    sharedscripts
    postrotate
        /bin/kill -HUP `cat /var/run/syslog-ng.pid 2> /dev/null` 2> /dev/null || true
    endscript
}

Restarting syslog it works, but after a couple of days, again logs are empty

Last edited by yzT!; 03-13-2014 at 05:21 AM.
 
Old 03-15-2014, 02:03 AM   #6
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: Custom Debian Live ISO's
Posts: 1,291

Rep: Reputation: 62
Are there any cron jobs running that may have a command that could periodically clear the log files. Are there other users that have access to the server that could be doing something they shouldn't? have you checked for rootkits? make a script that makes backups of your log files, say every hour, in another location, or can you send the logs to another server and archive them with dates and times in the filename for easier reference.
 
Old 03-17-2014, 03:13 AM   #7
yzT!
Member
 
Registered: Jan 2013
Distribution: Debian
Posts: 168

Original Poster
Rep: Reputation: 2
Just Apache's logs are sent to another server, but those do not have any problem.

A coworker is telling me that maybe it was that the server ran out of space at some point. When that happens, should syslog be restarted? Doesn't it recover itself?

Might it be something related with logrotate? That after reaching the log 4 doesn't start over again?

EDIT: a question about the rotation of logs. When a log rotates, it keeps logging to the new file or to the old one?

For example, if my secure rotated today, events generated today should be logged into secure or into secure.1? I'm asking because I'm noticing that on the server that isn't working it's behaving like this, but on another server that works, it saves the old log to secure.1 and starts a new one on secure.

Last edited by yzT!; 03-17-2014 at 04:42 AM.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Empty /var/log/boot.log saifkhan123 Linux - General 3 02-22-2010 02:48 AM
/var/log/messages empty Harlin Linux - General 2 07-14-2008 11:07 AM
/var/log/messages empty turbo_acura Linux - Software 8 11-23-2007 08:07 AM
Empty /var/log/messages jstencil Slackware 1 10-13-2006 09:34 AM
/var/log/messages empty Phathead Slackware 5 12-13-2004 11:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 03:14 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