Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

562
Visualizações
AWS Cloudwatch Metrics - How to Format a Number in Dashboard Metric to more than two decimal places

I'm building a metric for the success rate of my API gateway and I'm trying to get more that 1-2 decimal places. I want to make sure that less than 99.9999% are successful. (Ultimately to set an alarm), but I would like to show this detail in the dashboard.

Is there some kind of value formatting syntax available. I have been digging around in the docs and haven't found anything.

{
    "metrics": [
        [ { "expression": "100*(1-(m1+m2/m3))", "label": "Success Rate", "id": "e1" } ],
        [ "AWS/ApiGateway", "4XXError", "ApiName", "my_webhook_api", "Stage", "prod", { "id": "m1", "visible": false } ],
        [ ".", "5XXError", ".", ".", ".", ".", { "id": "m2", "visible": false } ],
        [ ".", "Count", ".", ".", ".", ".", { "id": "m3", "visible": false } ]
    ],
    "view": "singleValue",
    "region": "us-west-2",
    "stat": "Sum",
    "period": 2592000,
    "setPeriodToTimeRange": true
}

Basically, I want the picture below to say 99.8XXXXX (6 decimal places)

AWS Metric Widget Should say 99.8xxxxx

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

In the new-style CloudWatch UI (activated by the "Try out the new interface" link in the top-right corner) there's an Options tab where there's an option to "Show as many digits as can fit, before rounding", see the screenshot: CloudWatch Number graph options

As an alternative, open the Source tab and add the following option to the top-level object (in the provided example this can be after the line with setPeriodToTimeRange): "singleValueFullPrecision": true.

This doesn't let you control the number of decimal digits, but achieves the goal of displaying numbers with high precision.

over 4 years ago · Santiago Trujillo Relatório

0

You should be able to accomplish this with Metric Math. Multiply by 1000000 FLOOR the result to get an integer then divide by 1000000 to get a floating point number again.

FLOOR(1000000*(100*(1-(m1+m2/m3))))/1000000)
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda