MySQL Index Fragmentation
For InnoDB tables, this is both possible and redundant.
It is possible using Percona Server's INNODB_INDEX_STATS table in INFORMATION_SCHEMA. This table shows you the number of pages per index in an InnoDB tables.

Well, apparently InnoDB manages its own pages very well. Upon purging of data it merges back its index nodes. I have done multiple tests to verify that an OPTIMIZE TABLE -- a complete rebuild of the table -- does not actually improve on index fragmentation.

Please see my post on the subject.

By the way, I believe MySQL 5.6 has a similar table built-in.

With regard MyISAM tables, I'm unaware that there's any way of looking at the fragmentation.