Dash in the claim name is a problem for jmespath. You need to enclose it in quotes. Try:
role_attribute_path: contains('"user-roles[*]"', 'monitoring') && 'Editor' || 'Viewer'
CLI test:
$ echo '{"sub":"9f01d6ac-920e-442b-8bae-aa12e748732e","email_verified":false,"user-roles":["offline_access","uma_authorization"],"name":"Viewer Grafana","preferred_username":"test-viewer","given_name":"Viewer","family_name":"Grafana","email":"test-viewer@"}' | jp "contains('\"user-roles[*]\"', 'monitoring') && 'Editor' || 'Viewer'"
"Viewer"
Or you can customize claim name user-roles
in your IdP (it looks like a Keycloak).