Cannot import newly created dashboard or visualization to report definition

Hello community members, I’m using OpenSearch 1.0.0 with OpenSearch-Dashboards 1.0.0 and Logstash 7.12.1 in my test environment. I have activated multi-tenancy for both Global and Private tenants. My problem is that I can’t select a recently created dashboard or visualization, as it’s not listed for selection in a report definition or in notebooks. I have tried several configurations and delete some indices without any result. Below are my configurations and note that for OpenSearch-Dashboards TLS setup I just copied opensearch certificates to /etc/opensearch-dashboards/config directory:

opensearch_dashboards.yml
opensearch.hosts: [“https://127.0.0.1:9200”]
opensearchDashboards.index: “.opensearch-dashboards”
server.ssl.enabled: true
server.ssl.certificate: /etc/opensearch-dashboards/config/client.pem
server.ssl.key: /etc/opensearch-dashboards/config/client-key.pem
opensearch.ssl.certificateAuthorities: [ “/etc/opensearch-dashboards/config/root-ca.pem” ]
opensearch.ssl.verificationMode: none
opensearch.requestHeadersWhitelist: [“Authorization”, “securitytenant”]

#opensearch-dashboards security
opensearch_security.multitenancy.enabled: true
opensearch_security.multitenancy.tenants.enable_global: true
opensearch_security.multitenancy.tenants.enable_private: true
opensearch_security.multitenancy.tenants.preferred: [“Private”, “Global”]
opensearch_security.readonly_mode.roles: [“kibana_read_only”]
opensearch_security.multitenancy.enable_filter: true
opensearch_security.cookie.secure: true
opensearch_security.cookie.isSameSite: “None”
csp.strict: false

config.yml
config:
dynamic:
kibana:
multitenancy_enabled: true
server_username: admin
index: ‘.opensearch-dashboards’
do_not_fail_on_forbidden: false
multi_rolespan_enabled: true
basic_internal_auth_domain:
description: “Authenticate via HTTP Basic against internal users database”
http_enabled: true
transport_enabled: true
order: 4
http_authenticator:
type: basic
challenge: true
authentication_backend:
type: intern

opensearch.yml
plugins.security.ssl.transport.keystore_filepath: keystore.p12
plugins.security.ssl.transport.keystore_password: changeit
plugins.security.ssl.transport.keystore_type: PKCS12
plugins.security.ssl.transport.keystore_alias: node

plugins.security.ssl.transport.truststore_filepath: truststore.p12
plugins.security.ssl.transport.truststore_password: changeit
plugins.security.ssl.transport.truststore_type: PKCS12
plugins.security.ssl.transport.truststore_alias: rootCA
plugins.security.ssl.http.enabled: true
… … …
plugins.security.ssl.transport.enforce_hostname_verification: false
plugins.security.ssl.transport.resolve_hostname: false
plugins.security.allow_unsafe_democertificates: false
plugins.security.allow_default_init_securityindex: true
plugins.security.enable_snapshot_restore_privilege: true
plugins.security.check_snapshot_restore_write_privileges: true
plugins.security.restapi.roles_enabled: [“all_access”, “security_rest_api_access”]
plugins.security.system_indices.enabled: true
plugins.security.system_indices.indices: [".opendistro-anomaly-results*", “.opendistro-anomaly-detector*”, “.opendistro-anomaly-checkpoints”, “.opendistro-anomaly-detection-state”]
plugins.security.audit.type: internal_opensearch

When trying to download PDF or PNG directly from recent dashboard or visualization I get the bellow error at OpenSearch-Dashborads logs:

respons [10:03:05.183] GET /api/v1/multitenancy/tenant 200 8ms - 9.0B

log [10:03:05.255] [error][plugins][reportsDashboards] Failed input validation for create report Error: saved object with id visualization:97e8f9f0-0a42-11ec-a014-d73318615fd2 does not exist

respons [10:03:05.201] POST /api/reporting/generateReport?timezone=Europe%2FAthens 400 58ms - 9.0B

And the following error on browser which I will examine later for any plugin inconsistencies:

image

Humm. The error log makes me think that there is something mixed in the tenants in your report. If you run this from DevTools using the different tenants do you see that visualization:97e8f9f0-0a42-11ec-a014-d73318615fd2 visualization in one tenant but not the other?

GET /.kibana/_search
{
    "query": {
        "match_all": {}
    }
}

Searching all data streams returns results only from .kibana index. Ιn conclusion, this is the default index to store reporting elements while I had set .opensearch-dashboards incorrectly.

Thank you Kyle for your valuable help and your precious time.

1 Like

What is the solution here? I’m having the exact same issue and I’m super confused. From my OpenSearch Dashboards log:

{"type":"log","@timestamp":"2022-02-16T02:43:52Z","tags":["error","plugins","reportsDashboards"],"pid":18620,"message":"Failed input validation for create report Error: saved object with id search:197de890-8900-11ec-9b27-511a35f346b4 does not exist"}

The object clearly exists when viewing it under saved objects and the search renders fine.

Inside of opensearch_dashboards.yml I have:

kibana.index: .opensearch_dashboards

Where does the plugin look for these objects?

The default index for storing reporting elements is .kibana. Configure this properly to your opensearch_dashboards.yml.

@corduroy yeah i think there is a bigger problem in that it’s not just the default–the reporting plugin is hardcoded to only look at .kibana, so if you’ve configured your index to be a different name, you’re out of luck :\

They talk about this a bit in the following: