Mozaïk DynaTrace Api widget
Use DynaTrace's Api to display graphs from DynaTrace onto Mozaïk dashboard framework.
Preview
DynaTrace Api widget Configuration
Api Configuration
api: {
dynatrace: {
apiToken: process.env.DYNATRACE_APITOKEN
}
}
Working 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=COUNT×eriesId=com.dynatrace.builtin:service.requestspermin',
legend: 'Web App Ireland Requests',
colour:'#2b77f2',
},
{
query: 'relativeTime=Day&entity=SERVICE-E7EA44342E9D42A6&aggregationType=AVG×eriesId=com.dynatrace.builtin:service.failurerate',
legend: 'Web App Ireland Failed Requests',
colour:'#ff0000',
},
{
query: 'relativeTime=Day&entity=SERVICE-9A91D2F733E6322A&aggregationType=COUNT×eriesId=com.dynatrace.builtin:service.requestspermin',
legend: 'Web App Japan Requests',
colour:'#6298ef',
},
{
query: 'relativeTime=Day&entity=SERVICE-9A91D2F733E6322A&aggregationType=AVG×eriesId=com.dynatrace.builtin:service.failurerate',
legend: 'Web App Japan Failed Requests',
colour:'#ff6868',
}
],
graphID: "dynatrace5",
heightpx: "812.922px",
xLabel: "Time",
yLabel: "Requests",
minValue: 0,
fontsize: 20,
columns: 2, rows: 4,
x: 0, y: 0
}
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 | 'relativeTime=Day&entity=SERVICE-E7EA44342E9D45B9&aggregationType=COUNT×eriesId=com.dynatrace.builtin:service.requestspermin' |
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 |