Faas: Question: is Prometheus required?

Created on 10 Jul 2018  路  17Comments  路  Source: openfaas/faas

Question: i red pull request #442, #441, issue #190 in this repository, so is there no way to run openfaas without prometheus yet?

I have read #442, #441, #190 in this repository, so is there no way to run openfaas without prometheus yet?

Expected Behaviour

openfaas run without prometheus or with others

Current Behaviour

i tried all the possibility i can, but i couldn't make it

Possible Solution

not sure

Steps to Reproduce (for bugs)

i tried to change

  1. yaml
  2. makefile
  3. Dockerfile
  4. make block comments including all the code about prometheus

but i guess if i want to do so, i would make another versioon of prometheus which is as almost same as original one even if i do not need the operation in the prometheus
cuz' whole the codes and methods about gateway are linking to the prometheus's

right?

Your Environment

  • Docker version docker version (e.g. Docker 17.0.05 ):
    the latest one til now
  • Are you using Docker Swarm or Kubernetes (FaaS-netes)?
    Kubernetes and FaaS-netes as well
  • Operating System and version (e.g. Linux, Windows, MacOS):
    ubuntu linux, the latest one
  • Link to your project or a code example to reproduce issue:
prioritlow question support

Most helpful comment

Super weird, I must have run into another issue or something else funky when I spun things up originally. Maybe it was a Prometheus thing? Anyway, I killed the Prometheus pod and then rebooted the node that Prometheus was scheduled to and things seem to be working now and much more stable.

Here are the metrics for the openfaas components.

NAME                            CPU(cores)   MEMORY(bytes)
faas-idler-5b457d6dff-kr654     1m           4Mi
gateway-7b4895ff46-rbdfh        18m          22Mi
nats-68b4f7b757-qs4v2           2m           9Mi
queue-worker-7f4f44c9f6-46fgz   0m           5Mi

I think I just need to get my servicemonitor hooked up now and I should be good.

All 17 comments

Hi @wooramkang please can you explain your use-case where there is a need not to include Prometheus in the stack? It is a light-weight component and used to make decisions on scaling amongst other things.

Alex

i didn't ask all the detail about the project i'am in to my boss, but my boss ordered me to remove prometheus from openfass so if you need further detail, i'll ask

Why would your boss ask you to remove Prometheus from OpenFaaS? Without any context this makes little sense.

Derek close: inactive

Hi, I change the question a bit : Is it possible to use an existing Prometheus deployment instead of installing a new one?

Today we are using Prometheus to collect metrics from our K8S cluster and from our instrumented microservices.

I'd like to know if its possible to use our already existing prometheus server ? I supposed that openfaas exposes a /metrics rest endpoint that exposes some counters and gauges. Is it possible to use an existing prometheus server to scrap these openfaas metrics ?

Thank you

Sure your can do that, but it's not going to be a supported configuration. That means you'll need to maintain your own patch and configuration. If that feels like too much work then use our bundled version which is scoped to the openfaas namespace.

Alex

@cabrinoob Did you figure out how reuse an existing Prometheus? Are there instructions for how to do that anywhere?

How complicated would it be to point openfaas at an existing Prometheus Operator controlled Prometheus instance?

You'll have to edit the configuration for your helm chart and obviously your own Prometheus rules.

Gotcha, so I should be able to basically just grab the Prometheus configuration and convert it to work with the operator and be good to go?

Try it out, you'll need to do some of your own edits.

  • Don't install Prometheus in helm chart (or install it then remove it manually)
  • Point the gateway at your new name for Prometheus (include the namespace - i.e. my-operator.my-namespace vs prometheus.openfaas)
  • Update faas-idler and point it at the new operator-generated Prometheus instance
  • Configure AlertManager to use your new instance
  • Add the project-specific configs for AlertManager / Prometheus to your new operator version

Have fun, and don't hesitate to ask questions if you get stuck (after trying it).

@alexellis I got around to spinning this up (along with the faas-idler and operator) and immediately noticed a spike in CPU and memory usage to the Operator Prometheus. I turned everything off and resources started to mellow out right away.

Any ideas for things to look at? I checked the logs but didn't see any obvious errors and the openfaas components resource utilization was fairly low while things were turned on. Here's my manifest.yaml.

Let me know if you'd like me to open a new issue for this.

image: openfaas/faas-idler:0.2.0-arm64 ?

Are you using a low powered arm SoC?

It's a cluster of Pine64's.

You could try using kubectl top node/pod or cadvisor/Weave Scope to try to identify where the bottlenecks are. I had best performance from the Odroid board.

Super weird, I must have run into another issue or something else funky when I spun things up originally. Maybe it was a Prometheus thing? Anyway, I killed the Prometheus pod and then rebooted the node that Prometheus was scheduled to and things seem to be working now and much more stable.

Here are the metrics for the openfaas components.

NAME                            CPU(cores)   MEMORY(bytes)
faas-idler-5b457d6dff-kr654     1m           4Mi
gateway-7b4895ff46-rbdfh        18m          22Mi
nats-68b4f7b757-qs4v2           2m           9Mi
queue-worker-7f4f44c9f6-46fgz   0m           5Mi

I think I just need to get my servicemonitor hooked up now and I should be good.

@jmreicha

Would you be interested in trying a PoC to have OpenFaaS install without Prometheus and for it to use the operator version instead?

@alexellis I would be interested but I don't much time right now to try it out 馃槩

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hotjunfeng picture hotjunfeng  路  5Comments

ohld picture ohld  路  6Comments

edouardkleinhans picture edouardkleinhans  路  8Comments

saad749 picture saad749  路  5Comments

VenkateshSrini picture VenkateshSrini  路  7Comments