#nginx_request_total
#counter line_counter by request_status_rp
gauge http_request_total_count by le
#counter http_request_total by le,request_status_rp, request_status_crm
gauge line_time
/^(?P<hostname>[0-9\.-]+)( - -)(?P<timestamp> \[\d{2}\/\w{3}\/\d{4}:\d{2}:\d{2}:\d{2} .\d{4}\])(?P<times> .\w{4} .OjotrehnetI\.ihta. HTTP.\d{1}.\d{1}. )(?P<request_status_rp>\d{3})( \d{3} )(.-. )(.Axis.\d{1}.\d{1}. .-..)(?P<request_time_rp>[+-]?([0-9]*[.])?[0-9]+)(. ..)(?P<request_time_crm>[+-]?([0-9]*[.])?[0-9]+)(. .)(?P<request_status_crm>\d{3})(. "." "\d{2,3}.\d{2,3}.\d{2,3}.\d{2,3}:\d{2,4}.)/{
#Here I count request http where request status code are greater than than 200 and less than 399
$request_status_rp>=200 && $request_status_rp<399{
http_request_total_count["success"]++
}
Here I count request http where request status code are greater than than 400 and less than 599
#request status failed
$request_status_rp>=400 && $request_status_rp<599{
http_request_total_count["Failed_rp"]++
}
#request time < 60s
#request time > 60s
$request_time_rp>=60{
line_time++
}else{
line_time=0
}
}