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