VMware Cloud Community
TomP_uk
Contributor
Contributor

Simple Alarm actions - shown in "Task & Events", but not working...

Afternoon All

We have a simple alarm action defined within VC5, on the Actions tab of the Alarm Settings dialog we have;

Action: "Run a command" with the configuration of:

c:\windows\system32\cmd.exe /c c:\tmp\vcmsg.bat {targetName} {alarmName}

The c:\tmp\vcmsg.bat contains the following:

@echo off
echo Alarm Triggered: %date% %time% >> c:\tmp\vcmsg.log
echo %* >> c:\tmp\vcmsg.log
When looking at the "Tasks and Events" tab in VC5, I can see the alarm action is being trigered correctly:

Alarm 'Datastore usage on disk' on ESXVMF999 ran script c:\windows\system32\cmd.exe /c c:\tmp\vcmsg.bat ESXVMFS999 alarm.DatastoreDiskUsageAlarm

And when I check the logfile that the vcmsg.bat creates, I only get the "Alarm Triggered: 14/09/2012 14:11:39.98" lines, When I would have expected to see the arguments passed into the vcmsg.bat script on the following line - but they are not present.

If I manually paste the alarm action from "Tasks & Events" into a run dialog, I get exactly the right result in my logfile:

     c:\windows\system32\cmd.exe /c c:\tmp\vcmsg.bat ESXVMFS999 alarm.DatastoreDiskUsageAlarm

then my log shows the new entry as:

Alarm Triggered: 14/09/2012 14:11:39.98

ESXVMFS999 alarm.DatastoreDiskUsageAlarm

So in short VC5 is definatley executing the script (proven by the "Alarm Trigged Date Time" lines - but the the VC5 GUI is is displaying the arguments being passed in - but they are not...

Baffled here!

Thanks in advanced for any help!

Points etc.

Tags (1)
0 Kudos
2 Replies
emma234
Contributor
Contributor

Hello TomP_uk,

Welcome to the communities.

could you please post in on development forum , they may help you .

"He Conquers, Who Conquers Himself".
0 Kudos
bschreze
Contributor
Contributor

Any Update to this call.... I am having the same problem at the moment.


regards

0 Kudos