Commit e420e1b8 authored by ale's avatar ale

Fix link to Kibana http logs for a vhost

parent 34e9aa61
Pipeline #1138 passed with stages
in 48 seconds
......@@ -5,6 +5,12 @@ import (
"sort"
)
// Constants for Kibana dashboard IDs.
const (
kibanaWebDashboardID = "AV9wDlJSJ4s36xPImL8m"
kibanaSyslogDashboardID = "dc753c20-5616-11e8-b43b-036ee7010221"
)
type MonitoringEndpoint struct {
JobName string `yaml:"job_name"`
Port int `yaml:"port"`
......@@ -37,7 +43,15 @@ func (p PublicEndpoint) URL() string {
}
func (p PublicEndpoint) LogsURL() string {
return fmt.Sprintf("https://logs.%s/kibana/bla/bla/?vhost=%s", config.PublicDomain, p.FQDN())
// Woah.
return fmt.Sprintf(
"https://logs.%s/app/kibana#/dashboard/%s?_g=(refreshInterval:(display:Off,pause:!f,value:0),time:(from:now-12h,mode:quick,to:now))&_a=(description:'',filters:!(('$state':(store:appState),meta:(alias:!n,disabled:!f,index:da92a2d0-55fd-11e8-b43b-036ee7010221,key:vhost,negate:!f,params:(query:'%s:443',type:phrase),type:phrase,value:'%s:443'),query:(match:(vhost:(query:'%s:443',type:phrase))))),fullScreenMode:!f,options:(darkTheme:!f,useMargins:!f),panels:!((gridData:(h:15,i:'3',w:32,x:0,y:0),id:AWBcpcqhmhRvefO8Fqke,panelIndex:'3',type:visualization,version:'6.3.2'),(gridData:(h:15,i:'4',w:24,x:0,y:15),id:AWBcn9temhRvefO8Fkhj,panelIndex:'4',type:visualization,version:'6.3.2'),(embeddableConfig:(vis:(legendOpen:!t)),gridData:(h:15,i:'6',w:16,x:32,y:0),id:AWBh8jIzmhRvefO8gLxW,panelIndex:'6',type:visualization,version:'6.3.2'),(gridData:(h:15,i:'9',w:24,x:24,y:15),id:'6ddaf180-5614-11e8-b43b-036ee7010221',panelIndex:'9',type:visualization,version:'6.3.2'),(gridData:(h:40,i:'10',w:48,x:0,y:30),id:'1e7053a0-5615-11e8-b43b-036ee7010221',panelIndex:'10',type:search,version:'6.3.2')),query:(language:lucene,query:(match_all:())),timeRestore:!f,title:'web:%20overview',viewMode:view)",
config.PublicDomain,
kibanaWebDashboardID,
p.FQDN(),
p.FQDN(),
p.FQDN(),
)
}
func (p PublicEndpoint) QpsGraphURL() string {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment