Monitoring for Spring zeebe

I want to monitor the workflow so how should I integrate spring monitor with spring-zeebe-broker?

Hi @regojoyson,

thanks for trying out Zeebe.

Just to clarify with spring monitor you mean simple-monitor right?
The simple monitor is a standalone application so you don’t have to integrate it with spring-zeebe.

Hope this helps.

Greets
Chris

For monitoring workflows you can use Operate, or Simple Monitor, or both (slow, but insightful).

Simple Monitor shows details of message subscriptions, which is useful for debugging message correlation. Operate doesn’t show that.

You can use these docker-compose configurations here: https://github.com/jwulf/zeebe-operate-docker

Hi @Zelldon @jwulf ,

Thanks for the quick respsonse. I wanted to export data to elastic and also to simple monitor. so i want to know how to implement/connect exporter in spring zeebe broker project. beacause i got the implementation for Zeebe broker project but not for spring zeebe broker .

I tried to add POM dependency and un-commented exporter line in zeebe.cfg file but no luck

if any examples or samples in git for this it will be very helpful for all.

Embedded broker?

@zelldon is this still a thing? Or is it deprecated?

Hey @jwulf,

yes it is out of date and needs to be updated. I think it is often used for demo purposes.

Greets
Chris

1 Like

Hey @regojoyson,

the spring project is currently out of date and needs to be updated.

Nevertheless it should be possible to configure both exporters in the zeebe.cfg.toml.
The exporter section in the config could look like this:

[[exporters]]
id = "elasticsearch"
className = "io.zeebe.exporter.ElasticsearchExporter"

  [exporters.args]
  url = "http://localhost:9200"

  [exporters.args.bulk]
  delay = 5
  size = 1_000

  [exporters.args.authentication]
  username = elastic
  password = changeme

  [exporters.args.index]
  prefix = "zeebe-record"
  createTemplate = true

 [[exporters]]
 id = "simple-monitor"
 className = "io.zeebe.monitor.SimpleMonitorExporter"
 
 [[exporters]]
 id = "hazelcast"
 className = "io.zeebe.hazelcast.exporter.HazelcastExporter"
1 Like

Thanks @Zelldon @jwulf for the update.

Can I use spring-zeebe-starter client with zeebe-broker instead of spring-zeebe broker ? is there any problems?
@Zelldon @jwulf

Thanks,
Joyson

Hi @jwulf,
I want to use new zeebe 0.18.0 version and also new version of monitor. so i tried with given git project by changing the version of zeebe,monitor and updated the 2 jars (monitor and hazelcast exporter ) ,But its giving error in simple monitor for creating element instance table in db .

this is the below project link, which i tried to fork.

https://github.com/jwulf/zeebe-operate-docker.git

Error:

Caused by: org.hibernate.tool.schema.spi.SchemaManagementException: Schema-validation: missing table [element_instance]

Can you Please create one more project for latest zeebe 0.18.0 with latest monitor

Hi @regojoyson - this is the one you want: https://github.com/zeebe-io/zeebe-docker-compose

1 Like

THANKS @jwulf. can I use simple monitor or operate for production…? Is there any performance impact? Is there any charges or pricing model.?

Hi @jwulf, I am getting errors while running the operator-simple-monitor in docker. here is the error in simple-monitor

git url : https://github.com/zeebe-io/zeebe-docker-compose/tree/master/operate-simple-monitor

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2019-06-14 12:54:53.892 ERROR 1 --- [           main] o.s.boot.SpringApplication               : Application run failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.tool.schema.spi.SchemaManagementException: Schema-validation: missing table [element_instance]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1745) ~[spring-beans-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:576) ~[spring-beans-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498) ~[spring-beans-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1083) ~[spring-context-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:853) ~[spring-context-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546) ~[spring-context-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142) ~[spring-boot-2.1.2.RELEASE.jar!/:2.1.2.RELEASE]
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) [spring-boot-2.1.2.RELEASE.jar!/:2.1.2.RELEASE]
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.1.2.RELEASE.jar!/:2.1.2.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) [spring-boot-2.1.2.RELEASE.jar!/:2.1.2.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260) [spring-boot-2.1.2.RELEASE.jar!/:2.1.2.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248) [spring-boot-2.1.2.RELEASE.jar!/:2.1.2.RELEASE]
        at io.zeebe.monitor.ZeebeSimpleMonitorApp.main(ZeebeSimpleMonitorApp.java:49) [classes!/:0.14.0]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_212]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_212]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_212]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_212]
        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [zeebe-simple-monitor.jar:0.14.0]
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [zeebe-simple-monitor.jar:0.14.0]
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [zeebe-simple-monitor.jar:0.14.0]
        at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51) [zeebe-simple-monitor.jar:0.14.0]
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.tool.schema.spi.SchemaManagementException: Schema-validation: missing table [element_instance]
        at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:402) ~[spring-orm-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
        at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:377) ~[spring-orm-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
        at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:341) ~[spring-orm-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1804) ~[spring-beans-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1741) ~[spring-beans-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
        ... 24 common frames omitted
Caused by: org.hibernate.tool.schema.spi.SchemaManagementException: Schema-validation: missing table [element_instance]
        at org.hibernate.tool.schema.internal.AbstractSchemaValidator.validateTable(AbstractSchemaValidator.java:121) ~[hibernate-core-5.3.7.Final.jar!/:5.3.7.Final]
        at org.hibernate.tool.schema.internal.GroupedSchemaValidatorImpl.validateTables(GroupedSchemaValidatorImpl.java:42) ~[hibernate-core-5.3.7.Final.jar!/:5.3.7.Final]
        at org.hibernate.tool.schema.internal.AbstractSchemaValidator.performValidation(AbstractSchemaValidator.java:89) ~[hibernate-core-5.3.7.Final.jar!/:5.3.7.Final]
        at org.hibernate.tool.schema.internal.AbstractSchemaValidator.doValidation(AbstractSchemaValidator.java:68) ~[hibernate-core-5.3.7.Final.jar!/:5.3.7.Final]
        at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:191) ~[hibernate-core-5.3.7.Final.jar!/:5.3.7.Final]
        at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:72) ~[hibernate-core-5.3.7.Final.jar!/:5.3.7.Final]
        at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:310) ~[hibernate-core-5.3.7.Final.jar!/:5.3.7.Final]
        at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:467) ~[hibernate-core-5.3.7.Final.jar!/:5.3.7.Final]
        at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:939) ~[hibernate-core-5.3.7.Final.jar!/:5.3.7.Final]
        at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:57) ~[spring-orm-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
        at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:365) ~[spring-orm-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
        at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:390) ~[spring-orm-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
        ... 28 common frames omitted

Hi @regojoyson, I understand that you see errors in the startup logs. Here’s my question: does it work?

It should start the simple monitor on port 8082 of localhost.

See this link for an explanation of these errors: https://youtu.be/RV9_7Ct2j0g?t=431

1 Like

Don’t use Simple Monitor in production with the H2 database. It is too slow.

You can use it with Operate. That uses an Elastic Search exporter.

1 Like

Thanks @jwulf for the quick response. I am using the monitor and operator with the clustered zeebe…so it’s not working. It’s retrying every time but not starting…I waited for 20 mins. But for single instance of zeebe and monitor it’s worked for me

Can you please create one docker-compose for clustered zeebe with operate and monitor? It will very helpful for all

The operate is having free trail license now.so I can use it in production right without any charges?