fixed alarm query and column in db, added index on number and machine_group_id