cmd/bosun: annotate support #1610

Merged
merged 1 commit into from Feb 22, 2016

Projects

None yet

2 participants

@kylebrandt
Member

No description provided.

@kylebrandt kylebrandt cmd/bosun: annotate support
c7a0e31
@kylebrandt
Member

yiwa6ucoka

@captncraig captncraig commented on the diff Feb 22, 2016
cmd/bosun/web/web.go
+
+ // Annotations
+ if schedule.Conf.AnnotateEnabled() {
+ var err error
+ index := schedule.Conf.AnnotateIndex
+ if index == "" {
+ index = "annotate"
+ }
+ annotateBackend, err = backend.NewElastic(schedule.Conf.AnnotateElasticHosts, index)
+ if err != nil {
+ return err
+ }
+ if err := annotateBackend.InitBackend(); err != nil {
+ return err
+ }
+ web.AddRoutes(router, "/api", []backend.Backend{annotateBackend}, false, false)
@captncraig
captncraig Feb 22, 2016 Contributor

I like this way of doing it a lot. What are the last two bool parameters for? Mostly out of curiosity.

@captncraig
captncraig Feb 22, 2016 Contributor

nvm. read the code.

@captncraig
captncraig Feb 22, 2016 Contributor

are we gonna try to get the ui working at some point?

@kylebrandt
kylebrandt Feb 22, 2016 Member

enable the independent UI, and use local dev files when doing so

On Mon, Feb 22, 2016 at 11:56 AM, Craig Peterson notifications@github.com
wrote:

In cmd/bosun/web/web.go
#1610 (comment):

  • // Annotations
  • if schedule.Conf.AnnotateEnabled() {
  •   var err error
    
  •   index := schedule.Conf.AnnotateIndex
    
  •   if index == "" {
    
  •       index = "annotate"
    
  •   }
    
  •   annotateBackend, err = backend.NewElastic(schedule.Conf.AnnotateElasticHosts, index)
    
  •   if err != nil {
    
  •       return err
    
  •   }
    
  •   if err := annotateBackend.InitBackend(); err != nil {
    
  •       return err
    
  •   }
    
  •   web.AddRoutes(router, "/api", []backend.Backend{annotateBackend}, false, false)
    

I like this way of doing it a lot. What are the last two bool parameters
for? Mostly out of curiosity.


Reply to this email directly or view it on GitHub
https://github.com/bosun-monitor/bosun/pull/1610/files#r53654814.

@kylebrandt
kylebrandt Feb 22, 2016 Member

The UI does work, but I don't intend to just import the UI into bosun, Bosun will integrate with it using it's own UI.

@captncraig
captncraig Feb 22, 2016 Contributor

was thinking it might be nice if your ui has direct query/filter/ raw viewing support.

@kylebrandt
kylebrandt Feb 22, 2016 Member

Agreed, approaching this incremently and thinking of it as probably a "preview" feature when we release

@captncraig
Contributor

LGTM

@kylebrandt kylebrandt merged commit c7a0e31 into master Feb 22, 2016

2 checks passed

bosun All checks Passed!
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@captncraig captncraig deleted the annotate branch Feb 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment