def METHOD_NAME(query, hostname, enumerate=None, service=None):
    """
    Send query along to Nagios.
    """
    config = _config()
    data = None
    params = {
        "hostname": hostname,
        "query": query,
    }
    ret = {"result": False}
    if enumerate:
        params["formatoptions"] = "enumerate"
    if service:
        params["servicedescription"] = service
    if config["username"] and config["password"] is not None:
        auth = (
            config["username"],
            config["password"],
        )
    else:
        auth = None
    try:
        result = salt.utils.http.query(
            config["url"],
            method="GET",
            params=params,
            decode=True,
            data=data,
            text=True,
            status=True,
            header_dict={},
            auth=auth,
            backend="requests",
            opts=__opts__,
        )
    except ValueError:
        ret["error"] = "Please ensure Nagios is running."
        ret["result"] = False
        return ret
    if result.get("status", None) == http.client.OK:
        try:
            ret["json_data"] = result["dict"]
            ret["result"] = True
        except ValueError:
            ret["error"] = "Please ensure Nagios is running."
    elif result.get("status", None) == http.client.UNAUTHORIZED:
        ret["error"] = "Authentication failed. Please check the configuration."
    elif result.get("status", None) == http.client.NOT_FOUND:
        ret["error"] = "URL {} was not found.".format(config["url"])
    else:
        ret["error"] = "Results: {}".format(result.text)
    return ret