Dashboard
The dashboard is a real-time data analysis platform provided by the log service. You can display frequently used query and analysis statements in the form of charts and save statistical charts to the dashboard. Refer to details.
NOTE: Available in 1.86.0, parameter "action" in char_list is supported since 1.164.0+.
Example Usage
Basic Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.log.Project;
import com.pulumi.alicloud.log.ProjectArgs;
import com.pulumi.alicloud.log.Store;
import com.pulumi.alicloud.log.StoreArgs;
import com.pulumi.alicloud.log.Dashboard;
import com.pulumi.alicloud.log.DashboardArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var defaultProject = new Project("defaultProject", ProjectArgs.builder()
.description("tf unit test")
.build());
var defaultStore = new Store("defaultStore", StoreArgs.builder()
.project("tf-project")
.retentionPeriod("3000")
.shardCount(1)
.build());
var example = new Dashboard("example", DashboardArgs.builder()
.attribute("{\"type\":\"grid\"}")
.charList("""
[
{
"action": {},
"title":"new_title",
"type":"map",
"search":{
"logstore":"tf-logstore",
"topic":"new_topic",
"query":"* | SELECT COUNT(name) as ct_name, COUNT(product) as ct_product, name,product GROUP BY name,product",
"start":"-86400s",
"end":"now"
},
"display":{
"xAxis":[
"ct_name"
],
"yAxis":[
"ct_product"
],
"xPos":0,
"yPos":0,
"width":10,
"height":12,
"displayName":"xixihaha911"
}
}
]
""")
.dashboardName("tf-dashboard")
.projectName("tf-project")
.build());
}
}
Content copied to clipboard
Import
Log Dashboard can be imported using the id or name, e.g.
$ pulumi import alicloud:log/dashboard:Dashboard example tf-project:tf-logstore:tf-dashboard
Content copied to clipboard