Socket
Socket
Sign inDemoInstall

mozaik-ext-app-insights-rest-api

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mozaik-ext-app-insights-rest-api

A mozaik widget that allows application insights rest API information to be displayed in a graph


Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

Mozaïk Azure's Application Insights Rest Api widget

Use Azure's Application Insights Rest Api to display graphs from azure onto Mozaïk dashboard framework.

Preview

value

Azure's Application Insights Rest Api widget Configuration

Api Configuration

No API configuration is needed.

Working Example Dashboard Configuration #1

{
  type:               'appinsightsrestapi.graph',
  title:              'App Service 1 Requests (Last day/every hour):',
  chartType:          'AreaChart',
  url:                'https://api.applicationinsights.io/beta/apps/DEMO_APP/metrics/requests/count?timespan=P1D&interval=PT1H',
  apiKey:             'DEMO_KEY',
  graphID:            "myGraph",
  heightpx:           "368px",
  xLabel:             "Time",
  xType:              "string", 
  yLabel:             "Requests",
  yType:              "number",     
  fontsize:           10,
  pointsize:          5,  
  columns: 1, rows: 2,
  x: 1, y: 0
}

Working Example Dashboard Configuration #2

{
  type:               'appinsightsrestapi.graph',
  chartType:          'AreaChart',
  datasets:[

      {
          query: 'requests| where timestamp >= ago(24h)| make-series count() default=0 on timestamp in range(ago(23h), ago(1h), 1h)| mvexpand count_ to typeof(long), timestamp to typeof(datetime)',
          legend: 'Total Requests',
      },
      {
          query: 'requests|where timestamp >= ago(24h)| where resultCode=="200"| make-series count() default=0 on timestamp in range(ago(23h), ago(1h), 1h)| mvexpand count_ to typeof(long), timestamp to typeof(datetime)',
          legend: 'Successful Requests (200)',
      },
      {
          query: 'requests| where timestamp >= ago(24h)| where resultCode=="404"| make-series count() default=0 on timestamp in range(ago(23h), ago(1h), 1h)| mvexpand count_ to typeof(long), timestamp to typeof(datetime)',
          legend: 'Failed Requests - Not Found (404)',
      },
      {
          query: 'requests| where timestamp >= ago(24h)| where resultCode=="500"| make-series count() default=0 on timestamp in range(ago(23h), ago(1h), 1h)| mvexpand count_ to typeof(long), timestamp to typeof(datetime)',
          legend: 'Failed Requests - Server Exception (500)',
      }
  ],
  appID:              'DEMO_APP',
  apiKey:             'DEMO_KEY',
  graphID:            "myGraph",
  heightpx:           "812.922px",
  xLabel:             "Time",
  yLabel:             "Requests",  
  fontsize:           20,
  pointsize:          5,  
  columns: 2, rows: 4,
  x: 0, y: 0
}

Parameters for appinsightsrestapi.graph

keyrequireddescriptionExamples
chartTypeyesThe chart type. The types of chart you can choose from can be found here'AreaChart'
titleyesThe widget title'App Service 1 Requests (Last day/every hour):'
apiKeyyesYour Application Insights api key. Details to generate your api key can be found here'DEMO_KEY'
datasets.queryyesThe application insights query, try out app insights queries on the application insights playground'requests
datasets.legendyeslegend display for the query'Web App Ireland Requests'
datasets.colournolegend and line colour for the query'#00a1ff'
graphIDyesChoose a unique ID for your graph'UniqueID23'
xlabelyesChoose a label name for the x-axis of the graph'Time'
yLabelyes  Choose a label name for the y-axis of the graph'Requests'
slantedTextnoChoose whether to have the xAxis value labels slantedtrue or false
slantedTextAnglenoChoose the degree of angle for the slanteed xAxis value labels25
seriesTypenoChoose the way the data is displayed on the graph'bars'
fontsizenoChoose the size of the graph's text font10
pointsizenoChoose the size of the data points5
heightpxnoChoose the height of your graph, default being 300px200px
minValuenoThe minimum value allowed to be displayed on the graph0
maxValuenoThe maximum value allowed to be displayed on the graph100
isStackednoStacks the bar lines/area lines on top of each other, false by defaulttrue

Keywords

FAQs

Package last updated on 31 Aug 2017

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