import requests


def get_metric_data(url, metric):
    """Get metric data from Prometheus

    Args:
        url (str): Prometheus URL
        metric (str): Name of the metric

    Returns:
        dict: Dictionary for the metric data

    """
    response = requests.get(f'{url}/api/v1/query', params={"query": metric})
    data = response.json()['data']
    return data