Problem with probe based metrics || my misunderstanding? #368
-
Hi everyone, I would like to start using cloudprober in GCP environment and since I am new to it, I started with the simplest setup: Downloaded cloudprober-v0.12.6-linux-x86_64 from https://github.com/cloudprober/cloudprober/releases on Debian GNU/Linux 11 VM and created the simplest configuration: cat simple.cfg probe { Then started the cloudprober as root: I would expect to see in the output some metrics from the defined probe, but I only see the sysvars metrics. curl -s http://localhost:9313/metrics| grep -v '^#' On the GCP side, in the same project, I would expect the metrics like: The service account on the VM has the roles 'roles/logging.logWriter' and 'roles/monitoring.metricWriter' (even tried 'roles/monitoring.admin'). No error messages are shown. Most probably I misunderstand something, so any hints / suggestions are highly appreciated. Best regards, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Yeah, so it's not really using the config file in this case. You need to provide the config file using the flag
Ref: https://cloudprober.org/docs/overview/getting-started/#configuration However Cloudprober should result in an error if non-flag argument is given to avoid confusion like this. I'll file a follow up issue. |
Beta Was this translation helpful? Give feedback.
https://cloudprober.org/docs/surfacers/overview/ sheds some light on this.
If you specify any surfacer in your config, only that surfacer will be enabled. So if you want both, StackDriver and Prometheus (/metrics thing), you'll need to add the following to your config stanza:
and if you want to see metrics on stdout as well, add file surfacer too: