Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some commands print stack traces when failing #17769

Closed
jsoriano opened this issue Apr 16, 2020 · 5 comments
Closed

Some commands print stack traces when failing #17769

jsoriano opened this issue Apr 16, 2020 · 5 comments
Labels
enhancement libbeat Team:Elastic-Agent Label for the Agent team Team:Integrations Label for the Integrations team

Comments

@jsoriano
Copy link
Member

Some commands fail with stack traces, they should fail with a friendlier message and use a logger.

For example it happens with export commands like metricbeat export dashboard -id not-exist, that fails with messages like:

2020-04-16T20:22:57.202+0200	INFO	kibana/client.go:118	Kibana url: http://localhost:5601
Error exporting dashboard: error exporting dashboard: Saved object [dashboard/not-exist] not found
github.com/elastic/beats/v7/libbeat/kibana.extractError
	/home/jaime/gocode/src/github.com/elastic/beats/libbeat/kibana/client.go:74
github.com/elastic/beats/v7/libbeat/kibana.(*Connection).Request
	/home/jaime/gocode/src/github.com/elastic/beats/libbeat/kibana/client.go:177
github.com/elastic/beats/v7/libbeat/kibana.(*Client).GetDashboard
	/home/jaime/gocode/src/github.com/elastic/beats/libbeat/kibana/client.go:294
github.com/elastic/beats/v7/libbeat/dashboards.Export
	/home/jaime/gocode/src/github.com/elastic/beats/libbeat/dashboards/export.go:54
github.com/elastic/beats/v7/libbeat/cmd/export.GenDashboardCmd.func1
	/home/jaime/gocode/src/github.com/elastic/beats/libbeat/cmd/export/dashboard.go:79
github.com/spf13/cobra.(*Command).execute
	/home/jaime/gocode/src/github.com/elastic/beats/vendor/github.com/spf13/cobra/command.go:766
github.com/spf13/cobra.(*Command).ExecuteC
	/home/jaime/gocode/src/github.com/elastic/beats/vendor/github.com/spf13/cobra/command.go:852
github.com/spf13/cobra.(*Command).Execute
	/home/jaime/gocode/src/github.com/elastic/beats/vendor/github.com/spf13/cobra/command.go:800
main.main
	/home/jaime/gocode/src/github.com/elastic/beats/metricbeat/main.go:34
runtime.main
	/home/jaime/go/src/runtime/proc.go:203
runtime.goexit
	/home/jaime/go/src/runtime/asm_amd64.s:1357.
@jsoriano jsoriano added enhancement libbeat Team:Integrations Label for the Integrations team labels Apr 16, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations (Team:Integrations)

@botelastic
Copy link

botelastic bot commented Mar 21, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@botelastic botelastic bot added the Stalled label Mar 21, 2021
@jsoriano jsoriano added the Team:Elastic-Agent Label for the Agent team label Mar 22, 2021
@botelastic botelastic bot removed the Stalled label Mar 22, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/agent (Team:Agent)

@ph
Copy link
Contributor

ph commented Apr 30, 2021

I am going to close this, with the move to Elastic Agent all dashboard will be handled by Fleet.

@ph ph closed this as completed Apr 30, 2021
@jsoriano
Copy link
Member Author

jsoriano commented May 3, 2021

Ok, the only reason to solve this I see would be to avoid these errors during 7.x.

@zube zube bot removed the [zube]: Done label Jul 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement libbeat Team:Elastic-Agent Label for the Agent team Team:Integrations Label for the Integrations team
Projects
None yet
Development

No branches or pull requests

4 participants