-
Notifications
You must be signed in to change notification settings - Fork 53
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 an embedded HTTP server to monitor the service #385
Conversation
6d23a2b
to
98dd457
Compare
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.
I like the feature - a couple notes on the docs and defaults, nothing major though.
docs/user-guide/consuming.rst
Outdated
monitor its state. You can configure the port in the configuration file under | ||
the ``[monitoring]`` section, with ``address`` and ``port``. | ||
The default address is empty, which means that the monitoring server will | ||
listen on all interfaces. The default port is ``0``, which means that the |
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 a slightly surprising behavior since 0 usually means "bind to a free port" (try, for example, nc -l ::1 0
and then see the port with ss -plnt
).
Maybe just have the feature off if the section doesn't exist in the configuration and require both values to be set (or pick static defaults) if the section does exit.
fedora_messaging/config.py
Outdated
|
||
{ | ||
'address': '', # listen on all interfaces | ||
'port': 8070, |
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 doesn't line up with the documentation elsewhere and the code
98dd457
to
0895c7f
Compare
) | ||
|
||
# Don't check the reject action or the message will be put back in the queue and loop forever | ||
# Don't check a generic processing failure because it stops the consumer instantly and we can't look |
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.
I guess it could log the final stats on exit, if available, and then you could inspect the log, but whether you bother with all that is totally up to you.
See the "Monitoring" section in : https://fedora-messaging.readthedocs.io/en/develop/user-guide/consuming.html Fixes: fedora-infra#380 Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
0895c7f
to
efa8240
Compare
This changeset adds an embedded HTTP server to monitor consumers and producers, and get statistics about activity.
Fixes: #380