· 9 years ago · Sep 12, 2016, 05:08 PM
1# Total requests
2
3Every 10 seconds, gorouter emits `total_requests` which is a total running count of requests processed
4
5Looking at the firehose, using NOAA:
6```
7$ CF_ACCESS_TOKEN=`cf oauth-token |grep bearer` go run firehose_sample/main.go |grep total_req
8```
9output
10```
11origin:"gorouter" eventType:CounterEvent timestamp:1473693210501820123 deployment:"toque" job:"router_z1" index:"56a1fe06-bd35-4b3e-8860-3ef6f32bb718" ip:"10.10.2.70" counterEvent:<name:"total_requests" delta:4 total:4777968 >
12origin:"gorouter" eventType:CounterEvent timestamp:1473693220501571248 deployment:"toque" job:"router_z1" index:"56a1fe06-bd35-4b3e-8860-3ef6f32bb718" ip:"10.10.2.70" counterEvent:<name:"total_requests" delta:1 total:4777969 >
13origin:"gorouter" eventType:CounterEvent timestamp:1473693225501786848 deployment:"toque" job:"router_z1" index:"56a1fe06-bd35-4b3e-8860-3ef6f32bb718" ip:"10.10.2.70" counterEvent:<name:"total_requests" delta:101 total:4778070 >
14origin:"gorouter" eventType:CounterEvent timestamp:1473693230502196942 deployment:"toque" job:"router_z1" index:"56a1fe06-bd35-4b3e-8860-3ef6f32bb718" ip:"10.10.2.70" counterEvent:<name:"total_requests" delta:200 total:4778270 >
15origin:"gorouter" eventType:CounterEvent timestamp:1473693235501498736 deployment:"toque" job:"router_z1" index:"56a1fe06-bd35-4b3e-8860-3ef6f32bb718" ip:"10.10.2.70" counterEvent:<name:"total_requests" delta:196 total:4778466 >
16origin:"gorouter" eventType:CounterEvent timestamp:1473693240502612272 deployment:"toque" job:"router_z1" index:"56a1fe06-bd35-4b3e-8860-3ef6f32bb718" ip:"10.10.2.70" counterEvent:<name:"total_requests" delta:6 total:4778472 >
17```
18
19
20# Latency per request
21
22gorouter emits `latency` per request processed, which is a the time in `ms` which represents the latency in calls to backend app
23
24Looking at the firehose, using NOAA:
25```
26$ CF_ACCESS_TOKEN=`cf oauth-token |grep bearer` go run firehose_sample/main.go |grep "\"latency\""
27```
28output
29```
30origin:"gorouter" eventType:ValueMetric timestamp:1473696209369508761 deployment:"toque" job:"router_z1" index:"56a1fe06-bd35-4b3e-8860-3ef6f32bb718" ip:"10.10.2.70" valueMetric:<name:"latency" value:10 unit:"ms" >
31origin:"gorouter" eventType:ValueMetric timestamp:1473696221436492689 deployment:"toque" job:"router_z1" index:"56a1fe06-bd35-4b3e-8860-3ef6f32bb718" ip:"10.10.2.70" valueMetric:<name:"latency" value:10 unit:"ms" >
32origin:"gorouter" eventType:ValueMetric timestamp:1473696223227112843 deployment:"toque" job:"router_z1" index:"56a1fe06-bd35-4b3e-8860-3ef6f32bb718" ip:"10.10.2.70" valueMetric:<name:"latency" value:8 unit:"ms" >
33origin:"gorouter" eventType:ValueMetric timestamp:1473696236443327844 deployment:"toque" job:"router_z1" index:"56a1fe06-bd35-4b3e-8860-3ef6f32bb718" ip:"10.10.2.70" valueMetric:<name:"latency" value:7 unit:"ms" >
34origin:"gorouter" eventType:ValueMetric timestamp:1473696239407365521 deployment:"toque" job:"router_z1" index:"56a1fe06-bd35-4b3e-8860-3ef6f32bb718" ip:"10.10.2.70" valueMetric:<name:"latency" value:9 unit:"ms" >
35```