When I try to run the exportComplianceDetailsServerReport command, I get an error saying my serverId is not an integer, even though I am using "" which is supposed to indicate 'null' to include all servers:
%blcli_execute Utility exportComplianceDetailsServerReport 6541363 "" /tmp/bl_compliance
Command execution failed. com.bladelogic.om.infra.cli.factory.CommandNotFoundException: Found command 'Utility.exportComplianceDetailsServerReport' but with mismatching arguments. : java.lang.IllegalArgumentException: Input '' cannot be converted to expected type : int: java.lang.NumberFormatException: For input string: ""
Any idea why double-quotes would fail? I also tried single quotes which did not work and using '0' makes it look for serverId = 0 which isn't valid.
Did you try ‘null’ ?
Just tried it... get the same error:
Command execution failed. com.bladelogic.om.infra.cli.factory.CommandNotFoundException: Found command 'Utility.exportComplianceDetailsServerReport' but with mismatching arguments. : java.lang.IllegalArgumentException: Argument of type : null cannot be used for : int
seems like it wants a server id.
if you want the report for all servers i think you need to use exportComplianceRuleDetailsReport.
Yeah I was hoping to be able to do the server report so I could have the breakdown by server, but I can try the rules one just to see if it works.
In the BLCLI reference, it says for all servers to use "", so I'm not sure if that's just a mis-print or maybe a bug.
Where does it say to use “” ?
The problem with exportComplianceRuleDetailsReport is that you have to specify a specific rule to report. I need to have server results that display each rules' result for each individual server, along with the summary report of compliant/non-compliant servers, which is what exportComplianceDetailsServerReport provides.
Do you think it's worthy to enter this as a support issue? Wondering if the issue is in the code; it may have been overlooked to allow "" as an accepted value. Or do you think there's another integer value that represents 'All Servers'?
does that cli allow 'null' or "" for the rulename ??
For exportComplianceRuleDetailsReport, I tried using "" and 'null' for the rule name but no luck. Once I used an actual rule name the report would generate in the export directory. I was able to use "" for the groupname because in my compliance template I did not have a rule group.
Do you think the inability of being able to use "" or 'null' in the serverId field of the exportComplianceDetailsServerReport command should be raised as an issue to see if there is a workaround? Or do you know if there is another way around it? I would generate the report from the GUI but for this particular job run, it has over 14,000 targets and the BL client times out when I try to get to the context menu that has the option to export a compliance report.
If get a error if I run
JOB_RUN_ID=`blcli_execute JobRun findLastRunKeyByJobKey $JOB_RUN_KEY`
echo "JOB_RUN_ID: $JOB_RUN_ID"
Command execution failed. com.bladelogic.om.infra.cli.factory.CommandNotFoundExc
eption: Could not find any instance of command "JobRun,findLastRunKeyByJobKey" w
ith expected number of arguments: 9852
No result has been created yet
first - don't do:
why are you passing a job run key to a command that takes a job key ?