I am creating a grafana dashboard to show metrices. Is there any keyword which i can use in my query to check my service is running or not. I am using prometheus to retrive data from my api for the metrics creation.
You can create a query like so
count_scalar(container_last_seen{name=<container_name>})
That will give you the count of how many containers are running with that name