-
Notifications
You must be signed in to change notification settings - Fork 61
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
Add metrics endpoint in prometheus format #221
Comments
For anyone coming across this: We've been using the prometheus communities' JSON exporter in the meantime. Here's the configuration we're running: We're using https://github.com/prometheus-community/helm-charts/tree/main/charts/prometheus-json-exporter in version The values we have configured in the values fileserviceMonitor:
enabled: true
targets:
- name: renovate-ce
# Replace "the-endpoint-for-renovate" with the hostname for the renovate-ce service
url: http://the-endpoint-for-renovate/api/status
module: renovate
configuration:
config: |
---
modules:
renovate:
http_client_config:
authorization:
credentials_file: /credentials/renovate/renovate-ce.txt
metrics:
- name: renovate_organization_count
valuetype: gauge
path: "{ .app.organizationCount }"
help: The number of organizations known to renovate
- name: renovate_repository_count
valuetype: gauge
path: "{ .app.repositoryCount }"
help: The number of repositories known to renovate
- name: renovate_jobs_processed
valuetype: counter
path: "{ .jobs.history.processed }"
help: The number of jobs processed since the instance has started
- name: renovate_queue_size
valuetype: gauge
path: "{ .jobs.queue.size }"
help: The number of jobs currently in the queue
additionalVolumes:
- name: credentials-renovate-ce
secret:
secretName: credentials-renovate-ce
additionalVolumeMounts:
- name: credentials-renovate-ce
mountPath: /credentials/renovate/renovate-ce.txt
subPath: mendRnvServerApiSecret The secretapiVersion: v1
kind: Secret
metadata:
name: credentials-renovate-ce
namespace: kube-prometheus-stack
type: Opaque
data:
# This is the same as "mendRnvServerApiSecret" in the existingSecret configured in the renovate-ce values file at renovate.existingSecret` since that is the Bearer token.
mendRnvServerApiSecret: Tm8gY2hhbmNlLCBJIHJlcGxhY2VkIHRoaXMgYmVmb3JlIHBhc3RpbmcgaXQ= |
@nabeelsaabna Release 8.1.0 has a changelog entry
Could you add documentation for that, please? I tried a few paths, but couldn't find it ( |
Its not enabled by default and you have to set |
No worries, thanks for the update! |
@morremeyer Thanks for the quick catch |
@nabeelsaabna Thanks, just tested and it works. I noticed that the endpoint is available without authentication, is that on purpose? If yes, I think it would be great to have an option to not have it included in the Ingress resource, which currently exposes Maybe the Ingress could just expose For everyone: Once you set |
Agree, Ingress should not expose everything by default. We now have:
|
I think it makes sense to have all of these as separate This way, everyone can configure it to the needs of their setup. |
Description
The renovate on-prem application only exposes a
/status
endpoint that can be used to see what is the current state of the application, however, it is difficult to parse and send the data to a monitoring system. It has become a standard for Kubernetes open-source applications to expose a/metrics
endpoint in the Prometheus format, so the community can monitor the application successfully and have confidence in their deployment.Motivation
As a renovate on-prem user, I want a way to monitor the applications, investigate issues and receive alerts if my on-prem deployment is not behaving properly.
Implementation
/metrics
endpoint with Prometheus metricsExample
Here are some of the metrics that could be helpful
related to #220
The text was updated successfully, but these errors were encountered: