copper-engine / copper-monitoring

Monitoring GUI and server for COPPER
Apache License 2.0
5 stars 4 forks source link

History of workflows #3

Closed DanyHubGit closed 5 years ago

DanyHubGit commented 5 years ago

Hi all I think that this isn't an issue, but perhaps an enhancement.

Is there a configuration of copper monitoring GUI that allow to show all workflows history, without any running istances? Now, when I start the GUI, i don't see anything because there aren't any running workflow.
I don't know in the past, which workflows have been closed without any errors, with errors, and so on.

Is there something that cover the "workflow history" requirement?

Thanks in advance

HaydenHodge commented 5 years ago

Hello DanyHubGit,

The detailed history of all workflows in an application is not something that the Copper Engine maintains. The information you see in the Copper Monitoring GUI is queried from a database that the Copper Engine is working with, it isn't a 'history' as much as a current snapshot of the Engine and the database.

I can see two options for you, the Audit Trail system or Influx DB.

Have a look at the Copper Starter project, specifically the OrchestrationWithMonitoring folder on GitHub here: https://github.com/copper-engine/copper-starter/tree/master/src/main/resources/orchestrationWithMonitoring

You can see inside the CopperContext.xml and MonitoringContext.xml references to the classes BatchingAuditTrail.java and ScottyAuditTrailQueryEngine.java. If you have these set up properly, you can write detailed custom logs with whatever information you would like into the Audit Trail from within a workflow. See the example of simple Audit Trail usage in the ResetMailbox.java workflow here: https://github.com/copper-engine/copper-starter/blob/master/src/workflow/java/org/copperengine/examples/orchestration/wf/ResetMailbox.java

The Copper Monitoring GUI has a specific tab for viewing and sorting through an Audit Trail. I believe this would get you pretty close to what you are asking about.

The next option is slightly different, and that is using InfluxDB, Telegraf, and Chronograf to keep a constantly running statistics collector querying your Copper Application. Read more about that here: https://docs.influxdata.com/

You can configure Telegraf to query your Copper Application for information similarly to how the Copper Monitoring GUI does, and then store that information in an Influx database. From there, you can choose whether to view those statistics in the Copper Monitoring GUI Overview page or in the Chronograf application. With this set up, you will be collecting information without having to have your browser open with Copper Monitoring GUI running.

This would provide you with a more consistent tracking of your Copper Application, where as the Copper Monitoring GUI by itself only displays statistics that it queried while it is running.

I hope this response was helpful and can get you started with collecting and viewing the exact statistics and details that you are after.