Create a logrotate configuration file$ vi/etc/logrotate.d/tomcatAdd the following content:/opt/entermediadb/tomcat/logs/catalina.out { copytruncate daily rotate 7 compress Missingok dateext Size 100m Parameter description:Specify the path to the log file. Copytruncate–creates a copy of the log file and then truncates the original to an empty file so that the service can Kee P on logging un
About WebLogic server reboot or log rotation causing server.log i node number change
A couple of days ago, my colleague asked me a question, that is, when the client was using Tivoli to analyze the WebLogic server log, when the server restarted, Tivoli went wrong, saying that Fileid is changed. It was suspected to be related to the Inodenumber of server
/mysqladmin Ping >/dev/nullThen/app/mysql/mysql3306/bin/mysqladmin Flush-logsFiEndscript}4) Execute the following command to test whether the configuration is correct/usr/sbin/logrotate-f/etc/logrotate.d/mysql-log-rotateNote: You need to view the backed up compressed files This execution Gunzip file_name.gz can5) timed execution (early morning execution)# Vim/etc/crontab* * * * root/usr/sbin/logrotate-f/etc/logrotate.d/mysql-
[:len (Result)-Self.backupcount]returnResultThe principle of rotation is to find the log directory, matching the suffix suffix of the file, added to the delete list, if the specified number is added to the list to be deleted, and then look at the principle of matching: elif ' D ' or ' Midnight ' : # One day " %y-%m-%d " = R"^\d{4}-\d{2}-\d{2}$" Exmatch is a regular
Loggerlogger.addhandler (CH) # ' application ' codelogger.debug (' Debug message ')Looking down, there is nothing wrong with the place.Then look at the logging code, find the Timedrotatingfilehandler related content, which deletes the contents of the expired log:logging/handlers.pydef getfilestodelete (self): "" " determine the files to delete when rolling over . More specific than the earlier method, which just used Glob.glob (). "" DirName, BaseName = Os.path.split (self.basefilename) fi
0, Preface
This article is mainly referred to dockerinfo this article Elk log system, which Docker configuration file is mainly provided by the blog, I do just on the basis of this article, deleted part of this article does not need, while noting the construction process of some problems.
About Elk, this article does not do too much introduction, detailed can view the official website, here first posted our
Linux: |/usr/local/sbin/cronolog/web/apache/logs/%y%m%daccess_log## The following directives define some format nicknames for use with# a customlog directive (see below).#Logformat "%h%l%u%t \"%r\ "%>s%b \"%{referer}i\ "\"%{user-agent}i\ ""Logformat "%h%l%u%t \"%r\ "%>s%b" Common# need to enable MOD_LOGIO.C to Use%I And%OLogformat "%h%l%u%t \"%r\ "%>s%b \"%{referer}i\ "\"%{user-agent}i\ "%I%O" Combinedio## The location and format of the access logfile (Common logfile format).# If You don't defin
) Download and install Sqlplus: http://www.oracle.com/technetwork/database/features/instant-client/sqlplus-cloud-3080557.htmlPlace the extracted files of the downloaded Sqlplus compressed package into the same directory as the Oracle Instantclient: 3) Open Nvicat, "Tools"-"Options"-"OCI", configure the OCI library to C:\instantclient_12_2\oci.dll,sql*plus set to C:\instantclient_12_2\ Sqlplus.exe3. Establish a connection1) Connection Name any2) connection type: Basic3) host name or Ip:localhos
GRAYLOG2 is an open-source log storage System, written by the Java language Server, capable of receiving log information sent by TCP,UDP,AMQP protocol, and fast storage based on the MongoDB database server, through a ruby-based Web management interface , let's easily manage your logs.
1. Component Preparation
name
Component Name
Notes
1
Mongodb
1 Background and questions
With the advent of cloud computing, PAAs platforms, and the application of technologies such as virtualization and Docker, more and more services are deployed in the cloud. Usually, we need to get the log, for monitoring, analysis, forecasting, statistics and other work, but the cloud of services is not a physical fixed resources, log
1. Overview
In a distributed cluster environment, the log content of a single node tends to be stored on its own node, which has many problems. We need a unified log processing center to collect and centrally store logs, and to view and analyze them. The Twelve-factor app has recommendations for log processing.
The corresponding processing technology is now very
1 Background and questions
With the advent of cloud computing, PAAs platforms, virtualization, containerized technologies such as Docker, more and more services are deployed in the cloud. Usually, we need to get logs for monitoring, analysis, prediction, statistics and other work, but the cloud service is not a physical fixed resources, log access to increase the difficulty, the past can be SSH landing or F
1. The Docker container and the system time are inconsistent because the Docker container has a native time zone of 0 time zones, while the domestic system is in the East eight zone.2. There is also a eight-hour time difference between the log time played by the Java application running in the container and the standard time of the container obtained through the
java log Configuration
Syslog-ng process inside Docker
[Root@d390c7582ad7 syslog-ng]# Cat syslog-ng.conf @version: 3.2 # syslog-ng configuration file. # # should behave pretty much like the original syslog on RedHat.
But # it could is configured a lot smarter.
# # See Syslog-ng (8) and syslog-ng.conf (5) For more information.
# options {flush_lines (0);
Time_reopen (10);
Log_fifo_size (
Docker runs ACTIVEMQ, log time and container time as follows:
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/77/F4/wKioL1ZyPt-S8Yg9AAMaJK5fMJk997.png "title=" amq_ Time.png "alt=" Wkiol1zypt-s8yg9aamajk5fmjk997.png "/>d me to execute the date command a few minutes, from time to find the exact difference of 8 hours, suspected or time zone reasons.2. DoubtsA friend said that the host's/etc/lo
a new password, for example: 123456
Installing Vim,apt-get Install Vim-y
Install the openssh-server of the container, enter Apt-get install Openssh-server-y
After successful installation, Vim/etc/ssh/sshd_config, modify the following two configurations
Permitrootlogin YesUsepam No
Start SSH services, service ssh start
Exit the container, enter exit, then enter Docker ps-a to see the container ID
The commit container becomes the n
The basic skeleton of the Logrus and log principle (i) in Docker that was analyzed to the container's printout and log function is done in the Entry.log () function, and this Entry.log () also contains two parts: 1) via log Driver the hook function to record the log; 2) outp
learn Kubernetes in the order of chapters, and Master Kubernetes's theoretical knowledge and practical skills through the experiments in the tutorials.
Experienced OPS personnel can use this tutorial as a reference material to view relevant knowledge points in the actual work.
It is hoped that readers will be able to lay a solid foundation through this tutorial, to be able to operate the Kubernetes calmly, and to build a practical container management platform in combination with the a
Docker container Log Chinese garbled problem solving method
1. Find dockerfile files, such as/use/local/src/docker/dockerfile
2. Edit Dockerfile Add
ENV LANG en_US. UTF-8
env LANGUAGE en_us:en
env lc_all en_US. UTF-8
3. Generate a new mirrored file
4. Use Docker images to view newly generated
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.