zabbix系列之一——简要介绍
参考来源:(官网)
https://www.zabbix.com/documentation/3.4/manual/introduction/about
1what’s zabbix?
|
index |
detail |
remark |
|
1 |
An enterprise-class open source distributed monitoring solution |
|
|
2 |
Monitor numerous parameters of a network and the health and integrity of servers. |
|
|
3 |
Flexible notifcation mechanism for virtually any event |
|
|
4 |
Excellent reporting and data visualistaion based on stored data |
ideal for capacity planning(容量规划) |
|
5 |
Supports both polling and trapping. |
|
|
6 |
Web-based fronted |
|
|
7 |
GPL (General Public License) |
Freely distributed and available for general public |
2zabbix features
|
Features |
Detail |
remark |
|
Data gethering |
1Availability and performance checks 2Support for SNMP(both trapping and polling),IPMI,JMX,Vmware monitoring |
|
|
Flexible threshold definitions |
Define flexible problem thresholds,called triggers,referencing values from backend database |
|
|
Highly configurable alerting |
1sending notifications can be customized for the escalation schedule,recipient,media type 2automatic actions include remote commands |
Escalation [eskə'leɪʃn]n,扩大 recipient[rɪˈsɪpiənt],接收者 |
|
Real-time graphing |
Monitored items are immediately graphed using the built-in graphing functionality |
|
|
Extensive visualisation options |
1ablitiy to create custom graphs that can combine multiple items into a single view 2network maps |
|
|
Historical data storage |
1data stored in a database 2configurable history |
|
|
Network discovery |
1automatic discovery of network devices 2agent auto registration |
|
|
Fast web interface |
A web-based fronted in PHP |
|
|
Zabbix api |
json |
|
|
Persmissions system |
Secure user authentication |
权限系统 |
|
Full featured and easily extensible agent |
can be deployed on both Linux and Windows |
3zabbix overview
|
components |
Detail |
remark |
|
Server |
1Central component to which agents report availability and integrity information and statistics. 2the central repository in which all configuration,statistical and operational data are stored. |
|
|
Database storage |
All configuration information as well as the data gathered by zabbix is stored in database |
|
|
Web interface |
Provided web-based interface for easy access to zabbix from anywhere and from any platform |
|
|
Proxy |
1Can collect performance and availability data on behalf of zabbix server. 2 an optional part of zabbix deployment, beneficial to distribute the load of a single zabbix server. |
|
|
Agent |
Deployed on monitoring targets to actively monitor local resources and applications and report the gatherd data to zabbix server |
|
|
Data flow |
Important to take a step back and have a look at the overall data flow within zabbix. |
The process within zabbix. |
4 terminology
|
Index |
Name |
description |
|
1 |
Host |
A network device that you want to monitor,with ip/dns |
|
2 |
Host group |
Logical groupting of hosts,may contain hosts and templates. Hosts and templates within a host group are not in any way linked to each other. Host groups are used when assigning access rights to hosts for different user groups. |
|
3 |
item |
A particular piece of data that you want to receive off of a host,a metric of data |
|
4 |
Trigger |
A logical expression that defines a problem threshold and is used to “evaluate” data received in items When received data are above the threshold, triggers go from 'Ok' into a 'Problem' state. When received data are below the threshold, triggers stay in/return to an 'Ok' state. |
|
5 |
Event |
a single occurrence of something that deserves attention such as a trigger changing state or a discovery/agent auto-registration taking place |
|
6 |
problem |
a trigger that is in “Problem” state |
|
7 |
action |
a predefined means of reacting to an event. An action consists of operations (e.g. sending a notification) and conditions (when the operation is carried out) |
|
8 |
escalation |
a custom scenario for executing operations within an action; a sequence of sending notifications/executing remote commands |
|
9 |
media |
a means of delivering notifications; delivery channel |
|
10 |
notification |
a message about some event sent to a user via the chosen media channel |
|
11 |
template |
a set of entities (items, triggers, graphs, screens, applications, low-level discovery rules, web scenarios) ready to be applied to one or several hosts The job of templates is to speed up the deployment of monitoring tasks on a host; also to make it easier to apply mass changes to monitoring tasks. Templates are linked directly to individual hosts. |
|
12 |
application |
a grouping of items in a logical group |
|
13 |
web scenario |
one or several HTTP requests to check the availability of a web site |
5 zabbix process
5.1server
5.1.1Features
|
Index |
features |
detail |
|
1 |
performs the polling and trapping of data |
Polling : 轮询,服务器隔一段时间读取 Trapping:自陷,客户端主动上报 Agent and proxies’ central component. |
|
2 |
Central repository in which all configuration,statistical and operational data is stored |
1A basic zabbix server:zabbix server,web frontend and database storage 2All of the configuration information for Zabbix is stored in the database, which both the server and the web frontend interact with. |
5.1.2zabbix Processes
5.1.2.1server
Premise:If installed as package
Zabbix server runs as a daemon process
1.base process
|
Process |
Detail |
remark |
|
Start |
shell> service zabbix-server start or shell> /etc/init.d/zabbix-server start |
If it doesn’t work,you hava to start it manually: Find the path to the zabbix_server binary and execute: shell> zabbix_server |
|
other |
shell> service zabbix-server stop shell> service zabbix-server restart shell> service zabbix-server status |
|
|
Run zabbix with command line parameters |
-c –config<file> -R –runtime-control<option> -h –help -V --version |
1Runtime control is not supported on OpenBSD and NetBSD 2example: shell>zabbix_server -c /usr/local/etc/zabbix_server.conf shell> zabbix_server --help shell> zabbix_server -V |
|
Runtime control |
|
|
Runtime control
|
Option |
Description |
target |
|
config_cache_reload |
Reload configuration cache. Ignored if cache is being currently loaded. |
|
|
housekeeper_execute |
Start the housekeeping procedure. Ignored if the housekeeping procedure is currently in progress. |
|
|
log_level_increase[=<target>] |
Increase log level, affects all processes if target is not specified. |
pid - Process identifier (1 to 65535) process type - All processes of specified type (e.g., poller) process type,N - Process type and number (e.g., poller,3) |
|
log_level_decrease[=<target>] |
Decrease log level, affects all processes if target is not specified. |
1)Allowed range of PIDs for changing the log level of a single Zabbx process is from 1 to 65535.
2)On systems with large PIDs <process type,N> target option can be used for changing the log level of a single process.
Example:
|
Option |
Command |
remark |
|
reload the server configuration cache |
shell>zabbix_server -c /usr/local/etc/ zabbix_server.conf –R config_cache_reload |
|
|
trigger execution of housekeeper |
shell> zabbix_server -c /usr/local/etc/zabbix_server.conf -R housekeeper_execute |
|
|
change log level |
1) Increase log level of all processes: shell> zabbix_server -c /usr/local/etc/zabbix_server.conf -R log_level_increase 2)Increase log level of second poller process: shell> zabbix_server -c /usr/local/etc/zabbix_server.conf -R log_level_increase=poller,2 3) Increase log level of process with PID 1234: shell> zabbix_server -c /usr/local/etc/zabbix_server.conf -R log_level_increase=1234 4) Decrease log level of all http poller processes: shell> zabbix_server -c /usr/local/etc/zabbix_server.conf -R log_level_decrease="http poller" |
|
2process user
|
Option |
Description |
remark |
|
Zabbbix server is designed to run as a non-root user. |
It will run as whatever non-root user it is started as. So you can run server as any non-root user without any issues. |
|
|
If you want run it as ‘root’ |
it will switch to a hardcoded 'zabbix' user, which must be present on your system. 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. |
|
|
Start-up scripts |
automatically start/stop Zabbix processes during system's start-up/shutdown. The scripts are located under directory misc/init.d. |
|
|
Supported platforms |
Unix is the only operating system that can consistently deliver the necessary performance, fault tolerance and resilience. |
Zabbix server support: Linux|Solaris|AIX|Mac OS X |FreeBSD|OpenBSD|NetBSD |SCO Open Server |Tru64/OSF1 |
|
Local |
the server requires a UTF-8 locale |
|
5.1.2.2zabbix agent
1Overview:
|
Index |
Description |
note |
|
1 |
Is deployed on a monitoring target to actively monitor local resources and applications (hard drivers,memory,processor statistics etc) |
Gather operational information locally and reports data to zabbix server. |
|
2 |
Zabbix agents can perform passive and active checks |
|
|
3 |
Supported platforms |
Linux|IBM AIX|FreeBSD| NetBSD|OpenBSD|HP-UX| MAC OS X|solaris 9,10,11 |window:all since xp |
2passive and active checks
|
Option |
Description |
note |
|
Passive check |
The agent responds to data request,zabbix server(or proxy)asks for data. |
|
|
Active check |
The agent must first retrieve a list of items from zabbix server.Agent periodically send new values to server. |
Require More complex processing |
Note: Whether to perform passive or active checks is configured by selecting the respective monitoring item type. Zabbix agent processes items of type 'Zabbix agent' or 'Zabbix agent (active)
3 agent on UNIX-like systems
If installed as package, See the package installation section for instructions on how to install Zabbix agent as package.
|
Operation |
Description |
note |
|
Start |
shell> service zabbix-agent start or shell> /etc/init.d/zabbix-agent start |
|
|
Stop/restart /status |
shell> service zabbix-agent stop shell> service zabbix-agent restart shell> service zabbix-agent status |
|
|
Start up manually |
If the above doesn’t work, Find the path to the zabbix_agentd binary and execute: shell> zabbix_agentd |
|
|
|
|
|
|
|
|
|
4agent on windows systems
|
Operation |
Description |
note |
|
preparation |
1Download and uppack the zip agent file,choose any folder to store.e.g. c:\zabbix 2copy bin\win64\zabbix_agentd.exe and conf\zabbix_agentd.win.conf to c:\zabbix 3edit the c:\zabbix\zabbix_agentd.win.conf to your needs, making sure to specify a correct “Hostname” parameter |
|
|
installation |
install Zabbix agent as Windows service C:\> c:\zabbix\zabbix_agentd.exe -c c:\zabbix\zabbix_agentd.win.conf -i |
|
5.1.2.3zabbix proxy
|
index |
description |
|
1 |
zabbix proxy is a process tha may collect monitoring data from one or more monitored devices and send the information to the zabbix server,essentially working on behalf of the server. |
|
2 |
All collected data is buffered locally and then transferred to the server the proxy belongs to. |
|
3 |
Optional,but may very beneficial to distrubute the load of a single server. If only proxies collect data, processing on the server becomes less CPU and disk I/O hungry. |
|
4 |
Zabbix proxy requires a serparte database. E.g. sqlite,mysql,postgresql. |
Proxy process
|
Operation |
Description |
note |
|
installation |
If installed as package |
|
|
Start |
shell> service zabbix-proxy start or shell> /etc/init.d/zabbix-proxy start |
|
|
Stop/restart/status |
shell> service zabbix-proxy stop shell> service zabbix-proxy restart shell> service zabbix-proxy status |
|
|
Start up manually |
If the above does not work you have to start it manually. Find the path to the zabbix_proxy binary and execute: shell> zabbix_proxy |
|
|
command line parameters |
-c --config <file> path to the configuration file -R --runtime-control <option> perform administrative functions -h --help give this help -V --version display version number Examples: shell> zabbix_proxy -c /usr/local/etc/zabbix_proxy.conf shell> zabbix_proxy --help shell> zabbix_proxy -V |
Runtime control is not supported on OpenBSD and NetBSD |
|
Runtime control |
|
|
5.1.2.4java geteway
|
index |
description |
|
1 |
since Zabbix 2.0. Native support for monitoring JMX applications The application does not need any additional software installed, it just has to be started with -Dcom.sun.management.jmxremote option on the command line. |
|
2 |
Java gateway accepts incoming connection from Zabbix server or proxy and can only be used as a “passive proxy”. Access to each Java gateway is configured directly in Zabbix server or proxy configuration file, thus only one Java gateway may be configured per Zabbix server or Zabbix proxy. |
|
3 |
If a host will have items of type JMX agent and items of other type, only the JMX agent items will be passed to Java gateway for retrieval. |
|
4 |
1Zabbix server or proxy has a specific type of processes that connect to Java gateway, controlled by the option StartJavaPollers. 2Internally, Java gateway starts multiple threads, controlled by the START_POLLERS option. 3On the server side, if a connection takes more than Timeout seconds, it will be terminated, but Java gateway might still be busy retrieving value from the JMX counter. there is the TIMEOUT option in Java gateway that allows to set timeout for JMX network operations. |
|
5 |
It is suggested to have StartJavaPollers less than or equal to START_POLLERS, |
|
Operation |
Description |
note |
|
Getting java gateway |
1download from zabbix website http://www.zabbix.com/download.php Or 2compile java gateway from source https://www.zabbix.com/documentation/3.4/manual/concepts/java |
|
|
Overview of files In java gateway distribution |
1you should have ended up with a collection of shell scripts 2JAR and configuration files under $PREFIX/sbin/zabbix_java 3bin/zabbix-java-gateway-$VERSION.jar The Java gateway JAR file itself. 4lib/logback-core-0.9.27.jar lib/logback-classic-0.9.27.jar lib/slf4j-api-1.6.1.jar lib/android-json-4.3_r3.1.jar Dependencies of Java gateway: Logback, SLF4J, and Android JSON library. 5 lib/logback.xml lib/logback-console.xml Configuration files for Logbac 6 shutdown.sh startup.sh Convenience scripts for starting and stopping Java gateway. 7 settings.sh Configuration file that is sourced by startup and shutdown scripts above. |
|
|
Configuring And run |
1default port:10052 2after setting,can start with : $ ./startup.sh ;or stop with: $ ./shutdown.sh |
|
|
Configuring server for use with java gatewary |
The java gateway is running,then tell server where to find gateway. 1specifying JavaGateway and JavaGatewayPort parameters in server configuration file.if the jmx application host is monitored by zabbix proxy,specify the proxy configuration file: JavaGateway=192.168.3.14 JavaGatewayPort=10052 2default,server not start any processes related to jmx monitoring,can specify the number of pre-forked instances of java pollers. StartJavaPollers=5 3then,restart server or proxy. |
|
|
Debugging java gateway |
1 By default, Java gateway logs its activities into /tmp/zabbix_java.log file with log level “info”. To increase logging level “debug”.modify file lib/ logback.xml and change the level attribute of <root> tag to “debug” <root level="debug"> <appender-ref ref="FILE" /> </root>
|
no need to restart Zabbix Java gateway after changing logback.xml file - changes in logback.xml will be picked up automatically. |
|
start Java gateway as a console application rather than a daemon |
comment out PID_FILE variable in settings.sh. If PID_FILE is omitted, startup.sh script starts Java gateway as a console application and makes Logback use lib/logback-console.xml file instead, which not only logs to console, but has logging level “debug” enabled as well |
|
5.1.2.5sender
|
index |
description |
|
1 |
is a command line utility that may be used to send performance data to Zabbix server for processing. The utility is usually used in long running user scripts for periodical sending of availability and performance data. |
|
2 |
For sending results directly to Zabbix server or proxy, a trapper item type must be configured. |
|
3 |
can be used to send multiple values from an input file. See the Zabbix sender manpage for more information. |
|
Operation |
Description |
note |
|
Running zabbix sender |
1linux-like shell> cd bin shell> ./zabbix_sender -z zabbix -s "Linux DB3" -k db.connections -o 43 where: z - Zabbix server host (IP address can be used as well) s - technical name of monitored host (as registered in Zabbix frontend) k - item key o - value to send 2 windows Zabbix sender on Windows can be run similarly: zabbix_sender.exe [options] |
1Options that contain whitespaces, must be quoted using double quotes. 2Zabbix sender accepts strings in UTF-8 encoding 3A value that is not further apart from the previous value than 0.2 seconds can be put in the same stack, but maximum pooling time still is 1 second. 4Zabbix sender will terminate if invalid (not following parameter=value notation) parameter entry is present in the specified configuration file. |
5.1.2.6Get
|
index |
description |
|
1 |
1a command line utility which can be used to communicate with Zabbix agent and retrieve required information from the agent. 2The utility is usually used for the troubleshooting of Zabbix agents. |
|
Operation |
Description |
note |
|
Running zabbix get |
1get the processor load value from the agent: shell> cd bin shell> ./zabbix_get -s 127.0.0.1 -p 10050 -k system.cpu.load[all,avg1] 2capturing a string from a website: shell> cd bin shell> ./zabbix_get -s 192.168.1.1 -p 10050 -k "web.page.regexp[www.zabbix.com,,,\"USA: ([a-zA-Z0-9.-]+)\",,\1]"
|
1Note that the item key here contains a space so quotes are used to mark the item key to the shell. The quotes are not part of the item key; they will be trimmed by the shell and will not be passed to Zabbix agent. |
|
Zabbix get accepts the following command line parameters: |
-s --host <host name or IP> Specify host name or IP address of a host. -p --port <port number> Specify port number of agent running on the host. Default is 10050. -I --source-address <IP address> Specify source IP address. -k --key <item key> Specify key of item to retrieve value of. -h --help Give this help. -V --version Display version number. |
See also Zabbix get manpage for more information. |
|
Zabbix get on Windows can be run similarly: |
zabbix_get.exe [options] |
|
zabbix系列之一——简要介绍的更多相关文章
- [转]Android系统Surface机制的SurfaceFlinger服务简要介绍和学习计划
转自:Android系统Surface机制的SurfaceFlinger服务简要介绍和学习计划 前面我们从Android应用程序与SurfaceFlinger服务的关系出发,从侧面简单学习了Surfa ...
- [转] Android资源管理框架(Asset Manager)简要介绍和学习计划
转自:http://blog.csdn.net/luoshengyang/article/details/8738877 Android应用程序主要由两部分内容组成:代码和资源.资源主要就是指那些与U ...
- Android资源管理框架(Asset Manager)简要介绍和学习计划
文章转载至CSDN社区罗升阳的安卓之旅,原文地址:http://blog.csdn.net/luoshengyang/article/details/8738877 Android应用程序主要由两部分 ...
- Android窗口管理服务WindowManagerService的简要介绍和学习计划
在前一个系列文章中,我们从个体的角度来分析了Android应用程序窗口的实现框架.事实上,如果我们从整体的角度来看,Android应用程序窗口的 实现要更复杂,因为它们的类型和作用不同,且会相互影响. ...
- Android应用程序窗口(Activity)实现框架简要介绍和学习计划
文章转载至CSDN社区罗升阳的安卓之旅,原文地址:http://blog.csdn.net/luoshengyang/article/details/8170307 前面我们学习了SurfaceFli ...
- Android系统Surface机制的SurfaceFlinger服务简要介绍和学习计划
文章转载至CSDN社区罗升阳的安卓之旅,原文地址:http://blog.csdn.net/luoshengyang/article/details/8010977 前面我们从Android应用程序与 ...
- SEAndroid安全机制简要介绍和学习计划
与iOS相比.Android最被人诟病的是其流畅性和安全性. 然而,从4.0開始,Android不遗余力地改善其流畅性. 特别是在即将公布的L版本号中,用ART替换了Dalvik,相信会越来越流畅.至 ...
- JBPM4入门——1.jbpm简要介绍
本博文只是简要对JBPM4进行介绍,如需更详细内容请自行google 链接: JBPM入门系列文章: JBPM4入门——1.jbpm简要介绍 JBPM4入门——2.在eclipse中安装绘制jbpm流 ...
- 简要介绍BASE64、MD5、SHA、HMAC几种方法。
加密解密,曾经是我一个毕业设计的重要组件.在工作了多年以后回想当时那个加密.解密算法,实在是太单纯了. 言归正传,这里我们主要描述Java已经实现的一些加密解密算法,最后介绍数字证书. ...
随机推荐
- Cloudera Manager安装之利用parcels方式安装3或4节点集群(包含最新稳定版本或指定版本的安装)(添加服务)(CentOS6.5)(五)
参考博客 Cloudera Manager安装之利用parcels方式安装单节点集群 Cloudera Manager安装之Cloudera Manager 5.3.X安装(三)(tar方式.rpm ...
- Java的符号扩展与零扩展
byte b = -127; System.out.println(b); // -127 int b1 = b & 0xff; System.out.println(b1); // 129 ...
- android学习-LocationManager(一)-
Location Provider是不同位置信息来源的抽象 Location封装了从位置提供者提供给应用的位置数据(经纬度) Criteria提供了查询获取包含特定特征的位置提供者(accuracy精 ...
- 自定义针对Product Key处理的TextBox
代码: using System; using System.Collections.Generic; using System.Linq; using System.Text; using Syst ...
- Java代码实现单例模式
public class Single { /*private static final Single single=new Single(); private Single(){} public s ...
- SpringMVC源码阅读:核心分发器DispatcherServlet
1.前言 SpringMVC是目前J2EE平台的主流Web框架,不熟悉的园友可以看SpringMVC源码阅读入门,它交代了SpringMVC的基础知识和源码阅读的技巧 本文将介绍SpringMVC的核 ...
- 【原】戏说Java
戏说Java 本文只是个人闲余之际写的,查阅了些许资料,仅当娱乐.如有雷同,纯属巧合. 如果要学好一个东西,就应该要把他拟人化,当做一个你的好朋友,对他产生兴趣,那么你自然而然就会学习好他了.俗话 ...
- javascript 单双引号(转载)
来源:http://blog.csdn.net/irxiang/article/details/50164945 最近在使用javascript编程,遇到使用字符串的情况 写了一点测试代码 var s ...
- 转载:sql用逗号连接多张表对应哪个join?
http://blog.csdn.net/huanghanqian/article/details/52847835 四种join的区别已老生常谈: INNER JOIN(也可简写为JOIN): 如果 ...
- Hive 基础你需要掌握这些
HDFS 中一个简单的 Join查询,是否需要撸一大串代码?我只会SQL语句 能不能入坑大数据?这里我们就来聊一聊 Hive. Hive 是什么? Hive 是一种数据仓库工具,不提供数据存储(数据还 ...