Comments (6)
@AbdelrhmanHamouda for vis
from locust-k8s-operator.
Hi @SkylerLutz,
Thank you for showing interest in the project and actively participating. It has been a while I want to write a nice documentation on this part of the operator but time is always eluding me on that front. I may use this issue as a reason to do so.
However, in a nutshell;
- Every running test get an automatically configured locust exporter container. This is a very stable and robust Go based project. In our production environment where we are using the operator with thousands of tests, no issues where never encountered with this exporter.
- The container exposes a Prometheus compatible metrics that can be scrapped by any Prometheus server and visualised on any metrics provider (e.g. Grafana, NewRelic, Data Dog, etc...)
One of the nice things about this approach, is that it is a plug and play with any observability solution already configured in your cluster for other services. So nothing special needs to be done for this. once a test runs and the observability solution is configured, it everything becomes automatically available to build a dashboard or query the data.
I know it is not super detailed answer, but does that satisfy your question?
from locust-k8s-operator.
So if you have prometheus and grafana running in you k8s cluster what more do you need to do in order to get data into a grafana dashboard? I've imported the locust-exporter dashboard, but it just shows no data after a test job has run, so presumably there's more configuration necessary...
from locust-k8s-operator.
You at least need some servicemonitor
or podmonitor
to make Prometheus scrape the metrics. But the service lacks labels, which is the usual approach to configure the selector
in the servicemonitor
.
@AbdelrhmanHamouda How do you scrape the metrics? Do you have some example config you can share?
from locust-k8s-operator.
Hello all, thank you for your extreme patience with me on this. I'll provide a detailed answer in a future (very very soon) comment. But in a nutshell, for us we have the below setup that ranwith NewRelic and currently running with Datadog with 100% reliability.
General idea (very standard appraoch):
- Set Prometheus agent/server to scrape pods with
prometheus.io/scrape: true
- Instruct Prometheus to target correct
path
&port
with annotations that Prometheus expects and look forprometheus.io/path:
&prometheus.io/port
-> all of these, the operator already set for you
Newrelic setup:
- We used a standard Prometheus agent that was configured to send its scraped metrics to Newrelic. The configuration was exactly as mentioned in the "General idea" section above.
Datadog setup:
- For datadog, they gave a property scrapper "part of their datadog agent" that basically accepts "Prometheus like" config which we configured to exactly the same thing => target pods with
prometheus.io/scrape: true
and useprometheus.io/path:
&prometheus.io/port
to know which port and endpoint to hit on that pod.
We don't setup anything on the k8s service level
from locust-k8s-operator.
We are using kube-prometheus-stack
and it is by default configured to use servicemonitors
or podmonitors
to discover additional targets, it doesn't discover based on annotations. I can't change the prometheus configuration because this is common infra code from our DevOps team.
An additional option in the operator would be nice allowing to create a servicemonitor
. But the service labels would be more than enough for the start so people can create their own servicemonitor
.
As far as I am aware servicemonitors
are the standard way, so I think lots of people would benefit from this integration.
from locust-k8s-operator.
Related Issues (20)
- [Custom request] create a stale workflow to take care of stale issues
- [BUG] Jib version 3.3.2 crashing gradle build
- [Custom request] Quality of life change: Investigate the use of Github dependency submission API
- [Custom request] Quality of life change: Use Google's release-please HOT 1
- [Feature request] Customizable "locust_exporter" Image HOT 5
- [Feature request] update to gradle 8
- Update to JOSDK v 4.4.1
- Set CPU and Memory resources for the metrics exporter container HOT 6
- [Feature request] Make it possible to inject kubernetes secrets into the locust worker pods HOT 3
- Ability to add labels to created resources[Feature request] HOT 1
- [BUG] Fix double invocation of github actions on PRs
- [Custom request] investigate and migrate from fabric8 mock server to jenvtest
- Java locustfile? HOT 5
- Add annotation/labels on service HOT 3
- [Custom request] Promethues metric locust_running is always zero HOT 3
- Test results logged by locust master are truncated HOT 5
- [Feature request] Support imagePullSecrets in helm chart
- Disable CPU Limits for workers HOT 1
- [Feature request] Download HTML report HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from locust-k8s-operator.