0.2.4 • Published 7 years ago

mozaik-ext-app-insights-rest-api v0.2.4

Weekly downloads
-
License
MIT
Repository
github
Last release
7 years ago

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'requestswhere 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)'
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
0.2.4

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.9

7 years ago

0.1.8

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago