Skip to content

SBX-Added servicemonitor and services to scrape alastria metrics correctly#1648

Open
alejandro-nieto-git wants to merge 3 commits into
feature/monitoringfrom
SBX-Add-servicemonitor-alastria-grafana-kube-prom
Open

SBX-Added servicemonitor and services to scrape alastria metrics correctly#1648
alejandro-nieto-git wants to merge 3 commits into
feature/monitoringfrom
SBX-Add-servicemonitor-alastria-grafana-kube-prom

Conversation

@alejandro-nieto-git
Copy link
Copy Markdown
Contributor

Added service monitor, services and endpoints in order to scrape metrics correctly and populate alastria t network and b network grafana dashboards. I think it should work as is but please take a look and correct me if some file should go to another folder in order for ArgoCD to pick it up correctly @groundnuty

Regards.

@alejandro-nieto-git alejandro-nieto-git changed the title Added servicemonitor and services to scrape alastria metrics correctly SBX-Added servicemonitor and services to scrape alastria metrics correctly Sep 26, 2025
@groundnuty
Copy link
Copy Markdown
Contributor

Why do you think that Helm templates will work here?
This is the definition of the argocd app for kube-prom stack https://github.com/DOME-Marketplace/dome-gitops/blob/main/applications_prd/monitoring/kube-prometheus-stack.yaml

@alejandro-nieto-git alejandro-nieto-git force-pushed the SBX-Add-servicemonitor-alastria-grafana-kube-prom branch from 648cdf0 to 8039372 Compare September 26, 2025 11:01
@alejandro-nieto-git
Copy link
Copy Markdown
Contributor Author

Why do you think that Helm templates will work here? This is the definition of the argocd app for kube-prom stack https://github.com/DOME-Marketplace/dome-gitops/blob/main/applications_prd/monitoring/kube-prometheus-stack.yaml

Thank you! just wanted to keep it as abstract as possible and did not realise I could not put the templates there. I substituted all the values and now it should be ready to go.

@groundnuty
Copy link
Copy Markdown
Contributor

ok, but this will still not work, it's not how argo/helm works here at all :-)
In order to do what you want properly, you need to take all the files you want to put into ionos_sbx/kube-prometheus-stack and add them to the helm chart of the application you want to monitor, and then then they can be helm templates.
I can't find alastria helm chart in our gitops repo. Which app/chart it is?

On the other hand, the files you want to put in ionos_common/grafana-dashboards are ok, as this is the designated place to put dashboards.

@alejandro-nieto-git
Copy link
Copy Markdown
Contributor Author

ok, but this will still not work, it's not how argo/helm works here at all :-) In order to do what you want properly, you need to take all the files you want to put into ionos_sbx/kube-prometheus-stack and add them to the helm chart of the application you want to monitor, and then then they can be helm templates. I can't find alastria helm chart in our gitops repo. Which app/chart it is?

On the other hand, the files you want to put in ionos_common/grafana-dashboards are ok, as this is the designated place to put dashboards.

The thing is that we don't want to monitor an internal application deployed with a helm chart since the blockchain nodes are completely decentralised, so there is no application to act as an "umbrella" to hold and fill the templates. This is aiming to monitor alastria t and b network health so therefore it needs to monitor those external nodes.

@alejandro-nieto-git
Copy link
Copy Markdown
Contributor Author

In local I used the kube-prometheus-stack helm chart with an umbrella chart to add the templates to it and it works but I don't think it is appropriate to do it here.

@alejandro-nieto-git
Copy link
Copy Markdown
Contributor Author

ok, but this will still not work, it's not how argo/helm works here at all :-) In order to do what you want properly, you need to take all the files you want to put into ionos_sbx/kube-prometheus-stack and add them to the helm chart of the application you want to monitor, and then then they can be helm templates. I can't find alastria helm chart in our gitops repo. Which app/chart it is?
On the other hand, the files you want to put in ionos_common/grafana-dashboards are ok, as this is the designated place to put dashboards.

The thing is that we don't want to monitor an internal application deployed with a helm chart since the blockchain nodes are completely decentralised, so there is no application to act as an "umbrella" to hold and fill the templates. This is aiming to monitor alastria t and b network health so therefore it needs to monitor those external nodes.

I suppose that adding the new needed yaml files to:

repoURL: https://github.com/DOME-Marketplace/dome-gitops
    targetRevision: feature/monitoring
    path: ionos_sbx/kube-prometheus-stack
    directory:
      include: '{kube-prometheus-stack-sso-secret.yaml,kube-prometheus-stack-discord-webhook-infrastructure-secret.yaml,standard-cluster-monitoring-recording-rules.yaml,onzack-namespace-monitoring-recording-rules.yaml}'

should work, and be the best approach but I'm open to other alternatives.

…s to the argocd application to include new manifests for alastria monitoring.
@alejandro-nieto-git
Copy link
Copy Markdown
Contributor Author

just uploaded what I was talking about @groundnuty

@@ -22,7 +22,7 @@ spec:
targetRevision: feature/monitoring
path: ionos_sbx/kube-prometheus-stack
directory:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please squash the commits.

@alejandro-nieto-git
Copy link
Copy Markdown
Contributor Author

This PR was pending to be refactored to be aligned to a more standard way suggested by @groundnuty. Since this is aiming to monitor nodes of the alastria network just to see that the network is working properly directly from DOME Grafana but it is also in Alastria Grafana, and given the dates we are in we either go ahead or drop this PR for now and keep this in a separate branch. We can also go for the refactor if we want to have this feature added "by the book" but again, maybe given the dates the other approaches can be better @bialask-daiteap. Let me hear your thoughts and we will act accordingly.

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

Successfully merging this pull request may close these issues.

3 participants