Esempio n. 1
0
def dropcaches(host, r_session, **kwargs):
    """
    :param host: str
    :param r_session: requests.Session
    :return: dict
    """
    return utils.request_get(api_url(host), r_session, **kwargs)
Esempio n. 2
0
def filters(host, r_session, **kwargs):
    """
    :param host: str
    :param r_session: requests.Session
    :return: dict
    """
    return utils.request_get(api_url(host, pointer=ConfigPointer.FILTERS),
                             r_session, **kwargs)
Esempio n. 3
0
def version(host, r_session, **kwargs):
    """
    This endpoint returns information about the running version of OpenTSDB.

    :param host: str
    :param r_session: requests.Session
    :return: json
    """
    return utils.request_get(api_url(host), r_session, **kwargs)
Esempio n. 4
0
def aggregators(host, r_session, **kwargs):
    """
    Return all available tsdb aggregators
    :param r_session: requests.Session
    :param host: str
    :return: list
    """
    url = api_url(host)
    return utils.request_get(url, r_session, **kwargs)
Esempio n. 5
0
def jvm(host, r_session, **kwargs):
    """
    The threads endpoint is used for debugging the TSD's JVM process and includes
    stats about the garbage collector, system load and memory usage. (v2.2)

    :param host: str
    :param r_session: requests.Session
    :return: dict
    """
    return utils.request_get(api_url(host, pointer=StatsPointer.JVM),
                             r_session, **kwargs)
Esempio n. 6
0
def threads(host, r_session, **kwargs):
    """
    The threads endpoint is used for debugging the TSD and providing insight
    into the state and execution of various threads without having to resort
    to a JStack trace. (v2.2)

    :param host: str
    :param r_session: requests.Session
    :return: json
    """
    return utils.request_get(api_url(host, pointer=StatsPointer.THREADS),
                             r_session, **kwargs)
Esempio n. 7
0
def region_clients(host, r_session, **kwargs):
    """
    Returns information about the various HBase region server clients in AsyncHBase.
    This helps to identify issues with a particular region server. (v2.2)

    :param host: str
    :param r_session: requests.Session
    :return: json
    """
    return utils.request_get(
        api_url(host, pointer=StatsPointer.REGION_CLIENTS), r_session,
        **kwargs)
Esempio n. 8
0
def stats(host, r_session, **kwargs):
    """
    This endpoint provides a list of statistics for the running TSD.
    Sub endpoints return details about other TSD components such as the JVM,
    thread states or storage client. All statistics are read only.

    :param host: str
    :param r_session: requests.Session
    :return: dict
    """
    return utils.request_get(api_url(host, pointer=StatsPointer.STATS),
                             r_session, **kwargs)
Esempio n. 9
0
def query(host, r_session, **kwargs):
    """
    This endpoint can be used for tracking and troubleshooting queries executed
    against a TSD. It maintains an unbounded list of currently executing
    queries as well as a list of up to 256 completed queries (rotating the oldest
    queries out of memory). Information about each query includes the
    original query, request headers, response code, timing and an exception
    if thrown. (v2.2)

    :param host: str
    :param r_session: requests.Session
    :return: json
    """
    return utils.request_get(api_url(host, pointer=StatsPointer.QUERY),
                             r_session, **kwargs)
Esempio n. 10
0
def tsdb_configuration(host, r_session, **kwargs):
    return utils.request_get(api_url(host, pointer=ConfigPointer.CONFIG),
                             r_session, **kwargs)