This is a custom Prometheus metrics for monitoring cpu utilization per function in OpenFaaS. It uses mongodb to find total cpu usage per function that is created using custom template
mongo_uri
environmental variable is required. See mongo uri string
You need to deploy this metrics in kubernetes cluster using config in k8s folder and add a job in Prometheus config(example)