適用於 Node.js 的 Azure 服務對應模組Azure Service Map modules for Node.js

服務對應可自動探索 Windows 和 Linux 系統上的應用程式元件,並對應服務之間的通訊。Service Map automatically discovers application components on Windows and Linux systems and maps the communication between services. 不需要進行任何設定,只要安裝了代理程式,服務對應就會顯示橫跨任何 TCP 連線架構的伺服器、處理序和連接埠之間的連線。Service Map shows connections between servers, processes, and ports across any TCP-connected architecture, with no configuration required other than the installation of an agent.

深入了解 Azure 服務對應Learn more about Azure Service Map.

管理封裝Management package

安裝 npm 模組Install the npm module

安裝 Azure 服務對應 npm 模組Install the Azure Service Map npm module

npm install azure-arm-servicemap

範例Example

此範例會列出指定資源群組和工作區的所有服務對應。This example lists all service maps for the specified resource group and workspace.

const msRestAzure = require('ms-rest-azure');
const serviceMapManagement = require('azure-arm-servicemap');

const subscriptionId = 'your-subscription-id';
const resourceGroup = 'your-resource-group';
const workspace = 'your-workspace';
let serviceMapClient;

msRestAzure.interactiveLogin().then(credentials => {
  serviceMapClient = new serviceMapManagement(credentials, subscriptionId);
  serviceMapClient.machineGroups
    .listByWorkspace(resourceGroup, workspace)
    .then(machineGroups => console.log('Retrieved machine groups: ', machineGroups));
});

範例Samples

深入探索可在應用程式中使用的 Node.js 程式碼範例Explore more sample Node.js code you can use in your apps.