Ah ok. The problem for the prometheus format is that your app is declared in the collect server to monitor several instances as only one app. That is one app added in the collect server, with several URL targets.
In that case, the collect server doesn't know how to export that in the prometheus format: consider the javamelody_system_tmp_space_free_bytes metric: the collect server can't export this metric for one instance and then at the same time export the same metric with the same name for another instance in the same app. The prometheus exporter in the collect server don't know how to export metrics several times, neither to "aggregate" those metrics between several instances which may not make much sense sometimes.
Sorry for this restriction.
So, if you can for those instances and if it is worth the configuration, I suggest that you add each instance as a separate app in the collect server (and not several instances as a single app). Then you can declare in prometheus a scrape config for each separated app in the collect server. I think that is what you want to have alerts in grafana on the metrics per instance. (If the number of instances varies frequently, I don't know if you can do all that automatically and I would be happy to hear it.)
And if you want, you can also add an "aggregated app" in the collect server from the separately added apps, to replace
the.app you have at the moment.
bye,
Emeric