Updating the Cost Management Model Builder Proxy event


After creating an Automator populate event, you need to add a new run event to the script so Automator can run the Cost Management Model Builder Proxy. Use the following procedure to add the Cost Management Model Builder proxy event.

Warning

Important

If you are using Cost Management Scheduling Services to run the Model Builder Task at a specific time, you can skip this task.

To update the 

Cost Management

 Model Builder Proxy run event

  1. Open the script.
  2. Select Edit > Add Event > Run Visualizer Input File Transfer.

    Warning

    Important

    This event runs another application, such as an FTP application or (in this case) the Cost Management Model Builder Proxy application.

  3. Click Browse, navigate to the SCAModelBuildProxy file, and select the SCAModelBuildProxy.exe file.
  4. In the Arguments field, type the name of the Model Build Task created in Cost Management.You can use multiple command-line parameters for execution. The basic format is as follows:

     SCAModelBuildProxy.exe -t <taskname> [-d <yyyy/mm>][-s <servername>][-v <virtualpath>][-p <portnumber>][-l <logname>]

    Replace the variables as follows:

    Parameter

    Requirement

    Description

    -t taskName

    Required

    Name of the Model Builder Task to run

    This parameter can appear anywhere on the command line but must be immediately followed by the task name. If the task name contains spaces, it must be surrounded by quotes. For example, My Task.

    -d yyyy/mm

    Optional

    Specifies the date (year and month) to use when executing a run of the Model Builder Task

    This parameter can appear anywhere on the command line, but must be immediately followed by the year and month in the following format yyyy/mm.

    Since the parameter is optional, the following conditions apply:

    • If specified, the year and month must be in the form of yyyy/mm.
    • If not specified, the current year and month are used.
    Information
    Example

    For March 2019 use 2019/03.

    -s serverName

    Optional

    Name of the fully qualified Cost Management server, e.g. myserver.myco.com

    The default is LocalHost.

    This parameter can appear anywhere on the command line, but must be immediately followed by the server name.

    Warning

    Important

    Depending on the DNS resolution, it may not be necessary in all cases to fully qualify the name.

    Since the parameter is optional, the following conditions apply:

    • If specified, the specified server name will override any saved server name setting (or the default).
    • When not specified, execution of the command uses the server name setting saved as part of the interactive Model Build Proxy session or Localhost.

    -v virtualPath

    Optional

    Virtual Path to the Cost Management installation (by default BMCSCA)

    This parameter can appear anywhere on the command line but must be immediately followed by the virtual path.

    Since the parameter is optional, the following conditions apply:

    • If specified, the virtual path specified overrides any saved Virtual Directory setting (or the default).
    • When not specified, execution of the command uses the virtual directory setting saved as part of the interactive Model Build Proxy session or BMCSCA.

    -p portNumber

    Optional

    Server port number used by Cost Management

    The default is 80.

    This parameter can appear anywhere on the command line but must be immediately followed by the port number.

    Since the parameter is optional, the following conditions apply:

    • If specified, the specified port number overrides any saved Port Number setting (or the default).
    • When not specified, the execution of the command uses the port number setting saved as part of the interactive Model Build Proxy session or 80.

    -l logName

    Optional

    Name and path to write the log file messages

    Since the parameter is optional, the following conditions apply:

    • When specified, the log file messages are also written to the specified log file
    • When not specified, by default, messages are written to the Windows Event Viewer. This parameter can appear anywhere on the command line but must be immediately followed by the log file name.
    Success

    Tip

    Command line switches can be specified using any of the following forms: '-', '/', '/'.

    For example:

    SCAModelBuildProxy -t 'MyTask' /d 2019/03 /s 'MyServer'
    Information
    Example

    Some examples are provided as follows:

    • SCAModelBuildProxy -t 'My Task'

      This runs the proxy against the model builder task 'My Task' for the most recent month of data in the database and uses all defaults or user-configured options for the Cost Management server.

    • SCAModelBuildProxy -t 'My Task' -d '2019/03'

      This runs the proxy against the model builder task 'My Task' for March 2019 only and uses all defaults or user-configured options for the Cost Management server.

    • SCAModelBuildProxy -t 'My Task' -s 'MyServer'

      This runs the proxy against the model builder task 'My Task' on the server 'MyServer' for the most recent month of data in the database and uses defaults only for the port number and virtual directory.

    • SCAModelBuildProxy -d '2019/03'

      This command syntax fails because no Model Builder Task was specified.

    Warning

    Important

    If you are upgrading Cost Management, the product continues to support previously existing command-line parameters. However, We strongly recommend that you update the parameters as described in the previous table.

    The following obsolete syntax is supported:

     SCAModelBuildProxy.exe<taskname>|[<yyyy/mm>]|s|-p |-l]

    You should not mix positional parameters with switched parameters. You can specify switched parameters in any order after you specify the positional parameters.

  5. Click OK.Make sure the run event appears after the populate event. If not, select the run event and then use Ctrl+Up or Ctrl+Down to move it to the correct location.

    You want the run event to execute after the populate event to ensure that the latest data is in the database before the Cost Management model is generated. If the populate event does not execute or fails, any events following it in the script will not execute either. This ensures that the Cost Management Model will not be generated if the data did not populate correctly.

    Your script should now look like this:

    GUID-FB95FE13-E083-4C3C-A986-02190F0E0140-low.png

  6. Save the script to a name and location for future use.




 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC AMI Cost Management 24.1.00