Skip to content

Commit

Permalink
Fix pushgateway public URLs (#809)
Browse files Browse the repository at this point in the history
Previously, these were dead dev URLs. This commit publishes the real
URLs so users can see the metrics for themselves.
  • Loading branch information
pawalt authored Jul 10, 2024
1 parent c5787ad commit a0edf26
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions 10_integrations/pushgateway.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# ---
# cmd: ["modal", "deploy", "10_integrations/pushgateway.py"]
# deploy: true
# cmd: ["modal", "serve", "10_integrations/pushgateway.py"]
# ---
# # Publish custom metrics with Prometheus Pushgateway
#
Expand Down Expand Up @@ -134,17 +135,18 @@ def hello(self):
# ```shell
# $ modal deploy pushgateway.py
# ✓ Created objects.
# ├── 🔨 Created mount /Users/example/projects/scratch/pushgateway/pushgateway.py
# ├── 🔨 Created web function run_pushgateway => https://modal-labs-example--client-example-run-pushgateway.modal.run
# ├── 🔨 Created mount
# │ /home/runner/work/modal-examples/modal-examples/10_integrations/pushgateway.py
# ├── 🔨 Created function ExampleClientApplication.*.
# ├── 🔨 Created web function run_pushgateway =>
# │ https://modal-labs--client-example-run-pushgateway.modal.run
# └── 🔨 Created web function ExampleClientApplication.hello =>
# https://modal-labs-example--client-example-exampleclientappli-4c6f64.modal.run (label truncated)
# https://modal-labs--client-example-exampleclientapplication-hello.modal.run
# ✓ App deployed! 🎉
#
# View Deployment: https://modal.com/modal-labs/example/apps/deployed/client-example
# ```
#
# Go to both the client application and Pushgateway URLs to see the metrics being pushed.
# You can now go to both the [client application](https://modal-labs--client-example-exampleclientapplication-hello.modal.run)
# and [Pushgateway](https://modal-labs--client-example-run-pushgateway.modal.run) URLs to see the metrics being pushed.
#
# ## Hooking up Prometheus
#
Expand All @@ -157,7 +159,7 @@ def hello(self):
# - job_name: 'pushgateway'
# honor_labels: true # required so that the instance label is preserved
# static_configs:
# - targets: ['modal-labs-example--client-example-run-pushgateway-dev.modal.run']
# - targets: ['modal-labs--client-example-run-pushgateway.modal.run']
# ```
#
# Note that the target will be different if you have a custom domain set up for the Pushgateway,
Expand Down

0 comments on commit a0edf26

Please sign in to comment.