Configuration commands for Google Cloud's Agent for SAP

This document shows you the commands that you can use to modify the configuration of Google Cloud's Agent for SAP. These commands are supported from version 3.2 of the agent.

The configuration commands are an alternative to editing the agent's configuration file: /etc/google-cloud-sap-agent/configuration.json. Each configuration command also restarts the agent to make sure that the change takes effect.

Agent restart limit

You can restart Google Cloud's Agent for SAP up to 3 times in 60 seconds. During this timeframe, while you can continue configuring the agent by running the configuration commands, all auto-restart operations beyond this limit fail with the output: Could not restart the agent.

If you see this output, then after running all the required configuration commands, you need to manually restart the agent for the changes to take effect. For instructions, see Restart the agent.

Help commands

  • To print a summary help for the google_cloud_sap_agent configure command of the agent and exit:

    sudo /usr/bin/google_cloud_sap_agent configure -help
  • To print the status of the features of your agent instance:

    sudo /usr/bin/google_cloud_sap_agent configure -showall
  • To print the version of your agent instance:

    sudo /usr/bin/google_cloud_sap_agent configure -version

For information about the arguments supported by the google_cloud_sap_agent configure command, see Supported arguments.

For top-level settings

  • To configure the agent for a Bare Metal Solution server:
    sudo /usr/bin/google_cloud_sap_agent configure -setting=bare_metal -enable

    To configure the agent for a Compute Engine VM instance:

    sudo /usr/bin/google_cloud_sap_agent configure -setting=bare_metal -disable
  • To set the logging level of the agent:

    sudo /usr/bin/google_cloud_sap_agent configure -loglevel=LOG_LEVEL

    Replace LOG_LEVEL with one of the supported log levels: debug, info, warn, or error.

  • To let the agent discover the SAP systems running on your host:

    sudo /usr/bin/google_cloud_sap_agent configure -feature=sap_discovery -enable

    To not allow the agent from discovering your SAP systems:

    sudo /usr/bin/google_cloud_sap_agent configure -feature=sap_discovery -disable

For SAP Host Agent metrics collection

  • To allow the agent to collect the SAP Host Agent metrics:

    sudo /usr/bin/google_cloud_sap_agent configure -feature=host_metrics -enable

    To stop the collection of the SAP Host Agent metrics:

    sudo /usr/bin/google_cloud_sap_agent configure -feature=host_metrics -disable

For Agent health metrics collection

  • To enable the collection of the agent health metrics:

    sudo /usr/bin/google_cloud_sap_agent configure -feature=agent_metrics -enable

    To disable the collection of the agent health metrics:

    sudo /usr/bin/google_cloud_sap_agent configure -feature=agent_metrics -disable

  • To modify the frequency at which the agent collects the CPU and memory usage of its daemon process and sends them to Cloud Monitoring:

    sudo /usr/bin/google_cloud_sap_agent configure -feature=agent_metrics -agent_metrics_frequency=FREQUENCY

    Replace FREQUENCY with the required value, in seconds. The frequency must not be less than 5 seconds.

  • To modify the frequency at which the agent checks its operational health and sends that information to Cloud Monitoring:

    sudo /usr/bin/google_cloud_sap_agent configure -feature=agent_metrics -agent_health_frequency=FREQUENCY

For Process monitoring metrics collection

  • To allow the agent to collect the Process Monitoring metrics:

    sudo /usr/bin/google_cloud_sap_agent configure -feature=process_metrics -enable

    To stop the collection of the Process Monitoring metrics:

    sudo /usr/bin/google_cloud_sap_agent configure -feature=process_metrics -disable
  • To modify the frequency at which agent must collect the fast-changing Process Monitoring metrics:

    sudo /usr/bin/google_cloud_sap_agent configure -feature=process_metrics -process_metrics_frequency=FREQUENCY

    To modify the frequency at which agent must collect the slow-changing Process Monitoring metrics:

    sudo /usr/bin/google_cloud_sap_agent configure -feature=process_metrics -slow_process_metrics_frequency=FREQUENCY

    Replace FREQUENCY with the frequency, in seconds, at which the agent must collect the metrics.

  • To stop the collection of any Process Monitoring metrics:

    sudo /usr/bin/google_cloud_sap_agent configure -feature=process_metrics -process_metrics_to_skip="LIST_OF_METRICS" -add

    To resume the collection of any Process Monitoring metrics that you had the agent stop:

    sudo /usr/bin/google_cloud_sap_agent configure -feature=process_metrics -process_metrics_to_skip="LIST_OF_METRICS" -remove

    Replace LIST_OF_METRICS with the names of the Process Monitoring metrics that you want the agent to resume collecting. Use a comma to separate the metric names.

For Workload Manager evaluation metrics collection

  • To let the agent collect the Workload Manager evaluation metrics:
    sudo /usr/bin/google_cloud_sap_agent configure -feature=workload_validation -enable
  • To stop the collection of the Workload Manager evaluation metrics:

    sudo /usr/bin/google_cloud_sap_agent configure -feature=workload_validation -disable
  • To modify the frequency at which agent must collect the Workload Manager evaluation metrics:

    sudo /usr/bin/google_cloud_sap_agent configure -feature=workload_validation -workload_validation_metrics_frequency=FREQUENCY

    Replace FREQUENCY with the frequency, in seconds, at which the agent must collect the Workload Manager evaluation metrics.

  • To modify the frequency at which agent must collect the SAP HANA database metrics, for Workload Manager evaluation:

    sudo /usr/bin/google_cloud_sap_agent configure -feature=workload_validation -workload_validation_db_metrics_frequency=FREQUENCY

    Replace FREQUENCY with the frequency, in seconds, at which the agent must collect the SAP HANA database metrics for Workload Manager evaluation.

For SAP HANA monitoring metrics collection

  • To allow the agent to collect the SAP HANA monitoring metrics:

    sudo /usr/bin/google_cloud_sap_agent configure -feature=hana_monitoring -enable

    To stop the collection of the SAP HANA monitoring metrics:

    sudo /usr/bin/google_cloud_sap_agent configure -feature=hana_monitoring -disable
  • To modify the sample interval at which the agent must collect the SAP HANA Monitoring metrics:

    sudo /usr/bin/google_cloud_sap_agent configure -feature=hana_monitoring -sample_interval_sec=SAMPLE_INTERNAL

    Replace SAMPLE_INTERNAL with the interval, in seconds. The interval must be 5 seconds or longer.

  • To modify the timeout value for a query made to your SAP HANA instance:

    sudo /usr/bin/google_cloud_sap_agent configure -feature=hana_monitoring -query_timeout_sec=QUERY_TIMEOUT

    Replace QUERY_TIMEOUT with a value, in seconds.

Supported arguments

The following table describes the arguments that you can use with the google_cloud_sap_agent configure command:

Argument Description
-add

This argument makes the agent stop collecting the Process Monitoring metrics that you specify for the -process_metrics_to_skip argument.

-disable

Disables the specified feature or parameter of the agent.

-enable

Enables the specified feature or parameter of the agent.

-f=FEATURE_NAME
or
-feature=FEATURE_NAME

STRING

Sets the agent feature that you want to configure. The following are the supported values:

  • host_metrics
  • process_metrics
  • agent_metrics
  • hana_monitoring
  • workload_validation
  • sap_discovery
-h or -help

Displays help information for the command.

-loglevel=LOG_LEVEL

STRING

Sets the logging level for the agent. The supported values are: debug, info, warn, and error.

-path=PATH

STRING

Sets the path for the agent's configuration file: /etc/google-cloud-sap-agent/configuration.json.

-process_metrics_to_skip="LIST_OF_METRICS"

STRING

Specifies the Process Monitoring metrics that the agent must stop collecting. Use a comma to separate the metric names. Use the -add and -remove arguments with -process_metrics_to_skip.

-process_metrics_frequency=FREQUENCY

INT

Sets the frequency at which the agent collects fast-changing Process Monitoring metrics. The default value is 5 seconds.

-slow_process_metrics_frequency=FREQUENCY

INT

Sets the frequency at which the agent collects slow-changing Process Monitoring metrics. The default value is 30 seconds.

-query_timeout_sec=TIMEOUT

INT

Sets the query timeout, in seconds, for the collection of the SAP HANA monitoring metrics.

-remove

This argument makes the agent resume the collection of the Process Monitoring metrics that you stopped using the -process_metrics_to_skip argument.

-sample_interval_sec=INTERVAL

INT

Sets the frequency, in seconds, at which the agent queries your SAP HANA instance and collects the SAP HANA monitoring metrics.

-setting=SETTING

STRING

Specifies the agent setting that you want configure.

-showall

Prints the status of the features of your agent instance.

-slow_process_metrics_frequency=FREQUENCY

INT

Sets the collection frequency of the slow-changing Process Monitoring metrics, in seconds.

-v or -version

Prints the version of the agent.

-workload_validation_metrics_frequency=FREQUENCY

INT

Sets the frequency at which the agent collects the Workload Manager evaluation metrics.

-workload_validation_db_metrics_frequency=FREQUENCY

INT

Sets the frequency at which the agent collects the SAP HANA database metrics for Workload Manager evaluation.