Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metrics do not display zero-values correctly #1460

Closed
echlebek opened this issue May 7, 2018 · 0 comments
Closed

Metrics do not display zero-values correctly #1460

echlebek opened this issue May 7, 2018 · 0 comments
Assignees
Labels

Comments

@echlebek
Copy link
Contributor

echlebek commented May 7, 2018

Expected Behavior

I expect to see

      "points": [
        {
          "name": "percent_packet_loss",
          "value": 0,
          "timestamp": 1525723224,
          "tags": []
        },
        {
          "name": "rta",
          "value": 0.8,
          "timestamp": 1525723224,
          "tags": []
        }
      ]

Current Behavior

I see:

      "points": [
        {
          "name": "percent_packet_loss",
          "timestamp": 1525723224,
          "tags": []
        },
        {
          "name": "rta",
          "value": 0.8,
          "timestamp": 1525723224,
          "tags": []
        }
      ]

Possible Solution

Remove omitempty json tag from the generated datatype.

Steps to Reproduce (for bugs)

  1. create a check that emits PING ok - Packet loss = 0%, RTA = 0.80 ms | percent_packet_loss=0, rta=0.80 with a metric format of nagios_perfdata.
  2. List the generated event in JSON format.

Context

Bug filed while doing beta QA.

Your Environment

  • Sensu version used: e91bfb3
  • Build and run method: ./build.sh docker, docker-compose up
  • Operating System and version: Fedora 26
@echlebek echlebek added the bug label May 7, 2018
@echlebek echlebek changed the title Nagios metric extraction does not display zero-valued metrics correctly Metrics do not display zero-values correctly May 7, 2018
@echlebek echlebek self-assigned this May 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants