Dashboard offers the insight of running tasks in Jina. With dashboard, one can analyze logs, design flows and view Jina Hub images.
🌟 Features:
- Log streaming, real-time chart on log-level.
- Grouping logs by Pods, Executors, Levels. Full text search on logs.
- Drag & drop flow design, setting properties of each Pod via a webform.
- Prebuilt pod menu for easy flow design.
- Flow can be imported from/exported to YAML.
- Browse hub images, use your GitHub account to rate and review images.
- Monitor Jina "Hello, World!" with Dashboard
- Getting started
- Self-host Dashboard
- Contributing
- License
Jina "Hello, World" is a simple demo of image neural search for Fashion-MNIST.
Make sure to have Fluentd installed - gem install fluentd --no-doc
Run: fluentd -c jina/resources/fluent.conf
(file is in https://github.com/jina-ai/jina)
- Run the following command in the console
- (Python >=3.7 required)
JINA_LOG_PROFILING=1 jina hello-world --logserver
- ...or if you use Docker (no install required)
docker run -e "JINA_LOG_PROFILING=1" -p 5000:5000 jinaai/jina:devel hello-world --logserver
- (Python >=3.7 required)
- Open https://dashboard.jina.ai in your browser
It should start streaming. If not, please refer to this step.
Set environment variable
JINA_LOG_PROFILING
to1
to enable Task tab in the dashboard.
Log server is a helper thread in Jina flow. It exposes HTTP endpoints to the public which the dashboard can use to fetch logs, visualize the flow.
By default the log server is disabled. To enable it you can,
If you use Flow API in Python, |
from jina.flow import Flow
f = (Flow(logserver=True)
.add(...)
.add(...))
with f.build() as fl:
fl.index(...) |
...or write a Flow from YAML |
# myflow.yml
!Flow
with:
logserver: true
pods: ... f = Flow.load_config('myflow.yml')
with f.build() as fl:
fl.index(...) |
...or start a Flow from CLI |
jina flow --logserver --yaml-path myflow.yml |
...or start a Flow with Docker Container |
docker run -p 5000:5000 jina flow --logserver ... |
Either way, if you see the following logs show up in the console, then your log server is successfully running. You can now move to the next step.
Go to: https://dashboard.jina.ai
Make sure your settings are configured correctly to point to your Jina instance.
If you have a running Jina instance, it should connect automatically.
If you start a new Jina instance, click "try again" and it will connect.
Note: make sure you wait for the logserver
to start before attempting to connect dashboard.
Connection status will be indicated by the globe icon. A red X means the dashboard is not connected to any Jina instance, a green checkmark means there is an active connection.
You should now see the log stream and flow visualization.
By default the configurations of the log server are as follows:
host: 0.0.0.0
port: 5000
endpoints:
log: /stream/log # fetching log in SSE stream
profile: /stream/profile # fetching profiling log in SSE stream
yaml: /data/yaml # get the YAML spec of a flow
shutdown: /action/shutdown # shutdown the log server
ready: /status/ready # tell if the log server is ready, return 200 if yes
You can customize the endpoints of the log server via YAML, say mylogserver.yml
. Then pass it to the Flow API via
If you use Flow API in Python, |
f = Flow(logserver=True, logserver_config='mylogserver.yml') |
...or write a Flow from YAML |
!Flow
with:
logserver: true
logserver_config: mylogserver.yml |
...or start a Flow from CLI |
jina flow --logserver --logserver-config mylogserver.yml ... |
...or start a Flow with Docker Container |
docker run -p PORT:PORT -v "$(PWD)/mylogserver.yml:/mylogserver.yml" jina flow --logserver --logserver-config /mylogserver.yml ... |
Don't forget to update endpoint in the dashboard accordingly.
One can self-host a dashboard locally.
git clone https://github.com/jina-ai/dashboard.git && cd dashboard
.- Install dependencies using command
npm i
. - Run dashboard via the following ways .
Note: features like the hub and GitHub login will not work when running locally as they are restricted to the dashboard.jina.ai
origin. They are not necessary to view logs or interact with flows. If you would like to browse the hub do so from dashboard.jina.ai.
cd dev-resources
node testServer
- testServer will be running on
http://localhost:5000
by default npm start
- dashboard will be served on
http://localhost:3000
by default
npm build
node dashboard
- dashboard will be served on
http://localhost:3030
by default
We welcome all kinds of contributions from the open-source community, individuals and partners. Without your active involvement, Jina can't be successful.
The following resources help you to make a good first contribution:
Copyright (c) 2020 Jina AI Limited. All rights reserved.
Jina is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.