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

feat(prometheus): Prometheus Scraper service #1838

Merged
merged 12 commits into from
Jul 3, 2024

Conversation

24kushang
Copy link
Contributor

Added Prometheus Container for Metrics Collection

Summary:

  • Introduced a Prometheus container to the Docker Compose setup.
  • The Prometheus configuration is managed via an external prometheus.yml file.

Details:

  • The configuration ensures the Prometheus container starts with docker-compose -f docker-compose.yml -f prometheus.yml up.
  • Prometheus fetches its configuration from prometheus/prometheus.yml, which includes scrape configurations defining targets and the service name.

Next Steps:

  • The initial configuration sets up basic scrape targets and service names.
  • Future updates will enhance the Prometheus configuration with additional targets and detailed metrics.

Testing:

  • Ensure Prometheus starts correctly with the specified configurations.
  • Verify that metrics are being scraped and displayed in the Prometheus web interface accessible at http://localhost:9090.

Contributor - @24kushang

24kushang and others added 7 commits June 23, 2024 01:11
Changed according to the PR review

- added the PROSODY_METRICS_ALLOWED_CIDR variable
- arranged the variable in alphabetic order
Added 2 environment variable for prosody metrics collection

- PROSODY_ENABLE_METRICS
- PROSODY_METRICS_ALLOWED_CIDR
static_configs:
- targets: ["jvb:8080"]

- job_name: "prometheus-jicofo"
Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason to have separate jobs for each target?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This makes separation of concern and better individual service configuration. Suppose, we want to add authorization/authentication for one of the components or change the scrape_interval then it would be easier to maintain.

We can have a single job named prometheus and have all the targets listed in there. Then we are required to create a common config with all the features listed for each and every service.


Whatever way we choose, it should be best for future use and should have ease of modification.

prometheus.yml Outdated
Copy link

Choose a reason for hiding this comment

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

Allow setting restart policy from outside like using an env variable - see etherpad.yml - I would go with on-failure:2 by default https://docs.docker.com/config/containers/start-containers-automatically/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated the restart policy

Choose a reason for hiding this comment

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

I cannot see it in code

@@ -0,0 +1,9 @@
scrape_configs:
# - job_name: "prometheus"

Choose a reason for hiding this comment

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

why is the code commented?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry I pushed the code that I was testing. Would change it and push it again.

@aaronkvanmeerten aaronkvanmeerten merged commit 0f7be54 into jitsi:master Jul 3, 2024
1 check passed
saghul added a commit that referenced this pull request Jul 3, 2024
* 29a4523 feat(jvb) add JVB_CC_TRUST_BWE environment variable
* 0f7be54 feat(prometheus): Prometheus container and basic scraping configuration  (#1838)
* 9c87bba feat(jitsi-meet): added grafana loki and otel integration for log analysis (#1844)
* fcb90ba fix(web): whiteboard config.js syntax error (#1851)
* 811518b misc: working on unstable
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.

4 participants