bmcweb: Add authz timing and counters from bmcweb
Bug fix: count authz timing and counters from
bmcweb routing and query code. Original gRPC
stats only recorded timing and counter from
gRPC layer code. But some gRPC related authz
takes place in bmcweb code.
Also fixed missing AuthorizationLatencyMs property.
Needs corresponding change in grpc-redfish:
cr/531432519.
TESTED: Built for izumi. Tested using gRPC guitar test against
on BMC without test authz msv installed. Verified against logs
that requested URL wasn't authorized, verified against
gRPCStatistics that failed authz count incremented as expected.
curl -u root@${MACHINE_NAME}-nfd01 -X GET "http://${bmc}/redfish/v1/Managers/bmc/ManagerDiagnosticData/Oem/Google/GooglegRPCStatistics"
{
"@odata.id": "/redfish/v1/Managers/bmc/ManagerDiagnosticData/Oem/Google/GooglegRPCStatistics",
"@odata.type": "#GooglegRPCStatistics.v1_0_0.GooglegRPCStatistics",
"AuthenticatedCount": 1020,
"AuthenticatedFailCount": 0,
"AuthenticationLatencyMs": 140,
"AuthorizationLatencyMs": 380,
"AuthorizedCount": 2181,
"AuthorizedFailCount": 2,
"HTTPMethods": [
{
"Count": 3,
"Method": 4
},
{
"Count": 1017,
"Method": 2
}
],
"HTTPResponseCodes": [
{
"Count": 2,
"StatusCode": 401
},
{
"Count": 1018,
"StatusCode": 200
}
],
"Id": "GooglegRPCStatistics",
"Name": "Google gRPC Statistics",
"ProcessingLatencyMs": 343870,
"QueueLatencyMs": 0,
"RequestLatencyMs": 80,
"ResponseLatencyMs": 3030,
"gRPCInitLatencyMs": 950,
"gRPCResponseCodes": [
{
"Count": 1020,
"StatusCode": 0
}
]
BUG: 273341948
Change-Id: Ib3d00be9f7fc80171df95ff6e5ef6d7dc42f83cf
Signed-off-by: Nancy Yuen <yuenn@google.com>
4 files changed