Skip to content

Add central management telemetry#8671

Merged
exekias merged 2 commits intoelastic:masterfrom
exekias:mgmt-telemetry
Oct 23, 2018
Merged

Add central management telemetry#8671
exekias merged 2 commits intoelastic:masterfrom
exekias:mgmt-telemetry

Conversation

@exekias
Copy link
Copy Markdown
Contributor

@exekias exekias commented Oct 21, 2018

This will report central management enabled status

closes #7979

This will report central management enabled status
@exekias exekias changed the title Add central management telmetry Add central management telemetry Oct 21, 2018
@ruflin
Copy link
Copy Markdown
Contributor

ruflin commented Oct 22, 2018

@exekias This will need backport?

@chrisronline I wonder if we should show this info somehow in monitoring?

3 similar comments
@ruflin
Copy link
Copy Markdown
Contributor

ruflin commented Oct 22, 2018

@exekias This will need backport?

@chrisronline I wonder if we should show this info somehow in monitoring?

@ruflin
Copy link
Copy Markdown
Contributor

ruflin commented Oct 22, 2018

@exekias This will need backport?

@chrisronline I wonder if we should show this info somehow in monitoring?

@ruflin
Copy link
Copy Markdown
Contributor

ruflin commented Oct 22, 2018

@exekias This will need backport?

@chrisronline I wonder if we should show this info somehow in monitoring?


// Report central management state
mgmt := monitoring.GetNamespace("state").GetRegistry().NewRegistry("management")
monitoring.NewString(mgmt, "enabled").Set(strconv.FormatBool(b.ConfigManager.Enabled()))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should be a bool and not a string. Problem is I don't think we support Bool yet :-(


// Report central management state
mgmt := monitoring.GetNamespace("state").GetRegistry().NewRegistry("management")
monitoring.NewString(mgmt, "enabled").Set(strconv.FormatBool(b.ConfigManager.Enabled()))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should be a bool and not a string. Problem is I don't think we support Bool yet :-(


// Report central management state
mgmt := monitoring.GetNamespace("state").GetRegistry().NewRegistry("management")
monitoring.NewString(mgmt, "enabled").Set(strconv.FormatBool(b.ConfigManager.Enabled()))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should be a bool and not a string. Problem is I don't think we support Bool yet :-(

@ruflin
Copy link
Copy Markdown
Contributor

ruflin commented Oct 22, 2018

Will this need a backport?

@chrisronline Perhaps we could should this somehow in the monitoring UI?

@exekias exekias added the needs_backport PR is waiting to be backported to other branches. label Oct 22, 2018
@chrisronline
Copy link
Copy Markdown
Contributor

@ruflin Ideally, this data is reported through monitoring documents (instead of an api) so we can support multi-cluster setups, so as long as it's reported there, we should be able to show it.

@exekias
Copy link
Copy Markdown
Contributor Author

exekias commented Oct 22, 2018

Thank you for your changes @ruflin, as PR author I cannot approve them, but I'm ok with this going in 😄

@exekias exekias added the v6.5.0 label Oct 22, 2018

func (v *Bool) Get() bool { return v.f.Load() }
func (v *Bool) Set(value bool) { v.f.Store(value) }
func (v *Bool) Visit(_ Mode, vs Visitor) { vs.OnBool(v.Get()) }
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

exported method Bool.Visit should have comment or be unexported

}

func (v *Bool) Get() bool { return v.f.Load() }
func (v *Bool) Set(value bool) { v.f.Store(value) }
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

exported method Bool.Set should have comment or be unexported

return v
}

func (v *Bool) Get() bool { return v.f.Load() }
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

exported method Bool.Get should have comment or be unexported

Copy link
Copy Markdown
Contributor

@ruflin ruflin left a comment

Choose a reason for hiding this comment

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

LGTM.

Ignoring hound as these are one liners.

@chrisronline The data will be reported as soon as this PR is merged.

@exekias exekias merged commit 96e484c into elastic:master Oct 23, 2018
exekias added a commit to exekias/beats that referenced this pull request Oct 23, 2018
* Add central management telmetry

This will report central management enabled status

(cherry picked from commit 96e484c)
@exekias exekias removed the needs_backport PR is waiting to be backported to other branches. label Oct 23, 2018
exekias added a commit that referenced this pull request Oct 23, 2018
* Add central management telmetry

This will report central management enabled status

(cherry picked from commit 96e484c)
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.

Basic telemetry for Beats central configuration

4 participants