def METHOD_NAME(measure_stop_ceph_mgr):
    """
    Test that there is appropriate alert when ceph manager
    is unavailable and that this alert is cleared when the manager
    is back online.
    """
    api = prometheus.PrometheusAPI()
    # get alerts from time when manager deployment was scaled down
    alerts = measure_stop_ceph_mgr.get("prometheus_alerts")
    target_label = constants.ALERT_MGRISABSENT
    target_msg = "Storage metrics collector service not available anymore."
    states = ["pending", "firing"]
    prometheus.check_alert_list(
        label=target_label,
        msg=target_msg,
        alerts=alerts,
        states=states,
        severity="critical",
    )
    api.check_alert_cleared(
        label=target_label, measure_end_time=measure_stop_ceph_mgr.get("stop")
    )