Skip to content

Export a metrics endpoint for monitoring - #325

Open
pegerto wants to merge 1 commit into
gliderlabs:masterfrom
pegerto:master
Open

Export a metrics endpoint for monitoring#325
pegerto wants to merge 1 commit into
gliderlabs:masterfrom
pegerto:master

Conversation

@pegerto

@pegerto pegerto commented Sep 20, 2017

Copy link
Copy Markdown

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

pegerto commented Sep 20, 2017

Copy link
Copy Markdown
Author

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.

Comment thread router/metrics.go
func init() {
pumpMsgSend = prometheus.NewCounterVec(
prometheus.CounterOpts{
Name: "pump_msg_send",

Copy link
Copy Markdown

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
Copy Markdown

@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.

3 participants