Tag Info

Hot answers tagged

3

Yes, this is possible. However, since you aren't using HTTP basic auth, you will need your application to tell Nginx what the current username is. Add a response header along the lines of: X-Username: nishant Then in your log_format directive, use the variable $sent_http_x_username. This behavior is documented here: ...


3

You should be able to do this by using rsyslog on your systems to send all the logs to a centralised log server. For applications that log via syslog this is fairly straightforward. For applications that log directly to files, rsyslog provides a Text File Input Monitor module that sends lines from a text file to rsyslog for processing. Regarding ...


3

postfix logs each connection as it comes in, and the log lines look like Jul 8 16:25:15 swiss postfix/smtpd[11127]: connect from some.host.or.other [192.0.2.1] so you can tail -F your logfile (on my system it's /var/log/mail.log), use grep to filter the lines you want, and watch the live traffic.


2

That is not a good idea. Big part of the log rotation process is forcing applications to change the log file they are using. You to do that for a directory, you need to manage this for all the logs in it.


2

You forget to configure the inverse , besides writing your LAN requests to it's own log you need to exclude them from the regular log as well... # Where your access log is defined CustomLog logs/access_log common env=!fromlan Make sure that the SetEnvIf line is declared before the regular access log is.


2

Are you redirecting based on domain name? Eg from example.com to www.example.com? That might explain the 301 response. If your server is responding with a 301, it's likely this isn't doing much harm. However some page somewhere probably has a broken image link on it. To track that down you should look at the Referer header in the incoming requests. You ...


2

Don't use the -v option of rsync, instead use --out-format: rsync --out-format="%n%L" -az user@r18:~/assets ~/18 >> ~/18/rsync.log 2>&1 Will only have output when you are transfering files, and no output when you don't. To have more fancy output look at the rsync.conf man page, in the "log format" section.


1

Borrowed from sensu FAQ: http://sensuapp.org/docs/0.12/faq#how-do-i-increase-log-verbosity You can adjust the process log level by setting LOG_LEVEL in /etc/default/sensu to either debug, info, warn or error. You will need to restart the Sensu process(s) after making the adjustment. This will work for both server and client. Don't forget to restart ...


1

I've posted an answer to Bradd's question on AskUbuntu: http://askubuntu.com/a/490900/297973. Long story short, you may need to add $KLogPermitNonKernelFacility on to rsyslogd's config.


1

The answer to your question is No. At least, not without taking heroic measures (e.g., running DEBUG level and processing it with scripts) that are much harder than some sensible alternatives. That same [preauth] error is reported for no key or an invalid key. On the other hand, if they actually connect, your log will say explicitly Jul 7 15:59:38 ws6 ...


1

You can use a "cheat" - in your /etc/pam.d/ssh(d) in the auth section you can add a log statement (pam_log) before the pam_unix or @include common-auth statements. If this statement is hit, then a password authentication has been attempted.


1

For those to which the accepted answer does not work: I had the same situation, but I was using (liferay -> tomcat) startup.bat and it always opened up tomcat console. The way to edit the startup.bat file, so that it outputs the log into a file was like this: Look for the line: call "%EXECUTABLE%" start %CMD_LINE_ARGS% and edit it, so it looks like ...


1

Apache's CustomLog directive allows for evaluating environment variables in order to decide whether to log a message. And environment variables can be set depending on the URI using SetEnvIf. So to exclude all requests for URIs ending with wp-login.php from the combined custom log: SetEnvIf Request_URI "wp-login.php$" dontlog CustomLog ...


1

sysdig has turned out to be the solution I've been looking for. Their wiki has some exceptionally interesting examples for Disk I/O and so much more: Disk I/O See the top processes in terms of disk bandwidth usage sysdig -c topprocs_file List the processes that are using a high number of files sysdig -c fdcount_by proc.name "fd.type=file" See ...


1

Your first example sends both stderr and stdout to the file (2>&1) ; the MAILTO variable set in the cron will capture any output that is not redirected, and this combined with directing the output to the file means that no output is available for the cron to email. I'd suggest using tee to append the output to the file as well as sending it to stdout; ...


1

I'm using splunk on my work to handle a logs from a bunch of servers, some linux and some windows Highly advise you to look at splunk universal forwarder. With it you can choose, what logs to send and basically you can create any scenario on logs treatment, It's way easier to tune, then rsyslog, there is a deployment server, that can help you to manage ...


1

Why do you want to store the e-mails? Events are already stored in Zenoss's MySQL database? The e-mails are generated from the events. You can customize Zenoss's archive settings under the advanced tab - events in the left hand menu. You can query the tables like normal, and I suppose you could copy those tables too if you wanted...


1

There's always a lot of "background noise" being generated by bots scanning random ip-ranges and trying for known vulnerabilities and exploits. It's a fact of modern digital life and you see evidence of that in your log files. Keep your systems patched and up-to-date and learn to live with that. When a lot of traffic is for more valid looking URL's that ...


1

The above poster is close. tail allows you to see the last 10 lines in a file. The -f switch allows you to see new lines as they are appended to the maillog file. cd /var/log tail -f maillog Ctrl+c to escape. Seeing this is already written to a file called /var/log/maillog, not sure why you would want to create another file unless you are looking to ...



Only top voted, non community-wiki answers of a minimum length are eligible