Ad Widget

Collapse

Zabbix Agent2 for Windows

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jonathanlo55
    Junior Member
    • May 2020
    • 2

    #1

    Zabbix Agent2 for Windows

    Hi everyone!

    I'm new working with Zabbix. I started a big project recently to migrate from another monitoring platform to Zabbix and got caugh in between of version changing (from 4.4 to 5.0).
    The great majority of our monitored servers are Windows, and we've just deployed the version 4.4.8 of the Zabbix Agent in all servers.
    Today I have listened to the Webinar "Whats new in Zabbix 5.0?" and have hearded about Zabbix Agent2 (developed in GO) and all of its improvements...

    I've searched and searched but have not yet found any mention of where to find the Agent2 for Windows.
    Is it yet in development? Or it's available somewhere?
    Is the new agent 5.0.0 available at https://www.zabbix.com/download_agents already the Agent2??

    Would appretiate a lot some clarification!
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    I expect eventually "Agent2" will become the default and will supplant (replace) the normal C-based agent, but we're not there yet. Especially on Windows clients.

    I'm certain that the Windows agent on that page is not currently Agent2, it's the traditional agent.

    My recommendation to you is to stay with 4.4.x for a little while longer, and stay with the traditional zabbix-agent rather than zabbix-agent2 on Windows, for even longer. Once a couple of bug-fix releases in the 5.0 series are out (maybe 5.0.2 or 5.0.3), then consider upgrading your Zabbix server and agents to 5.0 LTS, but even then stay with the traditional zabbix-agent on your production clients that you monitor. Watch the release-notes page as further point-releases in 5.0 come out and deploy the Agent2 on less-important clients once it appears that Agent2 is approaching feature-parity with the traditional agent. I would expect it would still be a few months from now before that would happen.

    Comment

    • bbrendon
      Senior Member
      • Sep 2005
      • 870

      #3
      According to the docs, agent2 doesn't support Windows. I thought I heard it was supposed to exist for Windows though.

      https://www.zabbix.com/documentation...oncepts/agent2

      Also
      https://www.zabbix.com/forum/zabbix-...ows#post401061
      Unofficial Zabbix Expert
      Blog, Corporate Site

      Comment

      • Atsushi
        Senior Member
        • Aug 2013
        • 2028

        #4
        Agent 2 is supported for Linux and Windows platforms.


        ZBX-17558 Fixed zabbix agent 2 compilation on ms windows


        However, it is not possible to download the pre-compiled Zabbix agent 2 for Windows from the download page at this time.

        Comment

        • jonathanlo55
          Junior Member
          • May 2020
          • 2

          #5
          I have found in the documentation the step-by-step for compiling the Agent2 for Windows: https://www.zabbix.com/documentation...t_2_on_windows
          I'm guessing this is recent, at the time I open this post it wasn't there.

          About the pre-compiled version, I've heard in a Zabbix 5.0 webinar that it would be release in near future (though no dates were mentioned).

          Comment

          • Jarne St
            Member
            • Sep 2019
            • 63

            #6
            I also tried to compile the Agent 2 for Windows
            The instructions on http://www.zabbix.com/documentation/...t_2_on_windows are very difficult to follow.

            I have successfully compiled the PCRE library. But do you need to do something with the OpenSSL library?

            When I further try to compile the Zabbix sources I get errors.
            The full log:
            Code:
            C:\dev\zabbix-release-5.0\build\mingw>mingw32-make PCRE=c:\dev\pcre OPENSSL=c:\dev\openssl
            gcc -O2 -g -DUNICODE -DHAVE_STDINT_H=1 -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\win32\include -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\mingw -IC:\dev\zabbix-release-5.0\build\mingw\..\..\include -DHAVE_OPENSSL=1 -DHAVE_OPENSSL_WITH_PSK=1 -Ic:\dev\openssl\include -Ic:\dev\pcre\include -c C:\dev\zabbix-release-5.0\build\mingw\..\..\src\libs\zbxsys\threads.c -o output\threads.o
            gcc -O2 -g -DUNICODE -DHAVE_STDINT_H=1 -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\win32\include -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\mingw -IC:\dev\zabbix-release-5.0\build\mingw\..\..\include -DHAVE_OPENSSL=1 -DHAVE_OPENSSL_WITH_PSK=1 -Ic:\dev\openssl\include -Ic:\dev\pcre\include -c C:\dev\zabbix-release-5.0\build\mingw\..\..\src\libs\zbxcommon\str.c -o output\str.o
            gcc -O2 -g -DUNICODE -DHAVE_STDINT_H=1 -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\win32\include -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\mingw -IC:\dev\zabbix-release-5.0\build\mingw\..\..\include -DHAVE_OPENSSL=1 -DHAVE_OPENSSL_WITH_PSK=1 -Ic:\dev\openssl\include -Ic:\dev\pcre\include -c C:\dev\zabbix-release-5.0\build\mingw\..\..\src\libs\zbxcommon\misc.c -o output\misc.o
            gcc -O2 -g -DUNICODE -DHAVE_STDINT_H=1 -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\win32\include -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\mingw -IC:\dev\zabbix-release-5.0\build\mingw\..\..\include -DHAVE_OPENSSL=1 -DHAVE_OPENSSL_WITH_PSK=1 -Ic:\dev\openssl\include -Ic:\dev\pcre\include -c C:\dev\zabbix-release-5.0\build\mingw\..\..\src\libs\zbxwin32\fatal.c -o output\fatal.o
            gcc -O2 -g -DUNICODE -DHAVE_STDINT_H=1 -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\win32\include -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\mingw -IC:\dev\zabbix-release-5.0\build\mingw\..\..\include -DHAVE_OPENSSL=1 -DHAVE_OPENSSL_WITH_PSK=1 -Ic:\dev\openssl\include -Ic:\dev\pcre\include -c C:\dev\zabbix-release-5.0\build\mingw\..\..\src\libs\zbxwin32\disk.c -o output\disk.o
            gcc -O2 -g -DUNICODE -DHAVE_STDINT_H=1 -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\win32\include -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\mingw -IC:\dev\zabbix-release-5.0\build\mingw\..\..\include -DHAVE_OPENSSL=1 -DHAVE_OPENSSL_WITH_PSK=1 -Ic:\dev\openssl\include -Ic:\dev\pcre\include -c C:\dev\zabbix-release-5.0\build\mingw\..\..\src\libs\zbxcommon\iprange.c -o output\iprange.o
            gcc -O2 -g -DUNICODE -DHAVE_STDINT_H=1 -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\win32\include -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\mingw -IC:\dev\zabbix-release-5.0\build\mingw\..\..\include -DHAVE_OPENSSL=1 -DHAVE_OPENSSL_WITH_PSK=1 -Ic:\dev\openssl\include -Ic:\dev\pcre\include -c C:\dev\zabbix-release-5.0\build\mingw\..\..\src\libs\zbxcrypto\md5.c -o output\md5.o
            gcc -O2 -g -DUNICODE -DHAVE_STDINT_H=1 -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\win32\include -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\mingw -IC:\dev\zabbix-release-5.0\build\mingw\..\..\include -DHAVE_OPENSSL=1 -DHAVE_OPENSSL_WITH_PSK=1 -Ic:\dev\openssl\include -Ic:\dev\pcre\include -DWITH_COMMON_METRICS -c C:\dev\zabbix-release-5.0\build\mingw\..\..\src\libs\zbxsysinfo\sysinfo. c -o output\sysinfo.o
            gcc -O2 -g -DUNICODE -DHAVE_STDINT_H=1 -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\win32\include -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\mingw -IC:\dev\zabbix-release-5.0\build\mingw\..\..\include -DHAVE_OPENSSL=1 -DHAVE_OPENSSL_WITH_PSK=1 -Ic:\dev\openssl\include -Ic:\dev\pcre\include -c C:\dev\zabbix-release-5.0\build\mingw\..\..\src\libs\zbxalgo\vector.c -o output\vector.o
            gcc -O2 -g -DUNICODE -DHAVE_STDINT_H=1 -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\win32\include -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\mingw -IC:\dev\zabbix-release-5.0\build\mingw\..\..\include -DHAVE_OPENSSL=1 -DHAVE_OPENSSL_WITH_PSK=1 -Ic:\dev\openssl\include -Ic:\dev\pcre\include -DPCRE_STATIC -c C:\dev\zabbix-release-5.0\build\mingw\..\..\src\libs\zbxregexp\zbxregexp .c -o output\zbxregexp.o
            gcc -O2 -g -DUNICODE -DHAVE_STDINT_H=1 -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\win32\include -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\mingw -IC:\dev\zabbix-release-5.0\build\mingw\..\..\include -DHAVE_OPENSSL=1 -DHAVE_OPENSSL_WITH_PSK=1 -Ic:\dev\openssl\include -Ic:\dev\pcre\include -c C:\dev\zabbix-release-5.0\build\mingw\..\..\src\zabbix_agent\logfiles\lo gfiles.c -o output\logfiles.o
            gcc -O2 -g -DUNICODE -DHAVE_STDINT_H=1 -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\win32\include -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\mingw -IC:\dev\zabbix-release-5.0\build\mingw\..\..\include -DHAVE_OPENSSL=1 -DHAVE_OPENSSL_WITH_PSK=1 -Ic:\dev\openssl\include -Ic:\dev\pcre\include -c C:\dev\zabbix-release-5.0\build\mingw\..\..\src\libs\zbxcommon\file.c -o output\file.o
            gcc -O2 -g -DUNICODE -DHAVE_STDINT_H=1 -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\win32\include -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\mingw -IC:\dev\zabbix-release-5.0\build\mingw\..\..\include -DHAVE_OPENSSL=1 -DHAVE_OPENSSL_WITH_PSK=1 -Ic:\dev\openssl\include -Ic:\dev\pcre\include -c C:\dev\zabbix-release-5.0\build\mingw\..\..\src\libs\zbxcommon\alias.c -o output\alias.o
            gcc -O2 -g -DUNICODE -DHAVE_STDINT_H=1 -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\win32\include -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\mingw -IC:\dev\zabbix-release-5.0\build\mingw\..\..\include -DHAVE_OPENSSL=1 -DHAVE_OPENSSL_WITH_PSK=1 -Ic:\dev\openssl\include -Ic:\dev\pcre\include -c C:\dev\zabbix-release-5.0\build\mingw\..\..\src\libs\zbxalgo\algodefs.c -o output\algodefs.o
            gcc -O2 -g -DUNICODE -DHAVE_STDINT_H=1 -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\win32\include -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\mingw -IC:\dev\zabbix-release-5.0\build\mingw\..\..\include -DHAVE_OPENSSL=1 -DHAVE_OPENSSL_WITH_PSK=1 -Ic:\dev\openssl\include -Ic:\dev\pcre\include -c C:\dev\zabbix-release-5.0\build\mingw\..\..\src\libs\zbxsysinfo\common\s ystem.c -o output\sysinfo_system.o
            gcc -O2 -g -DUNICODE -DHAVE_STDINT_H=1 -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\win32\include -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\mingw -IC:\dev\zabbix-release-5.0\build\mingw\..\..\include -DHAVE_OPENSSL=1 -DHAVE_OPENSSL_WITH_PSK=1 -Ic:\dev\openssl\include -Ic:\dev\pcre\include -c C:\dev\zabbix-release-5.0\build\mingw\..\..\src\libs\zbxsysinfo\common\d ns.c -o output\sysinfo_dns.o
            gcc -O2 -g -DUNICODE -DHAVE_STDINT_H=1 -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\win32\include -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\mingw -IC:\dev\zabbix-release-5.0\build\mingw\..\..\include -DHAVE_OPENSSL=1 -DHAVE_OPENSSL_WITH_PSK=1 -Ic:\dev\openssl\include -Ic:\dev\pcre\include -c C:\dev\zabbix-release-5.0\build\mingw\..\..\src\libs\zbxsysinfo\common\d ir.c -o output\sysinfo_dir.o
            gcc -O2 -g -DUNICODE -DHAVE_STDINT_H=1 -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\win32\include -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\mingw -IC:\dev\zabbix-release-5.0\build\mingw\..\..\include -DHAVE_OPENSSL=1 -DHAVE_OPENSSL_WITH_PSK=1 -Ic:\dev\openssl\include -Ic:\dev\pcre\include -c C:\dev\zabbix-release-5.0\build\mingw\..\..\src\zabbix_agent\eventlog.c -IC:\dev\zabbix-release-5.0\build\mingw\..\..\go\win64 -o output\eventlog.o
            windres.exe C:\dev\zabbix-release-5.0\build\mingw\..\..\build\win32\project\resource .rc --input-format=rc -O coff --target=pe-x86-64 -D _WINDOWS -D ZABBIX_AGENT2 -o C:\dev\zabbix-release-5.0\build\mingw\..\..\src\go\cmd\zabbix_agent2\res ource.syso
            windres.exe: C:\\dev\\zabbix-release-5.0\\build\\mingw\\..\\..\\build\\win32\\project\\ resource.rc:75: syntax error
            mingw32-make: *** [Makefile:143: C:\dev\zabbix-release-5.0\build\mingw\..\..\src\go\cmd\zabbix_agent2\res ource.syso] Error 1
            Does this has something to to with the PCRE or OpenSSL libraries?

            Has someone compiled the Agent succesfully?
            Any help would be welcome!

            Comment

            • Jarne St
              Member
              • Sep 2019
              • 63

              #7
              Is there any documentation for the Zabbix Agent 2?

              Or when will be a precompiled version released? (that is ready for a production environment)

              And can the documentation for compiling the Agent be updated? (see previous post)

              Comment

              • Jarne St
                Member
                • Sep 2019
                • 63

                #8
                Has anyone compiled successfully on Windows? (to write plugins for the Agent2)

                I keep getting this error:
                Code:
                gcc -O2 -g -DUNICODE -DHAVE_STDINT_H=1 -IC:\dev\zabbix-master\build\mingw\..\..\build\win32\include -IC:\dev\zabbix-master\build\mingw\..\..\build\mingw -IC:\dev\zabbix-master\build\mingw\..\..\include -Ic:\dev\pcre\include -c C:\dev\zabbix-master\build\mingw\..\..\src\zabbix_agent\eventlog .c -IC:\dev\zabbix-master\build\mingw\..\..\go\win64 -o output\eventlog.o
                windres.exe C:\dev\zabbix-master\build\mingw\..\..\build\win32\project\resou rce.rc --input-format=rc -O coff --target=pe-x86-64 -D _WINDOWS -D ZABBIX_AGENT2 -o C:\dev\zabbix-master\build\mingw\..\..\src\go\cmd\zabbix_agent2\ resource.syso
                windres.exe: C:\\dev\\zabbix-master\\build\\mingw\\..\\..\\build\\win32\\projec t\\resource.rc:75: syntax error
                mingw32-make: *** [Makefile:143: C:\dev\zabbix-master\build\mingw\..\..\src\go\cmd\zabbix_agent2\ resource.syso] Error 1
                I don't know what I do wrong or how I can troubleshoot these errors.
                (I have followed the exact steps from the documentation)

                Comment

                • uayush109
                  Junior Member
                  • Aug 2020
                  • 1

                  #9
                  Originally posted by Jarne St
                  Has anyone compiled successfully on Windows? (to write plugins for the Agent2)

                  I keep getting this error:
                  Code:
                  gcc -O2 -g -DUNICODE -DHAVE_STDINT_H=1 -IC:\dev\zabbix-master\build\mingw\..\..\build\win32\include -IC:\dev\zabbix-master\build\mingw\..\..\build\mingw -IC:\dev\zabbix-master\build\mingw\..\..\include -Ic:\dev\pcre\include -c C:\dev\zabbix-master\build\mingw\..\..\src\zabbix_agent\eventlog .c -IC:\dev\zabbix-master\build\mingw\..\..\go\win64 -o output\eventlog.o
                  windres.exe C:\dev\zabbix-master\build\mingw\..\..\build\win32\project\resou rce.rc --input-format=rc -O coff --target=pe-x86-64 -D _WINDOWS -D ZABBIX_AGENT2 -o C:\dev\zabbix-master\build\mingw\..\..\src\go\cmd\zabbix_agent2\ resource.syso
                  windres.exe: C:\\dev\\zabbix-master\\build\\mingw\\..\\..\\build\\win32\\projec t\\resource.rc:75: syntax error
                  mingw32-make: *** [Makefile:143: C:\dev\zabbix-master\build\mingw\..\..\src\go\cmd\zabbix_agent2\ resource.syso] Error 1
                  I don't know what I do wrong https://kmspico11.website/ or how I can troubleshoot these errors.
                  (I have followed the exact steps from the documentation)
                  Having similar issues, any lead mate?
                  Last edited by uayush109; 14-01-2021, 14:00.

                  Comment

                  • bbrendon
                    Senior Member
                    • Sep 2005
                    • 870

                    #10
                    FYI Agent2 won't run as a windows service so it's probably not much use at this time.
                    Unofficial Zabbix Expert
                    Blog, Corporate Site

                    Comment

                    • Jarne St
                      Member
                      • Sep 2019
                      • 63

                      #11
                      hello, uasfsucyn40
                      I have digged a little bit in the source code.

                      I have came to the conclusion that the error cames for a file called `recource.rc`.

                      I have posted a question on StackOverflow because I don't know what this file exactly does. Or what it does during the compilation.
                      (https://stackoverflow.com/questions/...esource-script)

                      After searching for about 2 days I have found an article on a Microsoft forum with some explanation.


                      But I still don't understand where the error cames from. Or what I do wrong.

                      I had to change lines 74 to 90 in recource.rc to this:
                      Code:
                      VS_VERSION_INFO VERSIONINFO
                      74 FILEVERSION 1,2,3,4
                      75 PRODUCTVERSION 1,2,3,4
                      76 BEGIN
                      77     BLOCK "StringFileInfo"
                      78     BEGIN
                      79         BLOCK "040904E4"
                      80         BEGIN
                      81             VALUE "CompanyName", VER_COMPANYNAME_STR
                      82             VALUE "ProductVersion", "1.2.3.4"
                      83             VALUE "FileVersion", "1.2.3.4"
                      84             VALUE "InternalName", VER_PRODUCTNAME_STR
                      85             VALUE "FileDescription", VER_FILEDESCRIPTION_STR
                      86             VALUE "LegalCopyright", VER_LEGALCOPYRIGHT_STR
                      87             VALUE "ProductName", VER_PRODUCTNAME_STR
                      88        END
                      89 END
                      I is basically commenting out the references to FILEVERSION and PRODUCTVERSION and replacing them with static ones.

                      After that the code compiles and runs fine.

                      Comment

                      • bbrendon
                        Senior Member
                        • Sep 2005
                        • 870

                        #12
                        Jarne St I noticed there is a precompiled win binary on the website yesterday as well.

                        Unofficial Zabbix Expert
                        Blog, Corporate Site

                        Comment

                        • Jarne St
                          Member
                          • Sep 2019
                          • 63

                          #13
                          Yes, but I don't understand how you can write plugins for the precompiled binary.
                          I don't see any of the required directories to write plugins.

                          I don't see any of the go source our any other go configuration.
                          (Do you have to create these directories manually?)

                          So I thought if you want to write plugins you will need to compile the agent yourself.

                          Comment

                          • MichaelM
                            Member
                            • Sep 2008
                            • 38

                            #14
                            Hi guys,

                            I'am setting up a new Zabbix installation, planning for 5.2. Agent 2 seems to be fully supported by now, anyone using it in production already?

                            --Michael

                            Comment

                            • MBrunner
                              Junior Member
                              • Oct 2020
                              • 16

                              #15
                              I have on two server installed Agent 2 for testing. No problems so far

                              Comment

                              Working...