mozaik-ext-dynatrace-api
v0.2.2
Published
A mozaik widget that allows dynatrace information to be displayed in a graph
Downloads
3
Maintainers
Readme
Mozaïk DynaTrace Api widget
Use DynaTrace's Api to display graphs and notifications from DynaTrace onto Mozaïk dashboard framework.
Preview
DynaTrace Api widget Configuration
Api Configuration
api: {
dynatrace: {
apiToken: process.env.DYNATRACE_APITOKEN
}
}
Running tests
The tests require an environment variable, to set this run the following command to run tests with an environment variable:
set DYNATRACE_APITOKEN='api_token'&&npm test
Example Dashboard Configuration
{
type: 'dynatrace.graph',
title: 'Global Web App Requests',
chartType: 'ComboChart',
seriesType: 'bars',
isStacked: true,
baseUrl: 'https://example.live.dynatrace.com',
datasets:[
{
query: [{
relativeTime: 'Day',
entity: 'SERVICE-E7EA44342E9D42A6',
aggregationType: 'AVG',
timeseriesId: 'com.dynatrace.builtin:service.responsetime'
}],
legend: 'PPWebAppIreland__4362 Response Time',
colour: '#a100ff',
},
{
query: [{
relativeTime: 'Day',
entity: 'SERVICE-9A91D2F733E6322A',
aggregationType: 'AVG',
timeseriesId: 'com.dynatrace.builtin:service.responsetime'
}],
legend: 'PPWebAppJapan Response Time',
colour: '#00b2ff',
}
],
graphID: "dynatrace5",
heightpx: "812.922px",
xLabel: "Time",
yLabel: "Requests",
minValue: 0,
fontsize: 20,
columns: 2, rows: 4,
x: 0, y: 0
},
{
type: 'dynatrace.webcheck',
baseUrl: 'https://example.live.dynatrace.com',
entityId: 'SYNTHETIC_TEST-0000004500008D13',
columns: 1, rows: 1,
x: 1, y: 0
}
Graph Parameters
For information on obtaining your baseUrl, relativeTime, entity and timeseriesId, see the dynatrace api documentation.
key | required | description | Examples
------------------------------------|-----|-----------------------------------------------------------------------------|-------------
chartType
| yes | The chart type. The types of chart you can choose from can be found here | 'AreaChart'
baseUrl
| yes | Your DynaTrace base url |'https://example.live.dynatrace.com'
title
| yes | The widget title |'App Service 1 Requests (Last day/every hour):'
datasets.query
| yes | The time series query |
datasets.query.timeseriesId
| yes | see timeseriesId in the dynatrace documentation |'com.dynatrace.builtin:service.responsetime'
datasets.query.startTimestamp
| no | see startTimestamp in the dynatrace documentation |'1504188877712'
datasets.query.endTimestamp
| no | see endTimestamp in the dynatrace documentation |'1504188877712'
datasets.query.relativeTime
| no | see relativeTime in the dynatrace documentation |'day or hour or 2hours'
datasets.query.queryMode
| no | see queryMode in the dynatrace documentation |'series'
datasets.query.aggregationType
| no | see aggregationType in the dynatrace documentation |'AVG'
datasets.query.percentile
| yes if aggregationType = percentile | see percentile in the dynatrace documentation |15
datasets.query.entity
| no | see entity in the dynatrace documentation |'HOST-B64B6B1BB11E2244'
datasets.legend
| yes | legend display for the query |'Web App Ireland Requests'
datasets.colour
| no | legend and line colour for the query |'#00a1ff'
graphID
| yes | Choose a unique ID for your graph |'UniqueID23'
xlabel
| yes | Choose a label name for the x-axis of the graph |'Time'
yLabel
| yes | Choose a label name for the y-axis of the graph |'Requests'
slantedText
| no | Choose whether to have the xAxis value labels slanted |true or false
slantedTextAngle
| no | Choose the degree of angle for the slanteed xAxis value labels |25
seriesType
| no | Choose the way the data is displayed on the graph |'bars'
fontsize
| no | Choose the size of the graph's text font |10
pointsize
| no | Choose the size of the data points |5
heightpx
| no | Choose the height of your graph, default being 300px |200px
minValue
| no | The minimum value allowed to be displayed on the graph |0
maxValue
| no | The maximum value allowed to be displayed on the graph |100
isStacked
| no | Stacks the bar lines/area lines on top of each other, false by default |true
isMicroSeconds
| no | Some timeseriesId return the data in microseconds, this converts that data into miliseconds, false by default | true
reversePercentage
| no | Reverses the percentage of some timeseries that return a percentage |true
WebCheck Parameters
For information on obtaining your baseUrl and entityId, see the dynatrace api documentation.
key | required | description | Examples
------------------------------------|----------|--------------------------------------------------------------------|-----------------------------------
baseUrl
| yes | Your DynaTrace base url |'https://example.live.dynatrace.com'
entityId
| yes | Your entity ID |'SYNTHETIC_TEST-00000004500008D13'
Problems Parameters
For information on obtaining your baseUrl and entityId, see the dynatrace api documentation.
key | required | description | Examples
------------------------------------|----------|--------------------------------------------------------------------|-----------------------------------
baseUrl
| yes | Your DynaTrace base url |'https://example.live.dynatrace.com'