Implementation of Zabbix agentd and Zabbix Server Automatic startup

Source: Internet
Author: User

Zabbix supports ping, snmp, and many other monitoring tasks. However, most monitoring tasks can be used only with the support of client agentd. To avoid manual operation every time, perform the following steps:

1. Copy the startup script under the zabbix source program misc/init. d/redhat to the/etc/init. d directory.
Cp/zabbi x/zabbix-1.6.6/misc/init. d/redhat/zabbix_server_ctl/etc/init. d/zabbix_server
Cp/zabbi x/zabbix-1.6.6/misc/init. d/redhat/zabbix_agentd_ctl/etc/init. d/zabbix_agentd

2. Modify the startup script so that it supports redhat chkconfig #! Add the following two lines of comments to/bin/sh. Note that "#" must be added before the line.
# Chkconfig:-95 95
# Description: Zabbix Server

3. Modify BASEDIR and ZABBIX_SUCKERD in the Zabbix agentd STARTUP script to set the installation location of zabbix_server and zabbix_agentd, such:
BASEDIR =/usr/local/sbin
ZABBIX_SUCKERD = $ BASEDIR/zabbix_server

4. Use chkconfig to add Zabbix agentd to the startup service of init.
Chkconfig -- add zabbix_server
Chkconfig -- add zabbix_agentd
Chkconfig -- level 345 zabbix_server on
Chkconfig -- level 345 zabbix_agentd on

5. Check with chkconfig -- list
Chkconfig -- list | grep zabbix
The output is as follows:
Zabbix_agentd 0: off 1: off 2: off 3: on 4: on 5: on 6: off
Zabbix_server 0: off 1: off 2: off 3: on 4: on 5: on 6: off
 

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.