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: mssql.agent.* for monitoring SQL Agent jobs #1855

Merged
merged 1 commit into from
Aug 11, 2016

Conversation

gbrayut
Copy link
Contributor

@gbrayut gbrayut commented Aug 8, 2016

No description provided.

@gbrayut
Copy link
Contributor Author

gbrayut commented Aug 8, 2016

Ready for code review. Testing on ny-devbosun (see http://goo.gl/5GPH57 )

@gbrayut
Copy link
Contributor Author

gbrayut commented Aug 10, 2016

one of the metrics had a wrong type (WMI said it was a counter but really was a gauge). Testing again overnight and should be ready to merge tomorrow if there are no issues.

label := "mssqlserver"
if w.Name != `SQLSERVERAGENT` {
q = instanceAgentWMIQuery(w.Name, q)
label = strings.ToLower(w.Name[8:len(w.Name)])
Copy link
Member

Choose a reason for hiding this comment

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

Do you know that w.Name can not be shorter than 8?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, it is either SQLSERVERAGENT or SQLAgent$+Instance Name

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah does look like there is an off by one error though... should be 9. I'll wrap it in a length check too, since WMI sometimes goes crazy and returns default values like 0 / ""

@gbrayut gbrayut changed the title cmd/scollector: mssql.agent.jobs for monitoring SQL Agent jobs cmd/scollector: mssql.agent.* for monitoring SQL Agent jobs Aug 11, 2016
@gbrayut gbrayut merged commit 895405b into master Aug 11, 2016
@gbrayut gbrayut deleted the mssql_agent_jobs branch August 11, 2016 20:48
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.

2 participants