bug #2544: Use REPLACE to insert monitoring values

(cherry picked from commit dc79dd2c38b4a55f571891c1b6cd46c638a5df55)