zabbix安装配置

Zabbix一安装配置:环境搭建:VMware® Workstation 12 Pro (12.0.0 build-2985596)CentOS-7-x86_64-DVD-1511.iso (user:root password: toor00 )zabbix-3.0.3.tar安装过程:Installation from sourcesYou can get the very latest version of Zabbix by compiling it from the sources.A step-by-step tutorial for installing Zabbix from the sources is provided here.1 Installing Zabbix daemons1 Download the source archiveGo to the Zabbix download page and download the source archive. Once downloaded, extract the sources, by running:$ tar -zxvf zabbix-3.0.0.tar.gzEnter the correct Zabbix version in the command. It must match thename of the downloaded archive.2 Create user accountFor all of the Zabbix daemon processes, an unprivileged user is required. If a Zabbix daemon is started from an unprivileged user account, it willrun as that user.However, if a daemon is started from a 'root' account, it will switch to a 'zabbix' user account, which must be present. To create such a user account (in its own group, “zabbix”) on Linux systems, run:groupadd zabbixuseradd -g zabbix zabbixA separate user account is not required for Zabbix frontend installation. If Zabbix server and agent are run on the same machine it is recommended to use a different user for running the server than for running the agent. Otherwise, if both are run as the same user, the agent can access the server configuration file and any Admin level user in Zabbix can quite easily retrieve, for example, the database password.Running Zabbix as root, bin, or any other account with specialrights is a security risk.3 Create Zabbix databaseFor Zabbix server and proxy daemons, as well as Zabbix frontend, a database is required. It is not needed to run Zabbix agent.SQL scripts are provided for creating database schema and inserting the dataset. Zabbix proxy database needs only the schema while Zabbix server database requires also the dataset on top of the schema.Having created a Zabbix database, proceed to the following steps ofcompiling Zabbix.4 Configure the sourcesWhen configuring the sources for a Zabbix server or proxy, you must specify the database type to be used. Only one database type can be compiled with a server or proxy process at a time.To see all of the supported configuration options, inside the extracted Zabbix source directory run:./configure --helpTo configure the sources for a Zabbix server and agent, you may run something like:./configure --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2ac_default_prefix=/usr/localac_default_prefix=/usr/local/bin--with-libcurl configuration option with cURL 7.20.0 or higher is3.0.0.--with-libcurlrequired for virtual machine monitoring, supported since ZabbixTo configure the sources for a Zabbix server (with PostgreSQL etc.), you may run:./configure --enable-server --with-postgresql --with-net-snmpTo configure the sources for a Zabbix proxy (with SQLite etc.), you may run:./configure --prefix=/usr --enable-proxy --with-net-snmp --with-sqlite3 --with-ssh2 To configure the sources for a Zabbix agent, you may run:./configure --enable-agentYou may use the --enable-static flag to statically link libraries. If you plan to distribute compiled binaries among different servers, you must use this flag to make these binaries work without required libraries. Note that --enable-static does not work under Solaris.Using --enable-static option is not recommended when building server.In order to build the server statically you must have a static versioncheck for that in configure script.Command-line utilities zabbix_get and zabbix_sender are compiled if --enable-agent option is used.Use --with-ibm-db2 flag to specify location of the CLI API.For encryption support see Compiling Zabbix with encryption support 5 Make and install everythingIf installing from SVN, it is required to run first:$ make dbschema This step should be run as a user with sufficient permissions (commonly 'root', or by using sudo).Running make install will by default install the daemon binaries (zabbix_server, zabbix_agentd, zabbix_proxy) in /usr/local/sbin and the client binaries (zabbix_get, zabbix_sender) in /usr/local/bin.To specify a different location than /usr/local, use a --prefix key --prefix=/home/zabbix. installed <prefix>/bin. Man pages will be installed under <prefix>/share.6 Review and edit configuration filesedit the Zabbix agent configuration file /usr/local/etc/zabbix_agentd.confYou need to configure this file for every host with zabbix_agentd installed.You must specify the Zabbix server IP address in the file. Connections from other hosts will be denied.edit the Zabbix server configuration file /usr/local/etc/zabbix_server.confYou must specify the database name, user and password (if using any).With SQLite the full path to database file must be specified; DB user and password are not required.The rest of the parameters will suit you withtheir defaults if you have a small installation (up to ten monitored hosts). You should change the default parameters if you want to maximize the performance of Zabbix server (or proxy) though. See the performance tuning section for more details.if you have installed a Zabbix proxy, edit the proxy configuration file /usr/local/etc/zabbix_proxy.confYou must specify the server IP address and proxy hostname (must be known to the server), as well as the database name, user and password (if using any).With SQLite the full path to database file must be specified; DBuser and password are not required.7 Start up the daemonsRun zabbix_server on the server side.shell> zabbix_serverMake sure that your system allows allocation of 36MB (or a bitmore) of shared memory, otherwise the server may not start and you will see the server log file. This may happen on FreeBSD, Solaris 8.See the "See also"section at the bottom of this page to find out how to configure shared memory.Run zabbix_agentd on all the monitored machines.shell> zabbix_agentdMake sure that your system allows allocation of 2MB of shared memory, otherwise the agent may not start and you will see allocate may happen on Solaris 8.If you have installed Zabbix proxy, run zabbix_proxy.shell> zabbix_proxy2 Installing Zabbix web interfaceCopying PHP filesZabbix frontend is written in PHP, so to run it a PHP supported webserver is needed. Installation is done by simply copying the PHP files from frontends/php to the webserver HTML documents directory.Common locations of HTML documents directories for Apache web servers include:/usr/local/apache2/htdocs (default directory when installing Apache from source)/srv/www/htdocs (OpenSUSE, SLES)/var/www/html (Fedora, RHEL, CentOS)/var/www (Debian, Ubuntu)It is suggested to use a subdirectory instead of the HTML root. To create a subdirectory and copy Zabbix frontend files into it, execute the following commands, replacing the actual directory:mkdir <htdocs>/zabbixcd frontends/phpcp -a . <htdocs>/zabbixIf installing from SVN and planning to use any other language than English, you must generate translation files. To do so, run:locale/make_mo.shmsgfmt utility from gettext package is required.Additionally, to use any other language than English, its localeshould be installed on the web server. See theinrequired.Installing frontendStep 1In your browser, open Zabbix URL:You should see the first screen of the frontend installation wizard.Step 2Make sure that all software prerequisites are met.通过修改/etc/php.inipost_max_size =16Mmax_execution_time =300max_input_time =300date.timezone = PRCpost_max_size = 32M时区问题:修改php.ini文件,查找;date.timezone = ,把前面的分号去掉在“=”后面加上时区。

合集下载

Zabbix6.0的安装与IPMI的简单使用

Zabbix6.0的安装与IPMI的简单使用

Zabbix6.0的安装与IPMI的简单使⽤zabbix简介1.zabbix的安装与使⽤建议使⽤CentOS8进⾏部署, 不建议使⽤CentOS7, rpm包直接部署的话,CentOS8⽐较容易⼀些⽀持mysql数据库.建议先期部署mysql数据库.如果使⽤ipmi需要安装ipmitool 如果使⽤tar包安装需要安装devel包本次使⽤yum 直接在线安装不进⾏编译,提⾼部署速度2.安装根据zabbix官⽹的最新材料进⾏处理.# 建议直接使⽤centos8 centos7 没验证过最新的版本rpm -Uvh https:///zabbix/6.0/rhel/8/x86_64/zabbix-release-6.0-1.el8.noarch.rpm# 安装相关内容rpm包:dnf install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-sql-scripts zabbix-selinux-policy zabbix-agent -y# 升级⼀下相关部分软件,不然zabbix-server 启动时会报错yum update net-snmp -y2.安装数据库部分创建空的数据库mysql -uroot -p# 输⼊密码登录数据库# 注意我这边为了⽅便管理将 `%` 也添加进来了create database zabbix character set utf8mb4 collate utf8mb4_bin;create user zabbix@localhost identified by 'password';grant all privileges on zabbix.* to zabbix@localhost;quit;create user zabbix@'%' identified by 'password';grant all privileges on zabbix.* to zabbix@'%';quit;#初始化数据库实例zcat /usr/share/doc/zabbix-sql-scripts/mysql/server.sql.gz | mysql -uzabbix -p zabbix#注意需要输⼊密码vim /etc/zabbix/zabbix_server.confDBPassword=password2.安装启动服务# 注意如果开启了 IPMI需要修改如下参数:sed -i '/# StartIPMIPollers=0/aStartIPMIPollers=5' /etc/zabbix/zabbix_server.conf# 启动服务systemctl restart zabbix-server zabbix-agent httpd php-fpmsystemctl enable zabbix-server zabbix-agent httpd php-fpm2.安装界⾯初始化输⼊ http://ip/zabbix 进⾏初始化操作数据库密码如果在本地可以直接输⼊ 127.0.0.1 以及相关密码进⾏.安装速度较为迅速默认密码:admin:Zabbix注意安装完⽴即修改密码.3.简单连接IPMI的使⽤.简介本⼈对 zabbix的监控不太熟悉因为我们这边服务器的跨度⼜⽐较⼤, 所以这⾥简单描述⼀下⾃⼰的使⽤部分zabbix 6.0的界⾯与之前⽹络上很多介绍不太⼀样.3. 简单连接IMPI的使⽤3.1. 定义主机群组打开zabbix-配置-主机群组功能添加主机群组注意, 因为服务器⽐较繁多, 可能不同年代的服务器需要设置不同的群组进⾏处理3. 简单连接IMPI的使⽤3.2. 定义模板注意模板尽量使⽤英⽂数字, 不要使⽤中⽂,容易出现误判.虽然zabbix有很多ipmi的模板但是不符合,我们⼀些⽐较⽼旧型号的机器.添加⼀个新的模板注意不要选择模板, 可以选择对应的主机集群.3.3. 定义主机在配置-主机-中点击创建主机进⼊New host 的界⾯输⼊主机名称, 选择群组.Interface选择使⽤ IPMI的IP地址等内容.进⼊IPMI页, 注意选择输⼊⽤户名密码. 注意需要是正确的⽤户信息需要注意的是 IPMI输⼊的不是业务IP地址,必须是IPMI的管理⼝的地址.不然可能会不通.3.3.1 维护主机监控项⽬进⼊主机维护列表点击监控项进⼊监控项⽬维护界⾯点击创建监控项⽬进⼊监控项⽬需要填写的事项为:1. 填写名称2. 选择类型为IPMI客户端3. 键值,这⾥有⼀个具体要求. ⽐如CPU温度 IPMI定义的内容为ipmitool sensor |grep CPUCPU0_Temp | 68.000 | degrees C | ok | na | na | na | 102.000 | 104.000 | na 注意: 键值为 ipmi_cpu0_temp 为 ipmi开头的⼩写第⼀列内容注意: IPMI传感器名字要⼤⼩写正确起来. CPU0_Temp注意: 可以进⾏测试验证参数是否正确.3.3.2 创建图形便于分析在配置-主机-列表中点击图形配置新增图形注意需要增加⼀下监控项⽬. 保存即可.4. 监测仪表盘处理编辑仪表盘增加⼀个仪表盘的内容.使⽤click and drag to disired size选择主机样式以及监控的模式注意监控模式基本上是选择监控项⽬即可.。

Zabbix从安装到报警

Zabbix从安装到报警

Zabbix安装配置安装部署一 Zabbix安装环境准备当前系统为centos 5.3,root用户安装必须的包.zabbix需要LAMP环境支持(1) 快速搭建LAMP环境配好本地YUM源yum install –y mysql-server httpd php(2) 安装其需要的包yum install –y mysql-devel gcc net-snmp-devel curl-devel per-DBI php-gd phpmysql php-bamath php-mbstring php-xml必须确认以上包都安装完整(3) 下载最新的zabbix源码包可以从zabbix的官网找到 下载并解压到本地tar zxvf zabbix-1.8.11.tar.gz(4) Zabbix需要为其建立独立的用户和组groupadd zabbixuseradd –g zabbix –m zabbix二 数据库环境准备(1)首先启动Mysql数据库/etc/init.d/mysqld start(2)为root用户添加密码mysqladmin –u root password 123456成功后测试下能否正常登陆mysqlmysql –u root –p(2)创建zabbix数据库Mysql>create database zabbix;(3)导入数据库sql脚本进入zabbix的解压目录cd zabbix-1.8.11cat ./create/schema/mysql.sql |mysql –uroot –p123456 zabbixcat ./create/data/data.sql |mysql –uroot –p123456 zabbixcat ./create/data/images_mysql_sql |mysql –uroot –p123456 zabbix三 编译安装zabbix进入zabbix解压目录cd zabbix-1.8.11./configure --with-mysql--with-net-snmp --with-libcurl --enbale-server --enable-agent--enable-proxy --prefis=/usr/local/zabbix[编译过程中可能出现的问题和解决方法](1) 提示缺少mysql-client 库yum install –y mysql-client(2) 提示缺少snmp-snmp 库#yum install –y net-snmp*安装完成检查一下时候安装了以下的包rpm –qa|grep net-snmpnet-snmp-5.3.2.2-5.el5net-snmp-libs-5.3.2.2-5.el5net-snmp-devel-5.3.2.2-5.el5net-snmp-libs-5.3.2.2-5.el5net-snmp-devel-5.3.2.2-5.el5如果再次编译依旧提示缺少net-snmp库文件,请重启主机 (3) 提示缺少GD 库文件yum install –y gd*确认编译成功之后进行安装makemake install四 修改配置文件(1) 修改services文件,添加zabbix对应的服务端口vim /etc/services添加一下几行zabbix-agent 10050/tcpzabbix-agent 10050/udpzabbix-trapper 10051/tpczabbix-trapper 10051/udp(2) 添加zabbix配置文件进入zabbix解压目录cd zabbix-1.8.11cp ./misc/conf/* /etc/zabbix –R(3) 修改zabbix配置文件修改server配置vim /etc/zabbix/zabbix_server.conf修改DBPassword为当前MYSQL数据库登录密码grep -v '^#' zabbix_server.conf |grep -v '^$'修改agent配置文件vim /etc/zabbix/zabbix_agentd.conf修改HOST NAME为本机的hostname(4) 添加web前端php文件cd zabbix-1.8.11/frontends/cp php/* /var/www/html/zabbix –R注:当前配置为基于apache服务的配置,如果使用nginx,前端php文件的目录需与nginx配置文件中设置的目录一样(5) 修改php配置文件vim /etc/php.inidate.timezone = Aisa/Shanghaimax_execution_time = 300max_input_time = 300memory_limit = 128Mpost_max_size = 32Mmbstring_fun_overload = 2修改完成后重启apacheservice httpd restart(6) 确认无误之后打开本地浏览器,访问zabbix server,开始配置zabbix webhttp://192.168.18.1/zabbix(7) 一路下一步来到第三步 Check of pre-requisites这里一定要全部check ok才可以进入接下来的配置有任何一项提示为no ,则需要按提示安装相应的软件包或者修改/etc/php.ini下的相关内容,并重启apache服务之后再次check,直到全部ok注: php version安装高版本的phpPhp memory limitPhp post max sizePhp max execution timePhp max input timePhp timezone这些需要修改/etc/php.ini下相关的项,之前的步骤有写检测全部OK之后下一步(8) 数据库配置Type:写你当前使用的数据库类型HOST:写你当前的服务器,这里是本机,就写localhost,如果是其他服务器,则写对应的主机IPPort:使用的端口,0为默认Name:使用的数据库的名字User:登陆数据库的用户名Password:登陆数据库的密码点击Test connection.提示OK继续next.提示fail 检查数据库相关信息填写是否正确,是否存在对应的库,用户及密码时候正确,同时确保数据库正在运行.(9) Zabbix服务器相关配置Host:本地就写LocalhostPort:使用端口,/etc/services下配置的一样配好之后下一步(10) Install按提示下载配置文件到/var/www/html/zabbix/conf下, 下载到的配置文件,名字一定要是zabbix.conf.php至此,zabbix web前端已经配置完成,可以使用默认用户admin和默认密码zabbix登陆了.五 创建启动脚本为了日后使用方便,接下来需要创建启动脚本(1)添加启动脚本cd zabbix-1.8.11cp ./misc/init.d/redhat/zabbix_* /etc/init.dZabbix源码包里的启动脚本不完善,可以用网上下来的启动脚本,(2)修改启动脚本中如下的参数vim /etc/init.d/zabbix_server_ctlvim /etc/init.d/zabbix_agentd_ctl将BASEDIR=改为/usr/local/zabbix\\将zabbix_agentd_ctl中的ZABBIX_AGENTD改为ZABBIX_AGENTD=$BASEDIR/sbin/zabbix_agentd将zabbix_server_ctl中的ZABBIX_SERVER改为ZABBIX_SERVER=$BASEDIR/sbin/zabbix_server(3)将启动脚本加入开机启动echo ‘/etc/init.d/zabbix_server_ctl start &’ >>/etc/rcecho ‘/etc/init.d/zabbix_agnetd_ctl start &’ >>/etc/rc(4)创建快键方式ln -s /etc/init.d/zabbix_server_ctl /usr/local/zabbix_server_ctl ln -s /etc/init.d/zabbix_agentd_ctl /usr/local/zabbix_agentd_ctl之后就可以用下面的命令来启动zabbixzabbix_server_ctl startzabbix_agnetd_ctl start检查服务是否正常启动ps –ef|grep zabbix监控配置一 监控LINUX主机被监控的主机上需要安装zabbix agent,在zabbix官网下载对应的agent包. Linux下的agent包是已经编译好的,直接解压出来就行cd /usr/local/zabbixtar zxvf zabbix_agents_1.8.5.linux2_6.amd64.tar.gz(2)创建被监控主机配置文件从zabbix server上拷贝一份zabbix_agentd.conf到被监控主机上,并修改如下几个地方Hostname=被监控主机名Server=Zabbix server IPLogFile=被监控主机agentd日志保存位置(3) 启动客户端客户端启动命令/usr/local/zabbix/sbin/zabbix_agentd -c/usr/local/zabbix/zabbix_agentd.conf(4)将客户端加入开机运行echo ‘/usr/local/zabbix/sbin/zabbix_agentd -c/usr/local/zabbix/zabbix_agentd.conf &’>>/etc/rc(5) 在zabbix server上查看当前主机状态二 监控Windows主机监控winodws也需要下载相对应的agent,并解压到c:\zabbix(2) 建立配置文件进入c:\zabbix建立zabbix_agentd.conf文件,并输入如下的内容Hostname=被监控主机名Server=zabbix server IPStartAgents=5DebugLevel=3LogFile=c:\zabbix\zabbix_agentd.log#日志文件存放位置Timeout=3也可以从网上下载修改好的配置文件,之后修改下Hostname和Server.(3) 安装agent打开cmd命令行,执行c:>cd c:\zabbixc:\zabbix>zabbix_agentd install安装完成后将会在系统服务里添加一个zabbix_agentd服务,开机将自动运行 (4) 启动agentd在CMD命令行中执行c:>zabbix_agentd -start成功启动后可以在windows 服务中看到Zabbix Agentd当前的状态也可以登录Zabbix的web页面,在配置系统里查看当前被监控主机的状态监控报警的实现利用mutt和msmtp实现邮件自动发送功能mutt是一个MUA(邮件用户代理),类似foxmail和outlook,是不负责发送接收邮件的,如果要发送邮件需调用msmtp,msmtp实现了MTA的功能,比起sendmail 来方便了不少。

zabbix环境部署详细步骤(小白可入)

zabbix环境部署详细步骤(小白可入)

Zabbix部署流程目录1、计划安排 (2)2、环境准备 (2)3、软件安装(lamp) (2)4、配置文件修改 (3)5、web初始化及登陆 (4)6、监控项模板配置 (5)7、网络自动发现主机 (8)8、添加监控项的触发器及对应的动作 (11)9、在zabbix-server端配置简单的邮件postfix服务 (16)10、用户与报警媒介关联 (18)1、计划安排2、环境准备Zabbix-server端(10.21.X.X):操作系统:centos7.1 硬件:4c/8G 80G 安装图形化Mysql数据库端(10.21.20.202):操作系统:centos7.1 硬件:4c/8G 120G3、软件安装(lamp)(1)Zabbix-Server组件:yum –y install net-snmp* gcc下载zabbix-3.2.7.tar.gz包并进行编译安装(./configure –prefix=/usr/local/zabbix --enable –server --enable-agent --with-mysql --with-net-snmp)---- make (注编译时若出现报错,按照报错解决依赖包问题)(2)web 组件(注意php的软件版本一定要保持一致5.4)yum -y install httpd php php-mysqlyum -y localinstall zabbix-web-3.2.0 zabbix-web-mysql-3.2.0 php-mbstring php-bcmath(3)数据库端yum -y install mariadb-server或者编译安装mysql4、配置文件修改(1)数据库systemctl start mariadbmysql -e "create database zabbix default charset utf8"(创建时注意添加default charset utf8,否则有可能出现中文乱码问题)mysql zabbix < schema.sqlmysql zabbix < images.sqlmysql zabbix < data.sql授权:给zabbix-server端的ip授权Grant all on zabbix.* to zabbix@’10.21.20.201’ identified by ‘zabbixpass’;Flush privileges;(2)zabbix-server端(注:如果监控项较多配置文件中的CacheSize 等参数也做相应的修改,优化性能)Vim /usr/local/zabbix/etc/zabbix_server.confDBHOST=数据库所在的ipDBName=zabbixDBUser=zabbixDBPassword=zabbixDBPort=3306启动服务。

Zabbix安装配置手册- -

Zabbix安装配置手册- -

Zabbix 手册目录Ⅰ Zabbix简介 (1)一、Zabbix介绍 (1)二、Zabbix系统架构 (4)1.Zabbix架构: (4)2.Zabbix架构说明: (5)Ⅱ Zabbix安装 (8)一、Zabbix安装 (8)1、安装基础包 (8)2、启动httpd、mysql (9)3、配置防火墙 (9)4、配置PHP参数 (9)5、修改httpd 的FQDN 错误 (10)6、下载zabbix-3.0.3tar.gz (10)7、添加zabbix 用户和组 (11)8、安装zabbix-server (11)9、创建zabbix 数据库以及相关表 (11)10、配置软连接和启动文件信息 (12)11、修改/etc/init.d 目录下的zabbix_server 和zabbix_agentd 启动文件(配置server和agent) (12)12、通过web 站点配置zabbix (14)二、Zabbix 监控机配置 (19)1. 登录 (19)2. 添加主机(Hosts) (20)3. 创建模板 (26)4.添加告警动作(Actions) (28)5.添加告警方式(Medias) (29)6.添加用户(Users) (30)Ⅲ Zabbix配置 (32)一、Client端配置 (32)二、zabbix_server.conf 配置文件详解 (33)三、zabbix_agentd.conf 配置文件详解 (41)ⅠZabbix简介一、Zabbix介绍Zabbix是一个分布式监控系统,支持多种采集方式和采集客户端,有专用的Agent(代理),也支持SNMP、IPMI、JMX、Telnet、SSH等多种协议,它将采集到的数据存放到数据库,然后对其进行分析整理,达到条件触发告警.其灵活的扩展性和丰富的功能是其他监控系统所不能比的。

相对来说,它的总体功能做得非常优秀,其界面如图1-1、图1-2。

如何使用Zabbix进行服务器监控

如何使用Zabbix进行服务器监控

如何使用Zabbix进行服务器监控服务器是现代网络应用的核心组件,它需要提供稳定、高效、安全的服务。

但是,服务器在运行过程中可能会出现各种问题。

例如,服务器可能会暂停服务,可能会出现磁盘空间不足的情况,可能会出现 CPU 使用率过高的情况等等。

这时,我们需要一种工具来监控服务器的运行情况,以便及时发现并解决问题。

Zabbix就是这样一种工具。

本文将介绍如何使用Zabbix 进行服务器监控。

一、安装 Zabbix安装 Zabbix 的过程有点复杂,这里不再详细说明,读者可以参考 Zabbix 的官方文档进行安装。

在安装完成之后,需要进行以下配置:1. 启动 Zabbix Server 和 Zabbix Agent。

在启动之前,需要检查Zabbix 的配置文件是否正确。

例如,检查 Zabbix Server 是否配置了正确的数据库信息,检查 Zabbix Agent 是否配置了正确的Server。

2. 配置监控主机。

在 Zabbix 中,需要通过监控主机来监控服务器。

每个监控主机都有一个唯一的Hostname。

在配置监控主机时,需要注意:a. 首先,需要在监控主机上安装 Zabbix Agent,并配置Agent 的 Server 变量。

b. 其次,需要在Zabbix Server 上配置监控主机的Hostname。

3. 配置监控项。

监控项是用来监控服务器指标的,例如 CPU使用率、磁盘空间等等。

每个监控项都有一个唯一的名称和一个采集间隔。

在配置监控项时,需要注意:a. 需要选择正确的监控项类型。

例如,CPU 使用率的监控项类型是 "Zabbix Agent (Active)",而磁盘空间的监控项类型是"Zabbix Agent (Passive)"。

b. 需要配置正确的监控项参数。

例如,CPU 使用率的监控项需要设置 CPU 核数,而磁盘空间的监控项需要设置磁盘挂载点。

zabbix使用教程

zabbix使用教程

zabbix使用教程Zabbix 是一款开源的网络监控系统,可以帮助管理员实时监控服务器和网络设备的性能和状态。

本教程将为你介绍如何使用 Zabbix 进行基本的监控配置和使用。

1. 安装 Zabbix首先,你需要下载并安装 Zabbix 服务器和 Zabbix 前端。

可以从 Zabbix 官方网站上找到安装包,并按照说明进行安装。

2. 配置 Zabbix 服务器安装完成后,你需要编辑 Zabbix 服务器的配置文件,通常位于 /etc/zabbix/zabbix_server.conf。

你可以根据需要修改数据库连接、监听端口等配置。

3. 启动 Zabbix 服务器在 Zabbix 服务器上运行以下命令启动 Zabbix 服务器:```systemctl start zabbix-serversystemctl enable zabbix-server```4. 配置数据库Zabbix 需要使用数据库存储监控数据。

可以选择使用MySQL、PostgreSQL 或 SQLite。

你需要创建一个空的数据库,并将数据库连接信息配置在 Zabbix 服务器的配置文件中。

5. 安装 Zabbix 前端Zabbix 前端是一个基于 Web 的界面,用于配置和监控 Zabbix 系统。

你可以通过下载并部署前端代码到 Web 服务器上来安装 Zabbix 前端。

6. 配置 Zabbix 前端安装完成后,你需要编辑 Zabbix 前端的配置文件,通常位于/etc/zabbix/web/zabbix.conf.php。

你需要修改数据库连接、时区等配置,以使前端能够连接到 Zabbix 服务器。

7. 访问 Zabbix 前端在浏览器中输入 Zabbix 前端的 URL,然后使用管理员账户登录。

默认的管理员账户名为 "Admin",密码为 "zabbix"。

8. 添加主机在 Zabbix 前端中,您可以通过 "Configuration" 菜单来添加和配置主机。

ZABBIX使用手册

ZABBIX使用手册1.X简介 (1)1.1Z ABBIX简介 (1)1.2Z ABBIX功能 (1)1.3优劣势 (1)2.PART2.安装部署 (2)2.1服务端环境准备 (2)2.2数据库准备 (2)2.3编译安装 (2)2.4配置文件及WEB前端文件修改 (3)2.5WEB前端安装配置 (3)2.6启动S ERVER (4)2.7在HOSTS上配置AGENT (5)3.PART3.配置使用 (6)3.1添加H OSTS (6)3.2添加I TEMS (6)3.3添加T RIGGERS (8)3.4添加A CTIONS (8)3.5添加M EDIAS (9)3.6添加U SERS (10)3.7添加WEB M ONITORINGS (10)3.8添加G RAPHS (13)3.9添加S CREENS (14)3.10添加M APS (15)3.11添加M Y SQL监控 (15)3.12添加O RACLE监控 (16)3.13添加SNMP监控 (18)3.14添加通用协议监控 (18)3.15添加自定义监控 (18)3.16添加T EMPLATES (19)3.17添加R EPORTS(定制报表) (19)3.18添加M ACROS (20)3.19添加自动发现设备 (21)3.20添加I NVENTORY (21)3.21E XPORT/I MPORT XML (21)3.22M AINTENANCE(维护时间) (22)4. (23)图表目录图表1 (4)图表2 (6)图表3 (7)图表4 (7)图表 5 (8)图表 6 (9)图表7 (9)图表8 (10)图表9 (11)图表10 (11)图表11 (12)图表12 (12)图表13 (13)图表14 (13)图表15 (14)图表16 (15)图表17 (15)图表18 (16)图表19 (18)图表20 (18)图表21 (19)图表22 (19)图表23 (20)图表24 (20)图表25 (21)图表26 (22)图表27 (22)图表28 (23)图表29 (23)图表30 (24)1. x简介1.1 Zabbix简介Zabbix是一个企业级的开源分布式监控解决方案,由一个国外的团队持续维护更新,软件可以自由下载使用,运作团队靠提供收费的技术支持赢利。

zabixx介绍与安装

2015年9月份第二周产出物总结Zabbix主要功能Zabbix是一个企业级的、开源的、分布式的监控套件。

主要功能就是数据收集、图形化显示、历史数据储存、配置模板、实时告警等。

如下图对于zabbix主要功能学习的总结Zabbix几乎针对于现市场上主流的操作系统都进行相关的兼容,且功能强大,一般使用的硬件配置要求也不需要非常大,基本上可以确保现有的绝大多数监控软件的使用需求,但是有一点需要注意,zabbix服务端在监控其被监控端的同时,自己也需要被监控,即一个大型运维环境当中至少应该存在两个zabbix_server,让两个监控平台起到互相监控的作用,这样才能确保所有的体系皆处于监控状态,使得生产环境可以得到全面的预警保障。

常用的监控软件M RTG、Cacti、Rrdtool、Nagios、Zabbi xzabbix监控报警能力都很强大,但是也很复杂,脚本和策略设置需要能力。

Nagios报警能力可以,监控一般需要配合cacti使用,部署较为简单。

zabbix一般部署在大型分布式环境中,策略灵活。

其它几款只需了解有这么个东西,现在主要学习zabbix。

对比Nagios和Cacti这一周我也研究过Nagios+Cacti和zabbix的主要区别,其实二者从功能上来说都差不多,只不过Cacti用的是一种rrd的我把它称作为“环形数据库”,Cacti将监控到的数据保存在这个数据库里面,再以图表方式表达出来,但是这个数据库在建立的时候,就必须规划好这个数据库的大小,比如设置一年需要监控哪几个变量,那么过了一年,它这个数据库就得覆盖一年前的数据了,而对比zabbix,zabbix就可以兼容几种现有的主流数据库,而现在的中型企业大多数使用的监控软件都以zabbix居多,于是便开始以zabbix的学习进行入手。

开始安装zabbix硬件要求一般主流服务器都可以达到,下图仅供参考操作系统归类基本上也就跑Unix,GNU linux,和Unix其它的衍生产品,HP-UX这种基本上用到的不多,主流支持以前的惠普产品,大多以红帽或者CentOS居多,但是切记windows平台只能跑agent,这一点一定要明确。

4.zabbix硬件、软件需求--zibbix中文教程

1.3 其他硬件 如果你觉得有必要的话,你再准备一个GSM短信猫吧,不过很少人用,基本上都使用email或者飞信报警.
1.4 硬件需求表
如上,P2的CPU、256MB内存已经可以监控20个主机。AMD 3200+/2G内存可以监控500个主机(05年大学的时候,中低端主流cpu,这都快10 年了,尤其可见zabbix对服务器的硬件配置要求有多低),现在的服务器一般都比上面最高配还来得高,所以我武断的认为,大家手头的 服务器都有能力监控1w+以上的服务器,我再武断的认为手头上有1w+服务器的公司能有多少.
2. 操作系统
支持如下平台,平台之多让人刮目相看,但是window只能跑客户端 Linux IBM AIX FreeBSD NetBSD OpenBSD HP-UX Mac OS X Solaris Windows: 2000, Server 2003, XP, Vista, Server 2008, 7, 8, Server 2012 (只能跑Zabbix agent)
3. 软件需求
3.1 数据库 MySQL:5.0.3或者以上,推荐使用InnoDB引擎(TTLSA推荐使用MySQL,开源免费资料多) Oracle:10g或者以上 PostgreSQL:8.1或者以上 . SQLite:3.3.5或者以上 IBM DB2:9.7或者以上
3.2 WEB应用
Apache:1.3.12或者以上
4. 时间同步
最重要的一点在最后提,请确保你所有的服务器时间都是正确的,为了确保时间ok,请在crontab里面加上定时时间同步。
5. 结束
说到这里,大家对zabbix的一个需求大概都明白了,不过还是有人特别想知道:我有N个监控项到底需要多大的硬盘空间呢?好奇害死 猫,请看下下回的《zabbix数据库空间需求计算方法》,下一篇文章《zabbix安装》。请大家继续一如既往的支持运维生存时间,官方网 站/

zabbix监控2.6安装部署配置文档


3.1.2 编辑配置文件
cd /usr/local/zabbix/etc vim zabbix_agentd.conf LogFile=/tmp/zabbix_agentd.log Server=202.108.1.52 ##服务器 IP ServerActive=202.108.1.52 ##主动模式服务器 IP Hostname=202.108.1.51 ##设定主机名
图 2.2

连接 MySQL 的参数
图 2.3
页码5


zabbix server 详情
图 2.4

最后显示所有配置信息
页码6


图 2.5 完成,如果出现下面情况是 apche 没有/var/www/html/zabbix 写入权限,修改后 Retry
图 2.10
第三章 zabbix agent 的安装
3.1 Linux agent 的安装(在另一台机器上安装)
3.1.1 下载解压编译好的客户端
wget /downloads/2.0.6/zabbix_agents_2.0.6.linux2_6.amd64.tar.gz mkdir /usr/local/zabbix tar zabbix_agents_2.0.6.linux2_6.amd64.tar.gz -C /usr/local/zabbix
页码9

2.2.2 启动服务,设置 mysql 账号密码
service mysqld start service httpd start mysqladmin password redhat
2.3 zabbix server 安装
2.3.1 下载解压
wget /project/zabbix/ZABBIX%20Latest%20Stable/2.0.6/zabbix-2.0.6.tar.gz tar zxf zabbix-2.0.6.tar.gz cd zabbix-2.0.6
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
相关文档
最新文档