The current comparison for configured threshold values is not type-safe and thus ignores the not so un-common threshold of 0. Attached patch fixes the issue.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

fago created an issue. See original summary.

fago’s picture

miro_dietiker’s picture

Oopsie... Interestingly we never needed that "not-so-uncommon" threshold value ;-) - but sure!

Status: Needs review » Needs work

The last submitted patch, 2: d7_monitoring-0-values.patch, failed testing.

miro_dietiker’s picture

Does this threshold problem also apply for 8.x?

a.milkovsky’s picture

Status: Needs work » Needs review
FileSize
4.2 KB
900 bytes

There was a typo. Fixed the patch in #2

a.milkovsky’s picture

fago’s picture

Status: Needs review » Reviewed & tested by the community

ops, too many parentheses. Good to have test coverage! Thanks, a.milkovsky - I think this is ready now.

Berdir’s picture

This looks good, but tests would definitely be helpful here, we added some to the D8 port, should be possible to backport them to 7.x

  • Berdir committed 0de4ed0 on 7.x-1.x authored by a.milkovsky
    Issue #2684191 by a.milkovsky, fago: Sensors ignore thresholds of 0
    
Berdir’s picture

Title: Sensors ignore thresholds of 0 » [Needs tests] Sensors ignore thresholds of 0
Status: Reviewed & tested by the community » Needs work
Issue tags: +Novice

Decided to commit and keeping open for tests. Maybe someone will pick this up. Tagging as novice, it is not trivial but the tests have been written, they just need to be applied from the other issue.