'How to get the total uptime of a Spark job in prometheus

I am trying to get the total uptime of a Spark job at the prometheus endpoint. My spark job is deployed using Kubernetes. I can't find a simple metric which would give me the uptime as displayed in Spark UI. Can someone help as to what can be used for this? enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source