Azure Cloud account
4 min
configure an account to view permission for to pull data from azure resource manager configure azure resource manager and access rights for azure the application (account) should have registration of the application of that particular subscription and have at least the read access/role for that purpose, a new key should be created then, the client secret key, client id and tenant id are used to create/configure an account in to pull data from azure cloud use the following procedure to create a client secret key respective application account for azure cloud log in to the azure portal using your azure account select azure active directory from the left navigation bar select the app registrations from the left panel on the default directory page select new registration option from app registration pane enter the following information about the create pane name name for the new application type in the desired application name example graphconnectorapp redirect uri (optional) returns an authentication response after successfully authenticating a user edit the manifest file and change the value of the oauth2allowimplicitflow parameter to true after the application is created select save from the registered app pane, select api permissions select add permission from the settings pane permissions must be set as the image below on the azure portal , go to subscriptions and select the subscription select access control ( ) on the left side of the panel select the add button of the create a custom role section create a custom role and add permissions according to his requirements select the resource type , resource and add permissions according to his requirement selects review + create generate secret key use the following procedure to generate a secret key from azure active directory admin centre , select the created application from the list of app registrations and create certificates and secrets for the completed application log into your azure account to access the azure portal select the created application name from the settings pane, select the keys option from the keys pane, enter the description select the expiration period click save from the keys pane, copy the encoded key value and select save this key value cannot be retrieved after leaving this pane this encoded key value is the client's secret key that will be a part of the authentication credential add the created custom role to the created application use the following procedure to acquire the tenant id from azure active directory admin center , navigate to the app registrations pane log into the azure portal select azure active directory → app registrations from the app registrations pane, click endpoints from the endpoints pane, click the copy icon next to the oauth 2 0 token endpoint option click save copy the value between microsoftonline com/ and /oauth2/token from the copied endpoint url this is the tenant id that will be part of the authentication credential this is the tenant id requested in the form described in devops azure cloud platform configuration docid qifqy1tgqimzlssx9kwq use the following procedure to acquire the client id from azure active directory admin center , open the created application select the settings option log into the azure portal select the created application name from the settings pane, copy the application id value this is the client id that will be part of the authentication credential this is the client id requested in the form described in devops azure cloud platform configuration docid qifqy1tgqimzlssx9kwq at this point you have successfully configured azure cloud to exchange data with once all configuration steps have been completed at a cloud provider level, you must configure the tenant use the following procedure from the tenant landing page, select the main menu or the manage tile select admin and then, on the screen, select the connections tab from the left panel select the add new drop down menu select the add a connection select the technology category as cloud provider select azure cloud enter the account number , access key id , and access secret key from the azure account referred to in the previous section validate your credentials by selecting test connection once the connection is successful, select add to create a connection the "subscriptionid" column is required supports azure monitor, a comprehensive monitoring solution for collecting, analyzing, and responding to monitoring data from your cloud and on premise environments you can use azure monitor to help optimize the availability and performance of your applications and services it helps you understand how your applications are performing and allows you to manually and programmatically respond to system events is capable of fetching container level stats but, to access this service, you must first configure it for prerequisites three settings are necessary in the azure portal for collecting stats using azure monitor contributor permissions are necessary for the cluster we want to get stats from the application should have reader permissions in the workspace on log analytics workspaces setup authentication for api this information is available at learn microsoft com first, create a connection use the following procedure navigate to (click admin → ) click connection on the left navigation panel click add new connection from the add new drop down menu the application navigates to the add connection page select technology category for cloud provider , select azure cloud complete the form click test connection to test the connection click add to add the connection when the connection is functioning note the subscriptionid field is necessary to pull in data for azure clusters and other mandatory fields after a connection is added, a worker thread triggers cms configuration steps internally and creates a yaml configuration in common metrics service for collecting kubernetes container level stats the following yaml configuration containing the query to fetch cpu and memory stats gets added metricbeat modules \ module azure metricsets \ container insights period 24h enabled true continuous true connectionid "{{connectionid}}" queries \ name cpumemorystatscpu query these stats are collected by cms from azure monitor using the configurations performed in the aforementioned prerequisites the collected stats are then stored in a collection and are later used to generate recommendations visible on the dashboard the stats are collected once every 24 hours and the worker checking a new connection in is executed every 5 minutes