全部產品
Search
文件中心

Application Real-Time Monitoring Service:ARMS服務關聯角色

更新時間:Oct 25, 2024

本文介紹ARMS服務關聯角色AliyunServiceRoleForARMS以及如何刪除該角色。

背景資訊

ARMS服務關聯角色AliyunServiceRoleForARMS是ARMS在某些情況下,為了完成自身的某個功能,需要擷取其他雲端服務的存取權限而提供的RAM角色。更多關於服務關聯角色的資訊請參見服務關聯角色

AliyunServiceRoleForARMS應用情境

ARMS Prometheus監控功能需要訪問Container ServiceACKLog ServiceSLSElastic Compute ServiceVirtual Private Cloud雲端服務的資源時,可通過自動建立的ARMS服務關聯角色AliyunServiceRoleForARMS擷取存取權限。

AliyunServiceRoleForARMS許可權說明

AliyunServiceRoleForARMS具備以下雲端服務的存取權限:

Container ServiceACK的存取權限

{
            "Action": [
                "cs:ScaleCluster",
                "cs:DeleteCluster",
                "cs:GetClusterById",
                "cs:GetClusters",
                "cs:GetUserConfig",
                "cs:CheckKritisInstall",
                "cs:GetKritisAttestationAuthority",
                "cs:GetKritisGenericAttestationPolicy",
                "cs:CreateCluster",
                "cs:AttachInstances",
                "cs:InstallKritis",
                "cs:InstallKritisAttestationAuthority",
                "cs:InstallKritisGenericAttestationPolicy",
                "cs:DeleteCluster",
                "cs:UpdateClusterTags",
                "cs:DeleteClusterNodes",
                "cs:UninstallKritis",
                "cs:DeleteKritisAttestationAuthority",
                "cs:DeleteKritisGenericAttestationPolicy",
                "cs:UpdateKritisAttestationAuthority",
                "cs:UpdateKritisGenericAttestationPolicy",
                "cs:UpgradeCluster",
                "cs:DeleteClusterNode",
                "cs:GetClusterLogs"
            ],
            "Resource": [
                "acs:cs:*:*:cluster/*"
            ],
            "Effect": "Allow"
        }
      

Log ServiceSLS的存取權限

{
            "Action": [
                "log:CreateProject",
                "log:GetProject",
                "log:GetLogStoreLogs",
                "log:GetHistograms",
                "log:GetLogStoreHistogram",
                "log:GetLogStore",
                "log:ListLogStores",
                "log:CreateLogStore",
                "log:DeleteLogStore",
                "log:UpdateLogStore",
                "log:GetCursorOrData",
                "log:GetCursor",
                "log:PullLogs",
                "log:ListShards",
                "log:PostLogStoreLogs",
                "log:CreateConfig",
                "log:UpdateConfig",
                "log:DeleteConfig",
                "log:GetConfig",
                "log:ListConfig",
                "log:CreateMachineGroup",
                "log:UpdateMachineGroup",
                "log:DeleteMachineGroup",
                "log:GetMachineGroup",
                "log:ListMachineGroup",
                "log:ListMachines",
                "log:ApplyConfigToGroup",
                "log:RemoveConfigFromGroup",
                "log:GetAppliedMachineGroups",
                "log:GetAppliedConfigs",
                "log:GetShipperStatus",
                "log:RetryShipperTask",
                "log:CreateConsumerGroup",
                "log:UpdateConsumerGroup",
                "log:DeleteConsumerGroup",
                "log:ListConsumerGroup",
                "log:UpdateCheckPoint",
                "log:HeartBeat",
                "log:GetCheckPoint",
                "log:CreateIndex",
                "log:DeleteIndex",
                "log:GetIndex",
                "log:UpdateIndex",
                "log:CreateSavedSearch",
                "log:UpdateSavedSearch",
                "log:GetSavedSearch",
                "log:DeleteSavedSearch",
                "log:ListSavedSearch",
                "log:CreateDashboard",
                "log:UpdateDashboard",
                "log:GetDashboard",
                "log:DeleteDashboard",
                "log:ListDashboard",
                "log:CreateJob",
                "log:UpdateJob"
            ],
            "Resource": "*",
            "Effect": "Allow"
        }
      

Elastic Compute Service的存取權限

{
            "Action": [
                "ecs:DescribeInstanceAutoRenewAttribute",
                "ecs:DescribeInstances",
                "ecs:DescribeInstanceStatus",
                "ecs:DescribeInstanceVncUrl",
                "ecs:DescribeSpotPriceHistory",
                "ecs:DescribeUserdata",
                "ecs:DescribeInstanceRamRole",
                "ecs:DescribeDisks",
                "ecs:DescribeSnapshots",
                "ecs:DescribeAutoSnapshotPolicy",
                "ecs:DescribeSnapshotLinks",
                "ecs:DescribeImages",
                "ecs:DescribeImageSharePermission",
                "ecs:DescribeClassicLinkInstances",
                "ecs:AuthorizeSecurityGroup",
                "ecs:DescribeSecurityGroupAttribute",
                "ecs:DescribeSecurityGroups",
                "ecs:AuthorizeSecurityGroupEgress",
                "ecs:DescribeSecurityGroupReferences",
                "ecs:RevokeSecurityGroup",
                "ecs:DescribeNetworkInterfaces",
                "ecs:DescribeTags",
                "ecs:DescribeRegions",
                "ecs:DescribeZones",
                "ecs:DescribeInstanceMonitorData",
                "ecs:DescribeEipMonitorData",
                "ecs:DescribeDiskMonitorData",
                "ecs:DescribeInstanceTypes",
                "ecs:DescribeInstanceTypeFamilies",
                "ecs:DescribeTasks",
                "ecs:DescribeTaskAttribute",
                "ecs:DescribeInstanceAttribute",
                "ecs:InvokeCommand",
                "ecs:CreateCommand",
                "ecs:StopInvocation",
                "ecs:DeleteCommand",
                "ecs:DescribeCommands",
                "ecs:DescribeInvocations",
                "ecs:DescribeInvocationResults",
                "ecs:ModifyCommand",
                "ecs:InstallCloudAssistant"
            ],
            "Resource": "*",
            "Effect": "Allow"
        }
      

Virtual Private Cloud的存取權限

{
       "Action": [
           "vpc:DescribeVpcs",
           "vpc:DescribeVSwitches"
       ],
       "Resource": "*",
       "Effect": "Allow"
}
      

刪除AliyunServiceRoleForARMS

如果您使用了ARMS Prometheus監控功能,並且需要刪除ARMS服務關聯角色AliyunServiceRoleForARMS,例如出於安全考慮,需要刪除該角色,則需要先明確刪除後的影響:刪除AliyunServiceRoleForARMS後,無法將當前帳號下的K8s叢集同步至ARMS控制台的K8s叢集列表中,與此同時,ARMS控制台將停止擷取及寫入相關監控資料。

刪除AliyunServiceRoleForARMS的操作步驟如下:

說明

如果當前帳號下的K8s叢集安裝了ARMS Prometheus監控Agent,則需先刪除Agent後才能刪除AliyunServiceRoleForARMS,否則提示刪除失敗,詳情請參見卸載監控外掛程式

  1. 登入RAM控制台,在左側導覽列選擇身份管理 > 角色

  2. 角色頁面的搜尋方塊中,輸入AliyunServiceRoleForARMS,自動搜尋到名稱為AliyunServiceRoleForARMS的RAM角色。

  3. 在右側操作列,單擊刪除

  4. 刪除RAM角色對話方塊,單擊確定

    • 如果當前帳號下的K8s叢集安裝了ARMS Prometheus監控Agent,則需先刪除Agent後才能刪除AliyunServiceRoleForARMS,否則提示刪除失敗,詳情請參見卸載監控外掛程式

    • 如果當前帳號下的K8s叢集已卸載ARMS Prometheus監控Agent,則可直接刪除AliyunServiceRoleForARMS。

常見問題

為什麼我的RAM使用者無法自動建立ARMS服務關聯角色AliyunServiceRoleForARMS?

您需要擁有指定的許可權,才能自動建立或刪除AliyunServiceRoleForARMS。因此,在RAM使用者無法自動建立AliyunServiceRoleForARMS時,您需為其添加以下權限原則。

{
    "Statement": [
        {
            "Action": [
                "ram:CreateServiceLinkedRole"
            ],
            "Resource": "acs:ram:*:主帳號ID:role/*",
            "Effect": "Allow",
            "Condition": {
                "StringEquals": {
                    "ram:ServiceName": [
                        "arms.aliyuncs.com"
                    ]
                }
            }
        }
    ],
    "Version": "1"
}
說明

請將主帳號ID替換為您實際的阿里雲帳號(主帳號)ID。