[global_tags] cluster_name = "Cluster01" host_name = "node-1" host_ip = "192.168.1.5" [agent] interval = "5s" [[inputs.logparser]] files = ["/var/log/nginx/access.log"] from_beginning = false [inputs.logparser.grok] patterns = ['%{NOTSPACE:remote_addr} - %{NOTSPACE:remote_user} \[%{NOTSPACE:timestamp} %{NOTSPACE:time_zone}\] \"%{NOTSPACE:http_method} %{NOTSPACE:uri} %{NOTSPACE:http_version}\" %{NUMBER:status:int} %{NUMBER:request_length:int} %{NUMBER:body_bytes_sent:int} \"%{NOTSPACE:http_referer}\" %{QUOTEDSTRING:http_user_agent} \"%{NOTSPACE:http_x_forwarded_for}\" \"%{NUMBER:request_time:float}\"'] measurement = "nginx_access_log" [[inputs.logparser]] files = ["/var/log/nginx/access.log"] from_beginning = false [inputs.logparser.grok] custom_patterns = ''' SWIFT_API_PREFIX swift\/v1\/ CEPH_BUCKET [^\/]+ ''' patterns = ['%{NOTSPACE:remote_addr} - %{NOTSPACE:remote_user} \[%{NOTSPACE:timestamp} %{NOTSPACE:time_zone}\] \"GET \/%{SWIFT_API_PREFIX:bucket:tag}%{CEPH_BUCKET:bucket:tag}\/%{NOTSPACE:file}.* %{NOTSPACE:http_version}\" %{NUMBER:status:int} %{NUMBER:request_length:int} %{NUMBER:body_bytes_sent:int} \"%{NOTSPACE:http_referer}\" %{QUOTEDSTRING:http_user_agent} \"%{NOTSPACE:http_x_forwarded_for}\" \"%{NUMBER:request_time:float}\"'] measurement = "nginx_download_log" [[inputs.logparser]] files = ["/var/log/nginx/access.log"] from_beginning = false [inputs.logparser.grok] custom_patterns = ''' SWIFT_API_PREFIX swift\/v1\/ CEPH_BUCKET [^\/]+ ''' patterns = ['%{NOTSPACE:remote_addr} - %{NOTSPACE:remote_user} \[%{NOTSPACE:timestamp} %{NOTSPACE:time_zone}\] \"PUT \/%{SWIFT_API_PREFIX:bucket:tag}%{CEPH_BUCKET:bucket:tag}\/%{NOTSPACE:file} %{NOTSPACE:http_version}\" %{NUMBER:status:int} %{NUMBER:request_length:int} %{NUMBER:body_bytes_sent:int} \"%{NOTSPACE:http_referer}\" %{QUOTEDSTRING:http_user_agent} \"%{NOTSPACE:http_x_forwarded_for}\" \"%{NUMBER:request_time:float}\"'] measurement = "nginx_upload_log" [[inputs.logparser]] files = ["/var/log/nginx/access.log"] from_beginning = false [inputs.logparser.grok] custom_patterns = ''' SWIFT_API_PREFIX swift\/v1\/ CEPH_BUCKET [^\/]+ ''' patterns = ['%{NOTSPACE:remote_addr} - %{NOTSPACE:remote_user} \[%{NOTSPACE:timestamp} %{NOTSPACE:time_zone}\] \"DELETE \/%{SWIFT_API_PREFIX:bucket:tag}%{CEPH_BUCKET:bucket:tag}\/%{NOTSPACE:file} %{NOTSPACE:http_version}\" %{NUMBER:status:int} %{NUMBER:request_length:int} %{NUMBER:body_bytes_sent:int} \"%{NOTSPACE:http_referer}\" %{QUOTEDSTRING:http_user_agent} \"%{NOTSPACE:http_x_forwarded_for}\" \"%{NUMBER:request_time:float}\"'] measurement = "nginx_delete_log"