+---+
<project>
[...]
<build><plugins><plugin><groupId>com.lazerycode.jmeter</groupId><artifactId>jmeter-maven-plugin</artifactId><version>USE LAST VERSION</version><executions><execution><id>jmeter-tests</id><goals><goal>jmeter</goal></goals></execution></executions><configuration><jmeterExtensions><artifact>kg.apc:jmeter-plugins-casutg:2.4</artifact></jmeterExtensions><!-- The plugin uses some broken dependencies. An alternative is to set this to true and use excludedArtifacts, see below --><downloadExtensionDependencies>false</downloadExtensionDependencies></configuration></plugin></plugins></build>
[...]
</project>
+---+
:: Bat fileto create Telegraf configs for several hosts.
:: To create config files you should specify host name andlist of telegraf template files separated by space for each host.
:: Config files (telegraf.conf) will be created in the 'config/<host-name>' dir.
@pushd "%~dp0"
@echo off
chcp 65001
:: clean old configs
rmdir /S /Q configs
mkdir configs
:: testWebStand.raiffeisen.ru (web,haproxy)
call:create_config testWebStand.raiffeisen.ru ^
telegraf.header.conf telegraf.input.linux.conf telegraf.input.haproxy.conf
pause
goto:eof
Отчётность
create.configs.bat
::--------------------------------------------------------------------------------------------------------------------:: Creates a Telegraf config for specified host from specified templates
::--------------------------------------------------------------------------------------------------------------------:create_config
SETLOCAL
set HOSTNAME=%~1
set CONFIG_FILE=configs\%HOSTNAME%\telegraf.conf
echo.
echo %HOSTNAME%: Telegraf config will be created in"%CONFIG_FILE%"
md configs\%HOSTNAME% && copy NUL %CONFIG_FILE% > NUL
for /f "tokens=1,* delims= "%%a in ("%*") do set ALL_ARGS_BUT_FIRST=%%b
for %%a in (%ALL_ARGS_BUT_FIRST%) do (
echo. %%a
type %%a >> %CONFIG_FILE%
)
ENDLOCAL
goto:eof
::create_config
@popd
pause