This post is more than 5 years old
3 Posts
0
150744
October 1st, 2012 17:00
CommandAction - Issue Passing Parameters
Hello everyone,
I'm fairly new to vFoglight (running version 6.6 at the moment) and am having trouble setting up a CommandAction with parameters. We have a rule from vBundle-1, vBundle Datastore Storage Free that we're trying to have write some parameters to a file on the FMS via a simple Windows Batch script. Right now the rule is set to trigger as Critical when a datastore has less than 10 GB free, and Fatal when less than 5 GB free.
Problem is I'm only successful getting the CommandAction to work when I simply invoke a script with no parameters. If I try to pass any parameters to the script such as @DSName and @DSSpaceFree, I can see vFoglight is translating the variables to the actual values correctly, but tried to execute the entire COMMAND_LINE as if those variables were part of the script name itself.
Original setup for COMMAND_LINE was as follows:
E:\Scripts\DataStoreGBFree.bat @DSName @DSSpaceFree
This seemed to cause vFoglight to insert whitespace characters enclosed in quotation marks wherever a space could be found. This resulted in the the following error in the log:
VERBOSE [Thread-25] com.quest.nitro.service.action.impl.command.StreamGobbler - Command Action Out: 'E:\Scripts\DataStoreGBFree.bat" "VMStore_001" "8.10' is not recognized as an internal or external command
VERBOSE [Thread-25] com.quest.nitro.service.action.impl.command.StreamGobbler - Command Action Out: operable program or batch file.
INFO [Thread-26] com.quest.common.launcher.runner.ProcessNativeImpl - Process exited: [Command Action, message: Process exited, exit code: 1]
WARN [Action-4-thread-3] com.quest.nitro.service.action.impl.command.CommandAction - Invoked command returned value: 1
I then tried putting double-quotation characters around the entire COMMAND_LINE, but that resulted in a similar error essentially suggesting the same thing:
WARN [Action-4-thread-48] com.quest.nitro.service.action.ActionService - Failed to invoke action: CommandAction ({foglight_rule_id=ade50163-8f25-4897-b438-f72120ab992b, foglight_severity_level_name=Critical, foglight_rule_name=vBundle Datastore Storage Free} com.quest.nitro.service.action.api.ActionInvocationException: java.io.IOException: Process Command Action could not be started: Named executable does not exist or cannot be executed).
Finally I tried setting ENVIRONMENT_VARIABLES as follows to try and pass the parameters as environment variables that the batch script could easily capture:
DATASTORE=@DSName!GBFREE=@DSSpaceFree
But that didn't seem to work either. So I'm not sure what I'm doing wrong and I'm not finding anything in the Foglight or vFoglight documentation suggesting I need to do something special for my original COMMAND_LINE to work.
Any help or suggestions would be greatly appreciated.
Thanks!
-Aaron



aaron.smith11
3 Posts
1
October 10th, 2012 22:00
I opened a support ticket and it was determined this is a bug. ID assigned: FGL-14306.
aaron.smith11
3 Posts
1
October 10th, 2012 22:00
I was also given the following work around from support, which I confirmed works:
1. RDP to your FMS server
Modify the following:
\config\server.config
Add the following to the vm parameter
-Dquest.common.process-runner.disabled=true
example:
server.vm.option0 = "-Dquest.common.process-runner.disabled=true"
In my case, I already had a server.vm.option0 and option1, so I had to add this as option3.
DELL-Brian W
59 Posts
0
October 12th, 2012 21:00
Thanks for posting the bug id and the workaround!
Brian