Ad Widget

Collapse

How zabbix agent can work when zabbix server is down

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • yogi
    Junior Member
    • Mar 2016
    • 26

    #1

    How zabbix agent can work when zabbix server is down

    Hi,
    I have zabbix-agent (zabbix 3.0.1) working in active mode. One of the things it does is to activate some bash script every xxx time (working like cron).
    My questions are:
    1. How can i make him work (keep activating the bash script) even though the server is down?
    2. How zabbix agent can connect to zabbix server even if zabbix server is not connected to mariadb?
    Thanks
  • batchenr
    Senior Member
    • Sep 2016
    • 440

    #2
    1. How can i make him work (keep activating the bash script) even though the server is down?
    how can the agent work if the server is down? and how wil the script run ?
    for me, if i want to start a remote script i use zabbix server item
    with : system.run["/root/somescriptname.sh"]
    and ofcurse allow at /etc/zabbix/zabbix_agent.conf RemoteCommande

    2. How zabbix agent can connect to zabbix server even if zabbix server is not connected to mariadb?
    i dont think zabbix server & agent connection depanding on the connection to DB
    the only issue will be that zabbix can store info\read\write..

    Comment

    • yogi
      Junior Member
      • Mar 2016
      • 26

      #3
      "for me, if i want to start a remote script i use zabbix server item
      with : system.run["/root/somescriptname.sh"]
      and ofcurse allow at /etc/zabbix/zabbix_agent.conf RemoteCommande"

      I do so also. I have item in zabbix server that activate the bash script.
      My agent is in an active mode, so it responsible to collect the data (do what the item tell it to do), in my case only activate the bash script, so i want it to keep doing it even though the server is down...

      Comment

      • batchenr
        Senior Member
        • Sep 2016
        • 440

        #4
        Originally posted by yogi
        "for me, if i want to start a remote script i use zabbix server item
        with : system.run["/root/somescriptname.sh"]
        and ofcurse allow at /etc/zabbix/zabbix_agent.conf RemoteCommande"

        I do so also. I have item in zabbix server that activate the bash script.
        My agent is in an active mode, so it responsible to collect the data (do what the item tell it to do), in my case only activate the bash script, so i want it to keep doing it even though the server is down...
        if this script is on the server that is down - if you cant run a command on the server that is down zabbix couldnot do it.
        when you say its down you mean powerd off ?
        and is the remote script is on the server that is down ?

        if yes - then you cant do anything on a server that is down,

        Comment

        • yogi
          Junior Member
          • Mar 2016
          • 26

          #5
          I will try to explain it better:
          I have 2 VMs: VM1 and VM2.
          Zabbix-server is running on VM1, Zabbix-agent (active mode) is running on VM2.
          In VM2 there is a bash script that every xxx time Zabbix-agent go and activate. I don’t care from the value returned from the bash script (so I don’t care if Zabbix-server will get and store those values or not), I only care that Zabbix-agent will activate it every xxx time.
          Now what I want is: if VM1 is down (meaning no Zabbix-server is up) that my Zabbix-agent will keep working and activate the script ( even if it couldn’t send the return value from the bash script to Zabbix-server because it’s down) and simultaneously will keep and trying to connect to Zabbix-server (but not stop activating the bash script), when a connection to Zabbix-server is establish, Zabbix-agent can continue to send the returned values from the bash script again to the Zabbix-server…
          How can I achieve this?

          Comment

          • batchenr
            Senior Member
            • Sep 2016
            • 440

            #6
            Originally posted by yogi
            I will try to explain it better:
            I have 2 VMs: VM1 and VM2.
            Zabbix-server is running on VM1, Zabbix-agent (active mode) is running on VM2.
            In VM2 there is a bash script that every xxx time Zabbix-agent go and activate. I don’t care from the value returned from the bash script (so I don’t care if Zabbix-server will get and store those values or not), I only care that Zabbix-agent will activate it every xxx time.
            Now what I want is: if VM1 is down (meaning no Zabbix-server is up) that my Zabbix-agent will keep working and activate the script ( even if it couldn’t send the return value from the bash script to Zabbix-server because it’s down) and simultaneously will keep and trying to connect to Zabbix-server (but not stop activating the bash script), when a connection to Zabbix-server is establish, Zabbix-agent can continue to send the returned values from the bash script again to the Zabbix-server…
            How can I achieve this?
            ok,
            so cronjob sounds a good idea..
            you can make an item at the server itself using UserParameter
            at zabbix_agent.conf but idk if this item aswell activated by zabbix.

            give it a try - other then that im not expert yes so im sorry

            Comment

            Working...