josete
josete

Reputation: 367

Can't view any 'dependencies' inside zipkin UI dependencies tab

I do have several services interacting with each other, and all of them, sending traces to openzipkin ( https://github.com/openzipkin/docker-zipkin ).

While i can see the system behaviour in detail , looks like the 'dependencies' tab does not display anything at all.

The trace i check has 6 services, 21 spans and 43 spans, and i believe something should appear.

I'm using latest ( 1.40.1 ) docker-zipkin, with cassandra as storage, and just connecting to the cassandra instance, can see there's no entry in the dependencies 'table'. why ?

Thanks

Upvotes: 2

Views: 2863

Answers (2)

negi Yogi
negi Yogi

Reputation: 2278

If storage type is other than inline storage, for zipkin dependencies graph you have to start separate cron job/scheduler which reads the storage database and builds the graph. Because zipkin dependencies is separate spark job . For reference : https://github.com/openzipkin/docker-zipkin-dependencies

I have used zipkin with elastic search as storage type. I will share the steps for setting up the zipkin dependencies with elastic search and cron job for the same:

1.cd ~/
2. curl -sSL https://zipkin.io/quickstart.sh | bash -s io.zipkin.dependencies:zipkin-dependencies:LATEST zipkin-dependencies.jar
3. touch  cron.sh or vi cron.sh  
4. paste this content  : 
STORAGE_TYPE=elasticsearch ES_HOSTS=https:172.0.0.1:9200 ES_HTTP_LOGGING=BASIC ES_NODES_WAN_ONLY=true java -jar zipkin-dependencies.jar
5.chmode a+x cron.sh //make file executable
6.crontab -e   
window will open paste  below content 
0 * * * * cd && ./cron.sh //every one hour it will start the cron job if you need every 5 minutes change the commmand to '*/5 * * * * cd && ./cron.sh'
7. to check cron job is schedule run commant crontab -l

Other solution is to start a separate service and run the cron job using docker

Steps to get the latest zipkin-dependencies jar try running given command on teminal

cd /zipkindependencies // where your Dockerfile is available
curl -sSL https://zipkin.io/quickstart.sh | bash -s io.zipkin.dependencies:zipkin-dependencies:LATEST

you will get jar file at above mention directory

Dockerfile

FROM openjdk:8-jre-alpine
ENV STORAGE_TYPE=elasticsearch
ENV ES_HOSTS=http://172.0.0.1:9200
ENV ES_NODES_WAN_ONLY=true
ADD crontab.txt /crontab.txt
ADD script.sh /script.sh
COPY entry.sh /entry.sh
COPY zipkin-dependencies.jar  /
RUN chmod a+x /script.sh /entry.sh
RUN /usr/bin/crontab /crontab.txt
CMD ["/entry.sh"]
EXPOSE 8080

entry.sh

#!/bin/sh
# start cron
/usr/sbin/crond -f -l 8

script.sh

#!/bin/sh
java ${JAVA_OPTS} -jar /zipkin-dependencies.jar

crontab.txt

0 * * * * /script.sh >> /var/log/script.log

Upvotes: 1

Stuart Ingram
Stuart Ingram

Reputation: 101

Same problem here with the docker images using Cassandra (1.40.1, 1.40.2, 1.1.4).

This is a problem specific to using Cassandra as the storage tier. Mysql and the in-memory storage generate the dependency graph on-demand as expected.

There are references to the following project to generate the Cassandra graph data for the UI to display.

This looks to be superseded by ongoing work mentioned here

Upvotes: 1

Related Questions