Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ali-cloudmonitor

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ali-cloudmonitor

Aliyun cloudmonitor sdk for node.js

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

ali-cloudmonitor

Aliyun cloudmonitor sdk for node.js

Install

$ npm i ali-cloudmonitor --save

Usage

const AliCloudmonitor = require('ali-cloudmonitor')

const aliCloudmonitor = new AliCloudmonitor({
  accessKeyId: 'xxx',
  accessKeySecret: 'xxx',
  // internal: false, // 默认false,如果是true,走阿里云内网服务地址。参考:https://help.aliyun.com/document_detail/60196.html
  // region: 'cn-hangzhou', // 如果internal是true,需要设置此项。region列表参考:https://help.aliyun.com/document_detail/60196.html
})

// https://help.aliyun.com/document_detail/63275.html
aliCloudmonitor.sendMetric([{
  groupId: 1,
  metricName: 'metricName',
  dimensions: {
    dimensionA: 'xxx',
    dimensionB: 'xxx'
  },
  time: Date.now(),
  type: 0,
  period: 60,
  values: {
    value: Math.random()
  }
}]).then(console.log).catch(console.error)

// https://help.aliyun.com/document_detail/60196.html
aliCloudmonitor.sendEvent([{
  name: 'eventName',
  groupId: 2,
  time: Date.now(),
  content: 'This is a event'
}]).then(console.log).catch(console.error)

Test

$ npm test

Keywords

FAQs

Package last updated on 09 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc