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
7
votes
6 answers

Appending output to a file at the same time truncating it to N lines

I'm trying to find a simple way to append/write to a log, while at the same time keeping it the log trimmed to a reasonable size. I would prefer to not just append files forever, and then have to have a clean up log script. I can't wrap my head…
Marc
  • 173
  • 1
  • 4
7
votes
3 answers

How to best configure IIS7 logging to capture "HTTP_X_FORWARDED_FOR" header

We have IIS7 servers sitting behind an nginx reverse proxy. The reverse proxy is sending the standard "HTTP_X_FORWARDED_FOR" header with the visitor IP address, but IIS7 logging is only logging the IP address of the nginx server (which makes sense,…
zeroasterisk
  • 275
  • 1
  • 4
  • 10
7
votes
3 answers

how do I configure IIS to post logs to sql server?

how do I configure IIS to post logs to sql server? How want to save ANY log to my site. the site has a lot of views and the data can be big in a very small time. In addition, I want to show analytics of the use, in real time, and for all the…
stacker
  • 841
  • 3
  • 10
  • 15
7
votes
6 answers

Monitor the shell activity of a user on your Unix system?

Trust, but verify. Let's say I want to hire someone a sysadmin, and give them root access to my Unix system. I want to disable X windows for them, only allow shell usage (through SSH, maybe), so that all operations they perform will be through the…
Joseph Turian
  • 265
  • 2
  • 7
7
votes
1 answer

How to disable apache logging when accessing certain directories?

How do I get apache to prevent http requests from being logged on a directory basis? I want to do something alike UserDir public_html Options NoAccessLog …
nidi
  • 200
  • 1
  • 1
  • 7
7
votes
1 answer

Apache2 access.log has multiple lines that say "combine"

I'm running an Apache2 webserver on Ubuntu 20.04.2 LTS. I noticed that my access.log has several lines that simply say combine on them, with no information about the request or anything else. There are other lines in the access.log that do not say…
Noah Broyles
  • 179
  • 6
6
votes
1 answer

SSHd logs in Docker container not shown by `docker logs`

When using CMD ["/usr/sbin/sshd", "-D"] in a Dockerfile, docker logs does not show the logging: cat > Dockerfile.stdout <
Willem
  • 177
  • 4
  • 13
6
votes
1 answer

How to create a GDPR compliant HTTP server access log with focus on remote IP anonymization and nginx?

EU's General Data Protection Regulation (GDPR), and the German DSGVO implementation, are very strict when it comes to individual-related data (such as IP addresses). However this question is not about the GDPR, but how to implement the regulation…
burnersk
  • 2,056
  • 5
  • 27
  • 39
6
votes
1 answer

Create separated syslog file for each host with rsyslog

I have a syslog server (running rsyslog on RHEL 7.4) that consolidates all the syslogs from my network devices. It's listening on port TCP/514. I want to redirect the logs of each device to a different file in a dedicated directory (based on their…
eden881
  • 215
  • 1
  • 2
  • 10
6
votes
1 answer

Django with Apache and mod_wsgi: no system log unless setting Debug = True

I'm using apache web server and mod_wsgi to transfer request to django. $ apache2ctl -v Server version: Apache/2.4.10 (Raspbian) Server built: Sep 17 2016 16:40:43 I'm using this apache site to declare django app: ServerName…
Thomas
  • 61
  • 1
  • 1
  • 5
6
votes
1 answer

How do you rotate apache logs on windows without interrupting service?

I administrate a Windows Server 2003 (Standard Edition, 32-bit) installation running Apache2 and ColdFusion. The server has over 100 virtual hosts, each with an access log and an error log. I've been looking for an analog to (or a win32 port of)…
Joe
  • 1,775
  • 15
  • 23
6
votes
3 answers

Log file permissions in Linux

I am trying to write a simple script that monitors /var/log/messages file. The file by default doesn't have read permission for users, when I allow read access to this file my script works perfectly, but the problem is that file gets rewritten each…
Maksim Vi.
  • 167
  • 1
  • 1
  • 5
6
votes
2 answers

IPTables: How to log and set a specific log file

Is it possible log all dropped connections by IPTables and set a iptables.log file for logging in /var/log/?
user333044
6
votes
2 answers

iptables is occasionally logging MAC addresses. Why?

I have logging enabled on specific iptables packet drops. The rules I'm using are IP/port related only and this is what I can easily see in the logs, however occasionally I do get MAC address information logged as well. Like: "....OUT=eth1 IN=…
rs232
  • 105
  • 1
  • 10
6
votes
2 answers

Where to get proper `region name` and `output format` for AWS configuration?

I'm trying to get log events via my aws server. I log into the server as usual, and then I enter the following command: sudo aws logs get-log-events --log-group-name --log-stream-name I get the error... You must specify a…
makansij
  • 265
  • 1
  • 5
  • 12