Ad Widget

Collapse

Restart Zabbix-agent

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • c.molide
    Junior Member
    • Sep 2021
    • 10

    #1

    Restart Zabbix-agent

    Hello!

    I'm having trouble. I ask for help.


    I'm Mozambican and i used zabbix to monitor any Hosts in my Company.
    Can someone help on how to automatically restart Agent-zabbix on RedHat system.


  • tomdom
    Member
    • Nov 2021
    • 38

    #2
    Hello,

    RESTART
    service zabbix-agent restart


    service zabbix-agent start
    service zabbix-agent stop

    Comment

    • c.molide
      Junior Member
      • Sep 2021
      • 10

      #3
      Thanks Tomdom, but....

      That way I know how to do it and it works, but the agent constantly falls. it's hard to do it all the time. Isn't there a script that makes this automatic and I don't need to do it manually?

      Comment

      • vicbc
        Member
        • Nov 2021
        • 39

        #4
        Hey there.

        What do you mean with "the agent constantly falls"?

        Try enabling it, so it will start on boot time:

        Code:
        systemctl enable zabbix-agent.service
        If it's not the problem, can you copy and paste some results of the log so we can see why the agent is falling?

        You can get the logs with the command:

        Code:
        tail -n 100 /var/log/zabbix/zabbix_agentd.log
        "-n 100" means the last 100 lines of the file.

        Comment

        • tim.mooney
          Senior Member
          • Dec 2012
          • 1427

          #5
          Originally posted by c.molide

          That way I know how to do it and it works, but the agent constantly falls. it's hard to do it all the time. Isn't there a script that makes this automatic and I don't need to do it manually?
          The agent shouldn't be failing.

          If your hosts are at least RHEL 7.x, then systemd has replaced the traditional init script system (you can still use the init scripts, but they are legacy). systemd can be configured to automatically restart a service if it fails, just like running a process directly from init could under older systems. That could be used to continually restart the agent, no mater why it fails.

          However, continually restarting a failing service isn't the best approach. If the agent is failing, it would be better to diagnose what that problem is and fix it.

          What version of Zabbix agent are you running, and what version of Zabbix server?

          Comment

          • c.molide
            Junior Member
            • Sep 2021
            • 10

            #6
            I installed it on a server that is in production and a colleague constantly downloads applications to be able to backup the applications, but when he finishes the backup, the agent only gets up if I force and this is kind of embarrassing because the server in production is not managed directly by me. I wonder if there is a script that raises this. The zabbix version is 5.2.7

            Comment

            Working...