CRLF statt LF

This commit is contained in:
Bernhard Linz 2018-01-16 12:27:36 +01:00
parent d033039b6b
commit 9bca6d82ca
11 changed files with 876 additions and 874 deletions

2
.gitattributes vendored Normal file
View File

@ -0,0 +1,2 @@
# Immer crLF statt LF verwenden:
text eol=crlf

View File

@ -1,18 +1,18 @@
# Sample File for include own Config-File with UserParamter # Sample File for include own Config-File with UserParamter
# #
# Rename this file to: zabbix_agentd.win.include.txt # Rename this file to: zabbix_agentd.win.include.txt
# before using! # before using!
# Installation Script check if file "include\zabbix_agentd.win.include.txt" exist # Installation Script check if file "include\zabbix_agentd.win.include.txt" exist
# and will copy that script and include it # and will copy that script and include it
# If you need own Scripts or Programs copy them into the # If you need own Scripts or Programs copy them into the
# \UserParameter # \UserParameter
# Directory # Directory
# Use # Use
# "%PROGRAMFILES%\Zabbix\YoorScriptorExe.bat" at UserParameter # "%PROGRAMFILES%\Zabbix\YoorScriptorExe.bat" at UserParameter
# Complex Sample: # Complex Sample:
# UserParameter=znil.fileandfolder[*],"%PROGRAMFILES%\Zabbix\fileandfolder.exe" "$1" "$2" # UserParameter=znil.fileandfolder[*],"%PROGRAMFILES%\Zabbix\fileandfolder.exe" "$1" "$2"
# #
#Simple Sample #Simple Sample
UserParameter=znil.TestEcho,echo 1 UserParameter=znil.TestEcho,echo 1
# Your UserParameters behind this line: # Your UserParameters behind this line:

File diff suppressed because it is too large Load Diff

View File

@ -1,210 +1,210 @@
@echo off @echo off
REM 2015 Bernhard Linz / Bernhard.Linz@datagroup.de / Bernhard@znil.de REM 2015 Bernhard Linz / Bernhard.Linz@datagroup.de / Bernhard@znil.de
REM Script for Installing Zabbix-Agent on Windows System via GPO, REM Script for Installing Zabbix-Agent on Windows System via GPO,
REM take a look at: http://znil.net/index.php?title=Zabbix_Agent_per_Gruppenrichtlinie_installieren_lassen REM take a look at: http://znil.net/index.php?title=Zabbix_Agent_per_Gruppenrichtlinie_installieren_lassen
@echo off @echo off
cls cls
Echo +---------------------------------------------------------+ Echo +---------------------------------------------------------+
Echo ^| Starting Script InstallZabbixAgentGPO ^| Echo ^| Starting Script InstallZabbixAgentGPO ^|
Echo +---------------------------------------------------------+ Echo +---------------------------------------------------------+
Echo. Echo.
REM Globale Variables REM Globale Variables
Set GPO_INSTALL_AGENT=FALSE Set GPO_INSTALL_AGENT=FALSE
Set GPO_COMPUTERNAME=%COMPUTERNAME% x Set GPO_COMPUTERNAME=%COMPUTERNAME% x
Set GPO_COMPUTERNAME=%GPO_COMPUTERNAME:~0,15% Set GPO_COMPUTERNAME=%GPO_COMPUTERNAME:~0,15%
REM Loading Configuration for GPO-Installer REM Loading Configuration for GPO-Installer
Set GPO_CURPATH=%~dp0 Set GPO_CURPATH=%~dp0
If EXIST "%GPO_CURPATH%\InstallZabbixAgentGPO\ConfigGPO.bat" ( If EXIST "%GPO_CURPATH%\InstallZabbixAgentGPO\ConfigGPO.bat" (
CALL "%GPO_CURPATH%\InstallZabbixAgentGPO\ConfigGPO.bat" CALL "%GPO_CURPATH%\InstallZabbixAgentGPO\ConfigGPO.bat"
) else ( ) else (
echo Missing "%GPO_CURPATH%\InstallZabbixAgentGPO\ConfigGPO.bat" !!!! echo Missing "%GPO_CURPATH%\InstallZabbixAgentGPO\ConfigGPO.bat" !!!!
GoTo END GoTo END
) )
If EXIST "%GPO_CURPATH%Config.bat" ( If EXIST "%GPO_CURPATH%Config.bat" (
CALL "%GPO_CURPATH%Config.bat" CALL "%GPO_CURPATH%Config.bat"
) else ( ) else (
If "%GPO_LOGGING_ENABLE%" == "YES" ( If "%GPO_LOGGING_ENABLE%" == "YES" (
Echo %GPO_COMPUTERNAME% - ERROR - %DATE% - %TIME%: %GPO_CURPATH%Config.bat not found >>%GPO_LOGGING_GLOBAL_LOG_FILE% Echo %GPO_COMPUTERNAME% - ERROR - %DATE% - %TIME%: %GPO_CURPATH%Config.bat not found >>%GPO_LOGGING_GLOBAL_LOG_FILE%
) )
echo Missing "%GPO_CURPATH%Config.bat (for InstallZabbixAgent.bat)" !!!! echo Missing "%GPO_CURPATH%Config.bat (for InstallZabbixAgent.bat)" !!!!
GoTo END GoTo END
) )
REM ###### ## ## ######## ###### ## ## ###### REM ###### ## ## ######## ###### ## ## ######
REM ## ## ## ## ## ## ## ## ## ## ## REM ## ## ## ## ## ## ## ## ## ## ##
REM ## ## ## ## ## ## ## ## REM ## ## ## ## ## ## ## ##
REM ####### ####### ## ######### ###### ## ##### ###### ####### ####### REM ####### ####### ## ######### ###### ## ##### ###### ####### #######
REM ## ## ## ## ## ## ## ## REM ## ## ## ## ## ## ## ##
REM ## ## ## ## ## ## ## ## ## ## ## REM ## ## ## ## ## ## ## ## ## ## ##
REM ###### ## ## ######## ###### ## ## ###### REM ###### ## ## ######## ###### ## ## ######
REM Make a test if Zabbix-Agent is already installed REM Make a test if Zabbix-Agent is already installed
sc query "Zabbix Agent" >nul 2>&1 sc query "Zabbix Agent" >nul 2>&1
If NOT ERRORLEVEL 1 ( If NOT ERRORLEVEL 1 (
Echo Zabbix-Agent already installed - Install Agent DENIED - Exit Script Echo Zabbix-Agent already installed - Install Agent DENIED - Exit Script
GoTo END GoTo END
) Else ( ) Else (
Echo Missing Zabbix-Agent Configuration-File - Install Agent ALLOWED Echo Missing Zabbix-Agent Configuration-File - Install Agent ALLOWED
Set GPO_INSTALL_AGENT=TRUE Set GPO_INSTALL_AGENT=TRUE
) )
REM Show used Configuration REM Show used Configuration
Echo. Echo.
Echo Using following Settings: Echo Using following Settings:
Echo ------------------------- Echo -------------------------
Set GPO_ Set GPO_
REM Make the "Server or Workstation Check REM Make the "Server or Workstation Check
Echo. Echo.
Echo Check OS for Server or Workstation Echo Check OS for Server or Workstation
For /f "tokens=*" %%i in ('wmic os get caption ^| findstr /I "Windows"') do ( For /f "tokens=*" %%i in ('wmic os get caption ^| findstr /I "Windows"') do (
If "%GPO_LOGGING_ENABLE%" == "YES" ( If "%GPO_LOGGING_ENABLE%" == "YES" (
If "%GPO_LOG_POSITIVE%" == "YES" ( If "%GPO_LOG_POSITIVE%" == "YES" (
Echo %GPO_COMPUTERNAME% - INFO - %DATE% - %TIME%: OS-Type: %%i >>%GPO_LOGGING_GLOBAL_LOG_FILE% Echo %GPO_COMPUTERNAME% - INFO - %DATE% - %TIME%: OS-Type: %%i >>%GPO_LOGGING_GLOBAL_LOG_FILE%
) else ( ) else (
If "%GPO_LOG_NEGATIVE%" == "YES" ( If "%GPO_LOG_NEGATIVE%" == "YES" (
Echo %GPO_COMPUTERNAME% - INFO - %DATE% - %TIME%: OS-Type: %%i >>%GPO_LOGGING_GLOBAL_LOG_FILE% Echo %GPO_COMPUTERNAME% - INFO - %DATE% - %TIME%: OS-Type: %%i >>%GPO_LOGGING_GLOBAL_LOG_FILE%
) )
) )
) )
) )
wmic os get caption | findstr /I "Server" wmic os get caption | findstr /I "Server"
If ERRORLEVEL 1 ( If ERRORLEVEL 1 (
Echo %COMPUTERNAME% is a Windows Workstation Echo %COMPUTERNAME% is a Windows Workstation
If "%GPO_INSTALL_WORKSTATION%" == "YES" ( If "%GPO_INSTALL_WORKSTATION%" == "YES" (
If "%GPO_LOGGING_ENABLE%" == "YES" ( If "%GPO_LOGGING_ENABLE%" == "YES" (
If "%GPO_LOG_POSITIVE%" == "YES" ( If "%GPO_LOG_POSITIVE%" == "YES" (
Echo %GPO_COMPUTERNAME% - SUCCESS - %DATE% - %TIME%: Type WORKSTATION ALLOWED >>%GPO_LOGGING_GLOBAL_LOG_FILE% Echo %GPO_COMPUTERNAME% - SUCCESS - %DATE% - %TIME%: Type WORKSTATION ALLOWED >>%GPO_LOGGING_GLOBAL_LOG_FILE%
) )
) )
Set GPO_INSTALL_AGENT=TRUE Set GPO_INSTALL_AGENT=TRUE
Echo GPO_INSTALL_WORKSTATION is YES - Install Agent ALLOWED Echo GPO_INSTALL_WORKSTATION is YES - Install Agent ALLOWED
) else ( ) else (
If "%GPO_LOGGING_ENABLE%" == "YES" ( If "%GPO_LOGGING_ENABLE%" == "YES" (
If "%GPO_LOG_NEGATIVE%" == "YES" ( If "%GPO_LOG_NEGATIVE%" == "YES" (
Echo %GPO_COMPUTERNAME% - ERROR - %DATE% - %TIME%: Type WORKSTATION not ALLOWED >>%GPO_LOGGING_GLOBAL_LOG_FILE% Echo %GPO_COMPUTERNAME% - ERROR - %DATE% - %TIME%: Type WORKSTATION not ALLOWED >>%GPO_LOGGING_GLOBAL_LOG_FILE%
) )
) )
Echo GPO_INSTALL_WORKSTATION is NO - Install Agent DENIED - Exit Script Echo GPO_INSTALL_WORKSTATION is NO - Install Agent DENIED - Exit Script
GoTo END GoTo END
) )
)else ( )else (
Echo %COMPUTERNAME% is a Windows Server Echo %COMPUTERNAME% is a Windows Server
If "%GPO_INSTALL_SERVER%" == "YES" ( If "%GPO_INSTALL_SERVER%" == "YES" (
If "%GPO_LOGGING_ENABLE%" == "YES" ( If "%GPO_LOGGING_ENABLE%" == "YES" (
If "%GPO_LOG_POSITIVE%" == "YES" ( If "%GPO_LOG_POSITIVE%" == "YES" (
Echo %GPO_COMPUTERNAME% - SUCCESS - %DATE% - %TIME%: Type SERVER ALLOWED >>%GPO_LOGGING_GLOBAL_LOG_FILE% Echo %GPO_COMPUTERNAME% - SUCCESS - %DATE% - %TIME%: Type SERVER ALLOWED >>%GPO_LOGGING_GLOBAL_LOG_FILE%
) )
) )
Set GPO_INSTALL_AGENT=TRUE Set GPO_INSTALL_AGENT=TRUE
Echo GPO_INSTALL_SERVER is YES - Install Agent ALLOWED Echo GPO_INSTALL_SERVER is YES - Install Agent ALLOWED
) else ( ) else (
If "%GPO_LOGGING_ENABLE%" == "YES" ( If "%GPO_LOGGING_ENABLE%" == "YES" (
If "%GPO_LOG_NEGATIVE%" == "YES" ( If "%GPO_LOG_NEGATIVE%" == "YES" (
Echo %GPO_COMPUTERNAME% - ERROR - %DATE% - %TIME%: Type SERVER not ALLOWED >>%GPO_LOGGING_GLOBAL_LOG_FILE% Echo %GPO_COMPUTERNAME% - ERROR - %DATE% - %TIME%: Type SERVER not ALLOWED >>%GPO_LOGGING_GLOBAL_LOG_FILE%
) )
) )
Echo GPO_INSTALL_SERVER is NO - Install Agent DENIED - Exit Script Echo GPO_INSTALL_SERVER is NO - Install Agent DENIED - Exit Script
GoTo END GoTo END
) )
) )
REM Start the Whitelist Check REM Start the Whitelist Check
If "%GPO_USE_WHITELIST%" == "YES" ( If "%GPO_USE_WHITELIST%" == "YES" (
Echo. Echo.
Echo Check if %COMPUTERNAME% is whitelisted ... Echo Check if %COMPUTERNAME% is whitelisted ...
If EXIST "%GPO_CURPATH%InstallZabbixAgentGPO\Whitelist.txt" ( If EXIST "%GPO_CURPATH%InstallZabbixAgentGPO\Whitelist.txt" (
findstr /I /B /E "%COMPUTERNAME%" "%GPO_CURPATH%InstallZabbixAgentGPO\Whitelist.txt" findstr /I /B /E "%COMPUTERNAME%" "%GPO_CURPATH%InstallZabbixAgentGPO\Whitelist.txt"
If ERRORLEVEL 1 ( If ERRORLEVEL 1 (
If "%GPO_LOGGING_ENABLE%" == "YES" ( If "%GPO_LOGGING_ENABLE%" == "YES" (
If "%GPO_LOG_NEGATIVE%" == "YES" ( If "%GPO_LOG_NEGATIVE%" == "YES" (
Echo %GPO_COMPUTERNAME% - ERROR - %DATE% - %TIME%: Name not in Whitelist.txt >>%GPO_LOGGING_GLOBAL_LOG_FILE% Echo %GPO_COMPUTERNAME% - ERROR - %DATE% - %TIME%: Name not in Whitelist.txt >>%GPO_LOGGING_GLOBAL_LOG_FILE%
) )
) )
Echo %COMPUTERNAME% is NOT listet at "%GPO_CURPATH%InstallZabbixAgentGPO\Whitelist.txt" Echo %COMPUTERNAME% is NOT listet at "%GPO_CURPATH%InstallZabbixAgentGPO\Whitelist.txt"
Echo Install Agent DENIED - Exit Script Echo Install Agent DENIED - Exit Script
GoTo END GoTo END
) else ( ) else (
If "%GPO_LOGGING_ENABLE%" == "YES" ( If "%GPO_LOGGING_ENABLE%" == "YES" (
If "%GPO_LOG_POSITIVE%" == "YES" ( If "%GPO_LOG_POSITIVE%" == "YES" (
Echo %GPO_COMPUTERNAME% - SUCCESS - %DATE% - %TIME%: Name is in Whitelist.txt >>%GPO_LOGGING_GLOBAL_LOG_FILE% Echo %GPO_COMPUTERNAME% - SUCCESS - %DATE% - %TIME%: Name is in Whitelist.txt >>%GPO_LOGGING_GLOBAL_LOG_FILE%
) )
) )
Set GPO_INSTALL_AGENT=TRUE Set GPO_INSTALL_AGENT=TRUE
Echo %COMPUTERNAME% is listet at "%GPO_CURPATH%InstallZabbixAgentGPO\Whitelist.txt" Echo %COMPUTERNAME% is listet at "%GPO_CURPATH%InstallZabbixAgentGPO\Whitelist.txt"
Echo Install Agent ALLOWED Echo Install Agent ALLOWED
) )
) else ( ) else (
Echo Missing "%GPO_CURPATH%InstallZabbixAgentGPO\Whitelist.txt" Echo Missing "%GPO_CURPATH%InstallZabbixAgentGPO\Whitelist.txt"
GoTo END GoTo END
) )
) )
REM Start the Blacklist Check REM Start the Blacklist Check
If "%GPO_USE_BLACKLIST%" == "YES" ( If "%GPO_USE_BLACKLIST%" == "YES" (
Echo. Echo.
Echo Check if %COMPUTERNAME% is blacklisted ... Echo Check if %COMPUTERNAME% is blacklisted ...
If EXIST "%GPO_CURPATH%InstallZabbixAgentGPO\Blacklist.txt" ( If EXIST "%GPO_CURPATH%InstallZabbixAgentGPO\Blacklist.txt" (
findstr /I /B /E "%COMPUTERNAME%" "%GPO_CURPATH%InstallZabbixAgentGPO\Blacklist.txt" findstr /I /B /E "%COMPUTERNAME%" "%GPO_CURPATH%InstallZabbixAgentGPO\Blacklist.txt"
If ERRORLEVEL 1 ( If ERRORLEVEL 1 (
If "%GPO_LOGGING_ENABLE%" == "YES" ( If "%GPO_LOGGING_ENABLE%" == "YES" (
If "%GPO_LOG_POSITIVE%" == "YES" ( If "%GPO_LOG_POSITIVE%" == "YES" (
Echo %GPO_COMPUTERNAME% - SUCCESS - %DATE% - %TIME%: Name is NOT in Blacklist.txt >>%GPO_LOGGING_GLOBAL_LOG_FILE% Echo %GPO_COMPUTERNAME% - SUCCESS - %DATE% - %TIME%: Name is NOT in Blacklist.txt >>%GPO_LOGGING_GLOBAL_LOG_FILE%
) )
) )
Set GPO_INSTALL_AGENT=TRUE Set GPO_INSTALL_AGENT=TRUE
Echo %COMPUTERNAME% is NOT listet at "%GPO_CURPATH%InstallZabbixAgentGPO\Blacklist.txt" Echo %COMPUTERNAME% is NOT listet at "%GPO_CURPATH%InstallZabbixAgentGPO\Blacklist.txt"
Echo Install Agent ALLOWED Echo Install Agent ALLOWED
) else ( ) else (
If "%GPO_LOGGING_ENABLE%" == "YES" ( If "%GPO_LOGGING_ENABLE%" == "YES" (
If "%GPO_LOG_NEGATIVE%" == "YES" ( If "%GPO_LOG_NEGATIVE%" == "YES" (
Echo %GPO_COMPUTERNAME% - ERROR - %DATE% - %TIME%: Name is in Blacklist.txt >>%GPO_LOGGING_GLOBAL_LOG_FILE% Echo %GPO_COMPUTERNAME% - ERROR - %DATE% - %TIME%: Name is in Blacklist.txt >>%GPO_LOGGING_GLOBAL_LOG_FILE%
) )
) )
Echo %COMPUTERNAME% is listet at "%GPO_CURPATH%InstallZabbixAgentGPO\Blacklist.txt" Echo %COMPUTERNAME% is listet at "%GPO_CURPATH%InstallZabbixAgentGPO\Blacklist.txt"
Echo Install Agent DENIED - Exit Script Echo Install Agent DENIED - Exit Script
GoTo END GoTo END
) )
) else ( ) else (
Echo Missing "%GPO_CURPATH%InstallZabbixAgentGPO\Blacklist.txt" Echo Missing "%GPO_CURPATH%InstallZabbixAgentGPO\Blacklist.txt"
GoTo END GoTo END
) )
) )
REM #### ## ## ###### ######## ### ## ## REM #### ## ## ###### ######## ### ## ##
REM ## ### ## ## ## ## ## ## ## ## REM ## ### ## ## ## ## ## ## ## ##
REM ## #### ## ## ## ## ## ## ## REM ## #### ## ## ## ## ## ## ##
REM ####### ####### ## ## ## ## ###### ## ## ## ## ## ####### ####### REM ####### ####### ## ## ## ## ###### ## ## ## ## ## ####### #######
REM ## ## #### ## ## ######### ## ## REM ## ## #### ## ## ######### ## ##
REM ## ## ### ## ## ## ## ## ## ## REM ## ## ### ## ## ## ## ## ## ##
REM #### ## ## ###### ## ## ## ######## ######## REM #### ## ## ###### ## ## ## ######## ########
REM Call the Installation Script REM Call the Installation Script
Echo. Echo.
Echo Start Agent-Installation ... Echo Start Agent-Installation ...
If "%GPO_LOGGING_ENABLE%" == "YES" ( If "%GPO_LOGGING_ENABLE%" == "YES" (
Echo %GPO_COMPUTERNAME% - INSTALL - %DATE% - %TIME%: Start Installation: %GPO_INSTALLER% >>%GPO_LOGGING_GLOBAL_LOG_FILE% Echo %GPO_COMPUTERNAME% - INSTALL - %DATE% - %TIME%: Start Installation: %GPO_INSTALLER% >>%GPO_LOGGING_GLOBAL_LOG_FILE%
) )
If "%GPO_LOGGING_PER_HOST%" == "YES" ( If "%GPO_LOGGING_PER_HOST%" == "YES" (
%GPO_INSTALLER% > %GPO_LOGGING_PATH%\%COMPUTERNAME%.LOG %GPO_INSTALLER% > %GPO_LOGGING_PATH%\%COMPUTERNAME%.LOG
) else ( ) else (
%GPO_INSTALLER% %GPO_INSTALLER%
) )
GoTo END GoTo END
REM ######## ## ## ######## REM ######## ## ## ########
REM ## ### ## ## ## REM ## ### ## ## ##
REM ## #### ## ## ## REM ## #### ## ## ##
REM ####### ####### ###### ## ## ## ## ## ####### ####### REM ####### ####### ###### ## ## ## ## ## ####### #######
REM ## ## #### ## ## REM ## ## #### ## ##
REM ## ## ### ## ## REM ## ## ### ## ##
REM ######## ## ## ######## REM ######## ## ## ########
:END :END
Echo. Echo.
Echo +---------------------------------------------------------+ Echo +---------------------------------------------------------+
Echo ^| Stopping Script InstallZabbixAgentGPO ^| Echo ^| Stopping Script InstallZabbixAgentGPO ^|
Echo +---------------------------------------------------------+ Echo +---------------------------------------------------------+
REM exit 0 REM exit 0
REM PAUSE REM PAUSE

View File

@ -1,6 +1,6 @@
************************* *************************
*** B L A C K L I S T *** *** B L A C K L I S T ***
************************* *************************
One Computername per Line (NetBIOS Computername) One Computername per Line (NetBIOS Computername)
------------------------------------------------ ------------------------------------------------

View File

@ -1,5 +1,5 @@
************************* *************************
*** W H I T E L I S T *** *** W H I T E L I S T ***
************************* *************************
One Computername per Line (NetBIOS Computername) One Computername per Line (NetBIOS Computername)
------------------------------------------------ ------------------------------------------------

View File

@ -1,30 +1,30 @@
@echo off @echo off
REM *** Configuration for Installing Zabbix-Agent via Group Policies *** REM *** Configuration for Installing Zabbix-Agent via Group Policies ***
REM Please use always YES or NO for switching Options REM Please use always YES or NO for switching Options
REM ----------------------------------------------------------------- REM -----------------------------------------------------------------
REM Path and Name of InstallZabbixAgent.bat REM Path and Name of InstallZabbixAgent.bat
Set GPO_INSTALLER=\\10.20.30.40\Zabbix-Agent$\Agent\InstallZabbixAgent.bat Set GPO_INSTALLER=\\10.20.30.40\Zabbix-Agent$\Agent\InstallZabbixAgent.bat
REM Use Whitlist.txt - install only if %COMPUTERNAME% is listet in Whitelist REM Use Whitlist.txt - install only if %COMPUTERNAME% is listet in Whitelist
Set GPO_USE_WHITELIST=NO Set GPO_USE_WHITELIST=NO
REM Use Blacklist.txt - install only if %COMPUTERNAME% is NOT listet in Blacklist REM Use Blacklist.txt - install only if %COMPUTERNAME% is NOT listet in Blacklist
Set GPO_USE_BLACKLIST=YES Set GPO_USE_BLACKLIST=YES
REM Filter for different Operation Systems REM Filter for different Operation Systems
Set GPO_INSTALL_WORKSTATION=NO Set GPO_INSTALL_WORKSTATION=NO
Set GPO_INSTALL_SERVER=YES Set GPO_INSTALL_SERVER=YES
REM ----------------------------------------------------------------- REM -----------------------------------------------------------------
REM Logging of Setup REM Logging of Setup
Set GPO_LOGGING_ENABLE=YES Set GPO_LOGGING_ENABLE=YES
Set GPO_LOGGING_GLOBAL_LOG_FILE=\\\10.20.30.40\Zabbix-Agent$\Logs\_GlobalLogFile.txt Set GPO_LOGGING_GLOBAL_LOG_FILE=\\\10.20.30.40\Zabbix-Agent$\Logs\_GlobalLogFile.txt
Set GPO_LOGGING_PER_HOST=YES Set GPO_LOGGING_PER_HOST=YES
Set GPO_LOGGING_PATH=\\10.20.30.40\Zabbix-Agent$\Logs Set GPO_LOGGING_PATH=\\10.20.30.40\Zabbix-Agent$\Logs
Set GPO_LOG_POSITIVE=YES Set GPO_LOG_POSITIVE=YES
Set GPO_LOG_NEGATIVE=YES Set GPO_LOG_NEGATIVE=YES
REM ----------------------------------------------------------------- REM -----------------------------------------------------------------
REM for later use REM for later use
REM Set GPO_INSTALL_XP=NO REM Set GPO_INSTALL_XP=NO
REM Set GPO_INSTALL_7=NO REM Set GPO_INSTALL_7=NO
REM Set GPO_INSTALL_8=NO REM Set GPO_INSTALL_8=NO
REM Set GPO_INSTALL_Vista=NO REM Set GPO_INSTALL_Vista=NO
REM Set GPO_INSTALL_2003=YES REM Set GPO_INSTALL_2003=YES
REM Set GPO_INSTALL_2008=YES REM Set GPO_INSTALL_2008=YES
REM Set GPO_INSTALL_2012=YES REM Set GPO_INSTALL_2012=YES

View File

@ -1,5 +1,5 @@
ZabbixAgentAutoUpdater ZabbixAgentAutoUpdater
GoogleUpdateTaskMachine GoogleUpdateTaskMachine
ZabbixExchange ZabbixExchange
ZabbixWindowsUpdateCheck ZabbixWindowsUpdateCheck

View File

@ -1,5 +1,5 @@
@echo off @echo off
cls cls
WindowsMountPoints.exe WindowsMountPoints.exe
echo. echo.
pause pause

View File

@ -1,8 +1,8 @@
@echo off @echo off
cls cls
echo See available Windows Updates as single Number in next line - wait a moment! echo See available Windows Updates as single Number in next line - wait a moment!
echo First time maybe 0 at zabbix! echo First time maybe 0 at zabbix!
windowsupdates.exe CHEAT windowsupdates.exe CHEAT
windowsupdates.exe windowsupdates.exe
echo. echo.
pause pause

View File

@ -1,62 +1,62 @@
@echo off @echo off
REM *** Configure the Agent ************************************************** REM *** Configure the Agent **************************************************
REM DNS-Name or IP of the Zabbix-Server or Zabbix Proxy, separate more than one server with , REM DNS-Name or IP of the Zabbix-Server or Zabbix Proxy, separate more than one server with ,
Set ZABBIXSERVER=zabbix.example.local Set ZABBIXSERVER=zabbix.example.local
REM the same before, only for active checks. If Empty, ZABBIXSERVER will be used REM the same before, only for active checks. If Empty, ZABBIXSERVER will be used
Set ZABBIXSERVERACTIVE= Set ZABBIXSERVERACTIVE=
REM Port of Zabbix Server, Default = 10051 REM Port of Zabbix Server, Default = 10051
Set ZABBIXSERVERPORT=10051 Set ZABBIXSERVERPORT=10051
REM Hostname to use REM Hostname to use
REM Set ZABBIXHOSTNAME=%COMPUTERNAME% REM Set ZABBIXHOSTNAME=%COMPUTERNAME%
REM Next Line works also with Hostnames longer than 15 Chars REM Next Line works also with Hostnames longer than 15 Chars
For /f %%i in ('hostname') do Set ZABBIXHOSTNAME=%%i For /f %%i in ('hostname') do Set ZABBIXHOSTNAME=%%i
REM Set next Entry to YES or NO. YES = add Computerdomain like .domain.local to Hostname REM Set next Entry to YES or NO. YES = add Computerdomain like .domain.local to Hostname
Set USEDOMAINSUFFIX=YES Set USEDOMAINSUFFIX=YES
REM If the Computer is in no domain, or the domain can not be determined, use the following suffix REM If the Computer is in no domain, or the domain can not be determined, use the following suffix
Set FALLBACKDOMAIN=example.local Set FALLBACKDOMAIN=example.local
REM Zabbix Host ListenPort, Default = 10050 ********************************** REM Zabbix Host ListenPort, Default = 10050 **********************************
Set ZABBIXHOSTLISTENPORT=10050 Set ZABBIXHOSTLISTENPORT=10050
REM HostMetadata for Autodiscovery ******************************************* REM HostMetadata for Autodiscovery *******************************************
REM Set a REM in front of the line if you did not use REM Set a REM in front of the line if you did not use
REM Only use at Version 2.2 or higher, not for 2.0.x REM Only use at Version 2.2 or higher, not for 2.0.x
Set ZABBIXHOSTMETADATA=WindowsServer Set ZABBIXHOSTMETADATA=WindowsServer
REM ## Try some alternativ Tests for different Metadata ********************** REM ## Try some alternativ Tests for different Metadata **********************
REM Set METADATATEST to YES if you want the following additional Tests REM Set METADATATEST to YES if you want the following additional Tests
Set METADATATEST=NO Set METADATATEST=NO
REM Alternativ Metadata if if this Server is a Citrix Terminalserver with XenApp 6.x or 7.x REM Alternativ Metadata if if this Server is a Citrix Terminalserver with XenApp 6.x or 7.x
Set ZABBIXHOSTMETADATACITRIX=CitrixServer Set ZABBIXHOSTMETADATACITRIX=CitrixServer
REM Alternativ Metadata if this Server is an Active Directory Domain Controller REM Alternativ Metadata if this Server is an Active Directory Domain Controller
Set ZABBIXHOSTMETADATADC=DomainController Set ZABBIXHOSTMETADATADC=DomainController
REM Alternativ Metadata if this Server is an Exchange Mail Server REM Alternativ Metadata if this Server is an Exchange Mail Server
Set ZABBIXHOSTMETADATAEXCHANGE=ExchangeServer Set ZABBIXHOSTMETADATAEXCHANGE=ExchangeServer
REM Alternativ Metadata if this Server is an Microsoft SQL Server REM Alternativ Metadata if this Server is an Microsoft SQL Server
Set ZABBIXHOSTMETADATAMSSQL=MSSQLServer Set ZABBIXHOSTMETADATAMSSQL=MSSQLServer
REM ************************************************************************* REM *************************************************************************
REM Name of Config-File - Default zabbix_agentd.win.conf REM Name of Config-File - Default zabbix_agentd.win.conf
Set ZABBIXHOSTCONFIGFILE=zabbix_agentd.win.conf Set ZABBIXHOSTCONFIGFILE=zabbix_agentd.win.conf
REM CleanUp Directory before Installing - delete ALL Files in the Installation REM CleanUp Directory before Installing - delete ALL Files in the Installation
REM Directory before installing new Version REM Directory before installing new Version
Set ZABBIXCLEANUP=YES Set ZABBIXCLEANUP=YES
REM Unregister "Zabbix Agent" Service - set to "NO" if you use some Hosts where Zabbix Agent is running REM Unregister "Zabbix Agent" Service - set to "NO" if you use some Hosts where Zabbix Agent is running
REM as an Windows User instead of SYSTEM (Changed some Host manually) REM as an Windows User instead of SYSTEM (Changed some Host manually)
Set ZABBIXUNREGISTERSERVICE=YES Set ZABBIXUNREGISTERSERVICE=YES
REM *********************************************************** REM ***********************************************************
REM ** ** REM ** **
REM ** Next Lines are for the ZabbixAutoUpdater only ** REM ** Next Lines are for the ZabbixAutoUpdater only **
REM ** http://znil.net/index.php?title=Agent_Auto_Updater ** REM ** http://znil.net/index.php?title=Agent_Auto_Updater **
REM ** ** REM ** **
REM *********************************************************** REM ***********************************************************
REM Use ZabbixAutoUpdater? YES or NO REM Use ZabbixAutoUpdater? YES or NO
Set ZABBIXAGENTUPDATER=YES Set ZABBIXAGENTUPDATER=YES
REM Set Path to the Agent-Files in Network and to the Installation-Script or Program REM Set Path to the Agent-Files in Network and to the Installation-Script or Program
Set UPDATEFILESHARE=\\10.20.30.40\Zabbix-Agent$\3.4.1\UpdateCheck Set UPDATEFILESHARE=\\10.20.30.40\Zabbix-Agent$\3.4.1\UpdateCheck
Set UPDATEINSTALLER=\\10.20.30.40\Zabbix-Agent$\3.4.1\InstallZabbixAgent.bat Set UPDATEINSTALLER=\\10.20.30.40\Zabbix-Agent$\3.4.1\InstallZabbixAgent.bat
REM Update Frequency in Minutes REM Update Frequency in Minutes
Set UPDATEFREQUENCY=120 Set UPDATEFREQUENCY=120
REM Set Username and Password for Update-Task. Use DOMAIN\Username or Username@domain.local REM Set Username and Password for Update-Task. Use DOMAIN\Username or Username@domain.local
REM Thsi will not work with Password with an %. Use if possible a long Passwort with chars and Numbers REM Thsi will not work with Password with an %. Use if possible a long Passwort with chars and Numbers
REM Or you can run the job as SYSTEM. SYSTEM need no Password. But SYSTEM need anonymous access to the Network-Share REM Or you can run the job as SYSTEM. SYSTEM need no Password. But SYSTEM need anonymous access to the Network-Share
Set UPDATEUSER=SYSTEM Set UPDATEUSER=SYSTEM
Set UPDATEPASSWORD= Set UPDATEPASSWORD=
REM Set UPDATEUSER=DOMAIN\Administrator REM Set UPDATEUSER=DOMAIN\Administrator
REM Set UPDATEPASSWORD=passw0rd REM Set UPDATEPASSWORD=passw0rd