grimoirelab icon indicating copy to clipboard operation
grimoirelab copied to clipboard

No dashboard shown in kibiter

Open Eroyi opened this issue 1 year ago • 1 comments

image

Not sure which component is responsible for importing dashboards but

  • No error logs in kibiter
  • No error logs in sortinghat
  • Found error logs in mordred:
2024-10-23 08:25:58,282 - GrimoireLab - sirmordred.sirmordred - INFO - 
2024-10-23 08:25:58,283 - GrimoireLab - sirmordred.sirmordred - INFO - ----------------------------
2024-10-23 08:25:58,283 - GrimoireLab - sirmordred.sirmordred - INFO - Starting SirMordred engine ...
2024-10-23 08:25:58,283 - GrimoireLab - sirmordred.sirmordred - INFO - ----------------------------
Exception in thread Global tasks:
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/threading.py", line 980, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.9/site-packages/sirmordred/task_manager.py", line 84, in run
    task = tc(self.config, self.client)
TypeError: __init__() takes 2 positional arguments but 3 were given
2024-10-23 08:26:00,274 - GrimoireLab - sirmordred.sirmordred - INFO - Loading projects
2024-10-23 08:26:00,280 - GrimoireLab - sirmordred.task_projects - INFO - Reading projects data from  /home/grimoire/conf/projects.json 

GET _cat/indices

image

setup.cfg and projects.json are the sample files provided in grimoirelab/default-grimoirelab-settings.

Eroyi avatar Oct 23 '24 09:10 Eroyi

Hi @Eroyi

You can use kidash to import the dashboards stored at sigils.

zhquan avatar Oct 24 '24 15:10 zhquan

Hi @Eroyi

You can use kidash to import the dashboards stored at sigils.

None of the dashboards were able to import into Opensearch-dashboard:

kidash -g -e https://admin:[email protected]:9200 --import /tmp/grimoirelab-sigils/panels/json/about.json 


2024-10-25 15:51:55,494 Debug mode activated
2024-10-25 15:51:55,494 Reading panels JSON file: /tmp/grimoirelab-sigils/panels/json/about.json
2024-10-25 15:51:55,494 Reading panel from directory: /tmp/grimoirelab-sigils/panels/json/about.json
2024-10-25 15:51:55,494 Panel detected.
2024-10-25 15:51:56,709 Cleaning dashboard from studies vis
Traceback (most recent call last):
  File "/root/.cache/pypoetry/virtualenvs/kidash-PX08pWr7-py3.12/bin/kidash", line 6, in <module>
    sys.exit(main())
             ^^^^^^
  File "/tmp/grimoirelab-kidash/kidash/bin/kidash.py", line 39, in main
    import_dashboard(args.elastic_url, args.kibana_url, args.import_file, args.kibana_index,
  File "/tmp/grimoirelab-kidash/kidash/kidash.py", line 1297, in import_dashboard
    feed_dashboard(json_to_import, elastic_url, kibana_url, es_index, data_sources, add_vis_studies)
  File "/tmp/grimoirelab-kidash/kidash/kidash.py", line 1457, in feed_dashboard
    import_item_json(elastic, "dashboard", dashboard['dashboard']['id'],
  File "/tmp/grimoirelab-kidash/kidash/kidash.py", line 698, in import_item_json
    if res_content['error']['type'] == "strict_dynamic_mapping_exception" and \
       ~~~~~~~~~~~~~~~~~~~~^^^^^^^^
TypeError: string indices must be integers, not 'str'

Neither:

kidash -g -e https://admin:[email protected]:9200 --import /tmp/grimoirelab-sigils/panels/json/opensearch_dashboards/about.ndjson 


2024-10-25 15:53:55,651 Debug mode activated
2024-10-25 15:53:55,651 Reading panels JSON file: /tmp/grimoirelab-sigils/panels/json/opensearch_dashboards/about.ndjson
2024-10-25 15:53:55,651 Reading panel from directory: /tmp/grimoirelab-sigils/panels/json/opensearch_dashboards/about.ndjson
2024-10-25 15:53:55,652 Wrong file format (not JSON): /tmp/grimoirelab-sigils/panels/json/opensearch_dashboards/about.ndjson
2024-10-25 15:53:55,652 Can not find a valid JSON in: /tmp/grimoirelab-sigils/panels/json/opensearch_dashboards/about.ndjson
2024-10-25 15:53:55,652 Can not find a valid JSON in: /tmp/grimoirelab-sigils/panels/json/opensearch_dashboards/about.ndjson

But can be imported by dragging the ndjson file from panels/json/opensearch_dashboards into opensearch-dashboard webUI manually.

Eroyi avatar Oct 25 '24 07:10 Eroyi

Opss sorry I was not clear if you are using ElasticSearch 6.8.6 + Kibana or Kibiter you have to use kidash to import json files but if you are using OpenSearch Dashboard you can import directly the ndjson files using the WebUI as you said.

zhquan avatar Oct 25 '24 10:10 zhquan

Opss sorry I was not clear if you are using ElasticSearch 6.8.6 + Kibana or Kibiter you have to use kidash to import json files but if you are using OpenSearch Dashboard you can import directly the ndjson files using the WebUI as you said.

These instructions would be great to have in the tutorial instead of a closed issue.

Also, I'd love to share the helm chart I've composed for Grimorelab. If you're interested, just let me know.

Eroyi avatar Oct 25 '24 17:10 Eroyi