文件操作 - squidlog.conf
返回文件管理
返回主菜单
删除本文件
文件: /opt/netdata/usr/lib/netdata/conf.d/go.d/squidlog.conf
编辑文件内容
# netdata go.d.plugin configuration for squidlog # # This file is in YaML format. Generally the format is: # # name: value # # There are 2 sections: # - GLOBAL # - JOBS # # # [ GLOBAL ] # These variables set the defaults for all JOBs, however each JOB may define its own, overriding the defaults. # # The GLOBAL section format: # param1: value1 # param2: value2 # # Currently supported global parameters: # - update_every # Data collection frequency in seconds. Default: 1. # # - autodetection_retry # Re-check interval in seconds. Attempts to start the job are made once every interval. # Zero means not to schedule re-check. Default: 0. # # - priority # Priority is the relative priority of the charts as rendered on the web page, # lower numbers make the charts appear before the ones with higher numbers. Default: 70000. # # # [ JOBS ] # JOBS allow you to collect values from multiple sources. # Each source will have its own set of charts. # # IMPORTANT: # - Parameter 'name' is mandatory. # - Jobs with the same name are mutually exclusive. Only one of them will be allowed running at any time. # # This allows auto detection to try several alternatives and pick the one that works. # Any number of jobs is supported. # # The JOBS section format: # # jobs: # - name: job1 # param1: value1 # param2: value2 # # - name: job2 # param1: value1 # param2: value2 # # - name: job2 # param1: value1 # # # [ List of JOB specific parameters ]: # - path # The path to web server log file, can use wildcard. # Syntax: # path: /path/to/log/file # path: /path/to/log/*.log # # - exclude_path # The path to be excluded, can use wildcard. # Syntax: # exclude_path: *.tar.gz # # - log_type # One of supported log types: csv, ltsv, regexp. # Syntax: # log_type: csv/ltsv/regexp # # - csv_config # CSV log type specific parameters. # Syntax: # csv_config: # format: 'format' # Defines log format. # fields_per_record: -1 # The number of expected fields per record. If set to positive, csv parser requires # each record to have the given number of fields. If set to 0, csv parser sets it to # the number of fields in the first record, so that future records must have the same # field count. If fields_per_record is negative, no check is made and records may have # a variable number of fields. # delimiter: ' ' # Field delimiter. # trim_leading_space: yes/no # If set to true, leading white space in a field is ignored. # # - ltsv_config # LTSV log type specific parameters. # Syntax: # ltsv_config: # field_delimiter: ' ' # Fields delimiter. # value_delimiter: ':' # Label-value pairs delimiter. # mapping: # Label field mapping. # label1: field1 # label2: field2 # # - regexp_config # RegExp log type specific parameters. # Pattern syntax: https://golang.org/pkg/regexp/syntax/. # Syntax: # regexp_config: # pattern: pattern # Pattern. It is mandatory to have subexpressions names in the pattern. # # # [ JOB defaults ]: # exclude_path: *.gz # log_type: csv # csv_config: # format: '- resp_time client_address result_code resp_size req_method - - hierarchy mime_type' # fields_per_record: -1 # delimiter: ' ' # trim_leading_space: yes # # # [ JOB mandatory parameters ]: # - name # - path # # ------------------------------------------------MODULE-CONFIGURATION-------------------------------------------------- # [ GLOBAL ] # update_every: 1 # autodetection_retry: 0 # priority: 70000 # # # [ JOBS ] jobs: - name: squidlog path: /var/log/squid/access.log - name: squidlog path: /var/log/squid3/access.log
修改文件时间
将文件时间修改为当前时间的前一年
删除文件