其他分享
首页 > 其他分享> > SIP信令跟踪工具HOMER

SIP信令跟踪工具HOMER

作者:互联网

 

概述

HOMER是一款100%开源的针对SIP/VOIP/RTC的抓包工具和监控工具。

HOMER是一款强大的、运营商级、可扩展的数据包和事件捕获系统,是基于HEP/EEP协议的VoIP/RTC监控应用程序,并可以使用即时搜索、处理和存储大量的信令、RTC事件、日志和统计信息。

之前的文章中,我们介绍过一款针对SIP的抓包工具sngrep,相比来说,HOMER有更加成熟完善的架构和体系,包括后台的数据库存储和前台的web页面展示数据。

在我们的生产环境中,一直有使用HOMER来作为呼叫信令的收集和跟踪工具,只是版本比较老了,最近准备更新换代。

HOMER最新版本是HOMER7。

环境

CentOS  release 7.0 (Final)或以上版本

HOMER7

部署架构

图片来自官方介绍

 

 

 

CAPTURE AGENT,抓包终端,freeswitch、opensips这些常见的软交换都内置了该功能。

CAPTURE SERVER,抓包服务器,收集sip信令用的,老版本中使用kamailio,新版本更换了?

DATABASE,一般是mysql和postgres,没有用过时序数据库。

HOMER APP/API,web页面,提供给客户查看信息。

USERS,用户通过浏览器查看呼叫信令、统计信息等。

安装方式

在HOMER7的官方wiki中,安装方式有3种,手动安装,快速安装,docker安装。

根据文档标注的难易程度,我选择了easiest的docker安装。。。

安装docker

首先在centos7上安装docker工具。

yum remove  docker \

            docker-client \

            docker-client-latest \

            docker-common \

            docker-latest \

            docker-latest-logrotate \

            docker-logrotate \

            docker-selinux \

            docker-engine-selinux \

            docker-engine

 

yum install -y yum-utils device-mapper-persistent-data lvm2

yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

yum makecache fast

yum -y install docker-ce

systemctl start docker

安装docker-compose

docker-compose下载网址:https://github.com/docker/compose/releases

 

使用命令下载docker-compose。

curl -L https://github.com/docker/compose/releases/download/v2.4.1/docker-compose-linux-x86_64 > /usr/local/bin/docker-compose

chmod  777  /usr/local/bin/docker-compose

[root@localhost ~]# docker-compose -v

Docker Compose version v2.4.1

docker常用命令

docker version

docker images

docker ps

docker container ls

 

查看一下我们的docker版本。

[root@localhost ~]# docker version

Client: Docker Engine - Community

 Version:           20.10.14

 API version:       1.41

 Go version:        go1.16.15

 Git commit:        a224086

 Built:             Thu Mar 24 01:49:57 2022

 OS/Arch:           linux/amd64

 Context:           default

 Experimental:      true

 

Server: Docker Engine - Community

 Engine:

  Version:          20.10.14

  API version:      1.41 (minimum version 1.12)

  Go version:       go1.16.15

  Git commit:       87a90dc

  Built:            Thu Mar 24 01:48:24 2022

  OS/Arch:          linux/amd64

  Experimental:     false

 containerd:

  Version:          1.5.11

  GitCommit:        3df54a852345ae127d1fa3092b95168e4a88e2f8

 runc:

  Version:          1.0.3

  GitCommit:        v1.0.3-0-gf46b6ba

 docker-init:

  Version:          0.19.0

  GitCommit:        de40ad0

HOMER7安装

跟随HOMER7的官方安装指南。

git clone https://github.com/sipcapture/homer7-docker

cd  homer7-docker/heplify-server/hom7-prom-all

docker-compose up -d

一阵电闪雷鸣之后,安装完成。

[+] Running 11/11

 ⠿ Network hom7-prom-all_default           Created                                                                                                                                                                                    0.2s

 ⠿ Volume "hom7-prom-all_prometheus_data"  Created                                                                                                                                                                                    0.0s

 ⠿ Volume "hom7-prom-all_grafana_data"     Created                                                                                                                                                                                    0.0s

 ⠿ Container prometheus                    Started                                                                                                                                                                                    1.2s

 ⠿ Container loki                          Started                                                                                                                                                                                    1.3s

 ⠿ Container grafana                       Healthy                                                                                                                                                                                    2.8s

 ⠿ Container db                            Healthy                                                                                                                                                                                    4.7s

 ⠿ Container alertmanager                  Started                                                                                                                                                                                    1.2s

 ⠿ Container nodeexporter                  Started                                                                                                                                                                                    1.1s

 ⠿ Container homer-webapp                  Started                                                                                                                                                                                    5.1s

 ⠿ Container heplify-server                Started

 

测试

使用浏览器访问地址:http://192.168.0.151:9080/,输入默认的账号密码admin/sipcapture。

 

 

 

 

总结

HOMER的官方网站:http://sipcapture.org/

HOMER与freeswitch配合使用,搭建VOIP的业务平台,对平台的稳定和问题查错有非常大的帮助,极大的缩短发现问题的时间。

另外,HOMER也可以设置显示多个node节点的关联信令,以及通过收集RTCP信息来统计线路通话质量等等功能。

HOMER比SNGREP更强大,更易用。

下一次,我们介绍如何把freeswitch/opensips的信令上报HOMER平台,并通过WEB页面查看和搜索信令流​。

 

空空如常

求真得真

 

标签:HOMER,compose,Container,信令,SIP,version,docker
来源: https://www.cnblogs.com/qiuzhendezhen/p/16147547.html