monitoring: Fix setting a resource on a backend

The resources were indexed by integers instead of the resource names.