这是indexloc提供的服务,不要输入任何密码
Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants