Zabbix remote command execution and zabbix Command Execution
Originally published in cu:
When the Zabbix trigger reaches the threshold, an action is executed to send an alarm message or execute a remote command.
This document describes how to configure zabbix to run remote commands.I. Environment
Server: CentOS-7-x86_6
the monitored host, which collects the data periodically and sends it to the Zabbix server side, Zabbix server stores the data in the database, Zabbix the web to show and draw on the front end based on the data. Here the agent collects data into both active and passive modes:Active: The agent requests the server to get a list of active monitoring items and proac
This article takes the CentOS 6.7 x86_64 system as an example, the environment is the new system which just completes.Zabbix-server-End Environmental monitoring[Email protected] ~]# Cat/etc/redhat-releasecentos release 6.7 (Final) [[email protected] ~]# uname-r2.6.32-573.8.1.el6 . X86_64[[email protected] ~]# uname-mx86_64[[email protected] ~]# Hostnamelinux-node1.example.com[[email protected] ~]# Ifconfig | Awk-f ' [inet addr:|]+ ' Nr==2{print $} ' 10.19.1.19[[email protected] ~]# yum repolist
)
#vi/etc/zabbix/zabbix_agentd.confserver=127.0.0.1,172.16.100.7 (server-side reserved 127.0.0.1)serveractive=127.0.0.1,172.16.100.7Hostname-node1.magedu.com#service zabbix_agent StartWeb page Configuration Monitoring Server itself
Configure monitoring for other Linux hosts#scp-R zabbix-2.4/mode2:/root to copy all zabbix-2.4 RPM packages to the Node
Because of the need to monitor company-specific services, writing scripts to get the information that each process consumes system resources, using Zabbix to capture that data for the underlying monitoring of a particular process.My main need to monitor the program is as follows:Nginx Redis MySQL Tomcat Sentinel MongoDB openfire Kafka zookeeper Twemproxy MycatFirst, write the monitoring script on the agent side, the script content is as follows:[[Emai
By default, Zabbix has 5 processes:Zabbix_agent zabbix_get zabbix_proxy Zabbix_sender Zabbix_server, another zabbix_java_gateway is optional, this requires additional installation.ZABBIX_AGENTD: Client daemon, which collects client data such as CPU load, memory, hard disk usage, etc.The Zabbix_get:zabbix tool, which is used separately, usually executes commands to obtain remote client information on the server or proxy side. Usually the user is wrongl
[Zabbix series] Alarm System Setting and elimination, zabbix series Alarm SystemThere are many solutions for email alert. Here we choose the msmtp + mutt solution with better stability.
A good solution is that you do not need to build an independent mail server on your own. You can use third-party mail. This method not only effectively solves the problem that unknown email addresses are processed as spam em
First, the experimental needsThe company's Tomcat service often crashes automatically, causing business disruption, temporarily monitoring it with Zabbix, and enabling it to start automatically when Tomcat crashes, ensuring that the business returns to normal as soon as possible.Second, the preparation environmentSystem Environment: CentOS 6.5IP Address:zabbix-server:192.168.239.128zabbix-agent:192.168.239.130Installation of
Zabbix administrators Group and create the right-click receiver and corresponding security level in the user's media attributes.
The type option here is the name of the media type just created, and send to is the mail recipient.
5. Create a trigger action
Perform operations after configuration-actions is created and triggered
Default subject: fault !!! [{HOSTNAME1}]: {TRIGGER. NAME} recovery subject: Recovered !!! [{HOSTNAME1}]: {TRIGGER. NAME} de
perfcounter expression
Method Two:
Enter the start-gt; run, enter cmd into the command window. Input typeperf–qx| More gets the related perfcounter expression. You can also match the output of the pipeline to find, looking for the relevant expression of the desired. To get the NIC PerfCounter as an example, enter at the command line: TYPEPERF–QX |find "Network Interface" |find/v "loopback"
The command means to find the PerfCounter associated with "network Interface". /V is a perfcounter that
The new company monitoring with the Zabbix, which used to Zabbix-proxy, originally did not try to get, now first installed to see in order to follow up the use of inspection.Zabbix-proxy is a monitoring proxy server, which collects the monitored data, stores it in the buffer, the time can be set by the configuration file, and then transferred to Zabbix_server; the monitoring agent needs a separate database
first, environmental preparedness
Host and software preparation
Os:centos 6.7x86_64
Zabbix version: zabbix-3.0.2
MySQL version: MariaDB10.1.13
Nginx Version: nginx-1.8.0
PHP Version: php-5.6.1
Host IP Planning:
Host ip:192.168.3.45
Host Resource planning:
Memory: More than 2GB
Host partition:/TMP partition at least 2G above, MySQL data disk 20G above
Second, basic component Installation (LNMP)
1), the basic
group-create host group-set group nameConfiguration-host-create host, host name can be written as visible name, group Select the group you just createdIP Address Write client IP (note that this is the only path that Zabbix communicates with the monitored host and cannot be written incorrectly) my client is 192.168.226.1302 Adding a templateCreate an empty template first.Configuration-templates-create TemplateSpecify a name, template name and visible
Retry is successful.
If fail exists, search for the corresponding keyword in the/etc/PHP. ini file and change it to the one required.
Next, go to the next page and check the MySQL connection.
Set MySQL connection parameter and test connection. The connection is successful.
One way to next, the following page appears
Click Save configuration file, upload the file to the/var/www/html/conf directory of the VM, and click Retry.
All the way to next, enter the login page
Enter the management Username
Zabix Introduction Zabbix (with Z? ) Bix) is an enterprise-class open source solution that provides distributed system monitoring and network monitoring capabilities based on a web interface.
Zabbix can monitor various network parameters, ensure the safe operation of the server system, and provide a flexible notification mechanism to enable system administrators to quickly locate/resolve various p
Yum deployment, zabbix monitoring, and yum deployment of zabbix monitoring
Deploy zabbix monitoring in yum
Chapter 2 deploy zabbix server in yum... 1
1.1 command line deployment... 1
1.1.1 yum source configuration-explanation... 2
1.1.2 MariaDB and mysql 3
1.2 zabbix-web i
Tags: Linux add defined Item monitoring item(13) zabbix_linux add a defined item monitor itemBackground:1 , zabbix3.4.4 Server Setup completedIdeas:1 , monitored to allow custom monitoring items and create custom monitoring items2 , test whether the data is displayed properly by Zabbix server side with zabbix_get co
example, HostMetadata = Linux
HostMetadataItem must be set to item, which is usually set to system. uname.
The returned values of system. uanme are as follows:
# zabbix_get -s node1 -k system.unameLinux node1 2.6.32-573.el6.x86_64 #1 SMP Wed Jul 1 18:23:37 EDT 2015 x86_64
Set Operations
Here, you can perform the following operations:
Send message
Remote command
Add host
Add to host group
Link to template
Disable host
Here, I have set the following
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.