1 2 Previous Next 24 Replies Latest reply: Jan 21, 2011 9:26 AM by Bill Robinson Go to original post RSS
      • 15. Re: Reporting a Server Value
        Bill Robinson

        You could try ‘Value1,Value2,Value3’…  or play around w/ how you take the snapshot (the whole eo or just parts of it).


        Or you might have to iterate through all your devices.

        • 16. Re: Reporting a Server Value
          Jason B

          Tried that, BL sticks all values in as Value1 as each part is considered a separate item, so value1 gives me all data, but each entry is on a separate line.


          It's just nasty, I will hack something together, but I'm not sure why the blcli has been written to export data in such a horrible fashion


          I tried Checksum,Size too - no data which suggests these values are indeed supposed to be the Names of the properties, it just doesn't work in the way I think it was intended.  I hope V8 is has a vastly improved blcli.


          Many thanks though,


          • 17. Re: Reporting a Server Value
            Jason B



            Looks like i am back to having to use Utility exportSnapshotRun specifying the template and server name to get the data for each asset in the snapshot.  I consider a 'snapshotrun' a run of the job across many assets so why thecli considers each asset with a run a separate run I've no idea and presents the next problem.


            What cli do I use to get a list of hosts included in a snapshotrun so I can iterate through them, running the above command to hopefully export the results of each asset.  There is a ServerNameFromID method so I assume that somewhere there is a means to determine what servers were included in a snapshot run ?


            Any ideas as nothing looks that obvious to me ?



            • 18. Re: Reporting a Server Value
              Jason B

              Hi, any ideas here ?


              How can I get the host names included in a snapshot run to use as a parameter to extract the results for each host within that run ?


              ie from the help;

              Utility exportSnapshotRun "/sampleJobGroup" "sampleJob" 2000006 "/tmpGrp" "tmp1" "server1" "C:/temp/sampleJobResult.csv" "CSV"



              So, i need to determine the host (be nice if you could just do a for each loop in the snapshot result for each host in it !).





              • 19. Re: Reporting a Server Value
                Bill Robinson

                blcli_execute SnapshotJob getDBKeyByGroupAndName "/path/to/group" "job name"

                blcli_storeenv snapKey

                blcli_execute JobRun findLastRunKeyByJobKey ${snapKey}

                blcli_storeenv runKey

                blcli_execute JobRun jobRunKeyToJobRunId ${runKey}

                blcli_storeenv runId

                blcli_execute JobRun getServerTargetsForJobRunId ${runId}

                blcli_execute Utility listPrint

                blcli_execute Utility setTargetObject

                blcli_storeenv serverKeys


                for key in ${serverKeys}


                blcli_execute Server findByDBKey ${key}

                blcli_execute Server getName

                blcli_storeenv serverName



                • 20. Re: Reporting a Server Value
                  Jason B

                  That's all very well, and the method I have searched high and low for is;




                  Sadly this does not exist;


                  Command execution failed. com.bladelogic.cli.factory.CommandNotFoundException: Name space : JobRun has no commands by name : getServerTargetsForJobRunId


                  listPrint is also not recognised. 


                  I assume you are using BL 8.0 where as we are currently using  7.6.  The above commands are also not listed in the blcli help.


                  I have also used Index and Search in the blcli help with key words Target and Server and see nothing that returns the list of host names targeted by a job.





                  • 21. Re: Reporting a Server Value
                    Bill Robinson

                    look in the unreleased commands.  yes - the below are for 8.0.

                    • 22. Reporting a Server Value
                      Jason B



                      Looked at these and generated the new html.






                      Running this command


                      blcli_execute Utility simpleExportSnapshotResults DBKey:SJobKey:172507-6 DBKey:SJobRunKey:1226783 "export.csv"


                      With the args the help file asks (4th optional columns not specified) I get the following error;


                      Command execution failed. com.bladelogic.cli.factory.CommandNotFoundException: Found command 'Utility.simpleExportSnapshotResults' but with mismatching arguments.


                      This is somewhat confusing as it first says the "CommandNotFoundException., then says "Found command" but with missing arguments - which I have provided.


                      I am using the performance commands so the unreleased commands are available and the correct arguments are provided.


                      Can you clarify if this command works ?  there are no unreleased commands for determining the target hosts in a snapshoip job, so if this does not work it seems exporting the results of all snapshopts within a snapshot job run is impossible in 7.6


                      Many thanks,



                      • 23. Re: Reporting a Server Value
                        Jason B

                        Just to be clear, I have read this pdf, and I have generated the additional docs and provided the perameters asked for, yet the procedure call errors as per previous post.




                        Is there a way to get the perameter the procedure is unhappy with ?  The error message is rather generic / unhelpful





                        • 24. Reporting a Server Value
                          Bill Robinson

                          this should work:


                          blcli_execute Utility simpleExportSnapshot "/path/to/group" "job name" /tmp/snap.csv ""


                          (or c:\temp\snap.csv on windows)

                          1 2 Previous Next