-
Notifications
You must be signed in to change notification settings - Fork 79
Open
Description
Description
When I'm try dashboard conversion from JSON to Terraform using new relic cli, it is dropping thresholds from billboard widget.
Go Version
Provide the output of go version
here please
Current behavior
When I'm try dashboard conversion from JSON to Terraform using new relic cli, it is dropping thresholds from billboard widget.
Expected behavior
When I'm try dashboard conversion from JSON to Terraform using new relic cli, it should convert thresholds of billboard widget.
Steps To Reproduce
Steps to reproduce the behavior:
- Create dashboard.
- Add billboard widget
- Add thresholds to billboard widget
- Export JSON
- Use newrelic cli to convert json to hcl
cat dashboard.json | newrelic utils terraform dashboard --label my_dashboard_resource
- Check the converted hcl doesn't have thresholds
Debug Output (if applicable)
Additional Context
References or Related Issues
You can try with this json as well
{
"name": "New Relic Terraform Example",
"description": null,
"permissions": "PUBLIC_READ_ONLY",
"pages": [
{
"name": "New Relic Terraform Example",
"description": null,
"widgets": [
{
"title": "Requests per minute",
"layout": {
"column": 1,
"row": 1,
"width": 4,
"height": 3
},
"linkedEntityGuids": null,
"visualization": {
"id": "viz.billboard"
},
"rawConfiguration": {
"facet": {
"showOtherSeries": false
},
"nrqlQueries": [
{
"accountIds": [
134
],
"query": "FROM ServiceLevelSnapshot SELECT average(sliCompliance) WHERE entity.name='234' LIMIT 1"
}
],
"platformOptions": {
"ignoreTimeRange": false
},
"thresholds": [
{
"alertSeverity": "WARNING",
"value": 90
},
{
"alertSeverity": "CRITICAL",
"value": 95
}
]
}
},
{
"title": "List of Transactions",
"layout": {
"column": 5,
"row": 1,
"width": 4,
"height": 3
},
"linkedEntityGuids": null,
"visualization": {
"id": "viz.table"
},
"rawConfiguration": {
"nrqlQueries": [
{
"accountId": 134,
"query": "FROM Transaction SELECT *"
}
],
"platformOptions": {}
}
},
{
"title": "Average transaction duration, by application",
"layout": {
"column": 9,
"row": 1,
"width": 4,
"height": 3
},
"linkedEntityGuids": [
"1234"
],
"visualization": {
"id": "viz.bar"
},
"rawConfiguration": {
"nrqlQueries": [
{
"accountId": 123,
"query": "FROM Transaction SELECT average(duration) FACET appName"
}
],
"platformOptions": {}
}
}
]
}
],
"variables": []
}
This is the output, I'm getting:
widget_billboard {
title = "Requests per minute"
row = 1
column = 1
height = 3
width = 4
nrql_query {
query = <<EOT
FROM Transaction SELECT rate(count(*), 1 minute)
EOT
}
facet_show_other_series = false
legend_enabled = false
ignore_time_range = false
y_axis_left_min = 0
y_axis_left_max = 0
null_values {
null_value = ""
}
units {
unit = ""
}
colors {
color = ""
}
}
```
I understand widget_billboard might not support threshold, that's why thresholds are not being converted.
Then let's add thresholds to widget_billboard. Happy to contribute.
Metadata
Metadata
Assignees
Labels
No labels