@echo off
for /f %%u in ('c:\zabbix_agents_3.4.6.win\bin\win64\zabbix_get.exe -s 127.0.0.1 -k agent.hostname') do (set hn=%%u)
for /f %%a in (c:\zabbix_agents_3.4.6.win\keylist) do call :dataget %%a
c:\zabbix_agents_3.4.6.win\bin\win64\zabbix_sender.exe -z zbx.gaojihealth.cn -i c:\zabbix_agents_3.4.6.win\tmpdata >> c:\zabbix_agents_3.4.6.win\zabbix_agent.log
del c:\zabbix_agents_3.4.6.win\tmpdata /q
goto EOF
:dataget
for /f %%i in ('c:\zabbix_agents_3.4.6.win\bin\win64\zabbix_get.exe -s 127.0.0.1 -k %1') do (set result=%%i) 
echo %hn% %1 %result% >> c:\zabbix_agents_3.4.6.win\tmpdata
:EOF