Tag Info

Hot answers tagged

4

As your log files have the good taste of having timestamps that are lexicographically sorted, you can simple compare strings using awk, eg: awk 'substr($0,1,17)>="20150720 15:06:00" && substr($0,1,17)<="20150720 16:25:00"' <logfile.log I've assumed here that your timestamp starts at column 1 (numbering from 1). If not, change the ,1, ...


2

There were probably some control characters that file (which appears to be binary, not text. Maybe it is a zipped file that you cat'ed by mistake?) which altered the character set of your terminal. Logging out and back in should fix the character issue. As for the file, make sure you did not cat a binary file by mistake. If it ends in .bz or .gz, it is ...


2

The message indicates that the machine running out of file handles, check the current value and try increasing the value. List the current max-limit #cat /proc/sys/fs/file-max To increase the number of files (for whole system), add the following line to your sysctl.conf (/etc/sysctl.conf) fs.file-max = 131072 Run below command to re-read the ...


1

According to nginx documentation found here and here, try to use map rule to map your http referer to certain value and then log to specific file according that value. Put this map in your http context (outside the server context): map $http_referer $log_referer { example.com 1; default 0; } This goes to your server, location, etc.; access_log ...


1

Your second try[Edit 2] is having the correct syntax but I think the error occurs as you are using an older version of NGINX. The 'if' in access log was introduced in NGINX 1.7, see the release notes. If you have installed NGINX from Ubuntu repo then they are shipping ver 1.4.x . Run nginx with -V to know which version you are running. $ nginx -V ...


1

Firstly, when configuring a crontab use the full path for any commands and scripts you are calling. For example: tee should be /usr/bin/tee mailx should be /bin/mailx date should be /bin/date Note: If the paths are different on your system change as appropriate Also, chaining commands in a crontab (i.e. piping, |) can get messy very quickly. It might ...


1

The last screenshot that you have is that of an item being "not supported", rather than a trigger. If you hover over the red cross on the right side, you should see the reason why the item is not supported. According to https://www.zabbix.com/documentation/2.4/manual/config/items/itemtypes/zabbix_agent, the log[] item must be configured as an active check, ...


1

I had success with adding this to the "Additional parameters for <VirtualHost>" CustomLog "/Applications/MAMP/logs/mySiteName_access.log" combined



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