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

Export a metrics endpoint for monitoring #325

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pegerto
Copy link

@pegerto pegerto commented Sep 20, 2017

I find difficult to understand how logspout is behaving, one important metric for me is the rate of the sent msg per container. So we can identify peaks on the clusters easily but many other metrics can be really useful.

This PR expose a metric endpoint for prometheus that I can use to monitor logspout across my k8s cluster.

Feedback will be welcome.

@pegerto
Copy link
Author

pegerto commented Sep 20, 2017

I see the CI issue:

 go list ./... | egrep -v 'custom|vendor'

Will install the package dependencies for the master branch, prometheus as a dependency, so its is a bit chicken and egg problem.

func init() {
pumpMsgSend = prometheus.NewCounterVec(
prometheus.CounterOpts{
Name: "pump_msg_send",

Choose a reason for hiding this comment

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

All prometheus counter metrics should end in _total. Personally would call it logstash_sent_messages_total or logstash_messages_sent_total.

@discordianfish
Copy link

@progrium is this something you are willing to merge in general?

I can help reviving this PR. There is probably a better way than initializing all this in init().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants