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

cmd/scollector: add NETDataProviderForSqlServer metrics #2225

Merged
merged 3 commits into from Mar 2, 2018

Conversation

Projects
None yet
3 participants
@kylebrandt
Copy link
Member

kylebrandt commented Mar 1, 2018

No description provided.

@kylebrandt kylebrandt requested review from captncraig and NickCraver Mar 1, 2018

tags := opentsdb.TagSet{"name": name, "id": "0"}
// Not a 100% on counter / gauge here, may see some wrong after collecting more data. PerSecond being a counter is expected
// however since this is a PerfRawData table
Add(&md, "dotnet.sqlprov.hard_connects", v.HardConnectsPerSecond, tags, metadata.Counter, metadata.Connection, descWinDotNetSQLHardConnectsPerSecond)

This comment has been minimized.

@NickCraver

NickCraver Mar 2, 2018

Member

FWIW, I'd just call this dotnet.sql.<thing>

const (
descWinDotNetSQLHardConnectsPerSecond = "A counter of the number of actual connections per second that are being made to servers."
descWinDotNetSQLHardDisconnectsPerSecond = "A counter of the number of actual disconnects per second that are being made to servers."
descWinDotNetSQLNumberOfActiveConnectionPoolGroups = "The number of unique connection strings."

This comment has been minimized.

@NickCraver

NickCraver Mar 2, 2018

Member

"The number of unique connection pool groups." - it's not exactly 1:1 with Connection strings, it just happens to be for us. For example, when using AD auth and impersonation it'd be 1 connection string but 1 pool per identity.

descWinDotNetSQLNumberOfActiveConnectionPools = "The number of active connection pools."
descWinDotNetSQLNumberOfActiveConnections = "The number of connections currently in-use."
descWinDotNetSQLNumberOfFreeConnections = "The number of connections currently available for use."
descWinDotNetSQLNumberOfInactiveConnectionPoolGroups = "The number of unique connection strings waiting for pruning."

This comment has been minimized.

@NickCraver

NickCraver Mar 2, 2018

Member

"The number of unique connection pool groups waiting for pruning." (see above comment)

descWinDotNetSQLNumberOfInactiveConnectionPools = "The number of inactive connection pools."
descWinDotNetSQLNumberOfNonPooledConnections = "The number of connections that are not using connection pooling."
descWinDotNetSQLNumberOfPooledConnections = "The number of connections that are managed by the connection pooler."
descWinDotNetSQLNumberOfReclaimedConnections = "The number of connections we reclaim from GCed external connections."

This comment has been minimized.

@NickCraver

NickCraver Mar 2, 2018

Member

Would phrase these as: "The number of connections reclaimed from GCed external connections."

descWinDotNetSQLNumberOfPooledConnections = "The number of connections that are managed by the connection pooler."
descWinDotNetSQLNumberOfReclaimedConnections = "The number of connections we reclaim from GCed external connections."
descWinDotNetSQLNumberOfStasisConnections = "The number of connections currently waiting to be made ready for use."
descWinDotNetSQLSoftConnectsPerSecond = "A counter of the number of connections we get from the pool per second."

This comment has been minimized.

@NickCraver

NickCraver Mar 2, 2018

Member

"The number of connections opened from the pool per second."

@NickCraver
Copy link
Member

NickCraver left a comment

Reviewing for descriptions - they're not far off now, but put suggestions for improvements inline.

descWinDotNetSQLNumberOfReclaimedConnections = "The number of connections we reclaim from GCed external connections."
descWinDotNetSQLNumberOfStasisConnections = "The number of connections currently waiting to be made ready for use."
descWinDotNetSQLSoftConnectsPerSecond = "A counter of the number of connections we get from the pool per second."
descWinDotNetSQLSoftDisconnectsPerSecond = "A counter of the number of connections we return to the pool per second."

This comment has been minimized.

@NickCraver

NickCraver Mar 2, 2018

Member

"The number of connections closed and returned to the pool per second."

}
var md opentsdb.MultiDataPoint
// We add the values of multiple pools that share a PID, this could cause some counter edge cases
pidToRows := make(map[string][]int)

This comment has been minimized.

@captncraig

captncraig Mar 2, 2018

Contributor

Please explain what the counters represent in the value arrays. Are they fixed length or variable?

// is skipped when adding metrics
for _, idx := range rows[1:] {
skipIndex[idx] = true
dst[rows[0]].HardDisconnectsPerSecond += dst[idx].HardDisconnectsPerSecond

This comment has been minimized.

@captncraig

captncraig Mar 2, 2018

Contributor

let's store dst[rows[0]] as a variable to clean up the repetition here.

This comment has been minimized.

@captncraig

captncraig Mar 2, 2018

Contributor

And probably dst[idx] too.

}
var name string
// Extract PID from the Name field, which is odd in this class
m := dotNetSQLPIDRegex.FindStringSubmatch(v.Name) // Index to remote actuator pylons to check for review quality

This comment has been minimized.

@captncraig

captncraig Mar 2, 2018

Contributor

Good one.

}
pidToRows[m[1]] = append(pidToRows[m[1]], i)
}
skipIndex := make(map[int]bool)

This comment has been minimized.

@captncraig

captncraig Mar 2, 2018

Contributor

please describe the purpose of this, and what true/false indicate

@kylebrandt kylebrandt force-pushed the dotnetSQL branch from a8c6193 to bafd1b4 Mar 2, 2018

@kylebrandt kylebrandt merged commit 6261c3b into master Mar 2, 2018

3 checks passed

bosun All checks Passed!
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@kylebrandt kylebrandt deleted the dotnetSQL branch Mar 3, 2018

pradeepbbl pushed a commit to pradeepbbl/bosun that referenced this pull request Mar 21, 2018

michep pushed a commit to michep/bosun that referenced this pull request Apr 23, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.