Ad Widget

Collapse

Reload zabbix_agentd configuration

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rts
    Member
    • May 2007
    • 54

    #1

    Reload zabbix_agentd configuration

    Hi,

    Can a signal be sent to zabbix_agentd to cause it to reload the configuration? At present, if I change the config file, I have to killall zabbix_agentd, then wait for no zabbix processes to be running, then restart it. Is there a better way?

    Thanks
  • tazzu
    Junior Member
    • Nov 2006
    • 26

    #2
    I think you can't change the configuration while runetime. As you said you have to stop the agent and restart.

    Edit:

    The better way to kill the processes is:

    /etc/init.d/zabbix-agent stop

    Comment

    • Jun.Liu
      Member
      • Apr 2007
      • 91

      #3
      I'm using the zabbix1.6.1 but I can't find the zabbix-agent at directory /etc/init.d/.

      but it seems ok that just issue the command 'zabbix_agantd' and press ENTER!

      Comment

      • tighep
        Senior Member
        • Dec 2007
        • 124

        #4
        While you do need to bounce the agent, it is possible to automate that task. I created a trigger that watches the config file, when that changes a remote command runs a script that calls the at command to issue my restart. This has been working for me for about 6 months now.

        Comment

        • tchjts1
          Senior Member
          • May 2008
          • 1605

          #5
          Originally posted by Jun.Liu
          I'm using the zabbix1.6.1 but I can't find the zabbix-agent at directory /etc/init.d/.
          After you compiled the code, did you do this step? (From /home/zabbix/zabbix-1.6.1)
          Code:
          sudo cp misc/init.d/debian/zabbix-server /etc/init.d/zabbix-server
          sudo cp misc/init.d/debian/zabbix-agent /etc/init.d/zabbix-agent
          And after you complete that, also do this:

          In zabbix-server and zabbix-agent
          Code:
          Look for the following line: 
          DAEMON=/home/zabbix/bin/${NAME}
          and replace it with: 
          DAEMON=/usr/sbin/${NAME}
          After that you should be able to use sudo /etc/init.d/zabbix-agent stop

          And if you want Zabbix to come up when the machine reboots, do this:

          set the correct permissions and set ZABBIX to start when the machine boots:
          Code:
          sudo chmod 755 /etc/init.d/zabbix-server
          sudo update-rc.d zabbix-server defaults
          
          sudo chmod 755 /etc/init.d/zabbix-agent
          sudo update-rc.d zabbix-agent defaults

          Comment

          • Jun.Liu
            Member
            • Apr 2007
            • 91

            #6
            To tchjts1,
            the Zabbix was installed by someone else.
            It work after done the actions you post. many thanks your detail instructions!
            Last edited by Jun.Liu; 25-12-2008, 12:31. Reason: missing some words

            Comment

            • tchjts1
              Senior Member
              • May 2008
              • 1605

              #7
              Originally posted by Jun.Liu
              To tchjts1,
              the Zabbix was installed by someone else.
              It work after done the actions you post. many thanks your detail instructions!
              You're very welcome. Glad it worked out for you.

              Jeff

              Comment

              • bashman
                Senior Member
                • Dec 2009
                • 432

                #8
                To add zabbix_agentd as a RH service:

                Lookout for zabbix_agentd_ctl

                cp -v zabbix_agentd_ctl /etc/init.d
                chmod -v 755 /home/etc/init.d/zabbix_agentd_ctl

                chkconfig --add zabbix_agentd_ctl
                chkconfig --level 345 zabbix_agentd_ctl on
                chkconfig --list

                /etc/init.d/zabbix_agentd_ctl start

                /etc/init.d/zabbix_agentd_ctl help

                To remove zabbix_agentd from a RH service:
                /etc/init.d/zabbix_agentd_ctl stop
                chkconfig --level 345 zabbix_agentd_ctl off
                chkconfig --del zabbix_agentd_ctl
                rm -v /etc/init.d/zabbix_agentd_ctl
                978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

                Comment

                Working...