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

Add additional Prometheus Metrics #6511

Merged
merged 12 commits into from
Apr 28, 2021
Merged

Add additional Prometheus Metrics #6511

merged 12 commits into from
Apr 28, 2021

Conversation

quinqu
Copy link
Contributor

@quinqu quinqu commented Apr 20, 2021

Purpose

Extend Prometheus monitoring with various metrics

Implementation

Created counters for:

  • User logins
  • Heartbeat connections received
  • Heartbeat connections missed
  • Times cluster name was not found
  • Failed logins
  • Failed connecting to node
  • User exceeded their max connection limit
  • Max proxy connection limit
  • Certificate mismatch

Original issue 6238

*This does not contain tracking network usage on each Teleport component, that will be a separate PR

lib/auth/grpcserver.go Show resolved Hide resolved
lib/srv/regular/proxy.go Outdated Show resolved Hide resolved
lib/srv/regular/proxy.go Outdated Show resolved Hide resolved
// MetricUserLoginCount counts user logins
MetricUserLoginCount = "user_login_count"

// MetricHeartbeatConnectionsReceived counts heartbeat connections received by auth
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure on the terminology but perhaps these would be better described as heartbeat messages? Correct me if I am wrong but I think a connection is persistently held and used for heartbeats.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks for pointing this out because i did actually hook at the wrong place for heartbeat connections (in grpcserver.go )-- it should still be counting heartbeat connections but based on where i initally hooked -- i believe it counts messages. i will fix this.

@quinqu quinqu force-pushed the jane/add-prometheus-metrics branch from 6907b37 to b138371 Compare April 22, 2021 16:31
@NajiObeid
Copy link
Contributor

just randomly found this. hope it's ok if I rework this pr a bit to fit #6561 once it's reviewed and merged

@quinqu quinqu marked this pull request as ready for review April 23, 2021 23:56
@russjones
Copy link
Contributor

@fspmarshall @xacrimon Can you two review this PR?

Copy link
Contributor

@fspmarshall fspmarshall left a comment

Choose a reason for hiding this comment

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

Added a couple minor suggestions. LGTM overall.

lib/auth/auth.go Outdated Show resolved Hide resolved
lib/cache/cache.go Outdated Show resolved Hide resolved
@quinqu quinqu requested a review from xacrimon April 27, 2021 17:03
Copy link
Contributor

@xacrimon xacrimon left a comment

Choose a reason for hiding this comment

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

LGTM

@quinqu
Copy link
Contributor Author

quinqu commented Apr 27, 2021

@russjones can you review?

Copy link
Contributor

@russjones russjones left a comment

Choose a reason for hiding this comment

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

Bot.

@quinqu quinqu merged commit 7c9fd8e into master Apr 28, 2021
@quinqu quinqu deleted the jane/add-prometheus-metrics branch April 28, 2021 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants