Commit 36828fd9 authored by Simon Pastor's avatar Simon Pastor
Browse files

os.hostname still invoked on file uploads removed

parent 34e7af1d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -140,7 +140,7 @@ func uploadDashboardHttp(location string, cobraCmd *cobra.Command) {
}

func uploadDashboardFile(location string, cobraCmd *cobra.Command) {
	kibanaHost, _ := os.Hostname()
	kibanaHost := viper.GetString("node.ip")
	//forcing the overwrite of already existing saved object with the same id
	cmd := exec.Command("curl", "-vX", "POST", "http://"+kibanaHost+":32003/api/kibana/dashboards/import?force=true", "-H", "Content-Type: application/json", "-H", "kbn-xsrf: true", "-d", "@"+location)
	_, _ = ExecuteCmd(cmd, cobraCmd)