port ZEN-14319

original commit https://github.com/Zenoss/4.2.5-RPS/commit/35d32c02c653c1292c40055fe81d226a1367036a