Skip to content

Execute Bat File on Remote Windows Host with Zabbix Agent

Video Lecture

Execute Bat File on Remote Windows Host with Zabbix Agent Execute Bat File on Remote Windows Host with Zabbix Agent

Description

In this video, I create a Windows batch file that backups a file. I then execute it and read the response from the remote Zabbix Agent host using the system.run item key.

example.bat

1
2
3
4
5
6
@echo off
set d=%date%_%time%
set d=%d:.=%
set d=%d::=%
set d=%d:/=%
COPY c:\temp\abc.txt c:\temp\abc_%d%.txt >nul && (echo 1) || (echo 0)

Item

Property Value
Name Backup Example
Type Zabbix agent (active)
Key system.run[C:/temp/example.bat]

Zabbix Agent Items

Restricting Agent Checks

Comments