10 Replies Latest reply on Sep 3, 2020 12:49 PM by S. Crawford

    Is there a way to define an app server for getAppServerDetails in NSH script?

    S. Crawford
      Share This:

      We have an NSH script/job that is meant to retrieve the app server details of the app server target the job is running on.  We have all the app servers in a server group, and the job executes on each target, so we expect to see the details of each app server in the job log results.  However, even though the NSH script is running on each app server, it does not return the results of the target app server.  It returns the details of the job server that is executing the work item instead.  This is what the NSH script looks like:


      #!/bin/nsh -
      echo "Retrieve App Server Details"
      /opt/bmc/bladelogic/NSH/bin/blcred cred -acquire -profile defaultProfile -i /opt/bmc/bladelogic/NSH/br/user_info.dat
      blcli_setoption serviceProfileName defaultProfile
      blcli_execute AppServerProfiler getAppServerDetails


      Is there a way to change the script to force the BLCLI to be executed on the target app server instead of the job server that is executing the work item?  We have tried adding 'cd //<app_server_target' before acquiring the blcred but that didn't work.


      Looking to parse information from the getAppServerDetails and then use that information to do further actions, so we need to have the information come an automated method, not the GUI.