CodeAtCode/Prometheus-Metrics-in-WordPress

Return WordPress version as _info metric

Closed this issue · 4 comments

C-Duv commented

Hello,

Could the plugin return the WordPress version as a metric?

This is something various exporters do via an _info metric:

The Prometheus Proxmox VE Exporter:

pve_version_info{instance="pve.example.com:9221",job="pve",release="7.3",repoid="d69b70d4",version="7.3-4"} 1

The Node exporter:

go_info{instance="foo.example.com:9100",job="node",version="go1.11.6"} 1

I've also done it on self-made applications:

mycompany_app_info{instance="app.example.com:443",job="app",version="42",build="ab2d3ef2ad62"} 1

The wp_info could be used:

wp_info{host="https://wp.example.com",version="6.1.1"} 1

If it's OK with you I can open a PR for this.

Mte90 commented

Yes just do a PR :-)

C-Duv commented

Should I target master or v3.0 branch?

I don't see any CONTRIBUTING file so I'll try to mimic what I can from existing code.

Mte90 commented

use the 3.0 (that I didn't noticed that exist, the other maintainer added it in october).
We will merge the 3.0 on master after your pr.

C-Duv commented

PR opened (#16) but it looks like it need some more work to make it work.

I'll give it another shot this week-end...