Ad Widget

Collapse

Can I Install win zabbix agent by publish in Active Directory ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • molmi
    Member
    • Jul 2010
    • 39

    #1

    Can I Install win zabbix agent by publish in Active Directory ?

    I install the zabbix agent on 300 Windows clients in a Microsoft Active Directory ... Publications I used for the purpose of Active Directory to install at all for automatically silently agent ....

    Thank for your help!
  • QuakENT
    Member
    • Jun 2010
    • 40

    #2
    Yes, you can. Just make a simple zabbix_install.bat script a put it into domain politics.

    Comment

    • molmi
      Member
      • Jul 2010
      • 39

      #3
      where i found it???

      can you give me a batch .... or post here ....

      Thank you...

      Comment

      • molmi
        Member
        • Jul 2010
        • 39

        #4
        i found that

        REM Zabbix Server Address

        REM UNC Path to Zabbix Agent installation files
        set FilePath64="\\master\software\zabbix\win64\zabbix_ agentd.exe"
        set FilePath32="\\master\software\zabbix\win32\zabbix_ agentd.exe"

        REM Local Variables
        set service="ZABBIX Agent"
        set SUCCESS="Successfully"
        REM I haven't tested this on a 64 bit OS yet
        set qry="HKLM\System\CurrentControlSet\Services\Zabbix Agent"

        ECHO ---------- Start Zabbix Agent Script...
        ECHO.

        :IsServiceInstalled
        ECHO.
        ECHO Is %service% Installed?
        reg query %qry% | find /I %service% >NUL
        ECHO If Zero the service is Installed:%ERRORLEVEL%
        If NOT ERRORLEVEL 1 (
        ECHO YES, %service% Is Installed
        GOTO IsServiceRunning
        ) ELSE (
        ECHO NO, %service% Is NOT Installed
        GOTO InstallService
        )
        GOTO END

        :IsServiceRunning
        ECHO.
        ECHO Is %service% Running?
        net start | find /I %service% >NUL
        ECHO If Zero %service% is Running:%ERRORLEVEL%
        If NOT ERRORLEVEL 1 (
        ECHO YES, %service% IS Running
        ) ELSE (
        ECHO ----------- NO, %service% IS NOT Running -----------------
        GOTO StartService
        )
        GOTO END

        :StartService
        ECHO.
        ECHO Try to Start %service%
        net start %service% | FIND /I %SUCCESS% >NUL
        ECHO If Zero the %service% started %ERRORLEVEL%
        If NOT ERRORLEVEL 1 (
        echo YES %service% Started Successfully
        ) ELSE (
        ECHO ------------!!!!! %service% DID NOT START !!!!!--------------
        )
        GOTO END

        :GetInstallFilePath
        ECHO.
        REM 32Bit or 64 Bit?
        REM Could use a better test, this will fail without a C: drive
        if exist "C:\Program Files (x86)" (
        set FilePath=%FilePath64%
        ) else (
        set FilePath=%FilePath32%
        )
        ECHO Path to zabbix_agentd.exe: %FilePath%

        REM Verify that the installation file exists
        XCOPY %FilePath% /L | find /I %FilePath% >NUL
        ECHO If Zero %FilePath% Exists: %ERRORLEVEL%
        If NOT ERRORLEVEL 1 (
        ECHO YES, %FilePath% Exists
        GOTO END REM InstallService
        ) ELSE (
        ECHO %FilePath%
        ECHO ------------IS NOT VALID -----------------
        ECHO -------------- EXITING -------------------
        GOTO END
        )
        GOTO END

        :InstallService
        ECHO.
        REM Change working directory
        CD %SystemDrive%\
        REM Make sure we're on the right partition
        %SystemDrive%

        ECHO Copying %FilePath% To %SystemDrive%
        xcopy \\master\software\zabbix\win32\zabbix_agentd.exe %SystemDrive% /F /Y /R

        ECHO Writing zabbix_agentd.conf for %COMPUTERNAME%.%USERDNSDOMAIN%
        ECHO Server=srvmonitor > zabbix_agentd.conf
        ECHO ServerPort=10050 >> zabbix_agentd.conf
        ECHO Hostname=%COMPUTERNAME%.%USERDNSDOMAIN% >> zabbix_agentd.conf
        ECHO ListenPort=10050 >> zabbix_agentd.conf
        ECHO StartAgents=5 >> zabbix_agentd.conf
        ECHO DebugLevel=3 >> zabbix_agentd.conf
        ECHO LogFile= %SystemDrive%\zabbix_agentd.log >> zabbix_agentd.conf
        ECHO Timeout=5 >> zabbix_agentd.conf

        ECHO Installing %service% as a service
        %SystemDrive%\zabbix_agentd.exe -i -c %SystemDrive%\zabbix_agentd.conf
        ECHO If Zero the %service% Installed Successfully: %ERRORLEVEL%
        If ERRORLEVEL == 0 (
        ECHO YES, %service% Installed Successfully
        GOTO IsServiceRunning
        ) ELSE (
        ECHO ------------!!!!! %service% Installation FAILED !!!!!--------------
        GOTO END
        )
        ECHO Finished Installing Zabbix Agent!

        GOTO END

        :END
        ECHO.
        ECHO The Script has finnished running!

        Comment

        • QuakENT
          Member
          • Jun 2010
          • 40

          #5
          Originally posted by molmi
          can you give me a batch .... or post here ....

          Thank you...
          I can give you a script, but its a little scary, that you want deploy some sw to 300 pc and you even not look at manual or just hit a simple zabbix_agentd .exe -h, which will give you everything you need to deploy agent through AD enviroment.

          @ECHO OFF

          if exist "c:\Program Files\zabbix\yourszabbixconf.conf" goto END
          if not exist "c:\Program Files\zabbix\yourszabbixconf.conf" goto INSTALL

          :INSTALL
          MD "c:\Program Files\zabbix"
          COPY \\server\share\zabbix_agentd.exe "c:\Program Files\zabbix"
          COPY \\server\share\yourszabbixconf.conf "c:\Program Files\zabbix"
          echo Hostname=%computername%.yourdomain.xxx >> "c:\Program Files\zabbix\yourszabbixconf.conf"
          "c:\Program Files\zabbix\zabbix_agentd.exe" -i -c "c:\Program Files\zabbix\yourszabbixconf.conf"
          "c:\Program Files\zabbix\zabbix_agentd.exe" -s -c "c:\Program Files\zabbix\yourszabbixconf.conf"

          :END
          EXIT

          This script is very simple, but its everything one could need for installing zabbix agent platform on destination PC through network and AD. You can do some home work and play with more complex *.msi instalation ruttine, which may give you some advacements.
          I use this ruttine for a little testing deployment on 500 pc and so far works fine.

          Comment

          • piotrlg
            Junior Member
            • May 2010
            • 7

            #6
            Originally posted by QuakENT
            .....
            This script is very simple, but its everything one could need for installing zabbix agent platform on destination PC through network and AD. You can do some home work and play with more complex *.msi instalation ruttine, which may give you some advacements.
            I use this ruttine for a little testing deployment on 500 pc and so far works fine.
            Is there msi installer for windows zabbix agent? I have not found any but the are some threads on this forum where some people claims they use this.

            So where is this file? Not here, it is just exe file http://www.suiviperf.com/zabbix/

            And what about updating the windows agent? Simple deploy the newest agent and that is all?

            Regards
            P.

            Comment

            • QuakENT
              Member
              • Jun 2010
              • 40

              #7
              Originally posted by piotrlg
              Is there msi installer for windows zabbix agent? I have not found any but the are some threads on this forum where some people claims they use this.

              So where is this file? Not here, it is just exe file http://www.suiviperf.com/zabbix/

              And what about updating the windows agent? Simple deploy the newest agent and that is all?

              Regards
              P.
              You can create msi package by using some free tools and I thing I havent seen any msi package for zabbix agent on this forum yet.

              Updating? Simply stop and uninstall zabbix service, delete entire zabbix folder in program files and push new version of client? Could by simplier?

              Comment

              • piotrlg
                Junior Member
                • May 2010
                • 7

                #8
                Originally posted by QuakENT
                You can create msi package by using some free tools and I thing I havent seen any msi package for zabbix agent on this forum yet.

                Updating? Simply stop and uninstall zabbix service, delete entire zabbix folder in program files and push new version of client? Could by simplier?
                For example here. Looks like some people don't know what msi really is.


                On 100 hosts?

                the point is that having msi is the simplest way to deploy, update etc using Group Policy. having just simple exe or bat files makes life a bit harder.

                P.

                Comment

                • QuakENT
                  Member
                  • Jun 2010
                  • 40

                  #9
                  well...you problems on my head.

                  I will MUCH-much-MUCH more appreciated work on Ajax-web2 interface, with basic thing like subgroups, more sophisticated user rights, zabbix proxy windows version and endless etc... so, something like msi is last thing I need for day-by-day use.

                  Comment

                  Working...