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.
191
questions
64
votes
5
answers
24k
views
Equivalent of logrotate on OSX
Is logrotate hiding somewhere on OSX, or is there an equivalent? It's not in /usr/sbin.
53
votes
12
answers
32k
views
Tail multiple remote files
Is there a way to remote tail 2 files?
I have two servers(a and b) behind a load balancer and I would like to do something like this if possible:
tail -f admin@serverA:~/mylogs/log admin@serverB:~/...
39
votes
6
answers
271k
views
How to enable MySQL logging?
I am running MySQL 5.0.45 on OS X 10.6.1 and I cannot get MySQL to log anything. I am debugging an application and need to see all queries and errors.
I added to the etc/my.cnf:
[mysqld]
bind-...
38
votes
2
answers
17k
views
Get notification from supervisord when a job exits
Is there any way supervisord can automatically restart a failed/exited/terminated job and send me a notification email with a dump of the last x lines of log file?
32
votes
1
answer
46k
views
How can I let nginx log the used SSL/TLS protocol and ciphersuite?
My goal is to ensure proper security for clients connecting to my nginx. I'm following Mozilla's guide to configure TLS properly on my nginx installation, but I don't have an overview of the actual ...
29
votes
5
answers
85k
views
How do I get rsyslogd to log a server's FQDN instead of it's short hostname?
I'm trying to implement a simple centralized syslog server using stock rsyslogd (4.2.0-2ubuntu8.1) on Ubuntu 10.04 LTS. At this point I have all my client nodes sending logs to the central server, but ...
24
votes
5
answers
218k
views
How to get a linux network log?
We have a java server running in linux at a specific port that accepts persistent connections for thousands and thousands of users. Recently our clients are not able to connect with a time out error. ...
22
votes
1
answer
41k
views
How to limit nginx access log file size and compress?
I'm hoping to get some direction on how to set up truncating and gzip'ing on my domains' access logs. I notice that the core nginx access logs get split and compressed by default, yet my individual ...
21
votes
9
answers
212k
views
Are there any RDP activity logs? - Windows Server 2008 R2
a few users have logged into a server through RDP.
I would like to monitor activity, but do not know my way round Windows Server that well.
I am hoping there are logs of some kind around that I can ...
21
votes
6
answers
51k
views
Mongodb - proper way to rotate logs
Mongo docs say that I can:
use -SIGUSR1 signal and get the old log renamed and current switched
use logrotate from OS
I want the OS's logrotate ability to zip old files and remove oldest, but see no ...
19
votes
4
answers
114k
views
Haproxy not logging requests?
So, I configured Haproxy so the logging would go through rsyslog and, for now, be all dumped in one file.
It's definetly logging, as I get those "starting" messages on startup, but no HTTP requests ...
19
votes
3
answers
47k
views
How do you set a DATE variable to use in a log for crontab output?
I was playing aroudn with some variations of date like
DATE = $(date)
but that didnt work either
crontab -e
CRONLOG=/tmp/log/crontab.log
DATEVAR=`date +20\%y\%m\%d_\%H\%M\%S`
* * * * * echo $...
19
votes
4
answers
148k
views
nginx / php-fpm error logging
I'm trying to figure out where the PHP errors are going in my setup. I'm running nginx as the reverse proxy to PHP-FPM, but I'm not seeing the various E_NOTICE or E_WARNING messages my app is ...
18
votes
4
answers
162k
views
HAProxy logging to syslog
I installed HAProxy 1.5 via apt-get on ubuntu 14.04 via ppa:vbernat/haproxy-1.5 as per this Debian repository selection tool.
The problem is it logging to /var/log/syslog instead of /var/log/haproxy....
16
votes
2
answers
16k
views
No more logging after upgrade to Debian Wheezy
Syslog, auth.log, kern.log and messages log files are not updated anymore after upgrading to Debian Wheezy (Debian Squeeze was previously running).
How could I fix it?
15
votes
2
answers
12k
views
Change systemd unit tag send to journalctl/syslog
Is it possible to change what tag systemd managed service uses for logging? For example, my custom service report-daemon.service defined as
# ...
[Service]
ExecStart=/usr/bin/php # ...
# ...
shows ...
15
votes
4
answers
12k
views
`tail -f` sometimes stops updating - and the file hasn't moved
I have noticed recently that sometimes tail -f <logfile> 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 ...
15
votes
3
answers
38k
views
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 ...
14
votes
4
answers
3k
views
Log transport and aggregation at scale
How're you analysing log files from UNIX/Linux machines? We run several hundred servers which all generate their own log files, either directly or through syslog. I'm looking for a decent solution to ...
14
votes
5
answers
36k
views
/var/log/auth.log not logging failed ssh attempts
I'm trying to go failed (either incorrect username, password, or both) on my server.
I changed /etc/ssh/sshd_config from
# Logging
SyslogFacility AUTH
LogLevel INFO
to
# Logging
SyslogFacility ...
14
votes
8
answers
33k
views
Linux monitor logs and email alerts?
I have a server with a faulty power button that likes to reboot itself. Usually there are warning signs, like the acpid log file in /var/log starts spamming garbage for about 10hrs or so.
Is there an ...
14
votes
2
answers
20k
views
Timzone incorrect for log files only?
I have a small server running centos 6.4 and it is working quite nicely for some time. One thing that still bugs me is that the time in my log files is different then the time the 'date' command ...
13
votes
6
answers
20k
views
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 ...
13
votes
3
answers
7k
views
How can i send /var/mail/root again?
Through some misconfiguration I've a lot of emails in /var/mail/root and /var/mail/www-data
How can I "loop" over these files and send each mail another time?
12
votes
2
answers
5k
views
Why are external domains appearing in my apache logs?
I've got several log entries that refer to an external domain - mainly a Russian search engine (http://www.yandex.ru/)
How are these appearing in my logs?
82.146.58.53 - - [10/Jun/2010:00:49:11 +...
11
votes
4
answers
29k
views
Sending logs to Graylog2 server
I have just setup a Graylog2 server and I am looking to send all logs from my main server to the graylog server. I have enabled logging for the main server and am sending logs to my graylog server by ...
11
votes
4
answers
11k
views
Is there anyway to get msiexec to echo to stdout instead of logging to a file
As part of a continuous delivery pipeline I'd like to install an msi on a given machine. msiexec plus psexec does this perfectly, but it seems that msiexec can only log to a file and I need it to log ...
11
votes
1
answer
4k
views
Newsyslog wildcards - rotate all logs in a directory
I am running FreeBSD 8.1. I am trying to make newsyslog rotate logs defined by a dynamic path:
# logfilename [owner:group] mode count size when flags [/pid_file] [sig_num]
/path/logs/*....
11
votes
1
answer
6k
views
Empty/Null Apache request entries in access log
This entry got logged in a Apache access log:
IP ADDRESS - - [00/00/0000:00:00:00 -0000] " " 301 - "-" "-"
It was detected by LogWatch as a null HTTP Response and also got marked as a successful ...
11
votes
1
answer
31k
views
How to configure PHP-FPM over NGINX to write in per-virtualhost log files
I have Fedora 16 with Nginx and PHP-FPM. Everything is working very good. All logs with PHP notices, warnings, errors etc. are in /var/log/php-fpm/www-error.log.
Is there a way to configure PHP-FPM ...
11
votes
3
answers
2k
views
Is SSH logging capabilities equivalent to su logging for private/public key authentication?
Here at work, we have a non-root shared login account on UNIX that is used to admin a particular application. The policy is to not allow direct logins to the shared account; you must login as yourself ...
11
votes
3
answers
6k
views
Why are journald logfiles so huge?
When I do a journalctl --disk-usage it says something about 300MB size of the journal files but when I look at the actual text with journalctl | wc -c it's something about 28MB. Well, journald has ...
11
votes
5
answers
20k
views
How to log the URL scheme (http / https) in Apache?
nginx has the $scheme variable usable in its log_format lines.
%H is the request protocol (e.g. "HTTP/1.1").
How can I do the same with Apache?
11
votes
1
answer
15k
views
Is there a way to view an HP ProLiant server IML log from within ESXi?
I'm investigating a system outage on an HP ProLiant DL360 G7 server running VMware ESXi 5.1.
While I'm a huge advocate of installing the HP-specific management agents for ESXi or using the ...
11
votes
7
answers
3k
views
Hacking prevention, forensics, auditing and counter measures
Recently (but it is also a recurrent question) we saw 3 interesting threads about hacking and security:
How do I deal with a compromised server?.
Finding how a hacked server was hacked
File ...
10
votes
2
answers
47k
views
How to debug Samba authorization (authentication) procedure
I'm running a small home network linux-based server which acts as an internet router, torrent client and file server. I have problems connecting Windows clients to server Samba shares ('user name or ...
10
votes
8
answers
9k
views
The most powerful open source web analytics tools? [closed]
Need some advices on choosing open source web analytics tools, including both of page tagging and log file analysis type. I know some of them: piwik, open web analytics, awstats and more... what are ...
9
votes
2
answers
9k
views
How to block Nginx access log statements from specific user agents
I am looking to turn off logging in the Nginx access log file from specific requests from http user agents.
Basically from the Amazon ELB Health Check and our external (Pingdom) monitoring. Since ...
9
votes
1
answer
5k
views
When does IIS log a request?
This sounds silly, but when do they log requests? I have a web application, and about 500 HTTP proxies that will load up that application. But problem is sometimes (and this morning a lot), the proxy (...
9
votes
7
answers
51k
views
Nginx not logging PHP errors
When accessing some PHP scripts on my website, I'm getting the dreaded 500 error message. I'd like to know what's wrong to fix it, but Nginx isn't logging any PHP errors in the log file I have ...
9
votes
1
answer
5k
views
View unbuffered log output from journalctl
I have several systemd services defined. They log both to disk and also to the systemd journal, which I can monitor using journalctl -n 0 -fu myservice. However, I notice that the logs that I see ...
8
votes
2
answers
7k
views
tail -f not following log file in Docker container
I am seeing some strange behavior running the tail -f command inside a Docker container in CoreOS.
There are a number of variables I can think of that may be contributing to the problem but I am not ...
8
votes
8
answers
26k
views
How to find "growing" files inside a linux system
I have a server that is constantly losing disk space so I reckon there must be some logs that I'm not aware of.
What is a good way to locate files that are constantly increasing in size?
8
votes
1
answer
32k
views
nginx not logging errors to log files
I recently moved my CentOS 7 machine from Apache to nginx, and I am still working out the differences. One issue I have noticed for only one of my server blocks is that access and error log files are ...
8
votes
1
answer
8k
views
Windows Events for Remote Desktop logon failure
According to ref the logon types 10 and 3 in windows events are represnting
Logon Type 10 = RemoteInteractive Logon
&
Logon Type 3 = Network Logon
But when i tried to connect a Windows machine ...
8
votes
7
answers
28k
views
Get list of user-agents from nginx log
I have nginx log file, and I want to find out market share for each major version of browsers. I am not interested in minor versions and operating systems. I would like to get something like this:
...
7
votes
3
answers
41k
views
Where is catalina.out in tomcat 9?
I just recently deployed tomcat 9 and I would like to inspect the catalina.out log as it is running, however I notice that when stopped it would dump logging output to a catalina.[date].txt file. Is ...
7
votes
1
answer
12k
views
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
<IfModule mod_userdir.c>
UserDir public_html
<Directory /home/*/...
7
votes
1
answer
11k
views
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 <<EOF
FROM alpine:latest
RUN apk add --no-cache openssh-server \
...
7
votes
6
answers
6k
views
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 ...