Method: projects.locations.insights.writeInsight

Write the data insights to workload manager data warehouse.

HTTP request

POST https://workloadmanager.googleapis.com/v1/{location=projects/*/locations/*}/insights:writeInsight

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
location

string

Required. The GCP location. The format is: projects/{project}/locations/{location}.

Request body

The request body contains data with the following structure:

JSON representation
{
  "insight": {
    object (Insight)
  },
  "requestId": string,
  "agentVersion": string
}
Fields
insight

object (Insight)

Required. The metrics data details.

requestId

string

Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

agentVersion

string

Optional. The agent version collected this data point.

Response body

If successful, the response body is empty.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

Insight

A presentation of host resource usage where the workload runs.

JSON representation
{
  "sentTime": string,
  "instanceId": string,

  // Union field type can be only one of the following:
  "sapValidation": {
    object (SapValidation)
  },
  "sapDiscovery": {
    object (SapDiscovery)
  },
  "sqlserverValidation": {
    object (SqlserverValidation)
  }
  // End of list of possible types for union field type.
}
Fields
sentTime

string (Timestamp format)

Output only. [Output only] Create time stamp

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

instanceId

string

Required. The instance id where the insight is generated from

Union field type.

type can be only one of the following:

sapValidation

object (SapValidation)

The insights data for the SAP workload validation.

sapDiscovery

object (SapDiscovery)

The insights data for SAP system discovery. This is a copy of SAP System proto and should get updated whenever that one changes.

sqlserverValidation

object (SqlserverValidation)

The insights data for the sqlserver workload validation.

SapValidation

A presentation of SAP workload insight. The schema of SAP workloads validation related data.

JSON representation
{
  "validationDetails": [
    {
      object (ValidationDetail)
    }
  ],
  "projectId": string,
  "zone": string
}
Fields
validationDetails[]

object (ValidationDetail)

Optional. A list of SAP validation metrics data.

projectId

string

Required. The projectId of the cloud project that the Insight data comes from.

zone

string

Optional. The zone of the instance that the Insight data comes from.

ValidationDetail

Message describing the SAP validation metrics.

JSON representation
{
  "sapValidationType": enum (SapValidationType),
  "details": {
    string: string,
    ...
  },
  "isPresent": boolean
}
Fields
sapValidationType

enum (SapValidationType)

Optional. The SAP system that the validation data is from.

details

map (key: string, value: string)

Optional. The <k,v> pairs of metrics data: field name & field value.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

isPresent

boolean

Optional. Was there a SAP system detected for this validation type.

SapValidationType

The different SAP validation types.

Enums
SAP_VALIDATION_TYPE_UNSPECIFIED Unspecified type.
SYSTEM The SYSTEM validation type collects underlying system data from the VM.
COROSYNC The COROSYNC validation type collects Corosync configuration and runtime data. Corosync enables servers to interact as a HA cluster.
PACEMAKER The PACEMAKER validation type collects Pacemaker configuration data. Pacemaker is a high-availability cluster resource manager.
HANA The HANA validation type collects HANA configuration data. SAP HANA is an in-memory, column-oriented, relational database management system.
NETWEAVER The NETWEAVER validation type collects NetWeaver configuration data. SAP NetWeaver is a software stack for many of SAP SE's applications.
HANA_SECURITY The HANA_SECURITY validation type collects HANA configuration data as it relates to SAP security best practices.
CUSTOM The CUSTOM validation type collects any customer-defined data that does not fall into any of the other categories of validations.

SapDiscovery

The schema of SAP system discovery data.

JSON representation
{
  "metadata": {
    object (Metadata)
  },
  "databaseLayer": {
    object (Component)
  },
  "applicationLayer": {
    object (Component)
  },
  "systemId": string,
  "updateTime": string,
  "projectNumber": string,
  "workloadProperties": {
    object (WorkloadProperties)
  }
}
Fields
metadata

object (Metadata)

Optional. The metadata for SAP system discovery data.

databaseLayer

object (Component)

Required. An SAP System must have a database.

applicationLayer

object (Component)

Optional. An SAP system may run without an application layer.

systemId

string

Output only. A combination of database SID, database instance URI and tenant DB name to make a unique identifier per-system.

updateTime

string (Timestamp format)

Required. Unix timestamp this system has been updated last.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

projectNumber

string

Optional. The GCP project number that this SapSystem belongs to.

workloadProperties

object (WorkloadProperties)

Optional. The properties of the workload.

Metadata

Message describing SAP discovery system metadata

JSON representation
{
  "definedSystem": string,
  "sapProduct": string,
  "environmentType": string,
  "customerRegion": string
}
Fields
definedSystem

string

Optional. Customer defined, something like "E-commerce pre prod"

sapProduct

string

Optional. This SAP product name

environmentType

string

Optional. Should be "prod", "QA", "dev", "staging", etc.

customerRegion

string

Optional. Customer region string for customer's use. Does not represent GCP region.

Component

Message describing the system component.

JSON representation
{
  "resources": [
    {
      object (Resource)
    }
  ],
  "hostProject": string,
  "sid": string,
  "haHosts": [
    string
  ],
  "replicationSites": [
    {
      object (Component)
    }
  ],

  // Union field properties can be only one of the following:
  "applicationProperties": {
    object (ApplicationProperties)
  },
  "databaseProperties": {
    object (DatabaseProperties)
  }
  // End of list of possible types for union field properties.
  "topologyType": enum (TopologyType)
}
Fields
resources[]

object (Resource)

Optional. The resources in a component.

hostProject

string

Required. Pantheon Project in which the resources reside.

sid

string

Optional. The SAP identifier, used by the SAP software and helps differentiate systems for customers.

haHosts[]

string

Optional. A list of host URIs that are part of the HA configuration if present. An empty list indicates the component is not configured for HA.

replicationSites[]

object (Component)

Optional. A list of replication sites used in Disaster Recovery (DR) configurations.

Union field properties.

properties can be only one of the following:

applicationProperties

object (ApplicationProperties)

Optional. The component is a SAP application.

databaseProperties

object (DatabaseProperties)

Optional. The component is a SAP database.

topologyType

enum (TopologyType)

Optional. The detected topology of the component.

Resource

Message describing a resource.

JSON representation
{
  "resourceType": enum (ResourceType),
  "resourceKind": enum (ResourceKind),
  "resourceUri": string,
  "relatedResources": [
    string
  ],
  "updateTime": string,
  "instanceProperties": {
    object (InstanceProperties)
  }
}
Fields
resourceType

enum (ResourceType)

Required. The type of this resource.

resourceKind

enum (ResourceKind)

Required. ComputeInstance, ComputeDisk, VPC, Bare Metal server, etc.

resourceUri

string

Required. URI of the resource, includes project, location, and name.

relatedResources[]

string

Optional. A list of resource URIs related to this resource.

updateTime

string (Timestamp format)

Required. Unix timestamp of when this resource last had its discovery data updated.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

instanceProperties

object (InstanceProperties)

Optional. A set of properties only applying to instance type resources.

ResourceType

Different types of resources attached to the SAP system.

Enums
RESOURCE_TYPE_UNSPECIFIED Undefined resource type.
RESOURCE_TYPE_COMPUTE This is a compute resource.
RESOURCE_TYPE_STORAGE This a storage resource.
RESOURCE_TYPE_NETWORK This is a network resource.

ResourceKind

Different kinds of resources in the SAP System.

Enums
RESOURCE_KIND_UNSPECIFIED Unspecified resource kind.
RESOURCE_KIND_INSTANCE This is a compute instance.
RESOURCE_KIND_DISK This is a compute disk.
RESOURCE_KIND_ADDRESS This is a compute address.
RESOURCE_KIND_FILESTORE This is a filestore instance.
RESOURCE_KIND_HEALTH_CHECK This is a compute health check.
RESOURCE_KIND_FORWARDING_RULE This is a compute forwarding rule.
RESOURCE_KIND_BACKEND_SERVICE This is a compute backend service.
RESOURCE_KIND_SUBNETWORK This is a compute subnetwork.
RESOURCE_KIND_NETWORK This is a compute network.
RESOURCE_KIND_PUBLIC_ADDRESS This is a public accessible IP Address.
RESOURCE_KIND_INSTANCE_GROUP This is a compute instance group.

InstanceProperties

A set of properties only present for an instance type resource

JSON representation
{
  "virtualHostname": string,
  "clusterInstances": [
    string
  ],
  "instanceNumber": string,
  "instanceRole": enum (InstanceRole),
  "appInstances": [
    {
      object (AppInstance)
    }
  ]
}
Fields
virtualHostname

string

Optional. A virtual hostname of the instance if it has one.

clusterInstances[]

string

Optional. A list of instance URIs that are part of a cluster with this one.

instanceNumber
(deprecated)

string (int64 format)

Optional. The VM's instance number.

instanceRole

enum (InstanceRole)

Optional. Bitmask of instance role, a resource may have multiple roles at once.

appInstances[]

object (AppInstance)

Optional. App server instances on the host

InstanceRole

Bitmask of instance roles.

Enums
INSTANCE_ROLE_UNSPECIFIED Unspecified instance role.
INSTANCE_ROLE_ASCS Application central services.
INSTANCE_ROLE_ERS Enqueue replication server.
INSTANCE_ROLE_APP_SERVER Application server.
INSTANCE_ROLE_DATABASE Database node.
INSTANCE_ROLE_ASCS_ERS Combinations of roles. Application central services and enqueue replication server.
INSTANCE_ROLE_ASCS_APP_SERVER Application central services and application server.
INSTANCE_ROLE_ASCS_DATABASE Application central services and database.
INSTANCE_ROLE_ERS_APP_SERVER Enqueue replication server and application server.
INSTANCE_ROLE_ERS_DATABASE Enqueue replication server and database.
INSTANCE_ROLE_APP_SERVER_DATABASE Application server and database.
INSTANCE_ROLE_ASCS_ERS_APP_SERVER Application central services, enqueue replication server and application server.
INSTANCE_ROLE_ASCS_ERS_DATABASE Application central services, enqueue replication server and database.
INSTANCE_ROLE_ASCS_APP_SERVER_DATABASE Application central services, application server and database.
INSTANCE_ROLE_ERS_APP_SERVER_DATABASE Enqueue replication server, application server and database.
INSTANCE_ROLE_ASCS_ERS_APP_SERVER_DATABASE Application central services, enqueue replication server, application server and database.

AppInstance

Fields to describe an SAP application server instance.

JSON representation
{
  "name": string,
  "number": string
}
Fields
name

string

Optional. Instance name of the SAP application instance.

number

string

Optional. Instance number of the SAP application instance.

ApplicationProperties

A set of properties describing an SAP Application layer.

JSON representation
{
  "applicationType": enum (ApplicationType),
  "ascsUri": string,
  "nfsUri": string,
  "appInstanceNumber": string,
  "ascsInstanceNumber": string,
  "ersInstanceNumber": string,
  "kernelVersion": string,
  "abap": boolean
}
Fields
applicationType

enum (ApplicationType)

Required. Type of the application. Netweaver, etc.

ascsUri

string

Optional. Resource URI of the recognized ASCS host of the application.

nfsUri

string

Optional. Resource URI of the recognized shared NFS of the application. May be empty if the application server has only a single node.

appInstanceNumber

string

Optional. Instance number of the SAP application instance.

ascsInstanceNumber

string

Optional. Instance number of the ASCS instance.

ersInstanceNumber

string

Optional. Instance number of the ERS instance.

kernelVersion

string

Optional. Kernel version for Netweaver running in the system.

abap
(deprecated)

boolean

Optional. Deprecated: ApplicationType now tells you whether this is ABAP or Java.

ApplicationType

The type of application running in the system.

Enums
APPLICATION_TYPE_UNSPECIFIED Unspecified application type
NETWEAVER SAP Netweaver
NETWEAVER_ABAP SAP Netweaver ABAP
NETWEAVER_JAVA SAP Netweaver Java

DatabaseProperties

A set of properties describing an SAP Database layer.

JSON representation
{
  "databaseType": enum (DatabaseType),
  "primaryInstanceUri": string,
  "sharedNfsUri": string,
  "instanceNumber": string,
  "databaseSid": string,
  "databaseVersion": string
}
Fields
databaseType

enum (DatabaseType)

Required. Type of the database. HANA, DB2, etc.

primaryInstanceUri

string

Required. URI of the recognized primary instance of the database.

sharedNfsUri

string

Optional. URI of the recognized shared NFS of the database. May be empty if the database has only a single node.

instanceNumber

string

Optional. Instance number of the SAP instance.

databaseSid

string

Optional. SID of the system database.

databaseVersion

string

Optional. The version of the database software running in the system.

DatabaseType

The type of Database running in the system.

Enums
DATABASE_TYPE_UNSPECIFIED Unspecified database type.
HANA SAP HANA
MAX_DB SAP MAX_DB
DB2 IBM DB2

TopologyType

Different types of system topology.

Enums
TOPOLOGY_TYPE_UNSPECIFIED Unspecified topology.
TOPOLOGY_SCALE_UP A scale-up single node system.
TOPOLOGY_SCALE_OUT A scale-out multi-node system.

WorkloadProperties

A set of properties describing an SAP workload.

JSON representation
{
  "productVersions": [
    {
      object (ProductVersion)
    }
  ],
  "softwareComponentVersions": [
    {
      object (SoftwareComponentProperties)
    }
  ]
}
Fields
productVersions[]

object (ProductVersion)

Optional. List of SAP Products and their versions running on the system.

softwareComponentVersions[]

object (SoftwareComponentProperties)

Optional. A list of SAP software components and their versions running on the system.

ProductVersion

A product name and version.

JSON representation
{
  "name": string,
  "version": string
}
Fields
name

string

Optional. Name of the product.

version

string

Optional. Version of the product.

SoftwareComponentProperties

A SAP software component name, version, and type.

JSON representation
{
  "name": string,
  "version": string,
  "extVersion": string,
  "type": string
}
Fields
name

string

Optional. Name of the component.

version

string

Optional. The component's major version.

extVersion

string

Optional. The component's minor version.

type

string

Optional. The component's type.

SqlserverValidation

A presentation of SQLServer workload insight. The schema of SqlServer workloads validation related data.

JSON representation
{
  "agentVersion": string,
  "validationDetails": [
    {
      object (ValidationDetail)
    }
  ],
  "projectId": string,
  "instance": string
}
Fields
agentVersion

string

Optional. The agent version collected this data point

validationDetails[]

object (ValidationDetail)

Optional. A list of SqlServer validation metrics data.

projectId

string

Required. The projectId of the cloud project that the Insight data comes from.

instance

string

Required. The instance_name of the instance that the Insight data comes from. According to https://linter.aip.dev/122/name-suffix: field names should not use the _name suffix unless the field would be ambiguous without it.

ValidationDetail

Message describing the Sqlserver validation metrics.

JSON representation
{
  "type": enum (SqlserverValidationType),
  "details": [
    {
      object (Details)
    }
  ]
}
Fields
type

enum (SqlserverValidationType)

Optional. The Sqlserver system that the validation data is from.

details[]

object (Details)

Required. Details wraps map<string, string> that represents collected data names and values.

SqlserverValidationType

The different SqlServer systems.

Enums
SQLSERVER_VALIDATION_TYPE_UNSPECIFIED Unspecified type.
OS The Sqlserver system named OS.
DB_LOG_DISK_SEPARATION The LOG_DISK_SEPARATION table.
DB_MAX_PARALLELISM The MAX_PARALLELISM table.
DB_CXPACKET_WAITS The CXPACKET_WAITS table.
DB_TRANSACTION_LOG_HANDLING The TRANSACTION_LOG_HANDLING table.
DB_VIRTUAL_LOG_FILE_COUNT The VIRTUAL_LOG_FILE_COUNT table.
DB_BUFFER_POOL_EXTENSION The BUFFER_POOL_EXTENSION table.
DB_MAX_SERVER_MEMORY The MAX_SERVER_MEMORY table.
INSTANCE_METRICS The INSTANCE_METRICS table.
DB_INDEX_FRAGMENTATION The DB_INDEX_FRAGMENTATION table.
DB_TABLE_INDEX_COMPRESSION The DB_TABLE_INDEX_COMPRESSION table.
DB_BACKUP_POLICY The DB_BACKUP_POLICY table.

Details

Message containing collected data names and values.

JSON representation
{
  "fields": {
    string: string,
    ...
  }
}
Fields
fields

map (key: string, value: string)

Required. Collected data is in <k, v> format.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.