Files
asterisk/res/prometheus/prometheus_internal.h
Matt Jordan ed6cd13b5b res_prometheus: Add Asterisk endpoint metrics
This patch adds basic Asterisk endpoint statistics to the res_prometheus
module. This includes:

* asterisk_endpoints_state: The current state (unknown, online, offline)
  for each defined endpoint.

* asterisk_endpoints_channels_count: The current number of channels
  associated with a given endpoint.

* asterisk_endpoints_count: The current number of defined endpoints.

In all cases, enough information is provided with each endpoint metric
to determine a unique instance of Asterisk that provided the data, as well
as the underlying technology and resource definition.

ASTERISK-28403

Change-Id: I46443963330c206a7d12722d08dcaabef672310e
2019-05-21 20:47:50 -05:00

50 lines
1.2 KiB
C

/*
* Prometheus Internal API
*
* Copyright (C) 2019 Sangoma, Inc.
*
* Matt Jordan <mjordan@digium.com>
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
* any of the maintainers of this project for assistance;
* the project provides a web site, mailing lists and IRC
* channels for your use.
*
* This program is free software, distributed under the terms of
* the GNU General Public License Version 2. See the LICENSE file
* at the top of the source tree.
*/
#ifndef PROMETHEUS_INTERNAL_H__
#define PROMETHEUS_INTERNAL_H__
/*!
* \file prometheus_internal
*
* \brief Prometheus Metric Internal API
*
* This module provides internal APIs for \file res_prometheus.
* It should not be used outsize of that module, and should
* typically only provide intialization functions for units that
* want to register metrics / handlers with the core API.
*/
/*!
* \brief Initialize channel metrics
*
* \retval 0 success
* \retval -1 error
*/
int channel_metrics_init(void);
/*!
* \brief Initialize endpoint metrics
*
* \retval 0 success
* \retval -1 error
*/
int endpoint_metrics_init(void);
#endif /* #define PROMETHEUS_INTERNAL_H__ */