Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Just seein php_version as a metric version #18

Open
cgomm opened this issue Apr 22, 2023 · 3 comments
Open

Just seein php_version as a metric version #18

cgomm opened this issue Apr 22, 2023 · 3 comments

Comments

@cgomm
Copy link

cgomm commented Apr 22, 2023

I installed your plugin by first download the current master, made composer update -o. Than I zipped the hole folder and uploaded it by using the interface of WP.

Did I reproduce anything of your documentation wrong?

I just don't see any other metric than this:
image

I hope, you can help me.


Meta:
WP Version: 6.2


@cgomm
Copy link
Author

cgomm commented Apr 22, 2023

Okay, as far as I see, a admin has to define define('PROMETHEUS_METRICS_FOR_WP_DISABLE_CACHE', 'true') within the wp-config.php, I would add this to the readme?

@Mte90
Copy link
Member

Mte90 commented Apr 23, 2023

That constant disable the transient that cache daily the metrics

if ($metrics && (!defined('PROMETHEUS_METRICS_FOR_WP_DISABLE_CACHE') || !PROMETHEUS_METRICS_FOR_WP_DISABLE_CACHE)) {
and regenerate everything at every call.

@scrobbleme
Copy link
Collaborator

scrobbleme commented Nov 15, 2023

@cgomm As it is only possible to send numeric values, I've added the actual PHP Version as a "version" label... The Prometheus Client library has this as default metric included.

But it would be a good idea to just send the PHP_VERSION_ID as the actual value.
https://www.php.net/manual/de/reserved.constants.php#reserved.constants.core

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants