百度智能云

All Product Document

          Log Service

          Introduction

          Using the example of logs continuously generated by a server, this document introduces the basic concepts and log collection process of Baidu Log Service (BLS).

          Basic concepts

          • Agent: An agent is a service component provided by the log service, installed within an instance. It ensures safe and reliable log collection, guarantees the normal operation of applications, and includes a comprehensive exception handling mechanism.
          • Token: A token is a verification string used to authenticate the user's identity. It is included in the agent's configuration file and must be securely stored.
          • Transmission task: A transmission task is a unit for executing and managing log services, allowing the configuration and management of log sources, delivery addresses, collection rules, and more.

          Operation process

          Log format

          The log service supports text-format logs encoded in UTF-8.

          Sample log information used in this document

          • The server's log files are stored in the /home/work/nginx_logs directory.
          • Each day's logs are saved in a separate file. The file being actively written to is named ".log", and a timestamp in the format ".yyyy-mm-dd" is appended to completed log files.

          Log information is as follows:

          	#ls -al /home/work/nginx_logs
           drwxr-xr-x.2 work work 4096 June   16 08:35 .
           drwxr-xr-x.3 work work 4096 June   5 08:35 .
           -rw-r--r--.1 work work 3396 June    16 08:35 access.log
           -rw-r--r--.1 work work 4843 June    12 12:34 access.log.2016-06-12
           -rw-r--r--.1 work work 9686 June    13 14:21 access.log.2016-06-13
           -rw-r--r--.1 work work 7322 June    14 10:35 access.log.2016-06-14
           -rw-r--r--.1 work work 7062 June    15 10:55 access.log.2016-06-15

          The file "access.log" refers to logs being written on June 16, 2016, while "access.log.2016-06-15" is a completed log file from June 15.

          Subsequent sections will cover the installation of agents and the creation of transmission tasks.

          Previous
          Product pricing
          Next
          Install agent