隧道安全监控报警系统最大的作用是什么?

隧道安全监控报警系统最大的作用是什么?,第1张

1.告警精确度高

智能视频分析系统内置智能算法,能排除气候与环境因素的干扰,有效弥补人工监控的不足,减少视频监控系统整体的误报率和漏报率。

2.实时识别报警

基于智能视频分析和深度学习神经网络技术,对隧道监控区域内的异常行为进行监测,报警信息可显示在监控客户端界面,也可将报警信息推送到移动端。

3.全天候运行 稳定可靠

智能视频监控系统可对监控画面进行7×24不间断的分析,大大提高了视频资源的利用率,减少人工监控的工作强度。

4.告警存储功能

对隧道监控区域内的异常行为实时识别预警,并将报警信息存储到服务器数据库中,包括时间、地点、快照、视频等。

步骤1:确定视频传输通道

由于查看视频监控服务器的画面需要通过网络传输,因此视频监控服务器必须能连接互联网。在这之前为了能正常访问视频监控服务器,必须解决一个问题--如何从外部网络访问视频监控服务器。一般来说,监控服务器的联网方法有两种。一种是直接由监控服务器电脑拨号上网,这种联网方式比较简单,只要监控服务器成功运行,然后拨号上网,再运行动态域名解析软件和视频监控软件即可。另一种方法主要针对使用路由器上网的电脑进行端口映射,要想从外网访问,就必须给内网分配一个外网IP地址。因此必须申请动态域名解析服务。[fenye]

步骤2:监控设备的选择

设置完网络参数,接着搭建视频监控服务器。视频监控服务器就是一台配有摄像头且可以上网的电脑。由于需要长时间开机,因此要求电脑稳定性较高、功耗较低。笔者在客厅放置的视频监控服务器选用的是整合凌动CPU的小型主板,并配有静音风扇。软件方面,可以使用Webcamxp充当视频监控软件客户端

步骤3:确定音/视频源

为了让用户能够访问视频摄像头,还需要对客户端软件的视频和音频监控源进行设置,在视频监控软件的“sources monitor”选项卡的“tools/options”中有两个类别,分别是音频源(audio source)和视频源(video source),可在此设定对应的摄像头设备和麦克风设备。

步骤4:建立外部监控通道

由于用户要通过网络查看视频监控服务器上的监控视频,因此接下来要把客户端软件获取的视频和音频对外发布。可通过客户端软件的“web/broadcast”选项卡中的“内部http服务器”选项进行设置。

如果直连互联网,可以使用“搜索WAN IP”选项,勾选“启动时检测WAN IP”选项,这样客户端软件会自动获取视频监控服务器的公网IP。如果使用宽带路由器进行联网,则在软件的“内部IP地址”中输入手动分配给该视频监控服务器的内网IP地址,并关闭“启动时检测WAN IP”选项。完成这些设置后,点击WEB Server按钮即可启动对外广播功能。

经过以上设置后,只要在任何一台已经连接网络的电脑上输入自己申请的域名,即可看到家中情况。

更多参考艾维音响网

Ganglia 监控软件主要是用来监控系统性能的软件,如:cpu 、mem、硬盘利用率, I/O负载、网络流量情况等,通过曲线很容易见到每个节点的工作状态,对合理调整、分配系统资源,提高系统整体性能起到重要作用。支持浏览器方式访问,但 不能监控节点硬件技术指标ganglia 是分布式的监控系统,有两个Daemon, 分别是:客户端Ganglia Monitoring Daemon (gmond)

和服务端Ganglia Meta Daemon (gmetad),还有Ganglia PHP Web Frontend(基于web的动态访问方式)组成。是一个Linux下图形化监控系统运行性能的软件,界面美观、丰富,功能强大。RRDtool是系统 存放和显示time-series (即网络带宽、温度、人数、服务器负载等) 。并且它提出有用的图表由处理数据强制执行有些数据密度。

一、安装RRDTool

gmetad需要先安装RRDTool,安装路径:/usr/local/rrdtool

rrdtool安装需要下面的库文件,如果没有请进行安装。

pkgconfig安装

./configure --prefix=/usr/local/pkgconfig CFLAGS="-O3 -fPIC"

zlib安装

./configure --prefix=/usr/local/zlib CFLAGS="-O3 -fPIC" --shared

libpng安装

env CFLAGS="-O3 -fPIC" ./configure --prefix=/usr/local/libpng

freetype安装

./configure --prefix=/usr/local/freetype CFLAGS="-O3 -fPIC"

LibXML2安装

./configure --prefix=/usr/local/libxml2 CFLAGS="-O3 -fPIC"

fontconfig安装

fontconfig-2.4.2.tar.gz

./configure --prefix=/usr/local/fontconfig --with-freetype-config=/usr/local/freetype/bin/freetype-config

Pixman安装

./configure --prefix=/usr/local/pixman CFLAGS="-O3 -fPIC"

Cairo安装

./configure --prefix=$INSTALL_DIR --enable-xlib=no --enable-xlib-xrender=no --enable-win32=no CFLAGS="-O3 -fPIC"

Glib安装

glib-2.20.1.tar.bz2

./configure --prefix=/usr/local/glib CFLAGS="-O3 -fPIC"

pango安装

pango-1.21.1.tar.bz2

需要PKG_CONFIG_PATH,就的指定相应的路径

PKG_CONFIG_PATH=/usr/local/cairo/lib/pkgconfig:/usr/local/glib/lib/pkgconfig:/usr/local/pixman/lib/pkgconfig:/usr/local/freetype/lib/pkgconfig:/usr/local/fontconfig/lib/pkgconfig

export PKG_CONFIG_PATH

然后执行

./configure --prefix=/usr/local/pango --without-x

rrdtool安装

需要PKG_CONFIG_PATH,就的指定相应的路径

PKG_CONFIG_PATH=/usr/local/cairo/lib/pkgconfig:/usr/local/glib/lib/pkgconfig:/usr/local/pixman/lib/pkgconfig:/usr/local/freetype/lib/pkgconfig:/usr/local/fontconfig/lib/pkgconfig:/usr/local/pango/lib/pkgconfig

export PKG_CONFIG_PATH

./configure --prefix=/usr/local/rrdtool --disable-tcl --disable-python

二、安装所需软件,如果系统没有请您先下载安装.如果有软件已安装可以略过

apr

apr-util

http://apr.apache.org/

confuse

http://bzero.se/confuse/

expat

http://sourceforge.net/project/showfiles.php?group_id=10127

python

http://www.python.org/download/linux/

rrdtool

http://oss.oetiker.ch/rrdtool/

ganglia

http://ganglia.info

第二步:安装所下载的软件,

*1)安装expat-2.0.1.tar.gz 大多数Linux 发行版在默认安装的情况下就已经提供了

tar zxvf expat-2.0.1.tar.gz

cd expat

./configure --prefix=/usr/local/expat

make

make install

2)安装apr-1.3.3.tar.gz

tar zxvf apr-1.3.3.tar.gz

cd apr-1.3.3

./configure --prefix=/usr/local/apr

make

make install

3)安装apr-util-1.3.4.tar.gz

tar zxvf apr-util-1.3.4.tar.gz

cd apr-util-1.3.4

./configure --with-apr=/usr/local/apr

make

make install

如果系统没有自带expat,您安装上面方法安装了expat软件,./configure后要加入--with-

expat=/usr/local/expat路径

将/apr/include/apr-1/*拷贝到apr/include/目录,因为ganglia安装gmetad时默认会

去/usr/local/apr/include下寻找apr的库文件

cp /usr/local/apr/include/apr-1/* /usr/local/apr/include/。

4)安装confuse-2.6

tar zxvf confuse-2.6.tar.gz

cd confuse-2.6

./configure --prefix=/usr/local/confuse

make

make install

5)安装rrdtool-1.3.4.tar.gz

tar zxvf rrdtool-1.3.4.tar.gz

cd rrdtool-1.3.4

./configure --prefix=/usr/local/rrdtool

make

make install

*6)安装python-2.6.tgz 大多数Linux 发行版在默认安装的情况下就已经提供了Python

tar zxvf python-2.6.tgz

cd python-2.6

./configure --prefix=/usr/local/python2.6

make

make install

二 安装配置ganglig

1、安装服务器端gmetad

tar xvzf ganglia-3.1.2

2.tar.gz

cd ganglia-3.1.2

./configure --prefix=/usr/local/ganglia --with-librrd=/usr/local/rrdtool --with-libapr=/usr/local/apr --with-libexpat=/usr/local/expat --with-libconfuse=/usr/local/confuse --with-libpython=/usr/lib--with-gmetad --enable-gexec --enable-status --with-python=/usr/lib/python2.2

make

make install

注: 关于--with-librrd、--with-libapr、 --with-libexpat、 --with-libconfuse、 --with-libpython,ganglia安装所需要的库文件,要依据实际库文件路径设置,就是要依照您安装这些软件的路径。如果在安装这些软件 时并未指定安装路径,一般ganglia安装时就不需要指定--with-libexpat、 --with-libconfuse。其它的还是需要指的,因为ganglia默认安装找不到它们的。

2、服务器端gmetad设置

a、为了保证在开始时启动,需要将gmetad.init文件拷贝到 /etc/rc.d/init.d/

Your_prompt>cd ganglia-3.1.2/gmetad

Your_prompt>cp gmetad.init /etc/rc.d/init.d/gmetad

将配置文件拷贝到/etc/ganglia目录下

Your_prompt>mkdir -p /etc/ganglia

Your_prompt>cp gmetad.conf /etc/ganglia/gmetad.conf

b、Add GMETAD to the list of programs at startup

Your_prompt>chkconfig --add gmetad

Your_prompt>chkconfig --list gmetad

GMETAD 0:ff 1:ff 2:n 3:n 4:n 5:n 6:ff

建立rrds目录并修改权限(需与gmetad.conf中的数据存放路径保持一致,这里采用gmetad默认的存放路径)

Your_prompt>mkdir -p /var/lib/ganglia/rrds

Your_prompt>chown -R nobody /var/lib/ganglia/rrds

c、启动gmetad

Your_prompt>service gmetad start

Starting GANGLIA gmetad: [ OK ]

d.Your_prompt>telnet localhost 8651 | grep “hostname”

就可以得到监控的各个主机的状态。

3、gmetad.conf的配置

# data_source "another source" 1.3.4.7:8655 1.3.4.8

data_source "SERVER" 10 node1:端口号 node2:端口号

data_source是最重要的参量,在GMOND的Cluser name配置必须与data_source的相同,这个参量被设

置为群的名字,被监测以便能监测那群状态。如果有二个或更多监测对象,当有一对象不能被监测,

将读取data_source 配置的下一个对象。端口号可以根据您自己的要求任意设置,这样可以起到一定

的安全作用,防止其它的gmetad访问到你的客户机数据。

data_source后面如果添加的都是ip 话,效果是:有二个或更多监测对象,当有一对象不能被监测, 才

会将读取data_source 配置的下一个对象。

所以永远是你的第一个有图象

如果这样配置可以实现分组问题。下面是一个简单的例子

一、先单独设置数据源,这时客户端不需要配置

data_source "A" 1.1.1.1

data_source "B" 1.1.1.2

data_source "C" 1.1.2.1

二、我们需要将这三个监测对象添加到同一数据源组,组名为all

1、需要配置A、B、C的客户端配置 name = "all"

2、在服务端添加要分配的数据源组

data_source "all" A B C (这里也可以包含一个ip)

# The name of this Grid. All the data sources above will be wrapped in a GRID

# tag with this name.

# default: Unspecified

gridname "Network-status" #在web上显示GRID的名字,自己可以随意设置

# List of machines this gmetad will share XML with. Localhost

# is always trusted.

# default: There is no default value

# trusted_hosts 127.0.0.1 169.229.50.165 my.gmetad.org #可以设置多台gmetad的XML数据共享,

这样您可以对不同网域设置多台gmetad,由中央gmetad收集XML数据显示在web上。

#设置用户的访问,自己可以根据需要进行修改

# If you don't want gmetad to setuid then set this to off

# default: on #默认需要验证用户

# setuid off

#User gmetad will setuid to (defaults to "nobody")

# default: "nobody" #默认用户为nobody

# setuid_username "认证用户"

#数据存放路径为默认/var/lib/ganglia/rrds,在这里可以看到监测群及群内的机器.

# Where gmetad stores its round-robin databases

# default: "/var/lib/ganglia/rrds"

# rrd_rootdir "/some/other/place"

2) client端安装和配置

a.在linux客户机上安装ganglia,需要apr、apr-util、confuse

apr、apr-util、confuse安装

安装apr-1.3.3.tar.gz

tar zxvf apr-1.3.3.tar.gz

cd apr-1.3.3

./configure --prefix=/usr/local/apr

make

make install

安装apr-util-1.3.4.tar.gz

tar zxvf apr-util-1.3.4.tar.gz

cd apr-util-1.3.4

./configure --with-apr=/usr/local/apr

make

make install

将/apr/include/apr-1/*拷贝到apr/include/目录,因为ganglia安装gmond时默认会去/usr/local/apr/include下寻找apr的库文件

cp /usr/local/apr/include/apr-1/* /usr/local/apr/include/。

安装confuse-2.6

tar zxvf confuse-2.6.tar.gz

cd confuse-2.6

./configure --prefix=/usr/local/confuse

make

make install

安装ganglia client端

Your_prompt>tar -zxvf ganglia-3.1.2.tar.gz

Your_prompt>cd ganglia-3.1.2

Your_prompt>./configure --prefix=/usr/local/ganglia --with-libapr=/usr/local/apr --with-libconfuse=/usr/local/confuse --enable-gexec --with-pythoy=/usr/local/python/bin/python

Your_prompt>make

Your_prompt>make install

Your_prompt>cd gmond

Your_prompt>gmond –t >/etc/ganglia/gmond.conf

Your_prompt>cp gmond.init /etc/rc.d/init.d/gmond

Your_prompt>chkconfig --add gmond

Your_prompt>chkconfig --list gmond

gmond 0:ff 1:ff 2:n 3:n 4:n 5:n 6:ff

Your_prompt>service gmond start

Starting GANGLIA gmond: [ OK ]

Your_prompt>telnet localhost 8649 就可以获取机群内运行gmond的主机的信息

b.在windows客户机上安装ganglia

安装ganglia-3.0.0-setup,解压ganglia-3.1.1-bin.zip,然后将解压ganglia-3.1.1-bin,将里面全部

文件拷贝到ganglia目录gmond下,执行一下gmond.bat。

c.配置gmond.conf

Linux: vi /etc/ganglia/gmond.conf

Windows:开始菜单-程序-ganglia- Configure Ganglia Monitoring Service-gmond.conf

#可修改来验证可读取数据的用户,也可以不做修改。

setuid =

globals {

daemonize = yes

setuid = yes #windows版默认值为no,linux版默认值为yes。如需要验证用户windows版需要修改为yes

user = nobody#默认用户为任意。也可以通过修改来验证可读取数据的用户 ,但此用户必须为本机用户。

debug_level = 0

max_udp_msg_len = 1472

mute = no

deaf = no

host_dmax = 0 /*secs */

cleanup_threshold = 300 /*secs */

gexec = no

send_metadata_interval = 0

}

#根据您在gmetad设置的组名称修改name监控组名称,其它项可以自定义。

/* If a cluster attribute is specified, then all gmond hosts are wrapped inside

* of a <CLUSTER>tag. If you do not specify a cluster tag, then all <HOSTS>will

* NOT be wrapped inside of a <CLUSTER>tag. */

cluster {

name = "unspecified"

owner = "unspecified"

latlong = "unspecified"

url = "unspecified"

}

/* The host section describes attributes of the host, like the location */

host {

location = "unspecified"

}

#端口port为gmetad设置的端口号

/* Feel free to specify as many udp_send_channels as you like. Gmond

used to only support having a single channel */

udp_send_channel {

mcast_join = 239.2.11.71

port = 8649

ttl = 1

}

/* You can specify as many udp_recv_channels as you like as well. */

udp_recv_channel {

mcast_join = 239.2.11.71

port = 8649

}

/* You can specify as many tcp_accept_channels as you like to share

an xml description of the state of the cluster */

tcp_accept_channel {

port = 8649

#ACCESS CONTROL #访问控制

#The udp_recv_channel and tcp_accept_channel directives can contain an Access Control

List (ACL). This ACL allows you to specify exactly which hosts gmond process data from

udp_recv_channel #udp接受信道

#在里面添加访问控制命令

acl {

default = "allow"

access {

ip = x.x.x.x

mask = netmask

action = "deny"

}

}

tcp_accept_channel

#在里面添加访问控制命令

acl {

default = "deny"

access {

ip = x.x.x.x

mask = netmask

action = "allow"

}

}

配置完成后重新启动gmond

service gmond restart

多ip的时候,多播有问题

/sbin/route add -host 239.2.11.71 dev eth0 #把eth0换成你想收集信息的interface就好了

***************

安装后不显示图形

如果你在RHEL 4以上版本安装Ganglia那么就是SELinux在作怪,可以关闭SELinux

或者执行以下步骤:

vi /etc/selinux/targeted/contexts/files/file_contexts

添加:

/var/lib/ganglia/rrds(/.*)? system_u:bject_r:httpd_sys_script_exec_t

保存退出

执行:setfiles /etc/selinux/targeted/contexts/files/file_contexts /var/lib/ganglia/rrds/

如果还有问题

vi /$web'DocumentRoot/web/conf.php

将define("RRDTOOL", "/usr/local/bin/rrdtool")修改成自己的rrdtool路径

好久没有写什么东西了,最近有时间对用ganglia的应用做了一些研究,以前发的关于用ganglia监控服务器状态写简单,这个就算它的补充吧。内容上不正确的地方,还需要大家指正,希望能完善对ganglia的研究与应用。


欢迎分享,转载请注明来源:夏雨云

原文地址:https://www.xiayuyun.com/zonghe/553821.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-06-29
下一篇2023-06-29

发表评论

登录后才能评论

评论列表(0条)

    保存