-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 example for metrics and dashboard #2232
Conversation
docker compose up | ||
``` | ||
|
||
Go to http://localhost:3000/dashboards to see the dashboards. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing newline at EOF
RUN go mod init example.com/m/v2 | ||
RUN go mod tidy | ||
RUN go build main.go | ||
ENTRYPOINT [ "/app/main" ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing newline at EOF
# Grafana doesn't let us do this in provisioning, so we do it ourselves. | ||
RUN sed -i 's/${DS_PROMETHEUS}/prometheusuid/g' /etc/grafana/dashboards/*/*.json | ||
RUN cat /etc/grafana/dashboards/swarm/swarm.json | ||
USER grafana |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing newline at EOF
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🎉
I've added minor comments. Feel free to ignore them if you think they're not relevant
// Make a bunch of clients that all ping the server at various times | ||
wg := sync.WaitGroup{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*server initiate a connection with some clients.
wg.Add(1) | ||
go func(i int) { | ||
defer wg.Done() | ||
time.Sleep(time.Duration(i%100) * 100 * time.Millisecond) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we make this slightly longer? this example is complete by the time I open the grafana window.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the prometheus scrape interval is 1m
type: prometheus | ||
# Access mode - proxy (server in the UI) or direct (browser in the UI). | ||
access: proxy | ||
uid: "prometheusuid" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is neat! 👍
Deferring this work until after ipfs thing |
@MarcoPolo What's the status of this PR? It would be nice to get this merged before the next release. |
@MarcoPolo Friendly ping. Can we push this PR across the finish line? |
10809a7
to
f6d36b4
Compare
Pushed changes, this is good to merge after CI passes. |
merged based on this message, mainly in service of libp2p/blog#77 |
This reverts commit 22c45a1.
This came up after a call with @Giulio2002 when I discussed they could set up these dashboards for some more observability and to help debug #2202 .
Note for reviewer: Could you please try this and make sure it works for you as well (follow instructions in README.md)