跳转到主要内容

FreeSWITCH用于Prometheus监控系统。

项目描述

Build Status Package Version

这是一个暴露从FreeSWITCH收集的信息供Prometheus监控系统使用的导出器。

安装

pip install prometheus-freeswitch-exporter

用法

usage: freeswitch_exporter [-h] [config] [port]

positional arguments:
  config      Path to configuration file (esl.yml)
  port        Port on which the exporter is listening (9724)
  address     Address to which the exporter will bind

optional arguments:
  -h, --help  show this help message and exit

为了在双栈机器上绑定IPv6和IPv4套接字,在< cite> ::地址参数中使用< cite> address

访问http://localhost:9724/esl?target=1.2.3.4,其中1.2.3.4是从FreeSWITCH获取度量值的IP地址。指定 module请求参数,以从配置文件中选择要使用的模块。

target请求参数默认为 localhost。因此,如果将 freeswitch_exporter直接部署在FreeSWITCH主机上,则可以省略 target

请参阅维基以获取更多示例和文档。

身份验证

示例 esl.yml

default:
    port: 8021  # default port, can be omitted
    password: ClueCon

FreeSWITCH 配置

出于安全原因,在 FreeSWITCH 中更改默认密码至关重要 autoload_configs/event_socket.conf.xml

Prometheus 配置

FreeSWITCH 导出器可以部署在 FreeSWITCH 节点上,也可以部署在单独的机器上。

在 FreeSWITCH 节点上运行的 FreeSWITCH 导出器的示例配置

scrape_configs:
  - job_name: 'freeswitch'
    static_configs:
      - targets:
        - 192.168.1.2:9724  # FreeSWITCH node with FreeSWITCH exporter.
        - 192.168.1.3:9724  # FreeSWITCH node with FreeSWITCH exporter.
    metrics_path: /esl
    params:
      module: [default]

在 Prometheus 主机上运行的 FreeSWITCH 导出器的示例配置

scrape_configs:
  - job_name: 'freeswitch'
    static_configs:
      - targets:
        - 192.168.1.2  # FreeSWITCH node.
        - 192.168.1.3  # FreeSWITCH node.
    metrics_path: /esl
    params:
      module: [default]
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - source_labels: [__param_target]
        target_label: instance
      - target_label: __address__
        replacement: 127.0.0.1:9724  # FreeSWITCH exporter.

Grafana 仪表板

尚未提供。

项目详情


下载文件

下载您平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源分布

prometheus-freeswitch-exporter-1.0.1.tar.gz (9.1 kB 查看哈希)

上传时间

构建分布

prometheus_freeswitch_exporter-1.0.1-py3-none-any.whl (13.2 kB 查看哈希)

上传时间 Python 3

支持者: