All Products
Search
Document Center

Application Real-Time Monitoring Service:GetPrometheusInstance

Last Updated:Nov 05, 2024

Queries the information about a Prometheus instance.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
arms:GetPrometheusInstanceget
  • Prometheus
    acs:arms:{#regionId}:{#accountId}:prometheus/{#ClusterId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID.

cn-hangzhou
ClusterIdstringYes

The ID of the Prometheus instance.

c77f6f2397ea74672872acf5e31374a27

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

Id of the request

52C422FD-6B43-524D-B8A1-A4693294318C
Messagestring

The message returned.

message
Codeinteger

The status code. The status code 200 indicates that the request was successful. If another status code is returned, the request failed.

200
Dataobject

The returned message.

ClusterIdstring

The ID of the Prometheus instance.

c589a1b8db05c4561aefbb898ca8fb1cf
RegionIdstring

The region ID.

cn-beijing
UserIdstring

The user ID.

167275301789****
ClusterNamestring

The name of the monitoring object.

prom1
ClusterTypestring
  • remote-write: general-purpose Prometheus instance
  • ecs: Prometheus instances for ECS
  • cloud-monitor: Prometheus instance for Alibaba Cloud services in the Chinese mainland
  • cloud-product: Prometheus instance for Alibaba Cloud services outside the Chinese mainland
  • global-view: global aggregation instance
  • aliyun-cs: Prometheus instance for Container Service
remote-write
VpcIdstring

The VPC ID. This parameter is returned only for Prometheus instances for ECS.

vpc-8vb02uk57qbcktqcvqqqj
VSwitchIdstring

The vSwitch ID. This parameter is returned only for Prometheus instances for ECS.

vsw-f8z73vcja1tqnw90aav5a
SecurityGroupIdstring

The ID of the security group. This parameter is returned only for Prometheus instances for ECS.

sg-8vbdgmf4nraiqa9bx0jo
SubClustersJsonstring

The child instances of the Prometheus instance for GlobalView. The value is a JSON string.

\[{"headers":{},"regionId":"cn-hangzhou","sourceType":"AlibabaPrometheus","extras":{},"clusterId":"c39a1048921e04fceb039db2fbb73\*\*\*","sourceName":"arms-luyao-test","dataSource":"","userId":"167275301789\*\*\*"},{"headers":{},"regionId":"cn-beijing","sourceType":"AlibabaPrometheus","extras":{},"clusterId":"c6b6485496d5b400abde22cb47b5\*\*\*\*","sourceName":"agent-321-test","dataSource":"","userId":"1672753017899\*\*\*"},{"headers":{},"regionId":"cn-zhangjiakou","sourceType":"AlibabaPrometheus","extras":{},"clusterId":"c261a4f3200c446659133f1ade789b15e","sourceName":"zaifeng-cardinality-01","dataSource":"","userId":"167275301789\*\*\*"}]
RemoteReadIntraUrlstring

The internal URL for remote read.

http://cn-beijing-intranet.arms.aliyuncs.com:9090/api/v1/prometheus/xxx/api/v1/read
RemoteReadInterUrlstring

The public URL for remote read.

http://cn-beijing.arms.aliyuncs.com:9090/api/v1/prometheus/xxx/api/v1/read
RemoteWriteIntraUrlstring

The internal URL for remote write.

http://cn-beijing-intranet.arms.aliyuncs.com/prometheus/xxx/api/v3/write
RemoteWriteInterUrlstring

The public URL for remote write.

https://cn-beijing.arms.aliyuncs.com/prometheus/xxx/api/v3/write
PushGatewayIntraUrlstring

The internal URL for Pushgateway.

http://cn-beijing-intranet.arms.aliyuncs.com/prometheus/xxx/api/v2
PushGatewayInterUrlstring

The public URL for Pushgateway.

https://cn-beijing.arms.aliyuncs.com/prometheus/xxx/api/v2
HttpApiIntraUrlstring

The internal URL for the HTTP API.

http://cn-beijing-intranet.arms.aliyuncs.com:9090/api/v1/prometheus/xxx
HttpApiInterUrlstring

The public URL for the HTTP API.

https://cn-beijing.arms.aliyuncs.com:9443/api/v1/prometheus/xxx
AuthTokenstring

The authorization token.

GciOiJIUzI1NiJ9***
AccessTypestring

The permission type. Valid values: readWrite, readOnly, and httpReadOnly

readWrite
PaymentTypestring

The billing method. Valid values:

  • PREPAY: subscription
  • POSTPAY: pay-as-you-go
PREPAY
StorageDurationinteger

The data storage duration. Unit: days.

90
ArchiveDurationinteger

The number of days for which data is automatically archived after the storage duration expires. Valid values: 60, 90, 180, and 365. 0 indicates that the data is not archived.

60
GrafanaInstanceIdstring

The ID of the Grafana workspace.

grafana-rnggfvhlcdl6m71***
ResourceGroupIdstring

The ID of the resource group to which the instance belongs.

rg-aek2vezare****
ResourceTypestring

The type of the resource. Set the value to PROMETHEUS.

PROMETHEUS
EnableAuthTokenstring

Indicates whether access token authentication is enabled.

true
SupportAuthTypesarray

The supported authentication types.

SupportAuthTypestring

The supported authentication type.

Valid values:

  • BasicAuth: HTTP basic authentication
  • AuthFree: password-free authentication
  • AuthToken: token authentication
AuthFree
EnableAuthFreeReadboolean

Indicates whether password-free read is enabled.

false
AuthFreeReadPolicystring

The whitelist of IP addresses for which password-free read is enabled.

null
EnableAuthFreeWriteboolean

Indicates whether password-free write is enabled.

false
AuthFreeWritePolicystring

The whitelist of IP addresses for which password-free write is enabled.

null
Productstring

The product to which the Prometheus instance belongs. Valid values: arms and cms.

arms
DbInstanceStatusstring

The data storage status at the backend.

RUNNING
ExtraInfoobject

The extra information.

string

The extra information key.

key1
Tagsarray<object>

The tags of the instance.

tagobject

The tag.

TagKeystring

The tag key.

tag1
TagValuestring

The tag value.

tagValue1

Examples

Sample success responses

JSONformat

{
  "RequestId": "52C422FD-6B43-524D-B8A1-A4693294318C",
  "Message": "message",
  "Code": 200,
  "Data": {
    "ClusterId": "c589a1b8db05c4561aefbb898ca8fb1cf",
    "RegionId": "cn-beijing",
    "UserId": "167275301789****",
    "ClusterName": "prom1",
    "ClusterType": "remote-write",
    "VpcId": "vpc-8vb02uk57qbcktqcvqqqj",
    "VSwitchId": "vsw-f8z73vcja1tqnw90aav5a",
    "SecurityGroupId": "sg-8vbdgmf4nraiqa9bx0jo",
    "SubClustersJson": "\\[{\"headers\":{},\"regionId\":\"cn-hangzhou\",\"sourceType\":\"AlibabaPrometheus\",\"extras\":{},\"clusterId\":\"c39a1048921e04fceb039db2fbb73\\*\\*\\*\",\"sourceName\":\"arms-luyao-test\",\"dataSource\":\"\",\"userId\":\"167275301789\\*\\*\\*\"},{\"headers\":{},\"regionId\":\"cn-beijing\",\"sourceType\":\"AlibabaPrometheus\",\"extras\":{},\"clusterId\":\"c6b6485496d5b400abde22cb47b5\\*\\*\\*\\*\",\"sourceName\":\"agent-321-test\",\"dataSource\":\"\",\"userId\":\"1672753017899\\*\\*\\*\"},{\"headers\":{},\"regionId\":\"cn-zhangjiakou\",\"sourceType\":\"AlibabaPrometheus\",\"extras\":{},\"clusterId\":\"c261a4f3200c446659133f1ade789b15e\",\"sourceName\":\"zaifeng-cardinality-01\",\"dataSource\":\"\",\"userId\":\"167275301789\\*\\*\\*\"}]\n",
    "RemoteReadIntraUrl": "http://cn-beijing-intranet.arms.aliyuncs.com:9090/api/v1/prometheus/xxx/api/v1/read",
    "RemoteReadInterUrl": "http://cn-beijing.arms.aliyuncs.com:9090/api/v1/prometheus/xxx/api/v1/read",
    "RemoteWriteIntraUrl": "http://cn-beijing-intranet.arms.aliyuncs.com/prometheus/xxx/api/v3/write",
    "RemoteWriteInterUrl": "https://cn-beijing.arms.aliyuncs.com/prometheus/xxx/api/v3/write",
    "PushGatewayIntraUrl": "http://cn-beijing-intranet.arms.aliyuncs.com/prometheus/xxx/api/v2",
    "PushGatewayInterUrl": "https://cn-beijing.arms.aliyuncs.com/prometheus/xxx/api/v2",
    "HttpApiIntraUrl": "http://cn-beijing-intranet.arms.aliyuncs.com:9090/api/v1/prometheus/xxx",
    "HttpApiInterUrl": "https://cn-beijing.arms.aliyuncs.com:9443/api/v1/prometheus/xxx",
    "AuthToken": "GciOiJIUzI1NiJ9***",
    "AccessType": "readWrite",
    "PaymentType": "PREPAY",
    "StorageDuration": 90,
    "ArchiveDuration": 60,
    "GrafanaInstanceId": "grafana-rnggfvhlcdl6m71***",
    "ResourceGroupId": "rg-aek2vezare****",
    "ResourceType": "PROMETHEUS",
    "EnableAuthToken": "true",
    "SupportAuthTypes": [
      "AuthFree"
    ],
    "EnableAuthFreeRead": false,
    "AuthFreeReadPolicy": "null",
    "EnableAuthFreeWrite": false,
    "AuthFreeWritePolicy": "null",
    "Product": "arms",
    "DbInstanceStatus": "RUNNING",
    "ExtraInfo": {
      "key": "key1"
    },
    "Tags": [
      {
        "TagKey": "tag1",
        "TagValue": "tagValue1"
      }
    ]
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-09-06The response structure of the API has changedView Change Details
2024-09-02The response structure of the API has changedView Change Details
2024-08-15The response structure of the API has changedView Change Details
2024-08-02The response structure of the API has changedView Change Details
2024-05-28The response structure of the API has changedView Change Details
2024-05-27The response structure of the API has changedView Change Details
2024-04-12The response structure of the API has changedView Change Details
2023-12-06The response structure of the API has changedView Change Details