Zabbix action to execute a remote command

Source: Internet
Author: User

It's all right today. Zabbix Action executes the remote command, got a morning, finally good. It is now recorded, for later to appear similar problems can be consulted.


First, the service I want to monitor is Nginx/mysqld, which opens the remote execute command on the client to be monitored.


Enableremotecommands=1


Then add permissions on the client

Command #visudo

At the end of the add

# allows ' Zabbix ' user to run all commands without password.

Zabbix All=nopasswd:all

# # allows ' Zabbix ' user to restart Apache without password.

Zabbix all=nopasswd:/etc/init.d/nginx restart


After commenting out

#Defaults Requiretty # #表示不需要控制终端


Once saved, restart the Zabbix client.


Zabbix the trigger action on the service side, that is, after the Nginx/mysqld service is hung, restart the service

Under Configuration-actions, create actions, as follows:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/5C/2B/wKiom1UbuQ-ShB9eAAFxkpQcjZ0122.jpg "title=" QQ picture 20150401172229.png "alt=" Wkiom1ubuq-shb9eaafxkpqcjz0122.jpg "/>



650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/5C/26/wKioL1Ubumbxi_7SAAHZcMtMlh0624.jpg "title=" QQ picture 20150401172251.png "alt=" Wkiol1ubumbxi_7saahzcmtmlh0624.jpg "/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/5C/2B/wKiom1UbuKPCTReCAAOWOXibvpk728.jpg "title=" QQ picture 20150401171859.png "alt=" Wkiom1ubukpctrecaaowoxibvpk728.jpg "/>

Zabbix action to execute a remote command

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.