npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@datafire/azure_monitor_metrics_api

v5.0.0

Published

DataFire integration for MonitorManagementClient

Downloads

8

Readme

@datafire/azure_monitor_metrics_api

Client library for MonitorManagementClient

Installation and Usage

npm install --save @datafire/azure_monitor_metrics_api
let azure_monitor_metrics_api = require('@datafire/azure_monitor_metrics_api').create({
  access_token: "",
  refresh_token: "",
  client_id: "",
  client_secret: "",
  redirect_uri: ""
});

.then(data => {
  console.log(data);
});

Description

Actions

Metrics_List

Lists the metric values for a resource.

azure_monitor_metrics_api.Metrics_List({
  "resourceUri": "",
  "api-version": ""
}, context)

Input

  • input object
    • resourceUri required string: The identifier of the resource.
    • timespan string: The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'.
    • interval string: The interval (i.e. timegrain) of the query.
    • metricnames string: The names of the metrics (comma separated) to retrieve.
    • aggregation string: The list of aggregation types (comma separated) to retrieve.
    • top integer: The maximum number of records to retrieve.
    • orderby string: The aggregation to use for sorting results and the direction of the sort.
    • $filter string: The $filter is used to reduce the set of metric data returned.Example:Metric contains metadata A, B and C.- Return all time series of C where A = a1 and B = b1 or b2$filter=A eq ‘a1’ and B eq ‘b1’ or B eq ‘b2’ and C eq ‘*’- Invalid variant:$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘*’ or B = ‘b2’This is invalid because the logical or operator cannot separate two different metadata names.- Return all time series where A = a1, B = b1 and C = c1:$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘c1’- Return all time series where A = a1$filter=A eq ‘a1’ and B eq ‘’ and C eq ‘.
    • resultType string (values: Data, Metadata): Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details.
    • api-version required string: Client Api Version.
    • metricnamespace string: Metric namespace to query metric definitions for.

Output

Definitions

ErrorResponse

  • ErrorResponse object: Describes the format of Error response.
    • code string: Error code
    • message string: Error message indicating why the operation failed.

LocalizableString

  • LocalizableString object: The localizable string class.
    • localizedValue string: the locale specific value.
    • value required string: the invariant value.

MetadataValue

  • MetadataValue object: Represents a metric metadata value.

Metric

  • Metric object: The result data of a query.
    • id required string: the metric Id.
    • name required LocalizableString
    • timeseries required array: the time series returned when a data query is performed.
    • type required string: the resource type of the metric resource.
    • unit required Unit

MetricValue

  • MetricValue object: Represents a metric value.
    • average number: the average value in the time range.
    • count number: the number of samples in the time range. Can be used to determine the number of values that contributed to the average value.
    • maximum number: the greatest value in the time range.
    • minimum number: the least value in the time range.
    • timeStamp required string: the timestamp for the metric value in ISO 8601 format.
    • total number: the sum of all of the values in the time range.

Response

  • Response object: The response to a metrics query.
    • cost number: The integer value representing the cost of the query, for data case.
    • interval string: The interval (window size) for which the metric data was returned in. This may be adjusted in the future and returned back from what was originally requested. This is not present if a metadata request was made.
    • namespace string: The namespace of the metrics been queried
    • resourceregion string: The region of the resource been queried for metrics.
    • timespan required string: The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'. This may be adjusted in the future and returned back from what was originally requested.
    • value required array: the value of the collection.

TimeSeriesElement

  • TimeSeriesElement object: A time series result type. The discriminator value is always TimeSeries in this case.
    • data array: An array of data points representing the metric values. This is only returned if a result type of data is specified.
    • metadatavalues array: the metadata values returned if $filter was specified in the call.

Unit

  • Unit string (values: Count, Bytes, Seconds, CountPerSecond, BytesPerSecond, Percent, MilliSeconds, ByteSeconds, Unspecified, Cores, MilliCores, NanoCores, BitsPerSecond): the unit of the metric.