Metrics for optimal maintenance management