The JMX stats of the core do not expose the shard name that it is hosting, which could be of use.
I could not find any tests that cover the SolrCore.getStatistics call, so this patch only adds the core name to the stats if possible.
I've added collection as well and wrote a couple tests for this - I'll commit shortly.
This can cause a small issue - in cloud mode, when you want to auto shard, jmx 'stuff' tries to access shard and blows up because it is null in getStats. I'll make a small change so that when shard is null it shows up as auto in getStats.
FYI - the 'blowup' is simply a warning in the logs - and probably loss of some info in jmx that would normally be loaded after (if there was any left).