In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
A brief introduction to zabbix
Zabbix is an enterprise-level monitoring solution, it can use SNMP, zabbix special agent, simple system management and network tools to monitor objects, collect information, and store the collected information in the database, through real-time drawing to display the data, and according to the threshold, exceed and alarm, and has the function of linkage processing, that is, using scripts for service restart and other operations. Among the many monitoring tools, zabbix has a special Avent monitoring tool, and in many operating systems such as windowns,linux, it has its own dedicated Avent. In network devices, such as routers and switches, zabbix uses SNMP protocol or SSH protocol to achieve monitoring functions. The data stores supported by zabbix are mysql and pgsql databases. To sum up, zabbix has many functions. In the field of application, zabbix has been widely spread since version 1.8.
The architecture of automatic monitoring is as follows:
(quoted from Ma GE document)
Objects that can be monitored by zabbix:
Equipment / softwar
Devices: servers, routers, switches, IO systems
Software: OS, network, application
Unexpected condition:
Host downmachine, service unavailable, host unreachable
Critical event failure:
The disk is full and the data node down is missing.
Host performance metrics:
CPU, memory usage
Trend: time series data (commonly used in the data presentation phase)
Components included in zabbix:
Zabbix-server
Zabbix-agent
Zabbix-web:GUI, the user implements zabbix setting and display
Zabbix-proxy: a dedicated component in a distributed monitoring environment
Zabbix-database:MYSQL,PGSQL (postgreSQL), Oracle,DB2,SQLite
Common terms for zabbix:
Host (host): the network device to be monitored, which can be specified by IP or DNS name
Host group (host group): a logical container of a host, which can contain hosts and templates, but hosts and templates within the same group cannot be linked to each other. Host groups are usually used when assigning monitoring permissions to users or user groups.
Monitoring item (item); data related to a specific monitoring indicator, which comes from the monitored object. Item is the core of data collection in zabbix. Without item, there will be no data. Relative to a monitoring object, each item is identified by "key".
Trigger (trigger): an expression used to evaluate whether the data received within a particular item of a monitoring object is within a reasonable range, that is, a threshold; when the amount of data received is greater than the threshold, the state of the trigger will change from "ok" to "problem", and when the amount of data returns to a reasonable range, its state will change from "problem" to "ok".
Event: an event that is of concern, such as the state transition of a trigger, the automatic registration of a new agent or a re-online agent, etc.
Action (action): a predefined method of handling a particular event by including actions (such as sending notifications) and conditions (when to perform the action)
Alarm upgrade (escclction): a custom scheme for sending alerts or executing remote commands, such as sending alerts every 5 minutes, a total of 5 times, etc.
Media: a means or channel for sending notifications, such as Email, Jabber, or SMS
Notification: information about an event sent to a user through a selected medium
Remote command (remote command): a predefined command that can be executed automatically when the monitored host is under certain conditions
Template: a collection of preset entries used to quickly define monitored hosts, usually including item, trigger, graph, screen, application, and low-level discovery rule (lower-level discovery rules); templates can be linked directly to a single host
Application (application): a collection of item
Web scenario (web scennario): one or more HTTP requests used to test the availability of a web site
Front end (frontend): web interface of zabbix
Zabbix workflow:
After defining HostGroups, you can define Host,Host directly using Template,Template including Graphs (display), Triggers (alarm) and items (monitoring item). Host can also define items first, and then define Triggers,Triggers on items to define threshold. When the monitored value exceeds the threshold, it triggers Events (event), and Events activates Actions (action). Action performs script restart service or other alarm operations, such as email, phone, and so on. Maintenance defines that during the period of business online, software and hardware maintenance, no alarm is generated, while items collects information through agent,snmp,internal,ipmi and other methods. HostGroups grouping can be based on host type, geographic location, business, and so on.
Main processes on the zabbix server side:
Watchdog: monitors all processes on the server side
Poller: collect data from the agent end
Poller dedicated to httppoller:http
Discoverer: automatically discovers agent and joins monitoring
Alerter: alarm
Housekeeper: internal management
Pinger: detect whether the host is online through ping operation
Escalator: alarm upgrade
Timer: timer
Nodewatcher: monitoring nod
Db_data_syncer: database data Synchronizer
Db_config_syncer: database configuration Synchronizer
After the introduction of zabbix, let's deploy zabbix.
II. Zabbix deployment
Before installing zabbix, deploy LAMP or LNMP in advance.
For more information on deploying LAMP, see-> compiling and deploying LAMP
Zabbix can be obtained on the official website at http://www.zabbix.com/download
The zabbix official website provides us with three installation methods:
(1) Source code compilation and installation
# tar-zxvf zabbix-3.2.1.tar.gz installs both server and agent, and supports putting data into mysql data. You can use the following configuration command similar to:. / configure-- enable-server-- enable-agent-- with-mysql-- enable-ipv6-- with-net-snmp-- with-libcurl-- with-ssh3 if only server is installed and supports putting data into mysql data You can use a configuration command similar to the following:. / configure-- enable-server-- with-mysql-- with-net-snmp-- with-libcurl if you only install proxy and support putting data into mysql data, you can use a configuration command similar to. / configure-- prefix=/usr-- enable-proxy-- with-net-snmp-- with-mysql-- with-ssh3 if only agent is installed You can use a configuration command similar to. / configure-- enable-agent and then compile and install zabbix: # make# make install
(2) configure yum source installation
[root@jymlinux ~] # rpm- ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpmRetrieving http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpmwarning: / var/tmp/rpm-tmp.QBkmAF: Header V4 DSA/SHA1 Signature, key ID 79ea5ed4: NOKEYPreparing... # [100%] 1:zabbix-release # [root@jymlinux] # yum clean all loaded plug-in: fastestmirror Langpacks is cleaning up the software source: base extras updates zabbix zabbix-non-supportedCleaning up everythingCleaning up list of fastest mirrors [root@jymlinux ~] # yum makecache
(3) download and install rpm package
two。 Configure zabbix-database. Take mysql as an example, you can use mysql and pgsql
MariaDB [(none)] > create database zabbix character set utf8;MariaDB [(none)] > grant all on zabbix.* to 'zbxuser'@'localhost' identified by' zbxpass';MariaDB [(none)] > grant all on zabbix.* to 'zbxuser'@'192.168.%.%' identified by' zbxpass';MariaDB [(none)] > flush privileges;# connection test [root@jymlinux] # mysql-uzbxuser-hlocalhost-pEnter password: Welcome to the MariaDB monitor. Commands end with; or\ g.Your MariaDB connection id is 4Server version: 5.5.50-MariaDB MariaDB ServerCopyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.MariaDB [(none)] >\ qBye
3. Install zabbix
[root@jymlinux ~] # yum install zabbix zabbix-agent zabbix-get zabbix-sender zabbix-server zabbix-server-mysql zabbix-web zabbix-web-mysql generates the configuration file of zabbix-web in httpd [root@jymlinux ~] # cd / etc/zabbix/ [root@jymlinux zabbix] # lsweb zabbix_agentd.conf zabbix_agentd.d zabbix_ server.confs [root @ jymlinux zabbix] # service httpd startStarting httpd: [root@jymlinux zabbix] # ls / etc/httpd/conf.dphp.conf README welcome.conf zabbix .conf # import zabbix into the database [root@jymlinux zabbix] # cd / usr/share/doc/zabbix-server-mysql-2.4.8/ [root@jymlinux zabbix-server-mysql-2.4.8] # cd create/ [root@jymlinux create] # mysql zabbix < schema.sql # Note the import order [root@jymlinux create] # mysql zabbix < p_w_picpaths.sql [root@jymlinux create] # mysql zabbix < data.sql # if you only create a database for proxy Just import schema.sql
4. Configure zabbix-server
[root@jymlinux ~] # vim / etc/zabbix/zabbix_server.conf### Option: DBHost# Database host name.# If set to localhost, socket is used for MySQL.# If set to empty string, socket is used for PostgreSQL.## Mandatory: no# Default:# DBHost=localhostDBHost=192.168.3.8 # enter the connected database server. Default is native # Option: DBUser# Database user. Ignored for SQLite.## Mandatory: no# Default:# DBUser=DBUser=zabbix### Option: DBPassword# Database password. Ignored for SQLite.# Comment this line if no password is used.## Mandatory: no# Default:# DBUser=DBUser=zbxuser # fill in the database user name # Option: DBPassword# Database password. Ignored for SQLite.# Comment this line if no password is used.## Mandatory: no# Default:# DBPassword=DBPassword=zbxpass # fill in the database password other common modification options ListenIP=localhost # database ip address AlertScriptsPath=/usr/local/zabbix/share/zabbix/alertscripts # zabbix run script storage directory
5. Modify PHP time zone
[root@jymlinux zabbix] # vim / etc/php.ini date.timezone = 'Asia/Chongqing' # modify the time zone to Chongqing
At this point, zabbix is configured, and then you can use the gui interface to define monitoring operations such as objects.
If there are any mistakes, please correct them.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.