Ad Widget

Collapse

Zabbix Proxies running on Raspberry PIs.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jluvs2ride
    Member
    • Jul 2015
    • 85

    #1

    Zabbix Proxies running on Raspberry PIs.

    So we have a Zabbix Server VM running in Azure and Zabbix proxies built on Raspberry PIs at various locations. Critical equipment reports to the proxies at each site via Zabbix Agent or SNMP and the proxies relay to the Zabbix Server. This has really worked well for us, but I'm not a LINUX guru. I know just enough to get by. So I have a couple of questions.

    The Zabbix Proxies are bulit by compiling source on the PIs running the current flavor of Debian. How can I get the Proxy to auto start as a service?

    We get email notifications on critical events. How can we get an email notification if a Proxy goes offline?
  • jluvs2ride
    Member
    • Jul 2015
    • 85

    #2
    Are these questions really that hard?

    Comment

    • LenR
      Senior Member
      • Sep 2009
      • 1005

      #3
      Doesn't debian use systemd? systemctl enable zabbix-proxy and systemctl start zabbix-proxy. If it's not systemd (I've not played with my pi in several months).

      You should be able to apply the standard "Template App Zabbix Proxy" to your proxy, then add a "nodata" trigger to one of the items it collects.

      Comment

      • jluvs2ride
        Member
        • Jul 2015
        • 85

        #4
        Originally posted by LenR
        Doesn't debian use systemd? systemctl enable zabbix-proxy and systemctl start zabbix-proxy. If it's not systemd (I've not played with my pi in several months).
        The problem is that since the proxy was built by compiling the source on the PI I have to run "sudo /usr/sbin/zabbix_proxy" to start it because the zabbix-proxy doesn't get created. Like I said, I know just enough LINUX to barely get by.

        Originally posted by LenR
        You should be able to apply the standard "Template App Zabbix Proxy" to your proxy, then add a "nodata" trigger to one of the items it collects.
        So, to do this I need to add the proxy itself as a host?

        Comment

        • sb195c@att.com
          Member
          • Oct 2017
          • 41

          #5
          if you don't want to create an init script for the system to run at startup, put your commands in /etc/rc.local
          which will get processed at boot. other than that you are going to have to research/learn how to run your own init script for systemctl to run. a note on rc.local...if anything in there errors, it stops processing where it errors so you will have to trial/error your commands work correctly .

          Comment

          • LenR
            Senior Member
            • Sep 2009
            • 1005

            #6
            Yes, define the proxy as a host, monitored by the proxy on that host. Add the linux and proxy templates.

            Comment

            • jluvs2ride
              Member
              • Jul 2015
              • 85

              #7
              Originally posted by LenR
              Yes, define the proxy as a host, monitored by the proxy on that host. Add the linux and proxy templates.
              Thanks. This did the trick.

              Comment

              • jluvs2ride
                Member
                • Jul 2015
                • 85

                #8
                Originally posted by [email protected]
                if you don't want to create an init script for the system to run at startup, put your commands in /etc/rc.local
                which will get processed at boot. other than that you are going to have to research/learn how to run your own init script for systemctl to run. a note on rc.local...if anything in there errors, it stops processing where it errors so you will have to trial/error your commands work correctly .
                So I created this script;

                /etc/init.d/zabbix-proxy

                and copied the contents from a working script on another proxy.

                I then ran the following;

                sudo systemctl enable zabbix-proxy

                and got;

                zabbix-proxy.service is not a native service, redirecting to systemd-sysv-install.
                Executing: /lib/systemd/systemd-sysv-install enable zabbix-proxy

                Doing this;

                sudo service /etc/init.d/zabbix-proxy status

                Produces this;

                Unit etc-init.d-zabbix\x2dproxy.service.mount could not be found.

                Did I mention I know just enough to ask questions?

                Comment

                • jluvs2ride
                  Member
                  • Jul 2015
                  • 85

                  #9
                  OK, I just compared the Proxy setup on the Raspberry PI to a Proxy built on full blown Debian 9 and through trial and error recreated the appropriate files and settings. So now the RPI Zabbix Proxy autolaunches as a service. Thank you both for your help.

                  Comment

                  Working...