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

HAProxy saved objects won't import #9389

Closed
bigphilwa opened this issue Dec 5, 2018 · 6 comments
Closed

HAProxy saved objects won't import #9389

bigphilwa opened this issue Dec 5, 2018 · 6 comments
Assignees
Labels
bug Filebeat Filebeat module Team:Integrations Label for the Integrations team

Comments

@bigphilwa
Copy link

After moving the Filebeat-haproxy-overview.json file to the correct location and running filebeat setup --dashboards, there is an error when the program trys to load the HAProxy json file. It seems that the nested json objects in the file are expected to be text fields and NOT json. All other modules work just fine and their json files all contain escaped json text strings instead of plain json. The following error is logged when running setup:

2018-12-04T08:25:35.822-0800 ERROR instance/beat.go:800 Exiting: Error importing Kibana dashboards: fail to import the dashboards in Kibana: Error importing directory C:\ELASTIC\filebeat-6.5.1-windows-x86_64\kibana: Failed to import dashboard: Failed to load directory C:\ELASTIC\filebeat-6.5.1-windows-x86_64\kibana/6/dashboard:
error loading C:\ELASTIC\filebeat-6.5.1-windows-x86_64\kibana\6\dashboard\Filebeat-haproxy-overview.json: failed to parse field [visualization.kibanaSavedObjectMeta.searchSourceJSON] of type [text]. Response: {"objects":[{"id":"55251360-aa32-11e8-9c06-877f0445e3e0","type":"visualization","error":{"message":"failed to parse field [visualization.kibanaSavedObjectMeta.searchSourceJSON] of type [text]"}},{"id":"7fb671f0-aa32-11e8-9c06-877f0445e3e0","type":"vi... (truncated)

I've confirmed the saved objects (visualizations and dashboard) load without issue when I converted the objects to text strings. So not only that, but after the objects were loaded, I found two other issues noted below:

  1. in the visualization "IP Geohashes [Filebeat HAProxy]" it is referencing "haproxy.client_ip" where it should be "haproxy.client.ip" as that is what is in the mapping and index template.
  2. the panelsJSON is null in the dashboard object. This should included the visualizations that were created.

Please include configurations and logs if available.
s
For confirmed bugs, please report:

@ruflin ruflin added the Team:Integrations Label for the Integrations team label Dec 6, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/infrastructure

@ruflin
Copy link
Contributor

ruflin commented Dec 6, 2018

What is the exact file you moved? You can't take the file from the Github repo and move it into the package as the encoding is done during packaging. Closing as this should be fixed by #9313

@ruflin ruflin closed this as completed Dec 6, 2018
@jsoriano
Copy link
Member

jsoriano commented Dec 6, 2018

@ruflin actually there is something wrong with this dashboard, let me take a look.

@jsoriano
Copy link
Member

jsoriano commented Dec 6, 2018

@bigphilwa thanks for reporting this, there were actually some issues with this dashboard, I have opened #9417 to fix them.

@ruflin
Copy link
Contributor

ruflin commented Dec 6, 2018

@jsoriano Thanks for double checking.
@bigphilwa Sorry for closing this one too quickly.

@bigphilwa
Copy link
Author

@ruflin I moved the Filebeat-haproxy-overview.json that was in the Filebeat Windows zip package (filebeat-6.5.1-windows-x86_64.zip\filebeat-6.5.1-windows-x86_64\kibana\default\dashboard\Filebeat-haproxy-overview.json)

The fix for me was as I stated...converted all nested json objects to text strings. Like the very beginning of the file for instance looks like this >

{
"objects": [
{
"attributes": {
"description": "",
"kibanaSavedObjectMeta": {
"searchSourceJSON": {
"filter": [],
"index": "filebeat-*",
"query": {
"language": "lucene",
"query": ""
}
}
},

After changing it all to be like this > it worked (with the exception of the other two issues found after that).

{
"objects": [
{
"attributes": {
"description": "",
"kibanaSavedObjectMeta": {
"searchSourceJSON": "{"filter": [], "index": "filebeat-*", "query": {"query": "", "language": "lucene"}}"
},

  • not sure why pasting here is removing the escape characters in the second quote block, but you get the idea.

@alvarolobato alvarolobato changed the title HAProxy saved objects wont import HAProxy saved objects won't import Dec 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Filebeat Filebeat module Team:Integrations Label for the Integrations team
Projects
None yet
Development

No branches or pull requests

5 participants