This package has been deprecated

Author message:

Functionality merged into azure-arm-monitor. Use azure-arm-monitor instead.

azure-monitor
TypeScript icon, indicating that this package has built-in type declarations

1.0.2-preview • Public • Published

Microsoft Azure SDK for Node.js - Azure Monitor Management

The contents of this SDK have been moved to azure-arm-monitor and this SDK has been deprecated. Please change your dependency from azure-monitor to azure-arm-monitor.

This project provides a Node.js package that makes it easy to use the Azure Monitor API. Right now it supports:

  • Node.js version: 6.x or higher

How to Install

npm install azure-monitor

How to Use

Authentication, client creation and listing activityLogs as an example.

const msRestAzure = require('ms-rest-azure');
const monitorClient = require('azure-monitor');
 
// Interactive Login
// It provides a url and code that needs to be copied and pasted in a browser and authenticated over there. If successful, 
// the user will get a DeviceTokenCredentials object.
msRestAzure.interactiveLogin().then((credentials) => {
  let client = new monitorManagementClient(credentials, 'your-subscription-id');
  return client.activityLogs.list();
}).then((activityLogs) => {
   console.log('List of activityLogs:');
   console.dir(activityLogs, {depth: null, colors: true});
   return;
}).catch((err) => {
 console.log('An error ocurred');
 console.dir(err, {depth: null, colors: true});
 return;
});

Related projects

Readme

Keywords

Package Sidebar

Install

npm i azure-monitor

Weekly Downloads

103

Version

1.0.2-preview

License

MIT

Unpacked Size

206 kB

Total Files

32

Last publish

Collaborators

  • windowsazure