I'm using a userparameter to kick off a .bat script. I don't care what the
I'm getting the following unsupported message when I run the command with \zabbix_agentd.exe -c C:\zabbix_agentd.conf -p
outlook [m|ZBX_NOTSUPPORTED]
I dont really care about that value that would be returned here, i'm just using the userparameter as a means to kick off the script. i just have an echo 1 to satisfy a value coming through at the start of the script for key value.
In the .bat script, I have the following code.
When I run the script from the windows command prompt, I get the expected output as follows in the sender.log file in D:\EmailMonitor directory and zabbix has the correct latest data. The two powershell scripts also run correctly and have the correct data.
When I use the command to use the zabbix agent (\zabbix_agentd.exe -c C:\zabbix_agentd.conf -p) to run the .bat command, I get the following in the sender.log file and the latest data is not updated. It also looks like the powershell scripts are kicking off incorrectly as they are blank.
Any help would be appreciated.
Code:
UserParameter=outlook,"D:\EmailMonitor\zabbix_send.bat"
outlook [m|ZBX_NOTSUPPORTED]
I dont really care about that value that would be returned here, i'm just using the userparameter as a means to kick off the script. i just have an echo 1 to satisfy a value coming through at the start of the script for key value.
In the .bat script, I have the following code.
Code:
d: cd \EmailMonitor echo 1 @echo off @echo start of commands >> sender.log @echo Wait 10 minutes >> sender.log date /T >> sender.log time /T >> sender.log @echo score_mailbox run >> sender.log Powershell.exe -executionpolicy remotesigned -File D:\EmailMonitor\score_mailbox.ps1 @echo score_cas run >> sender.log Powershell.exe -executionpolicy remotesigned -File D:\EmailMonitor\score_cas.ps1 @echo testmbxmx101_db01finaloutput >> sender.log D:\zabbix_sender.exe -vv -z 10.106.21.99 -i D:\EmailMonitor\testmbxmx101_db01finaloutput.txt >> sender.log @echo testmbxmx102_db01finaloutput >> sender.log D:\zabbix_sender.exe -vv -z 10.106.21.99 -i D:\EmailMonitor\testmbxmx102_db01finaloutput.txt >> sender.log @echo testmbxmx103_db01finaloutput >> sender.log D:\zabbix_sender.exe -vv -z 10.106.21.99 -i D:\EmailMonitor\testmbxmx103_db01finaloutput.txt >> sender.log @echo testmbxmx104_db01finaloutput >> sender.log
Code:
Start of commands Wait 10 minutes Wed 12/31/2014 12:30 PM score_mailbox run score_cas run testmbxmx101_db01finaloutput info from server: "processed: 23; failed: 0; total: 23; seconds spent: 0.001880" sent: 23; skipped: 0; total: 23 testmbxmx102_db01finaloutput info from server: "processed: 16; failed: 0; total: 16; seconds spent: 0.000882" sent: 16; skipped: 0; total: 16 testmbxmx103_db01finaloutput info from server: "processed: 28; failed: 0; total: 28; seconds spent: 0.001080" sent: 28; skipped: 0; total: 28
Code:
start of commands Wait 10 minutes Wed 12/31/2014 01:00 PM score_mailbox run score_cas run
Comment