Fetch real time pipeline status/data from Jenkins

I have created my own dashboard to display Jenkins pipeline data. I want to fetch Jenkins real time data. As soon as any pipeline triggers in Jenkins I want that to be displayed in my dashboard as in running state.Do we have any Jenkins plugin to give us real time data simultaneously as pipeline runs in Jenkins Or any other approach we can follow to get this done.( I dont want to use REST API’s as my approach).
Please share your valuable inputs.
Thankyou.

If you don’t mind adding entries into your Pipeline job definitions for the stages that you are monitoring, you might try the embeddable build status plugin. It will provide a badge for a stage.

1 Like

Thankyou for your quick reply.
This solution looks good, but is there any way without making changes in job configuration we can get status of jobs. I have pre-existing jobs which i dont want to modify.

Yes, there you can get job status without making changes to the jobs. Some examples of techniques that are used to get more information from jobs without changing job configuration:

  • Read the console log of the job and parse it for the information you are seeking
  • Use the OpenTelemetry plugin to collect job information for display in the observability engine of your choice (Elastic Search, Datadog, Dynatrace, etc.) or in your own pages
  • Implement your own job status viewer based on the APIs that are used by the Pipeline graph view plugin and the blue ocean plugins

Unless you have hundreds of jobs that you do not want to modify, those all sound like much more work than using the embeddable build status plugin to display status results on your dashboard.

1 Like

Job and Stage monitoring might also be a solution

1 Like

Thanks @mawinter69 ! I was not aware of that plugin. It looks promising

1 Like

Thanks for your reply @mawinter69 Can we use external database to store (postgres/mongodb) rather than InfluxDB, StatsD by using this plugin?

Looking at the source code there is a BuildNotifier Extension point, that you could implement in an own plugin to publish to postgres or any other database you like.

How to do transfer the status of jenkins pipeline build live to endpoint
should not be pipeline specific ,generic it should work for any pipeline when it’s trigger and for all stage in the pipeline