Open senattcsgit opened 3 years ago
Please post your configuration and an example log line so I can have a look.
here you go Log lines: 100.13.33.20 - - [26/Jan/2021:05:53:34 +0000] "GET /api/services/v1/accounts/8327522766/change HTTP/1.1" 200 975 "https://www.shop.dummy.com/shop/phones/details/Samsung/xxxxx" "Mozilla/5.0 (Linux; Android 10; LM-K500) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.4147.125 Mobile Safari/537.36" 0.125 "0.000" "0.122" "0.122" "200" "20503980" "3" "1.2.3.4:443" "www.shop.dummy.com"
100.13.33.20 - - [26/Jan/2021:05:53:35 +0000] "GET /api/services/v1/accounts/10075227667/change HTTP/1.1" 200 975 "https://www.shop.dummy.com/shop/phones/details/Samsung/xxxxx" "Mozilla/5.0 (Linux; Android 10; LM-K500) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Mobile Safari/537.36" 0.125 "0.000" "0.122" "0.122" "200" "20503980" "3" "1.2.3.4:443" "www.shop.dummy.com"
My goal is count no of invocations for /api/services/v1/accounts API.
pattern: %{IP:remote_addr} %{NOTSPACE:random1} %{NOTSPACE:remote_user} [%{HTTPDATE:time}] \"%{NOTSPACE:method} %{URIPATH:uri} %{NOTSPACE:protocol}\" %{INT:status} %{INT:body_bytes_sent} %{NOTSPACE:http_referer} \"%{DATA:http_user_agent}\" %{NOTSPACE:request_time} \"%{NOTSPACE:upstream_connect_time}\" \"%{NOTSPACE:upstream_header_time}\" \"%{NOTSPACE:upstream_response_time}\" \"%{NOTSPACE:upstream_status}\" \"%{NOTSPACE:connection}\" \"%{NOTSPACE:connection_requests}\" \"%{NOTSPACE:upstream_addr}\" \"%{NOTSPACE:http_host}\"
global: config_version: 2 input: type: file path: /opt/app/logs/access.log readall: false # Read from the beginning of the file? False means we start at the end of the file and read only new lines. grok: patterns_dir: /opt/app/grok/patterns metrics:
@fstab any help on this? Appreciate any help on this topic
Any help on this topic? I tried several things , but its increasing my grok's CPU usage
ANy help?
Hello All- I have bunch of rest endpoint URIs with order numbers in it and they are quickly filling up my prometheus.
for e.g /order/status/101 , /order/status/102
and if I try to count the invocations on that URI- each order is a unique record for prometheus and filling it up. How do I just read until /order/status?