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
tree: c25ec18bcb32b4573096724359b5de0fae1422b8
  1. conf/
  2. dynamic-layers/
  3. meta-nuvoton-npcm8xx/
  4. recipes-bsp/
  5. recipes-connectivity/
  6. recipes-core/
  7. recipes-devtools/
  8. recipes-extended/
  9. recipes-google/
  10. recipes-kernel/
  11. recipes-phosphor/
  12. LICENSE
  13. README.md
README.md

meta-gbmc-staging

This repository contains additions to the openbmc/meta-google layer that are not yet ready for OpenBMC inclusion.

How to use this layer

  1. Clone openbmc/openbmc from GitHub.
  2. Clone this layer from GitHub into a subdirectory of openbmc.