Questions tagged [logging]

Recording activity on the system (or of a particular program) for later reporting and analysis. Logins, logouts, web server page requests, etc might all be logged.

2851 questions
14
votes
4 answers

`tail -f` sometimes stops updating - and the file hasn't moved

I have noticed recently that sometimes tail -f will stop updating to the screen. Doing a Ctrl>-C and restarting the tail works fine, though. And I checked to make sure the logfile isn't being rotated midstream (which can make tail lose…
warren
  • 18,369
  • 23
  • 84
  • 135
14
votes
2 answers

How can I detect Slowloris?

I'm pretty sure I was under Slowloris attack. I set up an iptables rule to limit max connections to my webserver, but I'd like to know how I can figure out if it really was a Slowloris attack, and if so, how I can find the IP address of the…
Rob
  • 2,393
  • 9
  • 33
  • 52
14
votes
3 answers

How can I log the response header and body in apache?

I need to determine whether the server (Apache 2) is returning the full contents of a page along with its correct header or not. I have a PHP-script that is executed successfully, but the browser is getting only half of the html content, it's simply…
acme
  • 677
  • 1
  • 8
  • 13
14
votes
9 answers

tail -f equivalent for MySQL logging database

It was decided that we should move to using a (MySQL) database for our application logs (it is a Java app using the logback lib). I am hoping to find something like tail -f that I can use with a specific table in that database that will show me new…
Nick Spacek
  • 251
  • 1
  • 2
  • 8
14
votes
7 answers

How long do you keep log files?

I have an application which writes its log files in a special folder. Now I'd like to add a functionality to delete these logs after a defined period of time automatically. But how long should I keep the log files? What are "good" default values (7…
Alex
  • 243
  • 1
  • 2
  • 4
13
votes
6 answers

Open source tomcat log viewer

I'm managing several tomcat instances (aprox 30-35) and looking for some console to centralize the logs. I tried php-syslog-ng before (no with tomcat), and found it useful. I would like that these software would have some of these features: -Syntax…
Ari
13
votes
1 answer

How to log original value of $remote_addr when using Real-IP

My environment has user requests passing through a number of systems: [Client] --> [ELB] ---> [nginx] --> [web] (ELB = AWS Elastic Load Balancer) Thanks to this answer, I have nginx determining and passing the correct client IP address to the…
michaelg
  • 250
  • 1
  • 3
  • 9
13
votes
4 answers

Proper way to rotate Nginx logs

I would like to achieve rotation of nginx logs that: would work without any extra software (i.e. - best if without "logrotate") would create rotated files with names based on date Best approach is something like PostgreSQL has - i.e. in its…
user13185
13
votes
1 answer

How do I make sec ignore a timestamp properly

I have a rule that is set up like so; In /etc/sec/rules.d I have; type=SingleWithSuppress ptype=regexp pattern=(\S+) sshd\[\d+\]: PAM \d+ more authentication failures\; logname=.* uid=.* euid=.* tty=ssh ruser=.* rhost=(.*) user=(.*) desc=Login…
Ethabelle
  • 2,052
  • 14
  • 20
13
votes
6 answers

Log commands executed over SSH

I would like to log all commands executed over SSH. Say, ssh something@server.com COMMAND I want to log "COMMAND" on server.com I did search extensively but could not find anything. There is one more similar question but I don't think there is a…
Prashanth
  • 261
  • 1
  • 2
  • 8
13
votes
3 answers

Getting errors while making backup of whole centos with tar

I am trying this command tar cvpzf /TEMP_BACKUPS/backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/tmp --exclude=/TEMP_BACKUPS --exclude=/mnt --exclude=/sys / > /TEMP_BACKUPS/mylog.txt and i am getting this error. I have tried twice tar:…
user1865341
  • 301
  • 1
  • 3
  • 7
13
votes
1 answer

How do I setup rsyslog to send all logs to multiple remote servers?

I am trying to make rsyslog to send all logs to 2 remote servers, but it seems rsyslog only sends to the secondary server if the first one fails. *.* @@server1 *.* @@server2 If I put the above in /etc/rsyslog.conf, server2 will not receive any logs…
Daniele Testa
  • 661
  • 4
  • 10
  • 18
13
votes
3 answers

how to filter rsyslog messages by tags

I have several applications and scripts that I want to redirect the output to custom files. I launch those applications using command | logger -t TAG I would like to filter these messages based on their tags and redirect them to different files. I…
mistyrouge
  • 301
  • 1
  • 2
  • 8
13
votes
2 answers

Is it good practice to use NTFS Compression on IIS Log folders?

Is it a good practice to use NTFS Compression on a IIS Log folders and files? I was able to go down from 20GB to 7GB by doing this. The IIS logs are per day, and have an average size of 20MB but some extreme days have 200MB. I'm wondering if IIS has…
Malartre
  • 321
  • 2
  • 5
  • 13
13
votes
4 answers

Log all mails and content (sSMTP)

How can I log all emails going through sSMTP? I can point my applications to a wrapper script, I just don't know how to write a wrapper script which logs headers and contents to a file (as much information as possible). Thanks! :-)
Thomas Jensen
  • 517
  • 2
  • 5
  • 9