From c71250eca9f7a9dd6907440e45be500684bb3557 Mon Sep 17 00:00:00 2001 From: Samir Faci Date: Thu, 16 Nov 2023 11:03:59 -0500 Subject: [PATCH] Adding initial implementation --- .gitignore | 1 + README.md | 8 +- Taskfile.yml | 5 + cli/backup/alertnotifications.go | 8 +- cli/backup/connection_permissions.go | 6 +- cli/backup/connections.go | 4 +- cli/backup/dashboard.go | 4 +- cli/backup/folder_permissions.go | 4 +- cli/backup/folders.go | 8 +- cli/backup/library.go | 6 +- cli/backup/organizations.go | 6 +- cli/backup/team.go | 8 +- cli/backup/users.go | 8 +- cli/commandeer.go | 6 +- cli/context.go | 6 +- cli/support/root.go | 2 +- cli/tools/auth_service_accounts.go | 4 +- cli/tools/auth_tokens.go | 2 +- cli/tools/organizations.go | 14 +- cli/tools/users.go | 2 +- cmd/gen/main.go | 27 +- config/assets.go | 14 +- config/templates-example.yml | 0 go.mod | 18 +- go.sum | 58 + internal/config/config.go | 114 +- internal/config/config_model.go | 26 +- internal/config/config_new_ctx.go | 4 +- internal/config/config_test.go | 18 +- internal/config/types.go | 33 +- internal/service/common.go | 28 +- internal/service/common_test.go | 4 +- internal/service/contract.go | 2 +- internal/service/dashboards.go | 4 +- internal/service/libraryelements.go | 2 +- internal/service/teams.go | 2 +- internal/service/user.go | 2 +- internal/templating/templating.go | 133 + internal/templating/templating_test.go | 17 + internal/tools/generics_tooling.go | 14 +- test/common_test.go | 4 +- test/connections_integration_test.go | 4 +- test/dashboard_integration_test.go | 2 +- .../Other/dashboard-makeover-challenge.json | 1333 -- test/data/templates/template_example.go.tmpl | 12785 ++++++++++++++++ website/content/en/docs/templating/_index.md | 4 + .../content/en/docs/templating/description.md | 174 + 47 files changed, 13439 insertions(+), 1499 deletions(-) create mode 100644 config/templates-example.yml create mode 100644 internal/templating/templating.go create mode 100644 internal/templating/templating_test.go delete mode 100644 test/data/org_1/dashboards/Other/dashboard-makeover-challenge.json create mode 100644 test/data/templates/template_example.go.tmpl create mode 100644 website/content/en/docs/templating/_index.md create mode 100644 website/content/en/docs/templating/description.md diff --git a/.gitignore b/.gitignore index 343b708c..8d670835 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ public resources .idea config/token*.yml +config/templates.yml diff --git a/README.md b/README.md index d7485456..f8542f4c 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,10 @@ The following remote backup locations are supported: Please find the generated documentation [here](https://software.es.net/gdg/) and the code for updating the docs is available [here](https://github.com/esnet/gdg/blob/master/documentation/content/docs/usage_guide.md) +## Quickstart + +![Quickstart screen](website/static/quickstart.gif) + ## Release conventions. GDG mostly follows the semver conventions with some minor modifications. @@ -33,7 +37,3 @@ contexts. i.e. `gdg diff dashboards prod staging` is a major divergences from For more info, please see the release notes and documentation both available [here](https://software.es.net/gdg/) -## Quickstart - -![Quickstart screen](website/static/quickstart.gif) - diff --git a/Taskfile.yml b/Taskfile.yml index 71d98be5..a063aa99 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -57,6 +57,11 @@ tasks: cmds: - echo "GOPATH=${GOPATH}" - go build -ldflags "{{ .LD_FLAGS }}" -o bin/{{ .BIN_NAME }} cmd/gdg/main.go + build_generate: + desc: "Buiding {{ .BIN_NAME }}-generate {{ .VERSION }}" + cmds: + - echo "GOPATH=${GOPATH}" + - go build -ldflags "{{ .LD_FLAGS }}" -o bin/{{ .BIN_NAME }}-generate cmd/gen/main.go install: desc: "installing {{ .BIN_NAME }} {{ .VERSION }}" cmds: diff --git a/cli/backup/alertnotifications.go b/cli/backup/alertnotifications.go index e5a6279a..ff4e1881 100644 --- a/cli/backup/alertnotifications.go +++ b/cli/backup/alertnotifications.go @@ -48,7 +48,7 @@ func newClearAlertNotificationsCmd() simplecobra.Commander { rootCmd.TableObj.AppendHeader(table.Row{"type", "filename"}) slog.Info("Clearing all alert notification channels for context", - "context", config.Config().AppConfig.GetContext()) + "context", config.Config().GetGDGConfig().GetContext()) deleted := rootCmd.GrafanaSvc().DeleteAllAlertNotifications() for _, item := range deleted { rootCmd.TableObj.AppendRow(table.Row{"alertnotification", item}) @@ -78,7 +78,7 @@ func newUploadAlertNotificationsCmd() simplecobra.Commander { rootCmd.TableObj.AppendHeader(table.Row{"name", "id", "UID"}) slog.Info("Exporting alert notification channels for context", - "context", config.Config().AppConfig.GetContext()) + "context", config.Config().GetGDGConfig().GetContext()) rootCmd.GrafanaSvc().UploadAlertNotifications() items := rootCmd.GrafanaSvc().ListAlertNotifications() for _, item := range items { @@ -108,7 +108,7 @@ func newDownloadAlertNotificationsCmd() simplecobra.Commander { rootCmd.TableObj.AppendHeader(table.Row{"type", "filename"}) slog.Info("Downloading alert notification channels for context", - "context", config.Config().AppConfig.GetContext()) + "context", config.Config().GetGDGConfig().GetContext()) savedFiles := rootCmd.GrafanaSvc().DownloadAlertNotifications() for _, file := range savedFiles { @@ -136,7 +136,7 @@ func newListAlertNotificationsCmd() simplecobra.Commander { alertnotifications := rootCmd.GrafanaSvc().ListAlertNotifications() slog.Info("Listing alert notifications channels for context", - "context", config.Config().AppConfig.GetContext()) + "context", config.Config().GetGDGConfig().GetContext()) if len(alertnotifications) == 0 { slog.Info("No alert notifications found") diff --git a/cli/backup/connection_permissions.go b/cli/backup/connection_permissions.go index ea25cef3..54521491 100644 --- a/cli/backup/connection_permissions.go +++ b/cli/backup/connection_permissions.go @@ -47,7 +47,7 @@ func newConnectionsPermissionListCmd() simplecobra.Commander { RunFunc: func(ctx context.Context, cd *simplecobra.Commandeer, rootCmd *support.RootCommand, args []string) error { connectionFilter, _ := cd.CobraCommand.Flags().GetString("connection") filters := service.NewConnectionFilter(connectionFilter) - slog.Info("Listing Connection Permissions for context", "context", config.Config().GetAppConfig().GetContext()) + slog.Info("Listing Connection Permissions for context", "context", config.Config().GetGDGConfig().GetContext()) rootCmd.TableObj.AppendHeader(table.Row{"id", "uid", "name", "slug", "type", "default", "url"}) connections := rootCmd.GrafanaSvc().ListConnectionPermissions(filters) _ = connections @@ -82,7 +82,7 @@ func newConnectionsPermissionClearCmd() simplecobra.Commander { RunFunc: func(ctx context.Context, cd *simplecobra.Commandeer, rootCmd *support.RootCommand, args []string) error { slog.Info("Clear all connections permissions") tools.GetUserConfirmation(fmt.Sprintf("WARNING: this will clear all permission from all connections on: '%s' "+ - "(Or all permission matching yoru --connection filter). Do you wish to continue (y/n) ", config.Config().GetAppConfig().ContextName, + "(Or all permission matching yoru --connection filter). Do you wish to continue (y/n) ", config.Config().GetGDGConfig().ContextName, ), "", true) rootCmd.TableObj.AppendHeader(table.Row{"cleared connection permissions"}) connectionFilter, _ := cd.CobraCommand.Flags().GetString("connection") @@ -114,7 +114,7 @@ func newConnectionsPermissionDownloadCmd() simplecobra.Commander { }, RunFunc: func(ctx context.Context, cd *simplecobra.Commandeer, rootCmd *support.RootCommand, args []string) error { slog.Info("import Connections for context", - "context", config.Config().GetAppConfig().GetContext()) + "context", config.Config().GetGDGConfig().GetContext()) rootCmd.TableObj.AppendHeader(table.Row{"filename"}) connectionFilter, _ := cd.CobraCommand.Flags().GetString("connection") filters := service.NewConnectionFilter(connectionFilter) diff --git a/cli/backup/connections.go b/cli/backup/connections.go index f20cefc2..e21b51f5 100644 --- a/cli/backup/connections.go +++ b/cli/backup/connections.go @@ -96,7 +96,7 @@ func newDownloadConnectionsCmd() simplecobra.Commander { }, RunFunc: func(ctx context.Context, cd *simplecobra.Commandeer, rootCmd *support.RootCommand, args []string) error { slog.Info("Importing connections for context", - "context", config.Config().GetAppConfig().GetContext()) + "context", config.Config().GetGDGConfig().GetContext()) dashboardFilter, _ := cd.CobraCommand.Flags().GetString("connection") filters := service.NewConnectionFilter(dashboardFilter) savedFiles := rootCmd.GrafanaSvc().DownloadConnections(filters) @@ -123,7 +123,7 @@ func newListConnectionsCmd() simplecobra.Commander { dashboardFilter, _ := cd.CobraCommand.Flags().GetString("connection") filters := service.NewConnectionFilter(dashboardFilter) dsListing := rootCmd.GrafanaSvc().ListConnections(filters) - slog.Info("Listing connections for context", "context", config.Config().GetAppConfig().GetContext()) + slog.Info("Listing connections for context", "context", config.Config().GetGDGConfig().GetContext()) if len(dsListing) == 0 { slog.Info("No connections found") } else { diff --git a/cli/backup/dashboard.go b/cli/backup/dashboard.go index c9d18616..49cd2042 100644 --- a/cli/backup/dashboard.go +++ b/cli/backup/dashboard.go @@ -134,7 +134,7 @@ func newDownloadDashboardsCmd() simplecobra.Commander { filter := service.NewDashboardFilter(parseDashboardGlobalFlags(cd.CobraCommand)...) savedFiles := rootCmd.GrafanaSvc().DownloadDashboards(filter) slog.Info("Downloading dashboards for context", - "context", config.Config().GetAppConfig().GetContext()) + "context", config.Config().GetGDGConfig().GetContext()) rootCmd.TableObj.AppendHeader(table.Row{"type", "filename"}) for _, file := range savedFiles { rootCmd.TableObj.AppendRow(table.Row{"dashboard", file}) @@ -160,7 +160,7 @@ func newListDashboardsCmd() simplecobra.Commander { filters := service.NewDashboardFilter(parseDashboardGlobalFlags(cd.CobraCommand)...) boards := rootCmd.GrafanaSvc().ListDashboards(filters) - slog.Info("Listing dashboards for context", "context", config.Config().GetAppConfig().GetContext()) + slog.Info("Listing dashboards for context", "context", config.Config().GetGDGConfig().GetContext()) for _, link := range boards { url := fmt.Sprintf("%s%s", config.Config().GetDefaultGrafanaConfig().URL, link.URL) rootCmd.TableObj.AppendRow(table.Row{link.ID, link.Title, link.Slug, link.FolderTitle, diff --git a/cli/backup/folder_permissions.go b/cli/backup/folder_permissions.go index cdd06b3e..a12e41ad 100644 --- a/cli/backup/folder_permissions.go +++ b/cli/backup/folder_permissions.go @@ -42,7 +42,7 @@ func newFolderPermissionListCmd() simplecobra.Commander { RunFunc: func(ctx context.Context, cd *simplecobra.Commandeer, rootCmd *support.RootCommand, args []string) error { rowConfigAutoMerge := table.RowConfig{AutoMerge: true} - slog.Info("Listing Folders for context", "context", config.Config().GetAppConfig().GetContext()) + slog.Info("Listing Folders for context", "context", config.Config().GetGDGConfig().GetContext()) rootCmd.TableObj.AppendHeader(table.Row{"folder ID", "folderUid", "folder Name", "UserID", "Team Name", "Role", "Permission Name"}, rowConfigAutoMerge) folders := rootCmd.GrafanaSvc().ListFolderPermissions(getFolderFilter()) @@ -71,7 +71,7 @@ func newFolderPermissionDownloadCmd() simplecobra.Commander { cmd.Aliases = []string{"d"} }, RunFunc: func(ctx context.Context, cd *simplecobra.Commandeer, rootCmd *support.RootCommand, args []string) error { - slog.Info("Downloading Folder Permissions for context", "context", config.Config().GetAppConfig().GetContext()) + slog.Info("Downloading Folder Permissions for context", "context", config.Config().GetGDGConfig().GetContext()) rootCmd.TableObj.AppendHeader(table.Row{"filename"}) folders := rootCmd.GrafanaSvc().DownloadFolderPermissions(getFolderFilter()) slog.Info("Downloading folder permissions") diff --git a/cli/backup/folders.go b/cli/backup/folders.go index 798f61e9..e8880c64 100644 --- a/cli/backup/folders.go +++ b/cli/backup/folders.go @@ -57,7 +57,7 @@ func newFolderClearCmd() simplecobra.Commander { cmd.Aliases = []string{"c", "delete"} }, RunFunc: func(ctx context.Context, cd *simplecobra.Commandeer, rootCmd *support.RootCommand, args []string) error { - slog.Info("Deleting all Folders for context", "context", config.Config().AppConfig.GetContext()) + slog.Info("Deleting all Folders for context", "context", config.Config().GetGDGConfig().GetContext()) rootCmd.TableObj.AppendHeader(table.Row{"title"}) folders := rootCmd.GrafanaSvc().DeleteAllFolders(getFolderFilter()) @@ -84,7 +84,7 @@ func newFolderListCmd() simplecobra.Commander { cmd.Aliases = []string{"u"} }, RunFunc: func(ctx context.Context, cd *simplecobra.Commandeer, rootCmd *support.RootCommand, args []string) error { - slog.Info("Listing Folders for context", "context", config.Config().AppConfig.GetContext()) + slog.Info("Listing Folders for context", "context", config.Config().GetGDGConfig().GetContext()) rootCmd.TableObj.AppendHeader(table.Row{"id", "uid", "title"}) folders := rootCmd.GrafanaSvc().ListFolder(getFolderFilter()) @@ -110,7 +110,7 @@ func newFolderDownloadCmd() simplecobra.Commander { cmd.Aliases = []string{"d"} }, RunFunc: func(ctx context.Context, cd *simplecobra.Commandeer, rootCmd *support.RootCommand, args []string) error { - slog.Info("Listing Folders for context", "context", config.Config().AppConfig.GetContext()) + slog.Info("Listing Folders for context", "context", config.Config().GetGDGConfig().GetContext()) rootCmd.TableObj.AppendHeader(table.Row{"file"}) folders := rootCmd.GrafanaSvc().DownloadFolders(getFolderFilter()) if len(folders) == 0 { @@ -135,7 +135,7 @@ func newFolderUploadCmd() simplecobra.Commander { cmd.Aliases = []string{"u"} }, RunFunc: func(ctx context.Context, cd *simplecobra.Commandeer, rootCmd *support.RootCommand, args []string) error { - slog.Info("Uploading Folders for context", "context", config.Config().AppConfig.GetContext()) + slog.Info("Uploading Folders for context", "context", config.Config().GetGDGConfig().GetContext()) rootCmd.TableObj.AppendHeader(table.Row{"file"}) folders := rootCmd.GrafanaSvc().UploadFolders(getFolderFilter()) if len(folders) == 0 { diff --git a/cli/backup/library.go b/cli/backup/library.go index b0b57dc8..903dd0ba 100644 --- a/cli/backup/library.go +++ b/cli/backup/library.go @@ -76,7 +76,7 @@ func newLibraryElementsListCmd() simplecobra.Commander { elements := rootCmd.GrafanaSvc().ListLibraryElements(nil) - slog.Info("Listing library for context", "context", config.Config().AppConfig.GetContext()) + slog.Info("Listing library for context", "context", config.Config().GetGDGConfig().GetContext()) for _, link := range elements { rootCmd.TableObj.AppendRow(table.Row{link.ID, link.UID, link.Meta.FolderName, link.Name, link.Type}) @@ -101,7 +101,7 @@ func newLibraryElementsDownloadCmd() simplecobra.Commander { cmd.Aliases = []string{"d"} }, RunFunc: func(ctx context.Context, cd *simplecobra.Commandeer, rootCmd *support.RootCommand, args []string) error { - slog.Info("Downloading library for context", "context", config.Config().AppConfig.GetContext()) + slog.Info("Downloading library for context", "context", config.Config().GetGDGConfig().GetContext()) savedFiles := rootCmd.GrafanaSvc().DownloadLibraryElements(nil) rootCmd.TableObj.AppendHeader(table.Row{"type", "filename"}) for _, file := range savedFiles { @@ -156,7 +156,7 @@ func newLibraryElementsListConnectionsCmd() simplecobra.Commander { libElmentUid := args[0] elements := rootCmd.GrafanaSvc().ListLibraryElementsConnections(nil, libElmentUid) - slog.Info("Listing library connections for context", "context", config.Config().AppConfig.GetContext()) + slog.Info("Listing library connections for context", "context", config.Config().GetGDGConfig().GetContext()) for _, link := range elements { dash := link.Dashboard.(map[string]interface{}) rootCmd.TableObj.AppendRow(table.Row{dash["id"].(json.Number), dash["uid"].(string), link.Meta.Slug, dash["title"].(string), link.Meta.FolderTitle}) diff --git a/cli/backup/organizations.go b/cli/backup/organizations.go index c602d195..581ecd33 100644 --- a/cli/backup/organizations.go +++ b/cli/backup/organizations.go @@ -42,7 +42,7 @@ func newOrganizationsListCmd() simplecobra.Commander { cmd.Aliases = []string{"l"} }, RunFunc: func(ctx context.Context, cd *simplecobra.Commandeer, rootCmd *support.RootCommand, args []string) error { - slog.Info("Listing organizations for context", "context", config.Config().AppConfig.GetContext()) + slog.Info("Listing organizations for context", "context", config.Config().GetGDGConfig().GetContext()) rootCmd.TableObj.AppendHeader(table.Row{"id", "org"}) listOrganizations := rootCmd.GrafanaSvc().ListOrganizations() sort.Slice(listOrganizations, func(a, b int) bool { @@ -71,7 +71,7 @@ func newOrganizationsDownloadCmd() simplecobra.Commander { cmd.Aliases = []string{"d"} }, RunFunc: func(ctx context.Context, cd *simplecobra.Commandeer, rootCmd *support.RootCommand, args []string) error { - slog.Info("Downloading organizations for context", "context", config.Config().AppConfig.GetContext()) + slog.Info("Downloading organizations for context", "context", config.Config().GetGDGConfig().GetContext()) rootCmd.TableObj.AppendHeader(table.Row{"file"}) listOrganizations := rootCmd.GrafanaSvc().DownloadOrganizations() if len(listOrganizations) == 0 { @@ -97,7 +97,7 @@ func newOrganizationsUploadCmd() simplecobra.Commander { cmd.Aliases = []string{"u"} }, RunFunc: func(ctx context.Context, cd *simplecobra.Commandeer, rootCmd *support.RootCommand, args []string) error { - slog.Info("Uploading Folders for context: '%s'", "context", config.Config().AppConfig.GetContext()) + slog.Info("Uploading Folders for context: '%s'", "context", config.Config().GetGDGConfig().GetContext()) rootCmd.TableObj.AppendHeader(table.Row{"file"}) folders := rootCmd.GrafanaSvc().UploadOrganizations() if len(folders) == 0 { diff --git a/cli/backup/team.go b/cli/backup/team.go index c414518e..ba371ad5 100644 --- a/cli/backup/team.go +++ b/cli/backup/team.go @@ -58,7 +58,7 @@ func newTeamsListCmd() simplecobra.Commander { cmd.Aliases = []string{"l"} }, RunFunc: func(ctx context.Context, cd *simplecobra.Commandeer, rootCmd *support.RootCommand, args []string) error { - slog.Info("Listing teams for context", "context", config.Config().AppConfig.GetContext()) + slog.Info("Listing teams for context", "context", config.Config().GetGDGConfig().GetContext()) rootCmd.TableObj.AppendHeader(table.Row{"id", "name", "email", "orgID", "memberCount", "memberID", "member Permission"}) filter := api.NewTeamFilter(parseTeamGlobalFlags(cd.CobraCommand)...) teams := rootCmd.GrafanaSvc().ListTeams(filter) @@ -89,7 +89,7 @@ func newTeamsDownloadCmd() simplecobra.Commander { cmd.Aliases = []string{"d"} }, RunFunc: func(ctx context.Context, cd *simplecobra.Commandeer, rootCmd *support.RootCommand, args []string) error { - slog.Info("Importing Teams for context", "context", config.Config().AppConfig.GetContext()) + slog.Info("Importing Teams for context", "context", config.Config().GetGDGConfig().GetContext()) filter := api.NewTeamFilter(parseTeamGlobalFlags(cd.CobraCommand)...) savedFiles := rootCmd.GrafanaSvc().DownloadTeams(filter) if len(savedFiles) == 0 { @@ -119,7 +119,7 @@ func newTeamsUploadCmd() simplecobra.Commander { cmd.Aliases = []string{"u"} }, RunFunc: func(ctx context.Context, cd *simplecobra.Commandeer, rootCmd *support.RootCommand, args []string) error { - slog.Info("Exporting Teams for context", "context", config.Config().AppConfig.GetContext()) + slog.Info("Exporting Teams for context", "context", config.Config().GetGDGConfig().GetContext()) filter := api.NewTeamFilter(parseTeamGlobalFlags(cd.CobraCommand)...) savedFiles := rootCmd.GrafanaSvc().UploadTeams(filter) if len(savedFiles) == 0 { @@ -150,7 +150,7 @@ func newTeamsClearCmd() simplecobra.Commander { cmd.Aliases = []string{"c"} }, RunFunc: func(ctx context.Context, cd *simplecobra.Commandeer, rootCmd *support.RootCommand, args []string) error { - slog.Info("Deleting teams for context", "context", config.Config().AppConfig.GetContext()) + slog.Info("Deleting teams for context", "context", config.Config().GetGDGConfig().GetContext()) filter := api.NewTeamFilter(parseTeamGlobalFlags(cd.CobraCommand)...) rootCmd.TableObj.AppendHeader(table.Row{"type", "team ID", "team Name"}) teams, err := rootCmd.GrafanaSvc().DeleteTeam(filter) diff --git a/cli/backup/users.go b/cli/backup/users.go index a686c38b..6b451124 100644 --- a/cli/backup/users.go +++ b/cli/backup/users.go @@ -46,7 +46,7 @@ func newUsersListCmd() simplecobra.Commander { }, RunFunc: func(ctx context.Context, cd *simplecobra.Commandeer, rootCmd *support.RootCommand, args []string) error { authLabel, _ := cd.CobraCommand.Flags().GetString("authlabel") - slog.Info("Listing users for context", "context", config.Config().AppConfig.GetContext()) + slog.Info("Listing users for context", "context", config.Config().GetGDGConfig().GetContext()) rootCmd.TableObj.AppendHeader(table.Row{"id", "login", "name", "email", "admin", "disabled", "default Password", "authLabels"}) users := rootCmd.GrafanaSvc().ListUsers(service.NewUserFilter(authLabel)) if len(users) == 0 { @@ -79,7 +79,7 @@ func newUsersDownloadCmd() simplecobra.Commander { RunFunc: func(ctx context.Context, cd *simplecobra.Commandeer, rootCmd *support.RootCommand, args []string) error { authLabel, _ := cd.CobraCommand.Flags().GetString("authlabel") savedFiles := rootCmd.GrafanaSvc().DownloadUsers(service.NewUserFilter(authLabel)) - slog.Info("Importing Users for context", "context", config.Config().AppConfig.GetContext()) + slog.Info("Importing Users for context", "context", config.Config().GetGDGConfig().GetContext()) rootCmd.TableObj.AppendHeader(table.Row{"type", "filename"}) if len(savedFiles) == 0 { slog.Info("No users found") @@ -104,7 +104,7 @@ func newUsersUploadCmd() simplecobra.Commander { }, RunFunc: func(ctx context.Context, cd *simplecobra.Commandeer, rootCmd *support.RootCommand, args []string) error { authLabel, _ := cd.CobraCommand.Flags().GetString("authlabel") - slog.Info("Uploading Users to context", "context", config.Config().AppConfig.GetContext()) + slog.Info("Uploading Users to context", "context", config.Config().GetGDGConfig().GetContext()) savedFiles := rootCmd.GrafanaSvc().UploadUsers(service.NewUserFilter(authLabel)) rootCmd.TableObj.AppendHeader(table.Row{"id", "login", "name", "email", "grafanaAdmin", "disabled", "default Password", "authLabels"}) if len(savedFiles) == 0 { @@ -136,7 +136,7 @@ func newUsersClearCmd() simplecobra.Commander { RunFunc: func(ctx context.Context, cd *simplecobra.Commandeer, rootCmd *support.RootCommand, args []string) error { authLabel, _ := cd.CobraCommand.Flags().GetString("authlabel") savedFiles := rootCmd.GrafanaSvc().DeleteAllUsers(service.NewUserFilter(authLabel)) - slog.Info("Delete Users for context", "context", config.Config().AppConfig.GetContext()) + slog.Info("Delete Users for context", "context", config.Config().GetGDGConfig().GetContext()) rootCmd.TableObj.AppendHeader(table.Row{"type", "filename"}) if len(savedFiles) == 0 { slog.Info("No users found") diff --git a/cli/commandeer.go b/cli/commandeer.go index 2b8543af..9eb01dc9 100644 --- a/cli/commandeer.go +++ b/cli/commandeer.go @@ -12,11 +12,11 @@ import ( // Execute executes a command. func Execute(defaultCfg string, args []string, options ...support.RootOption) error { - data, err := assets.Assets.ReadFile(defaultCfg) + var err error + support.DefaultConfig, err = assets.GetFile(defaultCfg) if err != nil { - slog.Info("unable to find load default configuration", "err", err) + slog.Warn("unable to find load default configuration", "err", err) } - support.DefaultConfig = string(data) rootCmd := support.NewRootCmd(getNewRootCmd(), options...) x, err := simplecobra.New(rootCmd) if err != nil { diff --git a/cli/context.go b/cli/context.go index fba3f337..27e85974 100644 --- a/cli/context.go +++ b/cli/context.go @@ -49,8 +49,8 @@ func newListContextCmd() simplecobra.Commander { NameP: "list", RunFunc: func(ctx context.Context, cd *simplecobra.Commandeer, r *support.RootCommand, args []string) error { r.TableObj.AppendHeader(table.Row{"context", "active"}) - contexts := config.Config().GetAppConfig().GetContexts() - activeContext := config.Config().GetAppConfig().GetContext() + contexts := config.Config().GetGDGConfig().GetContexts() + activeContext := config.Config().GetGDGConfig().GetContext() for key := range contexts { active := false if key == strings.ToLower(activeContext) { @@ -100,7 +100,7 @@ func newShowContext() simplecobra.Commander { return &support.SimpleCommand{ NameP: "show", RunFunc: func(ctx context.Context, cd *simplecobra.Commandeer, r *support.RootCommand, args []string) error { - contextEntry := config.Config().GetAppConfig().GetContext() + contextEntry := config.Config().GetGDGConfig().GetContext() if len(args) > 0 && len(args[0]) > 0 { contextEntry = args[0] } diff --git a/cli/support/root.go b/cli/support/root.go index cf5878aa..b58b1c1a 100644 --- a/cli/support/root.go +++ b/cli/support/root.go @@ -75,7 +75,7 @@ func (c *RootCommand) initConfiguration() { } //Registers sub CommandsList config.InitConfig(configOverride, DefaultConfig) - appconfig.InitializeAppLogger(os.Stdout, os.Stderr, config.Config().AppConfig.Global.Debug) + appconfig.InitializeAppLogger(os.Stdout, os.Stderr, config.Config().GetGDGConfig().Global.Debug) //Validate current configuration config.Config().GetDefaultGrafanaConfig().Validate() diff --git a/cli/tools/auth_service_accounts.go b/cli/tools/auth_service_accounts.go index 0e909521..aa9aa215 100644 --- a/cli/tools/auth_service_accounts.go +++ b/cli/tools/auth_service_accounts.go @@ -98,7 +98,7 @@ func newDeleteServiceAccountTokensCmd() simplecobra.Commander { slog.Info("Deleting Service Accounts Tokens for context", "serviceAccountId", id, - "context", config.Config().AppConfig.GetContext()) + "context", config.Config().GetGDGConfig().GetContext()) savedFiles := rootCmd.GrafanaSvc().DeleteServiceAccountTokens(id) rootCmd.TableObj.AppendHeader(table.Row{"serviceID", "type", "token_name"}) if len(savedFiles) == 0 { @@ -123,7 +123,7 @@ func newDeleteServiceAccountCmd() simplecobra.Commander { CommandsList: []simplecobra.Commander{}, RunFunc: func(ctx context.Context, cd *simplecobra.Commandeer, rootCmd *support.RootCommand, args []string) error { savedFiles := rootCmd.GrafanaSvc().DeleteAllServiceAccounts() - slog.Info("Delete Service Accounts for context", "context", config.Config().AppConfig.GetContext()) + slog.Info("Delete Service Accounts for context", "context", config.Config().GetGDGConfig().GetContext()) rootCmd.TableObj.AppendHeader(table.Row{"type", "filename"}) if len(savedFiles) == 0 { slog.Info("No Service Accounts found") diff --git a/cli/tools/auth_tokens.go b/cli/tools/auth_tokens.go index 5883b93e..218e30ce 100644 --- a/cli/tools/auth_tokens.go +++ b/cli/tools/auth_tokens.go @@ -78,7 +78,7 @@ func newDeleteTokenCmd() simplecobra.Commander { RunFunc: func(ctx context.Context, cd *simplecobra.Commandeer, rootCmd *support.RootCommand, args []string) error { savedFiles := rootCmd.GrafanaSvc().DeleteAllTokens() - slog.Info("Delete Tokens for context: ", "context", config.Config().AppConfig.GetContext()) + slog.Info("Delete Tokens for context: ", "context", config.Config().GetGDGConfig().GetContext()) rootCmd.TableObj.AppendHeader(table.Row{"type", "filename"}) if len(savedFiles) == 0 { slog.Info("No Tokens found") diff --git a/cli/tools/organizations.go b/cli/tools/organizations.go index 32dd24e3..eeba60d1 100644 --- a/cli/tools/organizations.go +++ b/cli/tools/organizations.go @@ -58,7 +58,7 @@ func newSetOrgCmd() simplecobra.Commander { if err != nil { log.Fatal("unable to set Org ID", "err", err) } - slog.Info("Successfully set Org ID for context", "context", config.Config().AppConfig.GetContext()) + slog.Info("Successfully set Org ID for context", "context", config.Config().GetGDGConfig().GetContext()) return nil }, @@ -73,7 +73,7 @@ func newGetUserOrgCmd() simplecobra.Commander { Short: description, Long: description, RunFunc: func(ctx context.Context, cd *simplecobra.Commandeer, rootCmd *support.RootCommand, args []string) error { - slog.Info("Listing organizations for context", "context", config.Config().AppConfig.GetContext()) + slog.Info("Listing organizations for context", "context", config.Config().GetGDGConfig().GetContext()) rootCmd.TableObj.AppendHeader(table.Row{"id", "name"}) org := rootCmd.GrafanaSvc().GetUserOrganization() if org == nil { @@ -97,7 +97,7 @@ func newGetTokenOrgCmd() simplecobra.Commander { Long: description, RunFunc: func(ctx context.Context, cd *simplecobra.Commandeer, rootCmd *support.RootCommand, args []string) error { - slog.Info("Display token organization for context'", "context", config.Config().AppConfig.GetContext()) + slog.Info("Display token organization for context'", "context", config.Config().GetGDGConfig().GetContext()) rootCmd.TableObj.AppendHeader(table.Row{"id", "name"}) org := rootCmd.GrafanaSvc().GetTokenOrganization() if org == nil { @@ -126,7 +126,7 @@ func newListUsers() simplecobra.Commander { if err != nil { log.Fatal("unable to parse orgId to numeric value") } - slog.Info("Listing org users for context", "context", config.Config().AppConfig.GetContext()) + slog.Info("Listing org users for context", "context", config.Config().GetGDGConfig().GetContext()) rootCmd.TableObj.AppendHeader(table.Row{"id", "login", "orgId", "name", "email", "role"}) users := rootCmd.GrafanaSvc().ListOrgUsers(orgId) if len(users) == 0 { @@ -161,7 +161,7 @@ func newUpdateUserRoleCmd() simplecobra.Commander { if err != nil { log.Fatal("unable to parse userId to numeric value") } - slog.Info("Listing org users for context", "context", config.Config().AppConfig.GetContext()) + slog.Info("Listing org users for context", "context", config.Config().GetGDGConfig().GetContext()) rootCmd.TableObj.AppendHeader(table.Row{"login", "orgId", "name", "email", "role"}) err = rootCmd.GrafanaSvc().UpdateUserInOrg(args[2], userId, orgId) if err != nil { @@ -192,7 +192,7 @@ func newAddUserRoleCmd() simplecobra.Commander { if err != nil { log.Fatal("unable to parse userId to numeric value") } - slog.Info("Add user to org for context", "context", config.Config().AppConfig.GetContext()) + slog.Info("Add user to org for context", "context", config.Config().GetGDGConfig().GetContext()) rootCmd.TableObj.AppendHeader(table.Row{"login", "orgId", "name", "email", "role"}) err = rootCmd.GrafanaSvc().AddUserToOrg(args[2], userId, orgId) if err != nil { @@ -223,7 +223,7 @@ func newDeleteUserRoleCmd() simplecobra.Commander { if err != nil { log.Fatal("unable to parse userId to numeric value") } - slog.Info("Update org for context", "context", config.Config().AppConfig.GetContext()) + slog.Info("Update org for context", "context", config.Config().GetGDGConfig().GetContext()) err = rootCmd.GrafanaSvc().DeleteUserFromOrg(userId, orgId) if err != nil { slog.Error("Unable to remove user from Org") diff --git a/cli/tools/users.go b/cli/tools/users.go index cb1428dc..1a5246ee 100644 --- a/cli/tools/users.go +++ b/cli/tools/users.go @@ -33,7 +33,7 @@ func newPromoteUserCmd() simplecobra.Commander { Short: "Promote User to Grafana Admin", Long: "Promote User to Grafana Admin", RunFunc: func(ctx context.Context, cd *simplecobra.Commandeer, rootCmd *support.RootCommand, args []string) error { - slog.Info("Promoting User to Grafana Admin for context: '%s'", "context", config.Config().AppConfig.GetContext()) + slog.Info("Promoting User to Grafana Admin for context: '%s'", "context", config.Config().GetGDGConfig().GetContext()) userLogin, _ := cd.CobraCommand.Flags().GetString("user") msg, err := rootCmd.GrafanaSvc().PromoteUser(userLogin) diff --git a/cmd/gen/main.go b/cmd/gen/main.go index e585b26c..cb57c0ec 100644 --- a/cmd/gen/main.go +++ b/cmd/gen/main.go @@ -1,13 +1,36 @@ package main import ( + assets "github.com/esnet/gdg/config" + "github.com/esnet/gdg/internal/config" appconfig "github.com/esnet/gdg/internal/log" + "github.com/esnet/gdg/internal/templating" + flag "github.com/spf13/pflag" + "log" "log/slog" "os" ) func main() { - appconfig.InitializeAppLogger(os.Stdout, os.Stderr, true) - slog.Info("Woot") + slog.Info("Reading GDG configuration") + var cfgName = flag.StringP("config", "c", "importer.yml", "Configuration override") + var templateName = flag.StringP("template", "t", "", "Specify template name, optional. Default is toe operate on all configured templates that are found.") + flag.Parse() + slog.Info("Configuration file is: ", "config", *cfgName) + defaultConfiguration, err := assets.GetFile("importer-example.yml") + if err != nil { + slog.Warn("unable to load default configuration, no fallback") + } + + config.InitConfig(*cfgName, defaultConfiguration) + config.InitTemplateConfig("") + cfg := config.Config() + slog.Info("Context is set to: ", "context", cfg.GetGDGConfig().ContextName) + template := templating.NewTemplate() + err = template.Generate(*templateName) + if err != nil { + log.Fatal("Failed to generate templates") + } + } diff --git a/config/assets.go b/config/assets.go index 2b851ecd..1b2c7b9b 100644 --- a/config/assets.go +++ b/config/assets.go @@ -1,6 +1,18 @@ package config -import "embed" +import ( + "embed" + "log/slog" +) //go:embed * var Assets embed.FS + +func GetFile(name string) (string, error) { + data, err := Assets.ReadFile(name) + if err != nil { + slog.Info("unable to find load default configuration", "err", err) + return "", err + } + return string(data), nil +} diff --git a/config/templates-example.yml b/config/templates-example.yml new file mode 100644 index 00000000..e69de29b diff --git a/go.mod b/go.mod index cc31a8a9..aab6c669 100644 --- a/go.mod +++ b/go.mod @@ -41,8 +41,14 @@ require ( github.com/Azure/go-autorest v14.2.0+incompatible // indirect github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v1.2.0 // indirect + github.com/Masterminds/goutils v1.1.1 // indirect + github.com/Masterminds/semver v1.5.0 // indirect + github.com/Masterminds/semver/v3 v3.2.1 // indirect + github.com/Masterminds/sprig v2.22.0+incompatible // indirect + github.com/Masterminds/sprig/v3 v3.2.3 // indirect github.com/Microsoft/go-winio v0.6.0 // indirect github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect + github.com/armon/go-radix v1.0.0 // indirect github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/aws/aws-sdk-go-v2 v1.22.2 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.0 // indirect @@ -63,6 +69,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/ssooidc v1.19.1 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.25.1 // indirect github.com/aws/smithy-go v1.16.0 // indirect + github.com/bgentry/speakeasy v0.1.0 // indirect github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/containerd/continuity v0.3.0 // indirect github.com/creack/pty v1.1.18 // indirect @@ -71,6 +78,7 @@ require ( github.com/docker/docker v24.0.7+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect + github.com/fatih/color v1.16.0 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-logr/logr v1.3.0 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -93,9 +101,12 @@ require ( github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect github.com/googleapis/gax-go/v2 v2.12.0 // indirect github.com/gosimple/unidecode v1.0.1 // indirect + github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/imdario/mergo v0.3.12 // indirect + github.com/huandu/xstrings v1.4.0 // indirect + github.com/imdario/mergo v0.3.16 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect @@ -106,7 +117,10 @@ require ( github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-runewidth v0.0.15 // indirect github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect + github.com/mitchellh/cli v1.1.5 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 // indirect github.com/oklog/ulid v1.3.1 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect @@ -117,9 +131,11 @@ require ( github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/posener/complete v1.2.3 // indirect github.com/rivo/uniseg v0.4.4 // indirect github.com/sagikazarmark/locafero v0.3.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect + github.com/shopspring/decimal v1.3.1 // indirect github.com/sirupsen/logrus v1.8.1 // indirect github.com/sourcegraph/conc v0.3.0 // indirect github.com/spf13/afero v1.10.0 // indirect diff --git a/go.sum b/go.sum index a5360262..34879061 100644 --- a/go.sum +++ b/go.sum @@ -68,6 +68,19 @@ github.com/AzureAD/microsoft-authentication-library-for-go v1.2.0 h1:hVeq+yCyUi+ github.com/AzureAD/microsoft-authentication-library-for-go v1.2.0/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= +github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= +github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= +github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= +github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= +github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0= +github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= +github.com/Masterminds/sprig v2.22.0+incompatible h1:z4yfnGrZ7netVz+0EDJ0Wi+5VZCSYp4Z0m2dk6cEM60= +github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= +github.com/Masterminds/sprig/v3 v3.2.1/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk= +github.com/Masterminds/sprig/v3 v3.2.3 h1:eL2fZNezLomi0uOLqjQoN6BfsDD+fyLtgbJMAj9n6YA= +github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM= github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 h1:+vx7roKuyA63nhn5WAunQHLTznkw5W8b1Xc0dNjp83s= @@ -76,6 +89,9 @@ github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEV github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= +github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= @@ -121,6 +137,8 @@ github.com/aws/smithy-go v1.16.0 h1:gJZEH/Fqh+RsvlJ1Zt4tVAtV6bKkp3cC+R6FCZMNzik= github.com/aws/smithy-go v1.16.0/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE= github.com/bep/simplecobra v0.3.2 h1:dVcflWm7l31zxV8QUrJqQ/de/satzqY8ukq0aL0pZDE= github.com/bep/simplecobra v0.3.2/go.mod h1:EOp6bCKuuHmwA9bQcRC8LcDB60co2Cmht5X4xMIOwf0= +github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/carlmjohnson/requests v0.23.5 h1:NPANcAofwwSuC6SIMwlgmHry2V3pLrSqRiSBKYbNHHA= github.com/carlmjohnson/requests v0.23.5/go.mod h1:zG9P28thdRnN61aD7iECFhH5iGGKX2jIjKQD9kqYH+o= github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= @@ -170,6 +188,9 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/esnet/grafana-swagger-api-golang v0.0.0-20230904013855-9a47b55d30d3 h1:5Pzswqykeauap1602DZwSl1qTQaH93oXxuYeEMk4rKg= github.com/esnet/grafana-swagger-api-golang v0.0.0-20230904013855-9a47b55d30d3/go.mod h1:KY/r+1ImaUFhABgjy/6imZARoe4uRpu8lj3hGW6KFtI= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= @@ -347,18 +368,32 @@ github.com/gosimple/slug v1.13.1 h1:bQ+kpX9Qa6tHRaK+fZR0A0M2Kd7Pa5eHPPsb1JpHD+Q= github.com/gosimple/slug v1.13.1/go.mod h1:UiRaFH+GEilHstLUmcBgWcI42viBN7mAb818JrYOeFQ= github.com/gosimple/unidecode v1.0.1 h1:hZzFTMMqSswvf0LBJZCZgThIZrpDHFXux9KeGmn6T/o= github.com/gosimple/unidecode v1.0.1/go.mod h1:CP0Cr1Y1kogOtx0bJblKzsVWrqYaqfNOnHzpgWw4Awc= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= +github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= +github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec h1:qv2VnGeEQHchGaZ/u7lxST/RaJw+cv273q79D81Xbog= github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec/go.mod h1:Q48J4R4DvxnHolD5P8pOtXigYlRuPLGl6moFx3ulM68= +github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= +github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= +github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= +github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU= +github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= +github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= @@ -406,9 +441,11 @@ github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0 github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= @@ -419,10 +456,18 @@ github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d h1:5PJl274Y63IEHC+7izoQE9x6ikvDFZS2mDVS3drnohI= github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= +github.com/mitchellh/cli v1.1.5 h1:OxRIeJXpAMztws/XHlN2vu6imG5Dpq+j61AzAX5fLng= +github.com/mitchellh/cli v1.1.5/go.mod h1:v8+iFts2sPIKUV1ltktPXMCC8fumSKFItNcD2cLtRR4= +github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= +github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 h1:rzf0wL0CHVc8CEsgyygG0Mn9CNCCPZqOPaz8RiiHYQk= github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= @@ -457,6 +502,9 @@ github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qR github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/posener/complete v1.2.3 h1:NP0eAhjcjImqslEwo/1hq7gpajME0fTLTezBKDqfXqo= +github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= @@ -475,6 +523,9 @@ github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWR github.com/samber/lo v1.38.1 h1:j2XEAqXKb09Am4ebOg31SpvzUTTs6EN3VfgeLUhPdXM= github.com/samber/lo v1.38.1/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA= github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= +github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= +github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= +github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= @@ -485,6 +536,7 @@ github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9yS github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spf13/afero v1.10.0 h1:EaGW2JJh15aKOejeuJ+wpFSHnbd7GE6Wvp3TsNhb6LY= github.com/spf13/afero v1.10.0/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= @@ -581,11 +633,14 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -661,6 +716,7 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -744,11 +800,13 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.14.0 h1:LGK9IlZ8T9jvdy6cTdfKUCltatMFOehAQo9SRC46UQ8= golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/internal/config/config.go b/internal/config/config.go index 8872e3af..5d6ac4f4 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -16,12 +16,19 @@ import ( "log" ) +func (s *Configuration) GetViperConfig(name string) *viper.Viper { + if s.viperConfiguration == nil { + return nil + } + return s.viperConfiguration[name] +} + func (s *Configuration) ClearContexts() { newContext := make(map[string]*GrafanaConfig) newContext["example"] = &GrafanaConfig{ APIToken: "dummy", } - appCfg := s.GetAppConfig() + appCfg := s.GetGDGConfig() appCfg.Contexts = newContext appCfg.ContextName = "example" err := s.SaveToDisk(false) @@ -35,9 +42,9 @@ func (s *Configuration) ClearContexts() { // GetDefaultGrafanaConfig returns the default aka. selected grafana config func (s *Configuration) GetDefaultGrafanaConfig() *GrafanaConfig { - name := s.GetAppConfig().GetContext() + name := s.GetGDGConfig().GetContext() - val, ok := s.GetAppConfig().GetContexts()[name] + val, ok := s.GetGDGConfig().GetContexts()[name] if ok { return val } else { @@ -50,7 +57,7 @@ func (s *Configuration) GetDefaultGrafanaConfig() *GrafanaConfig { // CopyContext Makes a copy of the specified context and write to disk func (s *Configuration) CopyContext(src, dest string) { //Validate context - contexts := s.GetAppConfig().GetContexts() + contexts := s.GetGDGConfig().GetContexts() if len(contexts) == 0 { log.Fatal("Cannot set context. No valid configuration found in importer.yml") } @@ -64,7 +71,7 @@ func (s *Configuration) CopyContext(src, dest string) { } contexts[dest] = newCopy - s.GetAppConfig().ContextName = dest + s.GetGDGConfig().ContextName = dest err = s.SaveToDisk(false) if err != nil { log.Fatal("Failed to make save changes") @@ -74,7 +81,7 @@ func (s *Configuration) CopyContext(src, dest string) { func (s *Configuration) PrintContext(name string) { name = strings.ToLower(name) - grafana, ok := s.GetAppConfig().GetContexts()[name] + grafana, ok := s.GetGDGConfig().GetContexts()[name] if !ok { slog.Error("context was not found", "context", name) return @@ -90,7 +97,7 @@ func (s *Configuration) PrintContext(name string) { // DeleteContext remove a given context func (s *Configuration) DeleteContext(name string) { name = strings.ToLower(name) //ensure name is lower case - contexts := s.GetAppConfig().GetContexts() + contexts := s.GetGDGConfig().GetContexts() _, ok := contexts[name] if !ok { slog.Info("Context not found, cannot delete context", "context", name) @@ -99,7 +106,7 @@ func (s *Configuration) DeleteContext(name string) { delete(contexts, name) if len(contexts) != 0 { for key := range contexts { - s.GetAppConfig().ContextName = key + s.GetGDGConfig().ContextName = key break } } @@ -108,17 +115,17 @@ func (s *Configuration) DeleteContext(name string) { if err != nil { log.Fatal("Failed to make save changes") } - slog.Info("Deleted context and set new context to", "deletedContext", name, "newActiveContext", s.GetAppConfig().ContextName) + slog.Info("Deleted context and set new context to", "deletedContext", name, "newActiveContext", s.GetGDGConfig().ContextName) } // ChangeContext changes active context func (s *Configuration) ChangeContext(name string) { name = strings.ToLower(name) - _, ok := s.GetAppConfig().GetContexts()[name] + _, ok := s.GetGDGConfig().GetContexts()[name] if !ok { log.Fatalf("context %s was not found", name) } - s.GetAppConfig().ContextName = name + s.GetGDGConfig().ContextName = name err := s.SaveToDisk(false) if err != nil { log.Fatal("Failed to make save changes") @@ -130,11 +137,11 @@ func (s *Configuration) ChangeContext(name string) { func (s *Configuration) SaveToDisk(useViper bool) error { if useViper { - return s.ViperConfig().WriteConfig() + return s.GetViperConfig(ViperGdgConfig).WriteConfig() } - file := s.ViperConfig().ConfigFileUsed() - data, err := yaml.Marshal(s.AppConfig) + file := s.GetViperConfig(ViperGdgConfig).ConfigFileUsed() + data, err := yaml.Marshal(s.gdgConfig) if err == nil { err = os.WriteFile(file, data, 0600) } @@ -142,12 +149,12 @@ func (s *Configuration) SaveToDisk(useViper bool) error { return err } -func (app *AppConfig) GetContext() string { +func (app *GDGAppConfiguration) GetContext() string { return strings.ToLower(app.ContextName) } // Temporary function -func (app *AppConfig) GetContextMap() map[string]interface{} { +func (app *GDGAppConfiguration) GetContextMap() map[string]interface{} { response := make(map[string]interface{}) data, err := json.Marshal(app.Contexts) if err != nil { @@ -170,7 +177,7 @@ var ( // GetCloudConfiguration Returns storage type and configuration func (s *Configuration) GetCloudConfiguration(configName string) (string, map[string]string) { - appData := s.AppConfig.StorageEngine[configName] + appData := s.GetGDGConfig().StorageEngine[configName] storageType := "local" if len(appData) != 0 { storageType = appData["kind"] @@ -178,36 +185,47 @@ func (s *Configuration) GetCloudConfiguration(configName string) (string, map[st return storageType, appData } -// ViperConfig returns the loaded configuration via a viper reference -func (s *Configuration) ViperConfig() *viper.Viper { - return s.defaultConfig -} - -func (app *AppConfig) GetContexts() map[string]*GrafanaConfig { +func (app *GDGAppConfiguration) GetContexts() map[string]*GrafanaConfig { return app.Contexts } // GetContexts returns map of all contexts func (s *Configuration) GetContexts() map[string]*GrafanaConfig { - return s.GetAppConfig().GetContexts() + return s.GetGDGConfig().GetContexts() } // IsDebug returns true if debug mode is enabled func (s *Configuration) IsDebug() bool { - return s.defaultConfig.GetBool("global.debug") + return s.GetViperConfig(ViperGdgConfig).GetBool("global.debug") } // IgnoreSSL returns true if SSL errors should be ignored func (s *Configuration) IgnoreSSL() bool { - return s.defaultConfig.GetBool("global.ignore_ssl_errors") + return s.GetViperConfig(ViperGdgConfig).GetBool("global.ignore_ssl_errors") } func Config() *Configuration { return configData } -func (s *Configuration) GetAppConfig() *AppConfig { - return s.AppConfig +// GetGDGConfig return instance of gdg app configuration +func (s *Configuration) GetGDGConfig() *GDGAppConfiguration { + return s.gdgConfig +} + +// GetTemplateConfig return instance of gdg app configuration +func (s *Configuration) GetTemplateConfig() *TemplatingConfig { + return s.templatingConfig +} + +func (s *TemplatingConfig) GetTemplate(name string) (*TemplateDashboards, bool) { + for ndx, t := range s.Entities.Dashboards { + if t.TemplateName == name { + return &s.Entities.Dashboards[ndx], true + } + } + + return nil, false } // setMapValueEnvOverride recursively iterate over the keys and updates the map value accordingly @@ -248,6 +266,22 @@ func applyEnvOverrides(contexts map[string]interface{}, mapName string, config * return contexts } +func InitTemplateConfig(override string) { + if configData == nil { + log.Fatal("GDG configuration was not able to be loaded, cannot continue") + } + appName := "templates" + configData.templatingConfig = new(TemplatingConfig) + v, err := readViperConfig[TemplatingConfig](appName, configSearchPaths, configData.templatingConfig) + if err != nil { + log.Fatal("unable to read templating configuration ") + } + if configData.viperConfiguration == nil { + configData.viperConfiguration = make(map[string]*viper.Viper) + } + configData.viperConfiguration[ViperTemplateConfig] = v +} + func InitConfig(override, defaultConfig string) { configData = &Configuration{} appName := "importer" @@ -263,8 +297,10 @@ func InitConfig(override, defaultConfig string) { configDirs = append(configDirs, configSearchPaths...) } var err error + var v *viper.Viper + configData.gdgConfig = new(GDGAppConfiguration) - configData.defaultConfig, configData.AppConfig, err = readViperConfig(appName, configDirs) + v, err = readViperConfig[GDGAppConfiguration](appName, configDirs, configData.gdgConfig) var configFileNotFoundError viper.ConfigFileNotFoundError ok := errors.As(err, &configFileNotFoundError) @@ -280,7 +316,7 @@ func InitConfig(override, defaultConfig string) { } appName = "importer" - configData.defaultConfig, configData.AppConfig, err = readViperConfig(appName, configDirs) + v, err = readViperConfig[GDGAppConfiguration](appName, configDirs, configData.gdgConfig) if err != nil { log.Panic(err) } @@ -288,16 +324,20 @@ func InitConfig(override, defaultConfig string) { } else if err != nil { // config is found but is invalid log.Fatal("Invalid configuration detected, please fix your configuration and try again.") } + if configData.viperConfiguration == nil { + configData.viperConfiguration = make(map[string]*viper.Viper, 0) + } + configData.viperConfiguration[ViperGdgConfig] = v //unmarshall struct - contexts := configData.defaultConfig.GetStringMap("contexts") - contexts = applyEnvOverrides(contexts, "contexts", configData.defaultConfig) + contexts := configData.GetViperConfig(ViperGdgConfig).GetStringMap("contexts") + contexts = applyEnvOverrides(contexts, "contexts", v) contextMaps, err := yaml.Marshal(contexts) if err != nil { log.Fatal("Failed to decode context map, please check your configuration") } - err = yaml.Unmarshal(contextMaps, &configData.AppConfig.Contexts) + err = yaml.Unmarshal(contextMaps, &configData.gdgConfig.Contexts) if err != nil { log.Fatal("No valid configuration file has been found") } @@ -305,8 +345,8 @@ func InitConfig(override, defaultConfig string) { } // readViperConfig utilizes the viper library to load the config from the selected paths -func readViperConfig(appName string, configDirs []string) (*viper.Viper, *AppConfig, error) { - app := &AppConfig{} +func readViperConfig[T any](appName string, configDirs []string, object *T) (*viper.Viper, error) { + v := viper.New() v.SetEnvPrefix("GDG") replacer := strings.NewReplacer(".", "__") @@ -321,8 +361,8 @@ func readViperConfig(appName string, configDirs []string) (*viper.Viper, *AppCon err := v.ReadInConfig() if err == nil { //Marshall the data read into a app struct - err = v.Unmarshal(app) + err = v.Unmarshal(object) } - return v, app, err + return v, err } diff --git a/internal/config/config_model.go b/internal/config/config_model.go index f909a392..ba86f629 100644 --- a/internal/config/config_model.go +++ b/internal/config/config_model.go @@ -28,6 +28,7 @@ const ( OrganizationMetaResource = "org" TeamResource = "teams" UserResource = "users" + TemplatesResource = "templates" ) var orgNamespacedResource = map[ResourceType]bool{ @@ -164,31 +165,6 @@ func (s *GrafanaConfig) GetPath(r ResourceType) string { return r.GetPath(s.OutputPath) } -// GetDashboardOutput returns the path of the dashboards output -func (s *GrafanaConfig) GetDashboardOutput() string { - return path.Join(s.OutputPath, DashboardResource) -} - -func (s *GrafanaConfig) GetDataSourceOutput() string { - return path.Join(s.OutputPath, ConnectionResource) -} - -func (s *GrafanaConfig) GetAlertNotificationOutput() string { - return path.Join(s.OutputPath, AlertNotificationResource) -} - -func (s *GrafanaConfig) GetUserOutput() string { - return path.Join(s.OutputPath, UserResource) -} - -func (s *GrafanaConfig) GetFolderOutput() string { - return path.Join(s.OutputPath, FolderResource) -} - -func (s *GrafanaConfig) GetTeamOutput() string { - return path.Join(s.OutputPath, TeamResource) -} - // GetOrgMonitoredFolders return the OrganizationMonitoredFolders that override a given Org func (s *GrafanaConfig) GetOrgMonitoredFolders(orgId int64) []string { for _, item := range s.MonitoredFoldersOverride { diff --git a/internal/config/config_new_ctx.go b/internal/config/config_new_ctx.go index c1e00408..5a2de286 100644 --- a/internal/config/config_new_ctx.go +++ b/internal/config/config_new_ctx.go @@ -115,9 +115,9 @@ func (s *Configuration) NewContext(name string) { log.Fatal(err.Error()) } - contextMap := s.GetAppConfig().GetContexts() + contextMap := s.GetGDGConfig().GetContexts() contextMap[name] = &answers - s.GetAppConfig().ContextName = name + s.GetGDGConfig().ContextName = name err = s.SaveToDisk(false) if err != nil { diff --git a/internal/config/config_test.go b/internal/config/config_test.go index 6ee57f7f..1c92bd83 100644 --- a/internal/config/config_test.go +++ b/internal/config/config_test.go @@ -46,10 +46,10 @@ func TestSetup(t *testing.T) { os.Setenv("GDG_CONTEXT_NAME", "qa") config.InitConfig("testing.yml", "") - conf := config.Config().ViperConfig() + conf := config.Config().GetViperConfig(config.ViperGdgConfig) slog.Info(conf.ConfigFileUsed()) - confobj := config.Config().GetAppConfig() + confobj := config.Config().GetGDGConfig() slog.Info(confobj.ContextName) assert.NotNil(t, conf) context := conf.GetString("context_name") @@ -69,10 +69,10 @@ func TestWatchedFoldersConfig(t *testing.T) { os.Setenv("GDG_CONTEXT_NAME", "qa") config.InitConfig("testing.yml", "") - conf := config.Config().ViperConfig() + conf := config.Config().GetViperConfig(config.ViperGdgConfig) slog.Info(conf.ConfigFileUsed()) - confobj := config.Config().GetAppConfig() + confobj := config.Config().GetGDGConfig() slog.Info(confobj.ContextName) assert.NotNil(t, conf) context := conf.GetString("context_name") @@ -101,7 +101,7 @@ func TestWatchedFoldersConfig(t *testing.T) { func TestSetupDifferentPath(t *testing.T) { cfgFile := DuplicateConfig(t) config.InitConfig(cfgFile, "") - conf := config.Config().ViperConfig() + conf := config.Config().GetViperConfig(config.ViperGdgConfig) assert.NotNil(t, conf) context := conf.GetString("context_name") assert.Equal(t, context, "production") @@ -114,7 +114,7 @@ func TestConfigEnv(t *testing.T) { os.Setenv("GDG_CONTEXT_NAME", "testing") os.Setenv("GDG_CONTEXTS__TESTING__URL", "www.google.com") config.InitConfig("testing.yml", "") - conf := config.Config().ViperConfig() + conf := config.Config().GetViperConfig(config.ViperGdgConfig) context := conf.GetString("context_name") assert.Equal(t, context, "testing") url := conf.GetString("contexts.testing.url") @@ -124,7 +124,7 @@ func TestConfigEnv(t *testing.T) { os.Setenv("GDG_CONTEXT_NAME", "production") os.Setenv("GDG_CONTEXTS__PRODUCTION__URL", "grafana.com") config.InitConfig("testing.yml", "") - conf = config.Config().ViperConfig() + conf = config.Config().GetViperConfig(config.ViperGdgConfig) url = conf.GetString("contexts.production.url") assert.Equal(t, url, "grafana.com") } @@ -137,8 +137,8 @@ func validateGrafanaQA(t *testing.T, grafana *config.GrafanaConfig) { folders := grafana.GetMonitoredFolders() assert.True(t, funk.Contains(folders, "Folder1")) assert.True(t, funk.Contains(folders, "Folder2")) - assert.Equal(t, "qa/connections", grafana.GetDataSourceOutput()) - assert.Equal(t, "qa/dashboards", grafana.GetDashboardOutput()) + assert.Equal(t, "qa/org_1/connections", grafana.GetPath(config.ConnectionResource)) + assert.Equal(t, "qa/org_1/dashboards", grafana.GetPath(config.DashboardResource)) dsSettings := grafana.DataSourceSettings request := models.AddDataSourceCommand{} assert.Equal(t, len(grafana.DataSourceSettings.MatchingRules), 3) diff --git a/internal/config/types.go b/internal/config/types.go index 3853efd1..ffb871fe 100644 --- a/internal/config/types.go +++ b/internal/config/types.go @@ -4,9 +4,34 @@ import ( "github.com/spf13/viper" ) +const ( + ViperGdgConfig = "gdg" + ViperTemplateConfig = "template" +) + type Configuration struct { - defaultConfig *viper.Viper - AppConfig *AppConfig + viperConfiguration map[string]*viper.Viper + gdgConfig *GDGAppConfiguration + templatingConfig *TemplatingConfig +} + +type TemplatingConfig struct { + Entities TemplateEntities `mapstructure:"entities"` +} + +type TemplateEntities struct { + Dashboards []TemplateDashboards `mapstructure:"dashboards"` +} + +type TemplateDashboards struct { + TemplateName string `mapstructure:"template_name"` + DashboardEntities []TemplateDashboardEntity `mapstructure:"output"` +} + +type TemplateDashboardEntity struct { + Folder string `mapstructure:"folder"` + OrgId int64 `mapstructure:"org_id"` + TemplateData map[string]interface{} `mapstructure:"template_data"` } // AppGlobals is the global configuration for the application @@ -15,8 +40,8 @@ type AppGlobals struct { IgnoreSSLErrors bool `mapstructure:"ignore_ssl_errors" yaml:"ignore_ssl_errors"` } -// AppConfig is the configuration for the application -type AppConfig struct { +// GDGAppConfiguration is the configuration for the application +type GDGAppConfiguration struct { ContextName string `mapstructure:"context_name" yaml:"context_name"` StorageEngine map[string]map[string]string `mapstructure:"storage_engine" yaml:"storage_engine"` Contexts map[string]*GrafanaConfig `mapstructure:"contexts" yaml:"contexts"` diff --git a/internal/service/common.go b/internal/service/common.go index 8912ed69..c8b048ca 100644 --- a/internal/service/common.go +++ b/internal/service/common.go @@ -4,8 +4,8 @@ import ( "errors" "fmt" "github.com/esnet/gdg/internal/config" + "github.com/esnet/gdg/internal/tools" "github.com/gosimple/slug" - "log" "log/slog" "os" "path/filepath" @@ -33,14 +33,6 @@ func updateSlug(board string) string { return "" } -// CreateDestinationPath Handle osMkdir Errors -func CreateDestinationPath(v string) { - err := os.MkdirAll(v, 0750) - if err != nil { - log.Panicf("unable to create path %s, err: %s", v, err.Error()) - } -} - // getFolderFromResourcePath if a use encodes a path separator in path, we can't determine the folder name. This strips away // all the known components of a resource type leaving only the folder name. func getFolderFromResourcePath(storageEngine string, filePath string, resourceType config.ResourceType) (string, error) { @@ -63,7 +55,14 @@ func getFolderFromResourcePath(storageEngine string, filePath string, resourceTy return "", errors.New("unable to parse resource to retrieve folder name") } -func buildResourceFolder(folderName string, resourceType config.ResourceType) string { +func buildResourcePath(folderName string, resourceType config.ResourceType) string { + v := fmt.Sprintf("%s/%s.json", config.Config().GetDefaultGrafanaConfig().GetPath(resourceType), folderName) + tools.CreateDestinationPath(filepath.Dir(v)) + return v + +} + +func BuildResourceFolder(folderName string, resourceType config.ResourceType) string { if resourceType == config.DashboardResource && folderName == "" { folderName = DefaultFolderName } @@ -73,13 +72,6 @@ func buildResourceFolder(folderName string, resourceType config.ResourceType) st folderName = strings.ReplaceAll(folderName, strSeperator, fmt.Sprintf("//%s", strSeperator)) } v := fmt.Sprintf("%s/%s", config.Config().GetDefaultGrafanaConfig().GetPath(resourceType), folderName) - CreateDestinationPath(v) + tools.CreateDestinationPath(v) return v } - -func buildResourcePath(folderName string, resourceType config.ResourceType) string { - v := fmt.Sprintf("%s/%s.json", config.Config().GetDefaultGrafanaConfig().GetPath(resourceType), folderName) - CreateDestinationPath(filepath.Dir(v)) - return v - -} diff --git a/internal/service/common_test.go b/internal/service/common_test.go index 514df338..9d155382 100644 --- a/internal/service/common_test.go +++ b/internal/service/common_test.go @@ -22,11 +22,11 @@ func TestUserPath(t *testing.T) { err := os.Setenv("GDG_CONTEXT_NAME", "qa") assert.Nil(t, err) config.InitConfig("testing.yml", "'") - path := buildResourceFolder("", config.UserResource) + path := BuildResourceFolder("", config.UserResource) assert.Equal(t, "qa/users/", path) } func TestBuildDashboardPath(t *testing.T) { - result := buildResourceFolder("General", config.DashboardResource) + result := BuildResourceFolder("General", config.DashboardResource) assert.Equal(t, "qa/org_1/dashboards/General", result) } diff --git a/internal/service/contract.go b/internal/service/contract.go index 550e563e..83d8ce08 100644 --- a/internal/service/contract.go +++ b/internal/service/contract.go @@ -51,7 +51,7 @@ func NewDashNGoImpl() *DashNGoImpl { func newInstance() *DashNGoImpl { obj := &DashNGoImpl{} obj.grafanaConf = config.Config().GetDefaultGrafanaConfig() - obj.configRef = config.Config().ViperConfig() + obj.configRef = config.Config().GetViperConfig(config.ViperGdgConfig) obj.Login() obj.debug = config.Config().IsDebug() diff --git a/internal/service/dashboards.go b/internal/service/dashboards.go index c2d4b889..46456b3f 100644 --- a/internal/service/dashboards.go +++ b/internal/service/dashboards.go @@ -209,7 +209,7 @@ func (s *DashNGoImpl) DownloadDashboards(filter filters.Filter) []string { continue } - fileName := fmt.Sprintf("%s/%s.json", buildResourceFolder(link.FolderTitle, config.DashboardResource), metaData.Payload.Meta.Slug) + fileName := fmt.Sprintf("%s/%s.json", BuildResourceFolder(link.FolderTitle, config.DashboardResource), metaData.Payload.Meta.Slug) if err = s.storage.WriteFile(fileName, pretty.Pretty(rawBoard)); err != nil { slog.Error("Unable to save dashboard to file\n", "err", err, "dashboard", metaData.Payload.Meta.Slug) } else { @@ -329,7 +329,7 @@ func (s *DashNGoImpl) UploadDashboards(filterReq filters.Filter) { } if _, exportError := s.client.Dashboards.ImportDashboard(importDashReq, s.getAuth()); exportError != nil { - slog.Info("error on Exporting dashboard", "dashboard-filename", file, "err", err) + slog.Info("error on Exporting dashboard", "dashboard-filename", file, "err", exportError) continue } diff --git a/internal/service/libraryelements.go b/internal/service/libraryelements.go index 1b8416a9..1ebf5136 100644 --- a/internal/service/libraryelements.go +++ b/internal/service/libraryelements.go @@ -106,7 +106,7 @@ func (s *DashNGoImpl) DownloadLibraryElements(filter filters.Filter) []string { folderName = val } - libraryPath := fmt.Sprintf("%s/%s.json", buildResourceFolder(folderName, config.LibraryElementResource), slug.Make(item.Name)) + libraryPath := fmt.Sprintf("%s/%s.json", BuildResourceFolder(folderName, config.LibraryElementResource), slug.Make(item.Name)) if err = s.storage.WriteFile(libraryPath, dsPacked); err != nil { slog.Error("Unable to write file", "err", err, "library-element", slug.Make(item.Name)) diff --git a/internal/service/teams.go b/internal/service/teams.go index 0efeda85..ed1aaff9 100644 --- a/internal/service/teams.go +++ b/internal/service/teams.go @@ -60,7 +60,7 @@ func NewTeamFilter(entries ...string) filters.Filter { func (s *DashNGoImpl) DownloadTeams(filter filters.Filter) map[*models.TeamDTO][]*models.TeamMemberDTO { teamListing := maps.Keys(s.ListTeams(filter)) importedTeams := make(map[*models.TeamDTO][]*models.TeamMemberDTO) - teamPath := buildResourceFolder("", config.TeamResource) + teamPath := BuildResourceFolder("", config.TeamResource) for ndx, team := range teamListing { //Teams teamFileName := filepath.Join(teamPath, GetSlug(team.Name), "team.json") diff --git a/internal/service/user.go b/internal/service/user.go index 2c2a5f9c..52a631ce 100644 --- a/internal/service/user.go +++ b/internal/service/user.go @@ -89,7 +89,7 @@ func (s *DashNGoImpl) DownloadUsers(filter filters.Filter) []string { userListing := s.ListUsers(filter) var importedUsers []string - userPath := buildResourceFolder("", config.UserResource) + userPath := BuildResourceFolder("", config.UserResource) for ndx, user := range userListing { if s.isAdminUser(user.ID, user.Name) { slog.Info("Skipping admin super user") diff --git a/internal/templating/templating.go b/internal/templating/templating.go new file mode 100644 index 00000000..a7810014 --- /dev/null +++ b/internal/templating/templating.go @@ -0,0 +1,133 @@ +package templating + +import ( + "fmt" + "github.com/esnet/gdg/internal/config" + "github.com/esnet/gdg/internal/service" + "log" + "log/slog" + "os" + "strings" + "text/template" +) + +type Templating interface { + Generate(templateName string) error +} + +type templateImpl struct { +} + +func NewTemplate() Templating { + return &templateImpl{} +} + +var fns = template.FuncMap{ + "ToLower": strings.ToLower, + "ToSlug": service.GetSlug, + "DefaultString": func(val interface{}) string { + const defaultValue = "[nil]" + switch v := val.(type) { + case string: + { + if v == "" { + return defaultValue + } else { + return v + } + } + default: + return defaultValue + } + }, + "QuotedStringJoin": func(arr []interface{}) string { + result := "" + for ndx, item := range arr { + if len(arr)-1 == ndx { + result += fmt.Sprintf("\"%v\"", item) + } else { + result += fmt.Sprintf("\"%v\",", item) + } + } + + return result + }, + "StringJoin": func(arr []interface{}) string { + result := "" + for ndx, item := range arr { + if len(arr)-1 == ndx { + result += fmt.Sprintf("%v", item) + } else { + result += fmt.Sprintf("%v,", item) + } + } + + return result + }, +} + +func (t *templateImpl) Generate(templateName string) error { + //Get Path + //Remove extension if specified. + templateName = strings.ReplaceAll(templateName, ".go.tmpl", "") + cfg := config.Config() + var entities []config.TemplateDashboards + entities = cfg.GetTemplateConfig().Entities.Dashboards + if templateName != "" { + entity, ok := cfg.GetTemplateConfig().GetTemplate(templateName) + if ok { + entities = append(entities, *entity) + } + } + for _, entity := range entities { + slog.Info("Processing template", "template", entity.TemplateName) + tmplPath := cfg.GetDefaultGrafanaConfig().GetPath(config.TemplatesResource) + fileLocation := fmt.Sprintf("%s/%s.go.tmpl", tmplPath, entity.TemplateName) + _, err := os.Stat(fileLocation) + if err != nil { + slog.Error("Processing template, file could not be found", "template", entity.TemplateName, "file", fileLocation) + return err + } + templateData, err := os.ReadFile(fileLocation) + if err != nil { + log.Fatal("unable to open file ", fileLocation) + } + for _, outputEntity := range entity.DashboardEntities { + grafana := cfg.GetDefaultGrafanaConfig() + slog.Info("Creating a new template", "folder", outputEntity.Folder, "orgId", outputEntity.OrgId, "data", outputEntity.TemplateData) + grafana.OrganizationId = outputEntity.OrgId + //outputPath := grafana.GetPath(config.DashboardResource) + outputPath := service.BuildResourceFolder(outputEntity.Folder, config.DashboardResource) + slog.Info("Writing data to destination", "output", outputPath) + t, err := template.New("").Funcs(fns).Parse(string(templateData)) + if err != nil { + slog.Error("unable to parse template") + } + + //Create new file. + err = os.MkdirAll(outputPath, 0755) + if err != nil { + log.Fatal("unable to create destination directory") + } + f, err := os.Create(fmt.Sprintf("%s/%s.json", outputPath, entity.TemplateName)) + defer func() { + err = f.Close() + if err != nil { + slog.Warn("failed to close template file", "filename", f.Name()) + } + }() + if err != nil { + log.Println("create file: ", err) + return err + } + + err = t.Execute(f, outputEntity.TemplateData) // merge. + if err != nil { + slog.Error("execute", "err", err) + return err + } + } + } + return nil + +} diff --git a/internal/templating/templating_test.go b/internal/templating/templating_test.go new file mode 100644 index 00000000..b5ed303a --- /dev/null +++ b/internal/templating/templating_test.go @@ -0,0 +1,17 @@ +package templating + +import ( + "github.com/esnet/gdg/internal/config" + "github.com/stretchr/testify/assert" + "testing" +) + +func TestGenerate(t *testing.T) { + //Setup + config.InitConfig("testing.yml", "") + config.InitTemplateConfig("templates-example.yml") + template := NewTemplate() + err := template.Generate("template_example") + assert.Nil(t, err) + +} diff --git a/internal/tools/generics_tooling.go b/internal/tools/generics_tooling.go index 209e1e7d..d76866c1 100644 --- a/internal/tools/generics_tooling.go +++ b/internal/tools/generics_tooling.go @@ -1,6 +1,10 @@ package tools -import "encoding/json" +import ( + "encoding/json" + "log" + "os" +) func PtrOf[T any](value T) *T { return &value @@ -19,3 +23,11 @@ func DeepCopy[T any](value T) (*T, error) { return clone, nil } + +// CreateDestinationPath Handle osMkdir Errors +func CreateDestinationPath(v string) { + err := os.MkdirAll(v, 0750) + if err != nil { + log.Panicf("unable to create path %s, err: %s", v, err.Error()) + } +} diff --git a/test/common_test.go b/test/common_test.go index ac2d85a4..a9e3cd64 100644 --- a/test/common_test.go +++ b/test/common_test.go @@ -173,7 +173,7 @@ func createSimpleClient(t *testing.T, cfgName *string) (service.GrafanaService, assert.Nil(t, err) config.InitConfig(*cfgName, "'") - conf := config.Config().ViperConfig() + conf := config.Config().GetViperConfig(config.ViperGdgConfig) assert.NotNil(t, conf) //Hack for Local testing contextName := conf.GetString("context_name") @@ -208,7 +208,7 @@ func SetupCloudFunction(params []string) (context.Context, service.GrafanaServic service.SSLEnabled: "false", } - cfgObj := config.Config().GetAppConfig() + cfgObj := config.Config().GetGDGConfig() defaultCfg := config.Config().GetDefaultGrafanaConfig() defaultCfg.Storage = "test" cfgObj.StorageEngine["test"] = m diff --git a/test/connections_integration_test.go b/test/connections_integration_test.go index 3233360a..b4161092 100644 --- a/test/connections_integration_test.go +++ b/test/connections_integration_test.go @@ -52,7 +52,7 @@ func TestConnectionFilter(t *testing.T) { _, _, clean := initTest(t, nil) defer clean() - testingContext := config.Config().GetAppConfig().GetContexts()["testing"] + testingContext := config.Config().GetGDGConfig().GetContexts()["testing"] testingContext.GetDataSourceSettings().FilterRules = []config.MatchingRule{ { Field: "name", @@ -64,7 +64,7 @@ func TestConnectionFilter(t *testing.T) { Regex: "elasticsearch|globalnoc-tsds-datasource", }, } - testingContext = config.Config().GetAppConfig().GetContexts()["testing"] + testingContext = config.Config().GetGDGConfig().GetContexts()["testing"] _ = testingContext apiClient := service.NewApiService("dummy") diff --git a/test/dashboard_integration_test.go b/test/dashboard_integration_test.go index 33413e2f..3c96853e 100644 --- a/test/dashboard_integration_test.go +++ b/test/dashboard_integration_test.go @@ -111,7 +111,7 @@ func TestWildcardFilter(t *testing.T) { filtersEntity.AddFilter(filters.TagsFilter, strings.Join([]string{"flow", "netsage"}, ",")) // Enable Wildcard - testingContext := config.Config().GetAppConfig().GetContexts()["testing"] + testingContext := config.Config().GetGDGConfig().GetContexts()["testing"] testingContext.GetFilterOverrides().IgnoreDashboardFilters = true assert.True(t, testingContext.GetFilterOverrides().IgnoreDashboardFilters) diff --git a/test/data/org_1/dashboards/Other/dashboard-makeover-challenge.json b/test/data/org_1/dashboards/Other/dashboard-makeover-challenge.json deleted file mode 100644 index 27d9327f..00000000 --- a/test/data/org_1/dashboards/Other/dashboard-makeover-challenge.json +++ /dev/null @@ -1,1333 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations \u0026 Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "description": "Extreme Dashboard Makeover Workshop", - "editable": true, - "fiscalYearStartMonth": 0, - "gnetId": 16415, - "graphTooltip": 0, - "id": 93, - "links": [], - "liveNow": false, - "panels": [ - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "testdata", - "uid": "EJHgYyf4z" - }, - "description": "", - "fieldConfig": { - "defaults": { - "unit": "fahrenheit" - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 0 - }, - "hiddenSeries": false, - "id": 13, - "interval": "", - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "libraryPanel": { - "description": "", - "meta": { - "connectedDashboards": 3, - "created": "2022-05-17T19:35:06Z", - "createdBy": { - "avatarUrl": "/avatar/579fc54abdc9ab34fb4865322f2870a1", - "id": 13, - "name": "mike.johnson@grafana.com" - }, - "folderName": "mj", - "folderUid": "R0bMCcW7z", - "updated": "2022-05-17T19:37:14Z", - "updatedBy": { - "avatarUrl": "/avatar/579fc54abdc9ab34fb4865322f2870a1", - "id": 13, - "name": "mike.johnson@grafana.com" - } - }, - "name": "Extreme Dashboard Makeover - Grill", - "type": "graph", - "uid": "y1C0A5unz", - "version": 2 - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.5.5", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "alias": "Grill", - "datasource": { - "type": "testdata", - "uid": "EJHgYyf4z" - }, - "max": 394, - "min": 380, - "refId": "A", - "scenarioId": "random_walk", - "startValue": 383 - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Grill", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "transformations": [], - "transparent": true, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:63", - "format": "fahrenheit", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:64", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "testdata", - "uid": "EJHgYyf4z" - }, - "description": "", - "fieldConfig": { - "defaults": { - "unit": "fahrenheit" - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 0 - }, - "hiddenSeries": false, - "id": 14, - "interval": "", - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "libraryPanel": { - "description": "", - "meta": { - "connectedDashboards": 3, - "created": "2022-05-17T19:42:54Z", - "createdBy": { - "avatarUrl": "/avatar/579fc54abdc9ab34fb4865322f2870a1", - "id": 13, - "name": "mike.johnson@grafana.com" - }, - "folderName": "mj", - "folderUid": "R0bMCcW7z", - "updated": "2022-05-17T19:42:54Z", - "updatedBy": { - "avatarUrl": "/avatar/579fc54abdc9ab34fb4865322f2870a1", - "id": 13, - "name": "mike.johnson@grafana.com" - } - }, - "name": "Extreme Dashboard Makeover - Room Temperature (F)", - "type": "graph", - "uid": "3dSe05X7z", - "version": 1 - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.5.5", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "alias": "Zone 1", - "datasource": { - "type": "testdata", - "uid": "EJHgYyf4z" - }, - "max": 70, - "min": 67, - "refId": "A", - "scenarioId": "random_walk", - "spread": 0.5, - "startValue": 68 - }, - { - "alias": "Zone 2", - "datasource": { - "type": "testdata", - "uid": "EJHgYyf4z" - }, - "hide": false, - "max": 71, - "min": 69, - "noise": 0.1, - "refId": "B", - "scenarioId": "random_walk", - "spread": 0.5, - "startValue": 70 - }, - { - "alias": "Zone 3", - "datasource": { - "type": "testdata", - "uid": "EJHgYyf4z" - }, - "hide": false, - "max": 71, - "min": 69, - "noise": 0.1, - "refId": "C", - "scenarioId": "random_walk", - "spread": 0.5, - "startValue": 70 - }, - { - "alias": "Zone 4", - "datasource": { - "type": "testdata", - "uid": "EJHgYyf4z" - }, - "hide": false, - "max": 71, - "min": 69, - "noise": 0.1, - "refId": "D", - "scenarioId": "random_walk", - "spread": 0.5, - "startValue": 70 - }, - { - "alias": "Zone 5", - "datasource": { - "type": "testdata", - "uid": "EJHgYyf4z" - }, - "hide": false, - "max": 71, - "min": 69, - "noise": 0.1, - "refId": "E", - "scenarioId": "random_walk", - "spread": 0.5, - "startValue": 70 - }, - { - "alias": "Zone 6", - "datasource": { - "type": "testdata", - "uid": "EJHgYyf4z" - }, - "hide": false, - "max": 71, - "min": 69, - "noise": 0.1, - "refId": "F", - "scenarioId": "random_walk", - "spread": 0.5, - "startValue": 70 - }, - { - "alias": "Zone 7", - "datasource": { - "type": "testdata", - "uid": "EJHgYyf4z" - }, - "hide": false, - "max": 71, - "min": 69, - "noise": 0.1, - "refId": "G", - "scenarioId": "random_walk", - "spread": 0.5, - "startValue": 70 - }, - { - "alias": "Zone 8", - "datasource": { - "type": "testdata", - "uid": "EJHgYyf4z" - }, - "hide": false, - "max": 71, - "min": 69, - "noise": 0.1, - "refId": "H", - "scenarioId": "random_walk", - "spread": 0.5, - "startValue": 70 - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Room Temperature (F)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "transformations": [], - "transparent": true, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:63", - "format": "fahrenheit", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:64", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "datasource": { - "type": "grafana-googlesheets-datasource", - "uid": "uL86Byf4k" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": true - }, - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "yellow", - "value": 35 - }, - { - "color": "red", - "value": 60 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Purchase Date" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeFromNow" - } - ] - } - ] - }, - "gridPos": { - "h": 30, - "w": 5, - "x": 0, - "y": 8 - }, - "id": 2, - "interval": "", - "libraryPanel": { - "description": "", - "meta": { - "connectedDashboards": 3, - "created": "2022-04-27T18:58:06Z", - "createdBy": { - "avatarUrl": "/avatar/579fc54abdc9ab34fb4865322f2870a1", - "id": 13, - "name": "mike.johnson@grafana.com" - }, - "folderName": "mj", - "folderUid": "R0bMCcW7z", - "updated": "2022-04-27T20:40:51Z", - "updatedBy": { - "avatarUrl": "/avatar/579fc54abdc9ab34fb4865322f2870a1", - "id": 13, - "name": "mike.johnson@grafana.com" - } - }, - "name": "Dashboard Makeover - Time since we purchased these spices", - "type": "table", - "uid": "1D_h3UQ7k", - "version": 4 - }, - "links": [ - { - "targetBlank": true, - "title": "Raw Data", - "url": "https://docs.google.com/spreadsheets/d/1uoZrXcnv_ZeKoLk56eaBdTOI8kMYaulZdMxFNQUxmGs/edit#gid=527121891" - } - ], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.5.5", - "targets": [ - { - "cacheDurationSeconds": 0, - "datasource": { - "type": "grafana-googlesheets-datasource", - "uid": "uL86Byf4k" - }, - "expr": "web_http_5xx_errors", - "legendFormat": "500", - "range": "SpicesAge!A1:B32", - "refId": "A", - "spreadsheet": "1uoZrXcnv_ZeKoLk56eaBdTOI8kMYaulZdMxFNQUxmGs", - "useTimeFilter": false - } - ], - "title": "Time since we purchased these spices", - "transformations": [], - "type": "table" - }, - { - "datasource": { - "type": "grafana-googlesheets-datasource", - "uid": "uL86Byf4k" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "left", - "displayMode": "auto", - "inspect": true - }, - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "yellow", - "value": 35 - }, - { - "color": "red", - "value": 60 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Purchase Date" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeFromNow" - } - ] - } - ] - }, - "gridPos": { - "h": 4, - "w": 19, - "x": 5, - "y": 8 - }, - "id": 10, - "interval": "", - "libraryPanel": { - "description": "", - "meta": { - "connectedDashboards": 3, - "created": "2022-04-28T12:36:10Z", - "createdBy": { - "avatarUrl": "/avatar/579fc54abdc9ab34fb4865322f2870a1", - "id": 13, - "name": "mike.johnson@grafana.com" - }, - "folderName": "mj", - "folderUid": "R0bMCcW7z", - "updated": "2022-05-17T19:18:36Z", - "updatedBy": { - "avatarUrl": "/avatar/579fc54abdc9ab34fb4865322f2870a1", - "id": 13, - "name": "mike.johnson@grafana.com" - } - }, - "name": "Dashboard Makeover - Lighting Status", - "type": "table", - "uid": "u97RX_Q7z", - "version": 2 - }, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.5.5", - "targets": [ - { - "cacheDurationSeconds": 0, - "datasource": { - "type": "grafana-googlesheets-datasource", - "uid": "uL86Byf4k" - }, - "expr": "web_http_5xx_errors", - "legendFormat": "500", - "range": "Lighting!A1:BW2", - "refId": "A", - "spreadsheet": "1uoZrXcnv_ZeKoLk56eaBdTOI8kMYaulZdMxFNQUxmGs", - "useTimeFilter": false - } - ], - "title": "Lighting Status", - "transformations": [], - "type": "table" - }, - { - "datasource": { - "type": "testdata", - "uid": "EJHgYyf4z" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-purple", - "value": null - }, - { - "color": "red", - "value": 380 - } - ] - }, - "unit": "fahrenheit" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 8, - "x": 5, - "y": 12 - }, - "id": 16, - "interval": "", - "libraryPanel": { - "description": "", - "meta": { - "connectedDashboards": 3, - "created": "2022-05-17T19:50:27Z", - "createdBy": { - "avatarUrl": "/avatar/579fc54abdc9ab34fb4865322f2870a1", - "id": 13, - "name": "mike.johnson@grafana.com" - }, - "folderName": "mj", - "folderUid": "R0bMCcW7z", - "updated": "2022-05-17T19:50:27Z", - "updatedBy": { - "avatarUrl": "/avatar/579fc54abdc9ab34fb4865322f2870a1", - "id": 13, - "name": "mike.johnson@grafana.com" - } - }, - "name": "Extreme Dashboard Makeover - Mac Oven", - "type": "stat", - "uid": "VvzpJ5X7z", - "version": 1 - }, - "links": [], - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "center", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { - "type": "testdata", - "uid": "EJHgYyf4z" - }, - "max": 377, - "min": 373, - "refId": "A", - "scenarioId": "random_walk", - "startValue": 375 - } - ], - "title": "Mac Oven", - "transformations": [], - "transparent": true, - "type": "stat" - }, - { - "datasource": { - "type": "testdata", - "uid": "EJHgYyf4z" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 11, - "w": 11, - "x": 13, - "y": 12 - }, - "id": 19, - "interval": "", - "libraryPanel": { - "description": "", - "meta": { - "connectedDashboards": 3, - "created": "2022-05-17T19:55:14Z", - "createdBy": { - "avatarUrl": "/avatar/579fc54abdc9ab34fb4865322f2870a1", - "id": 13, - "name": "mike.johnson@grafana.com" - }, - "folderName": "mj", - "folderUid": "R0bMCcW7z", - "updated": "2022-05-17T20:57:48Z", - "updatedBy": { - "avatarUrl": "/avatar/579fc54abdc9ab34fb4865322f2870a1", - "id": 13, - "name": "mike.johnson@grafana.com" - } - }, - "name": "Extreme Dashboard Makeover - Salmon Cooking Times, past 7 days", - "type": "gauge", - "uid": "fwwLJ5X7k", - "version": 4 - }, - "links": [], - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.5", - "targets": [ - { - "alias": "Rick", - "datasource": { - "type": "testdata", - "uid": "EJHgYyf4z" - }, - "refId": "A", - "scenarioId": "csv_metric_values", - "stringInput": "147,167,171,144,159,166" - }, - { - "alias": "Jose", - "datasource": { - "type": "testdata", - "uid": "EJHgYyf4z" - }, - "refId": "B", - "scenarioId": "csv_metric_values", - "stringInput": "141,144,139,141,140,140,149" - }, - { - "alias": "Kaitlyn", - "datasource": { - "type": "testdata", - "uid": "EJHgYyf4z" - }, - "refId": "C", - "scenarioId": "csv_metric_values", - "stringInput": "151,150,150,151,150,150,149" - }, - { - "alias": "Raj", - "datasource": { - "type": "testdata", - "uid": "EJHgYyf4z" - }, - "refId": "D", - "scenarioId": "csv_metric_values", - "stringInput": "147,150,155,148,154,146,149" - }, - { - "alias": "Lee", - "datasource": { - "type": "testdata", - "uid": "EJHgYyf4z" - }, - "refId": "E", - "scenarioId": "csv_metric_values", - "stringInput": "153,147,155,152,156,150,149" - } - ], - "title": "Salmon Cooking Times per side, past 7 days", - "transformations": [], - "type": "gauge" - }, - { - "datasource": { - "type": "testdata", - "uid": "EJHgYyf4z" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "blue", - "value": null - }, - { - "color": "green", - "value": 35 - }, - { - "color": "red", - "value": 39 - } - ] - }, - "unit": "fahrenheit" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 8, - "x": 5, - "y": 19 - }, - "id": 18, - "interval": "", - "libraryPanel": { - "description": "", - "meta": { - "connectedDashboards": 3, - "created": "2022-05-17T19:47:32Z", - "createdBy": { - "avatarUrl": "/avatar/579fc54abdc9ab34fb4865322f2870a1", - "id": 13, - "name": "mike.johnson@grafana.com" - }, - "folderName": "mj", - "folderUid": "R0bMCcW7z", - "updated": "2022-05-17T19:47:51Z", - "updatedBy": { - "avatarUrl": "/avatar/579fc54abdc9ab34fb4865322f2870a1", - "id": 13, - "name": "mike.johnson@grafana.com" - } - }, - "name": "Extreme Dashboard Makeover - Refrigerator Temperature (F)", - "type": "stat", - "uid": "kGPSJcu7z", - "version": 2 - }, - "links": [], - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.5", - "targets": [ - { - "alias": "Grill", - "datasource": { - "type": "testdata", - "uid": "EJHgYyf4z" - }, - "max": 38, - "min": 33, - "refId": "A", - "scenarioId": "random_walk", - "startValue": 33 - } - ], - "title": "Fridge Temp (F)", - "transformations": [], - "transparent": true, - "type": "stat" - }, - { - "datasource": { - "type": "grafana-googlesheets-datasource", - "uid": "uL86Byf4k" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "m" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Image" - }, - "properties": [ - { - "id": "custom.displayMode", - "value": "image" - }, - { - "id": "custom.width", - "value": 72 - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 11, - "x": 13, - "y": 23 - }, - "id": 9, - "interval": "", - "libraryPanel": { - "description": "", - "meta": { - "connectedDashboards": 3, - "created": "2022-04-27T21:27:23Z", - "createdBy": { - "avatarUrl": "/avatar/579fc54abdc9ab34fb4865322f2870a1", - "id": 13, - "name": "mike.johnson@grafana.com" - }, - "folderName": "mj", - "folderUid": "R0bMCcW7z", - "updated": "2022-04-27T21:29:50Z", - "updatedBy": { - "avatarUrl": "/avatar/579fc54abdc9ab34fb4865322f2870a1", - "id": 13, - "name": "mike.johnson@grafana.com" - } - }, - "name": "Dashboard Makeover - Extra Cleaning Duty Assignment Today", - "type": "table", - "uid": "T47RSwQnz", - "version": 2 - }, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.5.0", - "targets": [ - { - "cacheDurationSeconds": 0, - "datasource": { - "type": "grafana-googlesheets-datasource", - "uid": "uL86Byf4k" - }, - "expr": "web_http_5xx_errors", - "legendFormat": "500", - "range": "ExtraCleaningDuty!G1:J6", - "refId": "A", - "spreadsheet": "1uoZrXcnv_ZeKoLk56eaBdTOI8kMYaulZdMxFNQUxmGs", - "useTimeFilter": false - } - ], - "title": "Extra Cleaning Duty Assignment Today", - "transformations": [ - { - "id": "organize", - "options": { - "excludeByName": { - "Value": true - }, - "indexByName": {}, - "renameByName": { - "Duty": "" - } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "testdata", - "uid": "EJHgYyf4z" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [ - { - "options": { - "4000": { - "index": 0, - "text": "Max Time Allotted" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "#EAB839", - "value": 4000 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 11, - "w": 8, - "x": 5, - "y": 27 - }, - "id": 4, - "interval": "6h", - "libraryPanel": { - "description": "", - "meta": { - "connectedDashboards": 3, - "created": "2022-04-27T18:49:19Z", - "createdBy": { - "avatarUrl": "/avatar/579fc54abdc9ab34fb4865322f2870a1", - "id": 13, - "name": "mike.johnson@grafana.com" - }, - "folderName": "mj", - "folderUid": "R0bMCcW7z", - "updated": "2022-05-20T18:43:44Z", - "updatedBy": { - "avatarUrl": "/avatar/579fc54abdc9ab34fb4865322f2870a1", - "id": 13, - "name": "mike.johnson@grafana.com" - } - }, - "name": "Dashboard Makeover - Side Dish Prep Times, past 7 days", - "type": "gauge", - "uid": "WDs3jUQ7k", - "version": 9 - }, - "links": [], - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.3", - "targets": [ - { - "alias": "Rick", - "datasource": { - "type": "testdata", - "uid": "EJHgYyf4z" - }, - "max": 5400, - "min": 3800, - "refId": "A", - "scenarioId": "random_walk", - "spread": 100, - "startValue": 4500 - }, - { - "alias": "Jose", - "datasource": { - "type": "testdata", - "uid": "EJHgYyf4z" - }, - "hide": false, - "max": 3800, - "min": 3400, - "refId": "B", - "scenarioId": "random_walk", - "spread": 50, - "startValue": 3600 - }, - { - "alias": "Kaitlyn", - "datasource": { - "type": "testdata", - "uid": "EJHgYyf4z" - }, - "hide": false, - "max": 3800, - "min": 3400, - "refId": "C", - "scenarioId": "random_walk", - "spread": 50, - "startValue": 3600 - }, - { - "alias": "Raj", - "datasource": { - "type": "testdata", - "uid": "EJHgYyf4z" - }, - "hide": false, - "max": 3800, - "min": 3400, - "refId": "D", - "scenarioId": "random_walk", - "spread": 50, - "startValue": 3600 - }, - { - "alias": "Lee", - "datasource": { - "type": "testdata", - "uid": "EJHgYyf4z" - }, - "hide": false, - "max": 3800, - "min": 3400, - "refId": "E", - "scenarioId": "random_walk", - "spread": 50, - "startValue": 3600 - } - ], - "title": "Side Dish Prep Times, past 7 days", - "transformations": [], - "type": "gauge" - }, - { - "datasource": { - "type": "testdata", - "uid": "EJHgYyf4z" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "Time until we need new soup in the number of overall minutes", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "bars", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 11, - "x": 13, - "y": 31 - }, - "id": 8, - "interval": "", - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.5.0", - "targets": [ - { - "datasource": { - "type": "testdata", - "uid": "EJHgYyf4z" - }, - "refId": "A", - "scenarioId": "csv_metric_values", - "stringInput": "1470,1410,1350,1290,1170,1110,1050,990,930,870,810,750,690,630,570,510,450,390,330,270,210,150,90" - } - ], - "timeFrom": "24h", - "timeShift": "1d", - "title": "Soup: Minutes until we need to throw this soup out and make some new soup for our guests/customers", - "transformations": [], - "type": "timeseries" - } - ], - "refresh": "", - "schemaVersion": 36, - "style": "dark", - "tags": [], - "templating": { - "list": [] - }, - "time": { - "from": "now-7d", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Dashboard Makeover Challenge", - "uid": "F3eInwQ7z", - "version": 1, - "weekStart": "" -} diff --git a/test/data/templates/template_example.go.tmpl b/test/data/templates/template_example.go.tmpl new file mode 100644 index 00000000..55c017d9 --- /dev/null +++ b/test/data/templates/template_example.go.tmpl @@ -0,0 +1,12785 @@ +{ + "annotations": { + "list": [ + { + "$$hashKey": "{{ .title | ToLower | ToSlug}}", + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations \u0026 Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 1, + "id": 62, + "iteration": 1618867139860, + "links": [], + "panels": [ + { + "__netsage_template": "navigation", + "choices": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], + "cycleview": true, + "dashboardselection": true, + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "grafanafavorites": true, + "gridPos": { + "h": 3, + "w": 2, + "x": 0, + "y": 0 + }, + "hamburgerPath": "https://portal.netsage.global/hamburger-v4.gif", + "id": 1, + "link_text": [ + {{if .enabledlight}} + {{ range $v := .lightsources}} + {{ $v }} + {{ end }} + {{ end }} + ], + "link_url": [ + "{{ .lightsources | StringJoin}}", + "/grafana/d/000000003/bandwidth-dashboard", + "/grafana/d/xk26IFhmk/flow-data", + "/grafana/d/QfzDJKhik/flow-data-per-organization", + "/grafana/d/-l3_u8nWk/individual-flows", + "/grafana/d/fgrOzz_mk/flow-data-per-country", + "/grafana/d/WNn1qyaiz/flows-by-science-discipline", + "/grafana/d/ie7TeomGz/flow-data-for-projects", + "/grafana/d/b35BWxAZz/top-talkers-over-time", + "/grafana/d/ufIS9W7Zk/science-discipline-patterns", + "/grafana/d/000000004/bandwidth-patterns", + "/grafana/d/CJC1FFhmz/other-flow-stats", + "/grafana/d/VuuXrnPWz/flow-analysis" + ], + "links": [], + "sharescreen": true, + "sideLogoPath": "https://portal.netsage.global/netsage-header-logo.png", + "sidebar": true, + "tablefilters": true, + "title": "", + "topLogoPath": "https://portal.netsage.global/netsage-cropped.png", + "transparent": true, + "type": "netsagenavigation" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 20, + "x": 2, + "y": 0 + }, + "id": 2, + "links": [], + "options": { + "content": "\u003ccenter\u003e\u003ch1\u003e\u003cb\u003eBandwidth Dashboard\u003c/b\u003e\u003c/h1\u003e\u003c/center\u003e\n\u003ccenter\u003eThe map shows the minimum, maximum, and average bandwidth utilization of the circuits and exchange points over the selected time period.\u003c/center\u003e\n\u003ccenter\u003eThe rows below the map show each of the links in more detail, including traffic rate and total volume transferred.\u003c/center\u003e\n\u003ccenter\u003eA combined view of the average and maximum bandwidth utilization is shown at the bottom of the page.\u003c/center\u003e\n\u003ccenter\u003eAll times are displayed in browser local time\u003c/center\u003e\n\n\u003c!-- Global site tag (gtag.js) - Google Analytics --\u003e\n\u003cscript async src=\"https://www.googletagmanager.com/gtag/js?id=UA-142763676-1\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n window.dataLayer = window.dataLayer || [];\n function gtag(){dataLayer.push(arguments);}\n gtag('js', new Date());\n\n gtag('config', 'UA-142763676-1');\n\u003c/script\u003e", + "mode": "html" + }, + "pluginVersion": "7.3.3", + "title": "", + "transparent": true, + "type": "text" + }, + { + "cacheTimeout": null, + "datasource": "Netsage TSDS", + "fieldConfig": { + "defaults": { + "custom": {}, + "decimals": 1, + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } + ], + "nullValueMode": "connected", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "light-blue", + "value": null + }, + { + "color": "light-blue", + "value": 0 + }, + { + "color": "light-blue", + "value": 1 + } + ] + }, + "unit": "bps" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 0, + "y": 4 + }, + "id": 3, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": ["mean"] + }, + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": ["mean"], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "7.3.3", + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "alias": "", + "align": "", + "bucket": "", + "expanded": false, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": " ", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": {}, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["Select Metric"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": [""], + "rawQuery": true, + "refId": "A", + "series": "select table", + "target": "get max(aggregate(values.output, $quantify, max)) between ($START,$END) from interface where link_name != null", + "target_alias": "", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "Select Metric", + "op": "", + "right": "" + } + ] + ] + } + ], + "title": "Single Link Max A-Z", + "transparent": true, + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": "Netsage TSDS", + "fieldConfig": { + "defaults": { + "custom": {}, + "decimals": 1, + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } + ], + "nullValueMode": "connected", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "light-blue", + "value": null + }, + { + "color": "light-blue", + "value": 0 + }, + { + "color": "light-blue", + "value": 1 + } + ] + }, + "unit": "bps" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 6, + "y": 4 + }, + "id": 4, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": ["mean"] + }, + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": ["mean"], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "7.3.3", + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "alias": "", + "align": "", + "bucket": "", + "expanded": false, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": " ", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": {}, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["Select Metric"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": [""], + "rawQuery": true, + "refId": "A", + "series": "select table", + "target": "get max(aggregate(values.input, $quantify, max)) between ($START,$END) from interface where link_name != null", + "target_alias": "", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "Select Metric", + "op": "", + "right": "" + } + ] + ] + } + ], + "title": "Single Link Max Z-A", + "transparent": true, + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": "Netsage TSDS", + "fieldConfig": { + "defaults": { + "custom": {}, + "decimals": 2, + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } + ], + "nullValueMode": "connected", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "light-blue", + "value": null + }, + { + "color": "light-blue", + "value": 0 + }, + { + "color": "light-blue", + "value": 1 + } + ] + }, + "unit": "bps" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 7, + "x": 12, + "y": 4 + }, + "id": 5, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": ["mean"] + }, + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": ["mean"], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "7.3.3", + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "alias": "", + "align": "", + "bucket": "", + "expanded": false, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": " ", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": {}, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["Select Metric"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": [""], + "rawQuery": true, + "refId": "A", + "series": "select table", + "target": "get input_avg + output_avg as values.total_avg from ( get average(aggregate(values.input, $quantify, average)) as input_avg, average(aggregate(values.output, $quantify, average)) as output_avg between ($START,$END) by nothing from interface where link_name != null )", + "target_alias": "", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "Select Metric", + "op": "", + "right": "" + } + ] + ] + } + ], + "title": "Average Across All Links", + "transparent": true, + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": "Netsage TSDS", + "fieldConfig": { + "defaults": { + "custom": {}, + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } + ], + "nullValueMode": "connected", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "light-blue", + "value": null + }, + { + "color": "light-blue", + "value": 0 + }, + { + "color": "light-blue", + "value": 1 + } + ] + }, + "unit": "decbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 5, + "x": 19, + "y": 4 + }, + "id": 6, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": ["sum"] + }, + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": ["sum"], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "7.3.3", + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "alias": "", + "align": "", + "bucket": "", + "expanded": false, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": " ", + "hide": false, + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": {}, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["Select Metric"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": [""], + "rawQuery": true, + "refId": "A", + "series": "select table", + "target": "get total_bytes_sec * 3600 as values.total_bytes from ( get input_bytes_sec_total + output_bytes_sec_total as total_bytes_sec from ( get aggregate(input_bytes_sec, 3600, sum) as input_bytes_sec_total, aggregate(output_bytes_sec, 3600, sum) as output_bytes_sec_total by nothing from ( get aggregate(values.input, 3600, average) / 8 as input_bytes_sec, aggregate(values.output, 3600, average) / 8 as output_bytes_sec between ($START,$END) by link_name from interface where link_name != null ) ) )", + "target_alias": "", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "Select Metric", + "op": "", + "right": "" + } + ] + ] + } + ], + "title": "Total Transferred", + "transparent": true, + "type": "stat" + }, + { + "bing_api_key": "AplW162gFohrU9tZYti5XUCVeCG0ljiq5KgvLQREoqNBCl872zhHUs8PoVZ2j6Fw", + "choices": [1, 2, 4, 5, 7], + "color": { + "cardColor": "#82b5d8", + "colorScale": "linear", + "colorScheme": "interpolateOranges", + "exponent": 0.5, + "fillBackground": false, + "mode": "spectrum" + }, + "colorScheme": "interpolateBlues", + "data": [], + "datasource": "Netsage TSDS", + "downLinkColor": "rgb(200,200,200)", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "gridPos": { + "h": 17, + "w": 24, + "x": 0, + "y": 7 + }, + "hide_layers": false, + "id": 7, + "lat": 10, + "layer": { + "criteria": ["Minimum", "Maximum", "Average", "Current"], + "link": { + "selected": "Current" + }, + "node": { + "selected": "Current" + } + }, + "layers": [ + { + "__baseFactory__": "Layer" + }, + { + "__baseFactory__": "Layer" + }, + { + "__baseFactory__": "Layer" + }, + { + "__baseFactory__": "Layer" + }, + { + "__baseFactory__": "Layer" + } + ], + "legend": { + "adjLoadLegend": { + "horizontal": true + }, + "invert": true, + "legend_colors": [ + "#c8c8ff", + "#c4c4ff", + "#c0c0ff", + "#bcbcff", + "#b8b8ff", + "#b4b4ff", + "#b0b0ff", + "#acacff", + "#a8a8ff", + "#a4a4ff", + "#a0a0ff", + "#9c9cff", + "#9898ff", + "#9494ff", + "#9090ff", + "#8c8cff", + "#8888ff", + "#8484ff", + "#8080ff", + "#7c7cff", + "#7878ff", + "#7474ff", + "#7070ff", + "#6c6cff", + "#6868ff", + "#6464ff", + "#6060ff", + "#5c5cff", + "#5858ff", + "#5454ff", + "#5050ff", + "#4c4cff", + "#4848ff", + "#4444ff", + "#4040ff", + "#3c3cff", + "#3838ff", + "#3434ff", + "#3030ff", + "#2c2cff", + "#2828ff", + "#2424ff", + "#2020ff", + "#1c1cff", + "#1818ff", + "#1414ff", + "#1010ff", + "#0c0cff", + "#0808ff", + "#0404ff" + ], + "mode": "spectrum", + "show": true + }, + "legendTypes": ["opacity", "spectrum", "threshold"], + "line": { + "criteria": ["Minimum", "Maximum", "Average", "Current"], + "selected": "Current" + }, + "links": [], + "lng": -110, + "mapSrc": [ + "{\n \"results\": [\n {\n \"links\": [\n {\n \"endpoints\": [\n {\n \"name\": \"PIREN: Seattle to Oahu 100GE input\",\n \"label\": \"Seattle to Oahu\"\n },\n {\n \"name\": \"PIREN: Seattle to Oahu 100GE output\",\n \"label\": \"Oahu to Seattle\"\n }\n ],\n \"path\": [\n {\n \"lon\": \"-122.3359058\",\n \"lat\": \"47.614848\",\n \"name\": \"Seattle\"\n },\n {\n \"lon\": \"-148.169708\",\n \"lat\": \"37.383253\"\n },\n {\n \"lon\": \"-157.9652284\",\n \"lat\": \"21.4837543\",\n \"name\": \"Oahu\"\n }\n ],\n \"name\": \"PIREN: Seattle to Oahu 100GE\"\n },\n {\n \"endpoints\": [\n {\n \"name\": \"PIREN: Los Angeles to Mauna Lani 100GE input\",\n \"label\": \"Los Angeles to Mauna Lani\"\n },\n {\n \"name\": \"PIREN: Los Angeles to Mauna Lani 100GE output\",\n \"label\": \"Mauna Lani to Los Angeles\"\n }\n ],\n \"path\": [\n {\n \"lon\": \"-118.411\",\n \"lat\": \"34.0204989\",\n \"name\": \"Los Angeles\"\n },\n {\n \"lon\": \"-145\",\n \"lat\": \"28\"\n },\n {\n \"lon\": \"-155.8220663\",\n \"lat\": \"20.0233385\",\n \"name\": \"Mauna Lani\"\n }\n ],\n \"name\": \"PIREN: Los Angeles to Mauna Lani 100GE\"\n },\n {\n \"endpoints\": [\n {\n \"name\": \"PIREN: Oahu to Los Angeles 100GE input\",\n \"label\": \"Los Angeles to Oahu\"\n },\n {\n \"name\": \"PIREN: Oahu to Los Angeles 100GE output\",\n \"label\": \"Oahu to Los Angeles\"\n }\n ],\n \"path\": [\n {\n \"lon\": \"-118.411\",\n \"lat\": \"34.0204989\",\n \"name\": \"Los Angeles\"\n },\n {\n \"lon\": \"-147\",\n \"lat\": \"33\"\n },\n {\n \"lon\": \"-157.9652284\",\n \"lat\": \"21.4837543\",\n \"name\": \"Oahu\"\n }\n ],\n \"name\": \"PIREN: Oahu to Los Angeles 100GE\"\n },\n {\n \"endpoints\": [\n {\n \"name\": \"PIREN: Oahu to Sydney 100GE input\",\n \"label\": \"Oahu to Sydney\"\n },\n {\n \"name\": \"PIREN: Oahu to Sydney 100GE output\",\n \"label\": \"Sydney to Oahu\"\n }\n ],\n \"path\": [\n {\n \"lon\": \"-157.9652284\",\n \"lat\": \"21.4837543\",\n \"name\": \"Oahu\"\n },\n {\n \"lon\": \"-185.522049\",\n \"lat\": \"2.218017\"\n },\n {\n \"lon\": \"151.2100445\",\n \"lat\": \"-33.8679519\",\n \"name\": \"Sidney\"\n }\n ],\n \"name\": \"PIREN: Oahu to Sydney 100GE\"\n },\n {\n \"endpoints\": [\n {\n \"name\": \"PIREN: Mauna Lani to Sydney 100GE input\",\n \"label\": \"Mauna Lani to Sydney\"\n },\n {\n \"name\": \"PIREN: Mauna Lani to Sydney 100GE output\",\n \"label\": \"Sydney to Mauna Lani\"\n }\n ],\n \"path\": [\n {\n \"lon\": \"-155.8220663\",\n \"lat\": \"20.0233385\",\n \"name\": \"Mauna Lani\"\n },\n {\n \"lon\": \"185.8654694\",\n \"lat\": \"-58.863023\"\n },\n {\n \"lon\": \"151.2100445\",\n \"lat\": \"-33.8679519\",\n \"name\": \"Sidney\"\n }\n ],\n \"name\": \"PIREN: Mauna Lani to Sydney 100GE\"\n },\n {\n \"endpoints\": [\n {\n \"name\": \"PIREN: Oahu to Guam 100GE input\",\n \"label\": \"Guam to Oahu\"\n },\n {\n \"name\": \"PIREN: Oahu to Guam 100GE output\",\n \"label\": \"Oahu to Guam\"\n }\n ],\n \"path\": [\n {\n \"lon\": \"-157.9652284\",\n \"lat\": \"21.4837543\",\n \"name\": \"Oahu\"\n },\n {\n \"lon\": \"-193.823547\",\n \"lat\": \"24.006939\"\n },\n {\n \"lon\": \"144.7937\",\n \"lat\": \"13.4443\",\n \"name\": \"Guam\"\n }\n ],\n \"name\": \"PIREN: Oahu to Guam 100GE\"\n }\n ],\n \"endpoints\": [\n {\n \"lon\": \"-122.3359058\",\n \"lat\": \"47.614848\",\n \"name\": \"Seattle\"\n },\n {\n \"lon\": \"-118.411\",\n \"lat\": \"34.0204989\",\n \"name\": \"Los Angeles\"\n },\n {\n \"lon\": \"-157.9652284\",\n \"lat\": \"21.4837543\",\n \"name\": \"Oahu\"\n },\n {\n \"lon\": \"151.2100445\",\n \"lat\": \"-33.8679519\",\n \"name\": \"Sidney\"\n },\n {\n \"lon\": \"174.8654694\",\n \"lat\": \"-36.863023\",\n \"name\": \"Auckland\"\n },\n {\n \"lon\": \"-155.8220663\",\n \"lat\": \"20.0233385\",\n \"name\": \"Mauna Lani\"\n },\n {\n \"lon\": \"144.7937\",\n \"lat\": \"13.4443\",\n \"name\": \"Guam\"\n }\n ]\n }\n ]\n}", + "{\n \"results\": [\n {\n \"links\": [\n {\n \"endpoints\": [\n {\n \"name\": \"TransPAC: Seattle to Tokyo 100GE input\",\n \"label\": \"Tokyo to Seattle\"\n },\n {\n \"name\": \"TransPAC: Seattle to Tokyo 100GE output\",\n \"label\": \"Seattle to Tokyo\"\n }\n ],\n \"path\": [\n {\n \"lon\": \"139.853142695116\",\n \"order\": \"10\",\n \"lat\": \"35.7653023546885\"\n },\n {\n \"lon\": \" -172.86232\",\n \"lat\": \"47.60894\"\n },\n {\n \"lon\": \"-122.335927373024\",\n \"order\": \"20\",\n \"lat\": \"47.5652166492485\"\n }\n ],\n \"name\": \"TransPAC: Seattle to Tokyo 100GE\"\n }\n ],\n \"endpoints\": [\n {\n \"pop_id\": null,\n \"lon\": \"139.853142695116\",\n \"real_lon\": null,\n \"real_lat\": null,\n \"name\": \"TOKY\",\n \"lat\": \"35.7653023546885\"\n },\n {\n \"pop_id\": null,\n \"lon\": \"-122.335927373024\",\n \"real_lon\": null,\n \"real_lat\": null,\n \"name\": \"SEAT-TP\",\n \"lat\": \"47.5652166492485\"\n }\n ]\n }\n ]\n}", + "{\n \"results\": [\n {\n \"links\": [\n {\n \"endpoints\": [\n {\n \"name\": \"NEAAR: New York to London 100GE input\",\n \"label\": \"London to New York\"\n },\n {\n \"name\": \"NEAAR: New York to London 100GE output\",\n \"label\": \"New York to London\"\n }\n ],\n \"path\": [\n {\n \"lon\": \"-74.004561\",\n \"order\": \"10\",\n \"lat\": \"40.72\"\n },\n {\n \"lon\": \"-40.803412\",\n \"lat\": \"42.538777\"\n },\n {\n \"lon\": \"-0.127758\",\n \"order\": \"20\",\n \"lat\": \"51.507351\"\n }\n ],\n \"name\": \"NEAAR: New York to London 100GE\"\n },\n {\n \"endpoints\": [\n {\n \"name\": \"NEAAR: New York to Amsterdam 100GE input\",\n \"label\": \"Amsterdam to New York\"\n },\n {\n \"name\": \"NEAAR: New York to Amsterdam 100GE output\",\n \"label\": \"New York to Amsterdam\"\n }\n ],\n \"path\": [\n {\n \"lon\": \"-74.004561\",\n \"order\": \"10\",\n \"lat\": \"40.72\"\n },\n {\n \"lon\": \"-20.803412\",\n \"lat\": \"59.538777\"\n },\n {\n \"lon\": \"4.897070\",\n \"order\": \"20\",\n \"lat\": \"52.377956\"\n }\n ],\n \"name\": \"NEAAR: New York to Amsterdam 100GE\"\n }\n ],\n \"name\": \"Backbone\",\n \"endpoints\": [\n {\n \"lon\": \"-74.004561\",\n \"real_lon\": \"-74.004561\",\n \"real_lat\": \"40.72\",\n \"name\": \"NEWY32AOA\",\n \"lat\": \"40.72\"\n },\n {\n \"lon\": \"-0.127758\",\n \"real_lon\": null,\n \"real_lat\": null,\n \"name\": \"GEANT London\",\n \"lat\": \"51.507351\"\n },\n {\n \"lon\": \"4.897070\",\n \"real_lon\": null,\n \"real_lat\": null,\n \"name\": \"Netherlight Amsterdam\",\n \"lat\": \"52.377956\"\n }\n ],\n \"network_abbr_name\": \"NEAAR\",\n \"network_name\": \"NEAAR\"\n }\n ]\n}", + "{\n \"results\": [\n {\n \"links\": [\n {\n \"endpoints\": [\n {\n \"name\": \"TransPAC: Hong Kong to Guam 10GE input\",\n \"label\": \"Guam to Hong Kong\"\n },\n {\n \"name\": \"TransPAC: Hong Kong to Guam 10GE output\",\n \"label\": \"Hong Kong to Guam\"\n }\n ],\n \"path\": [\n {\n \"lon\": \"114.1095\",\n \"order\": \"10\",\n \"lat\": \"22.3964\"\n },\n {\n \"lon\": \"129.35165\",\n \"lat\": \"21.06656\"\n },\n {\n \"lon\": \"144.7937\",\n \"order\": \"20\",\n \"lat\": \"13.4443\"\n }\n ],\n \"name\": \"TransPAC: Guam to Hong Kong 10GE\"\n }\n ],\n \"endpoints\": [\n {\n \"lon\": \"114.1095\",\n \"lat\": \"22.3964\",\n \"name\": \"Hong Kong\"\n },\n {\n \"lon\": \"144.7937\",\n \"lat\": \"13.4443\",\n \"name\": \"Guam\"\n }\n ],\n \"network_abbr_name\": \"TP\",\n \"network_name\": \"TransPAC\"\n }\n ]\n}", + "{\n \"results\": [\n {\n \"name\": \"Pacific Wave Exchange\",\n \"endpoints\": [\n {\n \"lon\": \"-122.335927373024\",\n \"name\": \"SEATTLE\",\n \"lat\": \"47.5652166492485\"\n },\n {\n \"lon\": \"-118.411\",\n \"lat\": \"34.0204989\",\n \"name\": \"Los Angeles\"\n }\n ],\n \"links\": [\n {\n \"name\": \"Pacific Wave Exchange\",\n \"path\": [\n {\n \"lon\": \"-122.335927373024\",\n \"order\": \"10\",\n \"lat\": \"47.5652166492485\"\n },\n {\n \"lon\": \"-114.335927373024\",\n \"order\": \"20\",\n \"lat\": \"40\"\n },\n {\n \"lon\": \"-115.411\",\n \"order\": \"30\",\n \"lat\": \"20.8\"\n },\n {\n \"lon\": \"-125.411\",\n \"order\": \"40\",\n \"lat\": \"40.0204989\"\n },\n {\n \"lon\": \"-122.335927373024\",\n \"order\": \"50\",\n \"lat\": \"47.5652166492485\"\n }\n ],\n \"endpoints\": [\n {\n \"name\": \"CENIC values.input\",\n \"label\": \"Inbound to CENIC\"\n },\n {\n \"name\": \"CENIC values.output\",\n \"label\": \"Outbound from CENIC\"\n }\n ]\n }\n ]\n }\n ]\n}", + "" + ], + "map_tile_url": "https://stamen-tiles-{s}.a.ssl.fastly.net/toner-lite/{z}/{x}/{y}{r}.png", + "max": [ + "100000000000", + "100000000000", + "100000000000", + "10000000000", + "100000000000" + ], + "min": ["0", "0", "0", "0", "0"], + "name": ["PIREN", "TransPAC", "NEAAR", "HONG", "CENIC"], + "nodeFillColor": "#eab839", + "opacityScales": ["linear", "sqrt"], + "opacity_values": [], + "rgb_values": [ + "rgb(200,200,255)", + "rgb(196,196,255)", + "rgb(192,192,255)", + "rgb(188,188,255)", + "rgb(184,184,255)", + "rgb(180,180,255)", + "rgb(176,176,255)", + "rgb(172,172,255)", + "rgb(168,168,255)", + "rgb(164,164,255)", + "rgb(160,160,255)", + "rgb(156,156,255)", + "rgb(152,152,255)", + "rgb(148,148,255)", + "rgb(144,144,255)", + "rgb(140,140,255)", + "rgb(136,136,255)", + "rgb(132,132,255)", + "rgb(128,128,255)", + "rgb(124,124,255)", + "rgb(120,120,255)", + "rgb(116,116,255)", + "rgb(112,112,255)", + "rgb(108,108,255)", + "rgb(104,104,255)", + "rgb(100,100,255)", + "rgb(96,96,255)", + "rgb(92,92,255)", + "rgb(88,88,255)", + "rgb(84,84,255)", + "rgb(80,80,255)", + "rgb(76,76,255)", + "rgb(72,72,255)", + "rgb(68,68,255)", + "rgb(64,64,255)", + "rgb(60,60,255)", + "rgb(56,56,255)", + "rgb(52,52,255)", + "rgb(48,48,255)", + "rgb(44,44,255)", + "rgb(40,40,255)", + "rgb(36,36,255)", + "rgb(32,32,255)", + "rgb(28,28,255)", + "rgb(24,24,255)", + "rgb(20,20,255)", + "rgb(16,16,255)", + "rgb(12,12,255)", + "rgb(8,8,255)", + "rgb(4,4,255)" + ], + "size": ["3", "3", "3", "3", "3"], + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [""], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "alias": "input", + "align": "", + "bucket": "", + "expanded": false, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + }, + { + "alias": "output", + "align": "", + "bucket": "", + "expanded": false, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 60, average)": "input", + "aggregate(values.output, 60, average)": "output" + }, + "metricValueAliases": ["AZ", ""], + "metricValues_array": ["input", "Select Metric Value"], + "metric_array": ["link_name", "node"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "rawQuery": false, + "refId": "A", + "series": "interface", + "target": "get link_name, node, aggregate(values.input, 60, average),aggregate(values.output, 60, average) between (1570571291, 1570657691) by link_name from interface where (link_name like \".+\")", + "target_alias": "$link_name $VALUE", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "$$hashKey": "object:453", + "left": "link_name", + "op": "like", + "right": ".+" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "alias": "", + "align": "", + "bucket": "", + "expanded": false, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": {}, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["Select Metric"], + "orderby_field": "", + "outerGroupOperator": [""], + "rawQuery": true, + "refId": "D", + "series": "select table", + "target": "get node, intf, aggregate(values.input, $quantify, sum) as values.input, aggregate(values.output, $quantify, sum) as values.output by nothing from ( get node, intf, aggregate(values.input, $quantify, average) as values.input,aggregate(values.output, $quantify, average) as values.output between ($START, $END) by node, intf from interface where (node = \"wrn-albu-sw-3.cenic.net\" and intf = \"ethernet5/1\") or (node = \"snvl2-pw-sw-1-mgmt-2.cenic.net\" and intf = \"ethernet6/15\") or (node = \"wrn-albu-sw-4.cenic.net\" and intf = \"ethernet3/1\") or (node = \"snvl2-pw-sw-1-mgmt-2.cenic.net\" and intf = \"ethernet8/3\") or (node = \"snvl2-pw-sw-1-mgmt-2.cenic.net\" and intf = \"ethernet8/10\") or (node = \"wrn-albu-sw-3.cenic.net\" and intf = \"ethernet7/1\") or (node = \"losa3-pw-sw-1.cenic.net\" and intf = \"ethernet4/1\") or (node = \"wrn-denv-sw-4.cenic.net\" and intf = \"ethernet7/2\") or (node = \"losa2-pw-sw-1-mgmt-2.cenic.net\" and intf = \"ethernet15/2\") or (node = \"snvl2-pw-sw-1-mgmt-2.cenic.net\" and intf = \"ethernet1/1\") or (node = \"losa2-pw-sw-1-mgmt-2.cenic.net\" and intf = \"ethernet4/1\") or (node = \"losa2-pw-sw-1-mgmt-2.cenic.net\" and intf = \"ethernet15/8\") or (node = \"losa2-pw-sw-1-mgmt-2.cenic.net\" and intf = \"ethernet7/7\") or (node = \"snvl2-pw-sw-1-mgmt-2.cenic.net\" and intf = \"ethernet3/1\") or (node = \"wrn-elpa-sw-1.cenic.net\" and intf = \"ethernet1/1\") or (node = \"losa3-pw-sw-1.cenic.net\" and intf = \"ethernet7/1\") or (node = \"snvl2-pw-sw-1-mgmt-2.cenic.net\" and intf = \"ethernet7/2\") or (node = \"losa2-pw-sw-1-mgmt-2.cenic.net\" and intf = \"ethernet15/5\") or (node = \"wrn-elpa-sw-1.cenic.net\" and intf = \"ethernet5/1\") or (node = \"losa2-pw-sw-1-mgmt-2.cenic.net\" and intf = \"ethernet1/2\") or (node = \"losa2-pw-sw-1-mgmt-2.cenic.net\" and intf = \"ethernet16/5\") or (node = \"wrn-denv-sw-3.cenic.net\" and intf = \"ethernet7/1\") or (node = \"snvl2-pw-sw-1-mgmt-2.cenic.net\" and intf = \"ethernet6/20\") or (node = \"losa2-pw-sw-1-mgmt-2.cenic.net\" and intf = \"ethernet13/1\") or (node = \"snvl2-pw-sw-1-mgmt-2.cenic.net\" and intf = \"ethernet8/5\") or (node = \"losa2-pw-sw-1-mgmt-2.cenic.net\" and intf = \"ethernet15/6\") or (node = \"wrn-denv-sw-4.cenic.net\" and intf = \"ethernet7/1\") or (node = \"wrn-albu-sw-4.cenic.net\" and intf = \"ethernet5/1\") or (node = \"losa2-pw-sw-1-mgmt-2.cenic.net\" and intf = \"ethernet3/2\") or (node = \"wrn-denv-sw-4.cenic.net\" and intf = \"ethernet1/1\") or (node = \"wrn-denv-sw-3.cenic.net\" and intf = \"ethernet1/2\") or (node = \"losa2-pw-sw-1-mgmt-2.cenic.net\" and intf = \"ethernet1/1\") or (node = \"losa3-pw-sw-1.cenic.net\" and intf = \"ethernet7/2\") or (node = \"losa2-pw-sw-1-mgmt-2.cenic.net\" and intf = \"ethernet15/7\") or (node = \"snvl2-pw-sw-1-mgmt-2.cenic.net\" and intf = \"ethernet8/9\") or (node = \"losa2-pw-sw-1-mgmt-2.cenic.net\" and intf = \"ethernet16/7\") or (node = \"losa2-pw-sw-1-mgmt-2.cenic.net\" and intf = \"ethernet6/2\") or (node = \"snvl2-pw-sw-1-mgmt-2.cenic.net\" and intf = \"ethernet3/2\") or (node = \"wrn-denv-sw-4.cenic.net\" and intf = \"ethernet5/2\") or (node = \"losa2-pw-sw-1-mgmt-2.cenic.net\" and intf = \"ethernet4/2\") or (node = \"losa2-pw-sw-1-mgmt-2.cenic.net\" and intf = \"ethernet5/2\") or (node = \"losa2-pw-sw-1-mgmt-2.cenic.net\" and intf = \"ethernet9/1\") or (node = \"wrn-denv-sw-3.cenic.net\" and intf = \"ethernet5/2\") )", + "target_alias": "CENIC $VALUE", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "Select Metric", + "op": "", + "right": "" + } + ] + ] + } + ], + "threshold_colors": [], + "title": "", + "to_si": 1000000000, + "tooltip": { + "content": "\u003cdiv class= \"wrapper\" style= \"padding:0px; margin:0px; border-radius:0px; \"\u003e \u003ctable id= \"dataTable\"\u003e\n\u003ctr\u003e\n\u003ctd colspan = \"6\" class = \"mainTitle\"\u003e$name\u003c/td\u003e \u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd colspan = \"3\" class = \"mainHead borderBot\"\u003e$input.name\u003c/td\u003e\n\u003ctd colspan = \"3\" class = \"mainHead borderBot\"\u003e$output.name\u003c/td\u003e \u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd colspan = \"1\" class = \"headerTxt\"\u003eMin\u003c/td\u003e\n\u003ctd colspan = \"1\" class = \"headerTxt\"\u003eAvg\u003c/td\u003e\n\u003ctd colspan = \"1\" class = \"headerTxt rightBorder\"\u003eMax\u003c/td\u003e \u003ctd colspan = \"1\" class = \"headerTxt\"\u003eMin\u003c/td\u003e\n\u003ctd colspan = \"1\" class = \"headerTxt\"\u003eAvg\u003c/td\u003e\n\u003ctd colspan = \"1\" class = \"headerTxt \"\u003eMax\u003c/td\u003e\n\u003c/tr\u003e \u003ctr\u003e\n\u003ctd colspan = \"1\" class = \"bodyTxt\"\u003e$input.min\u003c/td\u003e\n\u003ctd colspan = \"1\" class = \"bodyTxt\"\u003e$input.avg\u003c/td\u003e\n\u003ctd colspan = \"1\" class = \"bodyTxt rightBorder\"\u003e$input.max\u003c/td\u003e \u003ctd colspan = \"1\" class = \"bodyTxt\"\u003e$output.min\u003c/td\u003e\n\u003ctd colspan = \"1\" class = \"bodyTxt\"\u003e$output.avg\u003c/td\u003e\n\u003ctd colspan = \"1\" class = \"bodyTxt\"\u003e$output.max\u003c/td\u003e\n\u003c/tr\u003e \u003ctr\u003e\n\u003ctd colspan = \"3\" class = \"mainHead rightBorder\"\u003eGb/s\u003c/td\u003e \u003ctd colspan = \"3\" class = \"mainHead\"\u003eGb/s\u003c/td\u003e\n\u003c/tr\u003e \u003c/table\u003e\n\u003cbr/\u003e\n\u003cstyle\u003e .wrapper{ color:snow;\n}\n.mainTitle{\nfont-size: 2em; //border-bottom:1px solid; padding:4px; font-weight:bold; color:orange; border-color:white;\n}\n.headerTxt{ padding:0px;\n}\n.bodyTxt{ font-weight:bold; font-size:2em; padding:0px;\npadding :1px 5px 5px 5px; }\n.mainHead{ font-weight:bold; font-size:1.2em; padding-left:20px; padding-right:20px;\n}\n.borderBot{ //border-bottom:1px solid; color:rgba(18,175,255,1); border-color:white;\n\n}\n.rightBorder{ border-right:0.5px solid; }\n#dataTable{\ntable-layout: fixed;\nwidth: 100%;\ntext-align: center;\n}\n.atlas-info-div{\nborder-radius: 2px; background-color:rgba(0,0,0,0.8); }\nhr{ padding:0px; margin:2px; }\n\u003c/style\u003e", + "node_content": "\u003cdiv style=\"text-align: center; font-size: 20px; color:orange; font-weight:bold; \"\u003e $name\n\u003c/div\u003e\n\u003cstyle\u003e\n.atlas-info-div{\nborder-radius: 2px; background-color:rgba(0,0,0,0.8); }\n\u003c/style\u003e", + "show": true, + "showDefault": true, + "showLinkHover": true, + "showNodeHover": true + }, + "transparent": true, + "twin_tubes": false, + "type": "globalnoc-networkmap-panel", + "use_json": true, + "zoom": 2.7 + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "gridPos": { + "h": 1, + "w": 2, + "x": 0, + "y": 24 + }, + "id": 8, + "links": [], + "options": { + "content": "", + "mode": "markdown" + }, + "pluginVersion": "7.3.3", + "title": "Link", + "type": "text" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "gridPos": { + "h": 1, + "w": 14, + "x": 2, + "y": 24 + }, + "id": 9, + "links": [], + "options": { + "content": "", + "mode": "markdown" + }, + "pluginVersion": "7.3.3", + "title": "Traffic Rate", + "type": "text" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "gridPos": { + "h": 1, + "w": 8, + "x": 16, + "y": 24 + }, + "id": 10, + "links": [], + "options": { + "content": "", + "mode": "markdown" + }, + "pluginVersion": "7.3.3", + "title": "Total Volume", + "type": "text" + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 25 + }, + "id": 11, + "panels": [], + "repeat": "links", + "scopedVars": { + "links": { + "selected": false, + "text": "AmLight: Boca Raton to Sao Paulo 100GE", + "value": "AmLight: Boca Raton to Sao Paulo 100GE" + } + }, + "title": "", + "type": "row" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 2, + "x": 0, + "y": 26 + }, + "id": 12, + "links": [], + "options": { + "content": "**$links**", + "mode": "markdown" + }, + "pluginVersion": "7.3.3", + "scopedVars": { + "links": { + "selected": false, + "text": "AmLight: Boca Raton to Sao Paulo 100GE", + "value": "AmLight: Boca Raton to Sao Paulo 100GE" + } + }, + "title": "", + "transparent": true, + "type": "text" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 14, + "x": 2, + "y": 26 + }, + "hiddenSeries": false, + "id": 13, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "scopedVars": { + "links": { + "selected": false, + "text": "AmLight: Boca Raton to Sao Paulo 100GE", + "value": "AmLight: Boca Raton to Sao Paulo 100GE" + } + }, + "seriesOverrides": [ + { + "alias": "A-Z", + "color": "#FBAE60" + }, + { + "alias": "Z-A", + "color": "#80B2E7" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "aggregate_all": false, + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": false, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 210, average)": "A-Z" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "refId": "A", + "series": "interface", + "target": "get link_name, aggregate(values.output, 210, average) between (1570571291, 1570657691) by link_name from interface where ((link_name like \"AmLight: Chile to Sao Paolo 100GE\"))", + "target_alias": "$VALUE", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "aggregate_all": false, + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 210, average)": "Z-A" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "orderby_field": "", + "outerGroupOperator": [""], + "refId": "B", + "series": "interface", + "target": "get link_name, aggregate(values.input, 210, average) between (1570571291, 1570657691) by link_name from interface where ((link_name like \"AmLight: Chile to Sao Paolo 100GE\"))", + "target_alias": "$VALUE", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bps", + "label": "Rate", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 26 + }, + "hiddenSeries": false, + "id": 14, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "show": false, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "scopedVars": { + "links": { + "selected": false, + "text": "AmLight: Boca Raton to Sao Paulo 100GE", + "value": "AmLight: Boca Raton to Sao Paulo 100GE" + } + }, + "seriesOverrides": [ + { + "alias": "A-Z", + "color": "#FBAE60" + }, + { + "alias": "Z-A", + "color": "#80B2E7" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "* $TIMESPAN", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 310, average)": "A-Z" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "rawQuery": true, + "refId": "A", + "series": "interface", + "target": "get link_name, values.output * 3600 from (get link_name, aggregate(values.output, 3600, average) / 8 as values.output between ($START, $END) by link_name from interface where ((link_name like \"$links\")))", + "target_alias": "A-Z", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "* $TIMESPAN", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "hide": false, + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 310, average)": "Z-A" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "orderby_field": "", + "outerGroupOperator": [""], + "rawQuery": true, + "refId": "B", + "series": "interface", + "target": "get link_name, values.input * 3600 from (get link_name, aggregate(values.input, 3600, average) / 8 as values.input between ($START, $END) by link_name from interface where ((link_name like \"$links\")))", + "target_alias": "Z-A", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": true, + "values": ["total"] + }, + "yaxes": [ + { + "format": "decbytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 33 + }, + "id": 97, + "panels": [], + "repeatIteration": 1618867139860, + "repeatPanelId": 11, + "scopedVars": { + "links": { + "selected": false, + "text": "AmLight: Fortaleza to Sao Paulo 100GE", + "value": "AmLight: Fortaleza to Sao Paulo 100GE" + } + }, + "title": "", + "type": "row" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 2, + "x": 0, + "y": 34 + }, + "id": 98, + "links": [], + "options": { + "content": "**$links**", + "mode": "markdown" + }, + "pluginVersion": "7.3.3", + "repeatIteration": 1618867139860, + "repeatPanelId": 12, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "AmLight: Fortaleza to Sao Paulo 100GE", + "value": "AmLight: Fortaleza to Sao Paulo 100GE" + } + }, + "title": "", + "transparent": true, + "type": "text" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 14, + "x": 2, + "y": 34 + }, + "hiddenSeries": false, + "id": 99, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeatIteration": 1618867139860, + "repeatPanelId": 13, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "AmLight: Fortaleza to Sao Paulo 100GE", + "value": "AmLight: Fortaleza to Sao Paulo 100GE" + } + }, + "seriesOverrides": [ + { + "alias": "A-Z", + "color": "#FBAE60" + }, + { + "alias": "Z-A", + "color": "#80B2E7" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "aggregate_all": false, + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": false, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 210, average)": "A-Z" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "refId": "A", + "series": "interface", + "target": "get link_name, aggregate(values.output, 210, average) between (1570571291, 1570657691) by link_name from interface where ((link_name like \"AmLight: Chile to Sao Paolo 100GE\"))", + "target_alias": "$VALUE", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "aggregate_all": false, + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 210, average)": "Z-A" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "orderby_field": "", + "outerGroupOperator": [""], + "refId": "B", + "series": "interface", + "target": "get link_name, aggregate(values.input, 210, average) between (1570571291, 1570657691) by link_name from interface where ((link_name like \"AmLight: Chile to Sao Paolo 100GE\"))", + "target_alias": "$VALUE", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bps", + "label": "Rate", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 34 + }, + "hiddenSeries": false, + "id": 100, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "show": false, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeatIteration": 1618867139860, + "repeatPanelId": 14, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "AmLight: Fortaleza to Sao Paulo 100GE", + "value": "AmLight: Fortaleza to Sao Paulo 100GE" + } + }, + "seriesOverrides": [ + { + "alias": "A-Z", + "color": "#FBAE60" + }, + { + "alias": "Z-A", + "color": "#80B2E7" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "* $TIMESPAN", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 310, average)": "A-Z" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "rawQuery": true, + "refId": "A", + "series": "interface", + "target": "get link_name, values.output * 3600 from (get link_name, aggregate(values.output, 3600, average) / 8 as values.output between ($START, $END) by link_name from interface where ((link_name like \"$links\")))", + "target_alias": "A-Z", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "* $TIMESPAN", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "hide": false, + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 310, average)": "Z-A" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "orderby_field": "", + "outerGroupOperator": [""], + "rawQuery": true, + "refId": "B", + "series": "interface", + "target": "get link_name, values.input * 3600 from (get link_name, aggregate(values.input, 3600, average) / 8 as values.input between ($START, $END) by link_name from interface where ((link_name like \"$links\")))", + "target_alias": "Z-A", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": true, + "values": ["total"] + }, + "yaxes": [ + { + "format": "decbytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 41 + }, + "id": 101, + "panels": [], + "repeatIteration": 1618867139860, + "repeatPanelId": 11, + "scopedVars": { + "links": { + "selected": false, + "text": "AmLight: Miami to Cape Town 100GE", + "value": "AmLight: Miami to Cape Town 100GE" + } + }, + "title": "", + "type": "row" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 2, + "x": 0, + "y": 42 + }, + "id": 102, + "links": [], + "options": { + "content": "**$links**", + "mode": "markdown" + }, + "pluginVersion": "7.3.3", + "repeatIteration": 1618867139860, + "repeatPanelId": 12, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "AmLight: Miami to Cape Town 100GE", + "value": "AmLight: Miami to Cape Town 100GE" + } + }, + "title": "", + "transparent": true, + "type": "text" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 14, + "x": 2, + "y": 42 + }, + "hiddenSeries": false, + "id": 103, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeatIteration": 1618867139860, + "repeatPanelId": 13, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "AmLight: Miami to Cape Town 100GE", + "value": "AmLight: Miami to Cape Town 100GE" + } + }, + "seriesOverrides": [ + { + "alias": "A-Z", + "color": "#FBAE60" + }, + { + "alias": "Z-A", + "color": "#80B2E7" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "aggregate_all": false, + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": false, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 210, average)": "A-Z" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "refId": "A", + "series": "interface", + "target": "get link_name, aggregate(values.output, 210, average) between (1570571291, 1570657691) by link_name from interface where ((link_name like \"AmLight: Chile to Sao Paolo 100GE\"))", + "target_alias": "$VALUE", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "aggregate_all": false, + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 210, average)": "Z-A" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "orderby_field": "", + "outerGroupOperator": [""], + "refId": "B", + "series": "interface", + "target": "get link_name, aggregate(values.input, 210, average) between (1570571291, 1570657691) by link_name from interface where ((link_name like \"AmLight: Chile to Sao Paolo 100GE\"))", + "target_alias": "$VALUE", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bps", + "label": "Rate", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 42 + }, + "hiddenSeries": false, + "id": 104, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "show": false, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeatIteration": 1618867139860, + "repeatPanelId": 14, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "AmLight: Miami to Cape Town 100GE", + "value": "AmLight: Miami to Cape Town 100GE" + } + }, + "seriesOverrides": [ + { + "alias": "A-Z", + "color": "#FBAE60" + }, + { + "alias": "Z-A", + "color": "#80B2E7" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "* $TIMESPAN", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 310, average)": "A-Z" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "rawQuery": true, + "refId": "A", + "series": "interface", + "target": "get link_name, values.output * 3600 from (get link_name, aggregate(values.output, 3600, average) / 8 as values.output between ($START, $END) by link_name from interface where ((link_name like \"$links\")))", + "target_alias": "A-Z", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "* $TIMESPAN", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "hide": false, + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 310, average)": "Z-A" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "orderby_field": "", + "outerGroupOperator": [""], + "rawQuery": true, + "refId": "B", + "series": "interface", + "target": "get link_name, values.input * 3600 from (get link_name, aggregate(values.input, 3600, average) / 8 as values.input between ($START, $END) by link_name from interface where ((link_name like \"$links\")))", + "target_alias": "Z-A", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": true, + "values": ["total"] + }, + "yaxes": [ + { + "format": "decbytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 49 + }, + "id": 105, + "panels": [], + "repeatIteration": 1618867139860, + "repeatPanelId": 11, + "scopedVars": { + "links": { + "selected": false, + "text": "AmLight: Miami to Fortaleza 100GE", + "value": "AmLight: Miami to Fortaleza 100GE" + } + }, + "title": "", + "type": "row" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 2, + "x": 0, + "y": 50 + }, + "id": 106, + "links": [], + "options": { + "content": "**$links**", + "mode": "markdown" + }, + "pluginVersion": "7.3.3", + "repeatIteration": 1618867139860, + "repeatPanelId": 12, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "AmLight: Miami to Fortaleza 100GE", + "value": "AmLight: Miami to Fortaleza 100GE" + } + }, + "title": "", + "transparent": true, + "type": "text" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 14, + "x": 2, + "y": 50 + }, + "hiddenSeries": false, + "id": 107, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeatIteration": 1618867139860, + "repeatPanelId": 13, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "AmLight: Miami to Fortaleza 100GE", + "value": "AmLight: Miami to Fortaleza 100GE" + } + }, + "seriesOverrides": [ + { + "alias": "A-Z", + "color": "#FBAE60" + }, + { + "alias": "Z-A", + "color": "#80B2E7" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "aggregate_all": false, + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": false, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 210, average)": "A-Z" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "refId": "A", + "series": "interface", + "target": "get link_name, aggregate(values.output, 210, average) between (1570571291, 1570657691) by link_name from interface where ((link_name like \"AmLight: Chile to Sao Paolo 100GE\"))", + "target_alias": "$VALUE", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "aggregate_all": false, + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 210, average)": "Z-A" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "orderby_field": "", + "outerGroupOperator": [""], + "refId": "B", + "series": "interface", + "target": "get link_name, aggregate(values.input, 210, average) between (1570571291, 1570657691) by link_name from interface where ((link_name like \"AmLight: Chile to Sao Paolo 100GE\"))", + "target_alias": "$VALUE", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bps", + "label": "Rate", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 50 + }, + "hiddenSeries": false, + "id": 108, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "show": false, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeatIteration": 1618867139860, + "repeatPanelId": 14, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "AmLight: Miami to Fortaleza 100GE", + "value": "AmLight: Miami to Fortaleza 100GE" + } + }, + "seriesOverrides": [ + { + "alias": "A-Z", + "color": "#FBAE60" + }, + { + "alias": "Z-A", + "color": "#80B2E7" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "* $TIMESPAN", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 310, average)": "A-Z" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "rawQuery": true, + "refId": "A", + "series": "interface", + "target": "get link_name, values.output * 3600 from (get link_name, aggregate(values.output, 3600, average) / 8 as values.output between ($START, $END) by link_name from interface where ((link_name like \"$links\")))", + "target_alias": "A-Z", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "* $TIMESPAN", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "hide": false, + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 310, average)": "Z-A" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "orderby_field": "", + "outerGroupOperator": [""], + "rawQuery": true, + "refId": "B", + "series": "interface", + "target": "get link_name, values.input * 3600 from (get link_name, aggregate(values.input, 3600, average) / 8 as values.input between ($START, $END) by link_name from interface where ((link_name like \"$links\")))", + "target_alias": "Z-A", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": true, + "values": ["total"] + }, + "yaxes": [ + { + "format": "decbytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 57 + }, + "id": 109, + "panels": [], + "repeatIteration": 1618867139860, + "repeatPanelId": 11, + "scopedVars": { + "links": { + "selected": false, + "text": "AmLight: Miami to Santiago 100GE", + "value": "AmLight: Miami to Santiago 100GE" + } + }, + "title": "", + "type": "row" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 2, + "x": 0, + "y": 58 + }, + "id": 110, + "links": [], + "options": { + "content": "**$links**", + "mode": "markdown" + }, + "pluginVersion": "7.3.3", + "repeatIteration": 1618867139860, + "repeatPanelId": 12, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "AmLight: Miami to Santiago 100GE", + "value": "AmLight: Miami to Santiago 100GE" + } + }, + "title": "", + "transparent": true, + "type": "text" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 14, + "x": 2, + "y": 58 + }, + "hiddenSeries": false, + "id": 111, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeatIteration": 1618867139860, + "repeatPanelId": 13, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "AmLight: Miami to Santiago 100GE", + "value": "AmLight: Miami to Santiago 100GE" + } + }, + "seriesOverrides": [ + { + "alias": "A-Z", + "color": "#FBAE60" + }, + { + "alias": "Z-A", + "color": "#80B2E7" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "aggregate_all": false, + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": false, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 210, average)": "A-Z" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "refId": "A", + "series": "interface", + "target": "get link_name, aggregate(values.output, 210, average) between (1570571291, 1570657691) by link_name from interface where ((link_name like \"AmLight: Chile to Sao Paolo 100GE\"))", + "target_alias": "$VALUE", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "aggregate_all": false, + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 210, average)": "Z-A" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "orderby_field": "", + "outerGroupOperator": [""], + "refId": "B", + "series": "interface", + "target": "get link_name, aggregate(values.input, 210, average) between (1570571291, 1570657691) by link_name from interface where ((link_name like \"AmLight: Chile to Sao Paolo 100GE\"))", + "target_alias": "$VALUE", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bps", + "label": "Rate", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 58 + }, + "hiddenSeries": false, + "id": 112, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "show": false, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeatIteration": 1618867139860, + "repeatPanelId": 14, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "AmLight: Miami to Santiago 100GE", + "value": "AmLight: Miami to Santiago 100GE" + } + }, + "seriesOverrides": [ + { + "alias": "A-Z", + "color": "#FBAE60" + }, + { + "alias": "Z-A", + "color": "#80B2E7" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "* $TIMESPAN", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 310, average)": "A-Z" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "rawQuery": true, + "refId": "A", + "series": "interface", + "target": "get link_name, values.output * 3600 from (get link_name, aggregate(values.output, 3600, average) / 8 as values.output between ($START, $END) by link_name from interface where ((link_name like \"$links\")))", + "target_alias": "A-Z", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "* $TIMESPAN", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "hide": false, + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 310, average)": "Z-A" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "orderby_field": "", + "outerGroupOperator": [""], + "rawQuery": true, + "refId": "B", + "series": "interface", + "target": "get link_name, values.input * 3600 from (get link_name, aggregate(values.input, 3600, average) / 8 as values.input between ($START, $END) by link_name from interface where ((link_name like \"$links\")))", + "target_alias": "Z-A", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": true, + "values": ["total"] + }, + "yaxes": [ + { + "format": "decbytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 65 + }, + "id": 113, + "panels": [], + "repeatIteration": 1618867139860, + "repeatPanelId": 11, + "scopedVars": { + "links": { + "selected": false, + "text": "AmLight: Miami to Sao Paulo 100GE", + "value": "AmLight: Miami to Sao Paulo 100GE" + } + }, + "title": "", + "type": "row" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 2, + "x": 0, + "y": 66 + }, + "id": 114, + "links": [], + "options": { + "content": "**$links**", + "mode": "markdown" + }, + "pluginVersion": "7.3.3", + "repeatIteration": 1618867139860, + "repeatPanelId": 12, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "AmLight: Miami to Sao Paulo 100GE", + "value": "AmLight: Miami to Sao Paulo 100GE" + } + }, + "title": "", + "transparent": true, + "type": "text" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 14, + "x": 2, + "y": 66 + }, + "hiddenSeries": false, + "id": 115, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeatIteration": 1618867139860, + "repeatPanelId": 13, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "AmLight: Miami to Sao Paulo 100GE", + "value": "AmLight: Miami to Sao Paulo 100GE" + } + }, + "seriesOverrides": [ + { + "alias": "A-Z", + "color": "#FBAE60" + }, + { + "alias": "Z-A", + "color": "#80B2E7" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "aggregate_all": false, + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": false, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 210, average)": "A-Z" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "refId": "A", + "series": "interface", + "target": "get link_name, aggregate(values.output, 210, average) between (1570571291, 1570657691) by link_name from interface where ((link_name like \"AmLight: Chile to Sao Paolo 100GE\"))", + "target_alias": "$VALUE", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "aggregate_all": false, + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 210, average)": "Z-A" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "orderby_field": "", + "outerGroupOperator": [""], + "refId": "B", + "series": "interface", + "target": "get link_name, aggregate(values.input, 210, average) between (1570571291, 1570657691) by link_name from interface where ((link_name like \"AmLight: Chile to Sao Paolo 100GE\"))", + "target_alias": "$VALUE", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bps", + "label": "Rate", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 66 + }, + "hiddenSeries": false, + "id": 116, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "show": false, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeatIteration": 1618867139860, + "repeatPanelId": 14, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "AmLight: Miami to Sao Paulo 100GE", + "value": "AmLight: Miami to Sao Paulo 100GE" + } + }, + "seriesOverrides": [ + { + "alias": "A-Z", + "color": "#FBAE60" + }, + { + "alias": "Z-A", + "color": "#80B2E7" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "* $TIMESPAN", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 310, average)": "A-Z" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "rawQuery": true, + "refId": "A", + "series": "interface", + "target": "get link_name, values.output * 3600 from (get link_name, aggregate(values.output, 3600, average) / 8 as values.output between ($START, $END) by link_name from interface where ((link_name like \"$links\")))", + "target_alias": "A-Z", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "* $TIMESPAN", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "hide": false, + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 310, average)": "Z-A" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "orderby_field": "", + "outerGroupOperator": [""], + "rawQuery": true, + "refId": "B", + "series": "interface", + "target": "get link_name, values.input * 3600 from (get link_name, aggregate(values.input, 3600, average) / 8 as values.input between ($START, $END) by link_name from interface where ((link_name like \"$links\")))", + "target_alias": "Z-A", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": true, + "values": ["total"] + }, + "yaxes": [ + { + "format": "decbytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 73 + }, + "id": 117, + "panels": [], + "repeatIteration": 1618867139860, + "repeatPanelId": 11, + "scopedVars": { + "links": { + "selected": false, + "text": "AmLight: Panama to Puerto Rico 100GE", + "value": "AmLight: Panama to Puerto Rico 100GE" + } + }, + "title": "", + "type": "row" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 2, + "x": 0, + "y": 74 + }, + "id": 118, + "links": [], + "options": { + "content": "**$links**", + "mode": "markdown" + }, + "pluginVersion": "7.3.3", + "repeatIteration": 1618867139860, + "repeatPanelId": 12, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "AmLight: Panama to Puerto Rico 100GE", + "value": "AmLight: Panama to Puerto Rico 100GE" + } + }, + "title": "", + "transparent": true, + "type": "text" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 14, + "x": 2, + "y": 74 + }, + "hiddenSeries": false, + "id": 119, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeatIteration": 1618867139860, + "repeatPanelId": 13, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "AmLight: Panama to Puerto Rico 100GE", + "value": "AmLight: Panama to Puerto Rico 100GE" + } + }, + "seriesOverrides": [ + { + "alias": "A-Z", + "color": "#FBAE60" + }, + { + "alias": "Z-A", + "color": "#80B2E7" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "aggregate_all": false, + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": false, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 210, average)": "A-Z" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "refId": "A", + "series": "interface", + "target": "get link_name, aggregate(values.output, 210, average) between (1570571291, 1570657691) by link_name from interface where ((link_name like \"AmLight: Chile to Sao Paolo 100GE\"))", + "target_alias": "$VALUE", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "aggregate_all": false, + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 210, average)": "Z-A" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "orderby_field": "", + "outerGroupOperator": [""], + "refId": "B", + "series": "interface", + "target": "get link_name, aggregate(values.input, 210, average) between (1570571291, 1570657691) by link_name from interface where ((link_name like \"AmLight: Chile to Sao Paolo 100GE\"))", + "target_alias": "$VALUE", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bps", + "label": "Rate", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 74 + }, + "hiddenSeries": false, + "id": 120, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "show": false, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeatIteration": 1618867139860, + "repeatPanelId": 14, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "AmLight: Panama to Puerto Rico 100GE", + "value": "AmLight: Panama to Puerto Rico 100GE" + } + }, + "seriesOverrides": [ + { + "alias": "A-Z", + "color": "#FBAE60" + }, + { + "alias": "Z-A", + "color": "#80B2E7" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "* $TIMESPAN", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 310, average)": "A-Z" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "rawQuery": true, + "refId": "A", + "series": "interface", + "target": "get link_name, values.output * 3600 from (get link_name, aggregate(values.output, 3600, average) / 8 as values.output between ($START, $END) by link_name from interface where ((link_name like \"$links\")))", + "target_alias": "A-Z", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "* $TIMESPAN", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "hide": false, + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 310, average)": "Z-A" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "orderby_field": "", + "outerGroupOperator": [""], + "rawQuery": true, + "refId": "B", + "series": "interface", + "target": "get link_name, values.input * 3600 from (get link_name, aggregate(values.input, 3600, average) / 8 as values.input between ($START, $END) by link_name from interface where ((link_name like \"$links\")))", + "target_alias": "Z-A", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": true, + "values": ["total"] + }, + "yaxes": [ + { + "format": "decbytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 81 + }, + "id": 121, + "panels": [], + "repeatIteration": 1618867139860, + "repeatPanelId": 11, + "scopedVars": { + "links": { + "selected": false, + "text": "AmLight: Puerto Rico to Miami 100GE", + "value": "AmLight: Puerto Rico to Miami 100GE" + } + }, + "title": "", + "type": "row" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 2, + "x": 0, + "y": 82 + }, + "id": 122, + "links": [], + "options": { + "content": "**$links**", + "mode": "markdown" + }, + "pluginVersion": "7.3.3", + "repeatIteration": 1618867139860, + "repeatPanelId": 12, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "AmLight: Puerto Rico to Miami 100GE", + "value": "AmLight: Puerto Rico to Miami 100GE" + } + }, + "title": "", + "transparent": true, + "type": "text" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 14, + "x": 2, + "y": 82 + }, + "hiddenSeries": false, + "id": 123, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeatIteration": 1618867139860, + "repeatPanelId": 13, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "AmLight: Puerto Rico to Miami 100GE", + "value": "AmLight: Puerto Rico to Miami 100GE" + } + }, + "seriesOverrides": [ + { + "alias": "A-Z", + "color": "#FBAE60" + }, + { + "alias": "Z-A", + "color": "#80B2E7" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "aggregate_all": false, + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": false, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 210, average)": "A-Z" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "refId": "A", + "series": "interface", + "target": "get link_name, aggregate(values.output, 210, average) between (1570571291, 1570657691) by link_name from interface where ((link_name like \"AmLight: Chile to Sao Paolo 100GE\"))", + "target_alias": "$VALUE", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "aggregate_all": false, + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 210, average)": "Z-A" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "orderby_field": "", + "outerGroupOperator": [""], + "refId": "B", + "series": "interface", + "target": "get link_name, aggregate(values.input, 210, average) between (1570571291, 1570657691) by link_name from interface where ((link_name like \"AmLight: Chile to Sao Paolo 100GE\"))", + "target_alias": "$VALUE", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bps", + "label": "Rate", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 82 + }, + "hiddenSeries": false, + "id": 124, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "show": false, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeatIteration": 1618867139860, + "repeatPanelId": 14, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "AmLight: Puerto Rico to Miami 100GE", + "value": "AmLight: Puerto Rico to Miami 100GE" + } + }, + "seriesOverrides": [ + { + "alias": "A-Z", + "color": "#FBAE60" + }, + { + "alias": "Z-A", + "color": "#80B2E7" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "* $TIMESPAN", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 310, average)": "A-Z" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "rawQuery": true, + "refId": "A", + "series": "interface", + "target": "get link_name, values.output * 3600 from (get link_name, aggregate(values.output, 3600, average) / 8 as values.output between ($START, $END) by link_name from interface where ((link_name like \"$links\")))", + "target_alias": "A-Z", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "* $TIMESPAN", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "hide": false, + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 310, average)": "Z-A" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "orderby_field": "", + "outerGroupOperator": [""], + "rawQuery": true, + "refId": "B", + "series": "interface", + "target": "get link_name, values.input * 3600 from (get link_name, aggregate(values.input, 3600, average) / 8 as values.input between ($START, $END) by link_name from interface where ((link_name like \"$links\")))", + "target_alias": "Z-A", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": true, + "values": ["total"] + }, + "yaxes": [ + { + "format": "decbytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 89 + }, + "id": 125, + "panels": [], + "repeatIteration": 1618867139860, + "repeatPanelId": 11, + "scopedVars": { + "links": { + "selected": false, + "text": "AmLight: Santiago to Panama 100GE", + "value": "AmLight: Santiago to Panama 100GE" + } + }, + "title": "", + "type": "row" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 2, + "x": 0, + "y": 90 + }, + "id": 126, + "links": [], + "options": { + "content": "**$links**", + "mode": "markdown" + }, + "pluginVersion": "7.3.3", + "repeatIteration": 1618867139860, + "repeatPanelId": 12, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "AmLight: Santiago to Panama 100GE", + "value": "AmLight: Santiago to Panama 100GE" + } + }, + "title": "", + "transparent": true, + "type": "text" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 14, + "x": 2, + "y": 90 + }, + "hiddenSeries": false, + "id": 127, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeatIteration": 1618867139860, + "repeatPanelId": 13, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "AmLight: Santiago to Panama 100GE", + "value": "AmLight: Santiago to Panama 100GE" + } + }, + "seriesOverrides": [ + { + "alias": "A-Z", + "color": "#FBAE60" + }, + { + "alias": "Z-A", + "color": "#80B2E7" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "aggregate_all": false, + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": false, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 210, average)": "A-Z" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "refId": "A", + "series": "interface", + "target": "get link_name, aggregate(values.output, 210, average) between (1570571291, 1570657691) by link_name from interface where ((link_name like \"AmLight: Chile to Sao Paolo 100GE\"))", + "target_alias": "$VALUE", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "aggregate_all": false, + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 210, average)": "Z-A" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "orderby_field": "", + "outerGroupOperator": [""], + "refId": "B", + "series": "interface", + "target": "get link_name, aggregate(values.input, 210, average) between (1570571291, 1570657691) by link_name from interface where ((link_name like \"AmLight: Chile to Sao Paolo 100GE\"))", + "target_alias": "$VALUE", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bps", + "label": "Rate", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 90 + }, + "hiddenSeries": false, + "id": 128, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "show": false, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeatIteration": 1618867139860, + "repeatPanelId": 14, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "AmLight: Santiago to Panama 100GE", + "value": "AmLight: Santiago to Panama 100GE" + } + }, + "seriesOverrides": [ + { + "alias": "A-Z", + "color": "#FBAE60" + }, + { + "alias": "Z-A", + "color": "#80B2E7" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "* $TIMESPAN", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 310, average)": "A-Z" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "rawQuery": true, + "refId": "A", + "series": "interface", + "target": "get link_name, values.output * 3600 from (get link_name, aggregate(values.output, 3600, average) / 8 as values.output between ($START, $END) by link_name from interface where ((link_name like \"$links\")))", + "target_alias": "A-Z", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "* $TIMESPAN", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "hide": false, + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 310, average)": "Z-A" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "orderby_field": "", + "outerGroupOperator": [""], + "rawQuery": true, + "refId": "B", + "series": "interface", + "target": "get link_name, values.input * 3600 from (get link_name, aggregate(values.input, 3600, average) / 8 as values.input between ($START, $END) by link_name from interface where ((link_name like \"$links\")))", + "target_alias": "Z-A", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": true, + "values": ["total"] + }, + "yaxes": [ + { + "format": "decbytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 97 + }, + "id": 129, + "panels": [], + "repeatIteration": 1618867139860, + "repeatPanelId": 11, + "scopedVars": { + "links": { + "selected": false, + "text": "AmLight: Santiago to Sao Paolo 100GE", + "value": "AmLight: Santiago to Sao Paolo 100GE" + } + }, + "title": "", + "type": "row" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 2, + "x": 0, + "y": 98 + }, + "id": 130, + "links": [], + "options": { + "content": "**$links**", + "mode": "markdown" + }, + "pluginVersion": "7.3.3", + "repeatIteration": 1618867139860, + "repeatPanelId": 12, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "AmLight: Santiago to Sao Paolo 100GE", + "value": "AmLight: Santiago to Sao Paolo 100GE" + } + }, + "title": "", + "transparent": true, + "type": "text" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 14, + "x": 2, + "y": 98 + }, + "hiddenSeries": false, + "id": 131, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeatIteration": 1618867139860, + "repeatPanelId": 13, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "AmLight: Santiago to Sao Paolo 100GE", + "value": "AmLight: Santiago to Sao Paolo 100GE" + } + }, + "seriesOverrides": [ + { + "alias": "A-Z", + "color": "#FBAE60" + }, + { + "alias": "Z-A", + "color": "#80B2E7" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "aggregate_all": false, + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": false, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 210, average)": "A-Z" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "refId": "A", + "series": "interface", + "target": "get link_name, aggregate(values.output, 210, average) between (1570571291, 1570657691) by link_name from interface where ((link_name like \"AmLight: Chile to Sao Paolo 100GE\"))", + "target_alias": "$VALUE", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "aggregate_all": false, + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 210, average)": "Z-A" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "orderby_field": "", + "outerGroupOperator": [""], + "refId": "B", + "series": "interface", + "target": "get link_name, aggregate(values.input, 210, average) between (1570571291, 1570657691) by link_name from interface where ((link_name like \"AmLight: Chile to Sao Paolo 100GE\"))", + "target_alias": "$VALUE", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bps", + "label": "Rate", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 98 + }, + "hiddenSeries": false, + "id": 132, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "show": false, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeatIteration": 1618867139860, + "repeatPanelId": 14, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "AmLight: Santiago to Sao Paolo 100GE", + "value": "AmLight: Santiago to Sao Paolo 100GE" + } + }, + "seriesOverrides": [ + { + "alias": "A-Z", + "color": "#FBAE60" + }, + { + "alias": "Z-A", + "color": "#80B2E7" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "* $TIMESPAN", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 310, average)": "A-Z" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "rawQuery": true, + "refId": "A", + "series": "interface", + "target": "get link_name, values.output * 3600 from (get link_name, aggregate(values.output, 3600, average) / 8 as values.output between ($START, $END) by link_name from interface where ((link_name like \"$links\")))", + "target_alias": "A-Z", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "* $TIMESPAN", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "hide": false, + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 310, average)": "Z-A" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "orderby_field": "", + "outerGroupOperator": [""], + "rawQuery": true, + "refId": "B", + "series": "interface", + "target": "get link_name, values.input * 3600 from (get link_name, aggregate(values.input, 3600, average) / 8 as values.input between ($START, $END) by link_name from interface where ((link_name like \"$links\")))", + "target_alias": "Z-A", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": true, + "values": ["total"] + }, + "yaxes": [ + { + "format": "decbytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 105 + }, + "id": 133, + "panels": [], + "repeatIteration": 1618867139860, + "repeatPanelId": 11, + "scopedVars": { + "links": { + "selected": false, + "text": "NEAAR: New York to Amsterdam 100GE", + "value": "NEAAR: New York to Amsterdam 100GE" + } + }, + "title": "", + "type": "row" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 2, + "x": 0, + "y": 106 + }, + "id": 134, + "links": [], + "options": { + "content": "**$links**", + "mode": "markdown" + }, + "pluginVersion": "7.3.3", + "repeatIteration": 1618867139860, + "repeatPanelId": 12, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "NEAAR: New York to Amsterdam 100GE", + "value": "NEAAR: New York to Amsterdam 100GE" + } + }, + "title": "", + "transparent": true, + "type": "text" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 14, + "x": 2, + "y": 106 + }, + "hiddenSeries": false, + "id": 135, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeatIteration": 1618867139860, + "repeatPanelId": 13, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "NEAAR: New York to Amsterdam 100GE", + "value": "NEAAR: New York to Amsterdam 100GE" + } + }, + "seriesOverrides": [ + { + "alias": "A-Z", + "color": "#FBAE60" + }, + { + "alias": "Z-A", + "color": "#80B2E7" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "aggregate_all": false, + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": false, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 210, average)": "A-Z" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "refId": "A", + "series": "interface", + "target": "get link_name, aggregate(values.output, 210, average) between (1570571291, 1570657691) by link_name from interface where ((link_name like \"AmLight: Chile to Sao Paolo 100GE\"))", + "target_alias": "$VALUE", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "aggregate_all": false, + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 210, average)": "Z-A" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "orderby_field": "", + "outerGroupOperator": [""], + "refId": "B", + "series": "interface", + "target": "get link_name, aggregate(values.input, 210, average) between (1570571291, 1570657691) by link_name from interface where ((link_name like \"AmLight: Chile to Sao Paolo 100GE\"))", + "target_alias": "$VALUE", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bps", + "label": "Rate", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 106 + }, + "hiddenSeries": false, + "id": 136, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "show": false, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeatIteration": 1618867139860, + "repeatPanelId": 14, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "NEAAR: New York to Amsterdam 100GE", + "value": "NEAAR: New York to Amsterdam 100GE" + } + }, + "seriesOverrides": [ + { + "alias": "A-Z", + "color": "#FBAE60" + }, + { + "alias": "Z-A", + "color": "#80B2E7" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "* $TIMESPAN", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 310, average)": "A-Z" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "rawQuery": true, + "refId": "A", + "series": "interface", + "target": "get link_name, values.output * 3600 from (get link_name, aggregate(values.output, 3600, average) / 8 as values.output between ($START, $END) by link_name from interface where ((link_name like \"$links\")))", + "target_alias": "A-Z", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "* $TIMESPAN", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "hide": false, + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 310, average)": "Z-A" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "orderby_field": "", + "outerGroupOperator": [""], + "rawQuery": true, + "refId": "B", + "series": "interface", + "target": "get link_name, values.input * 3600 from (get link_name, aggregate(values.input, 3600, average) / 8 as values.input between ($START, $END) by link_name from interface where ((link_name like \"$links\")))", + "target_alias": "Z-A", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": true, + "values": ["total"] + }, + "yaxes": [ + { + "format": "decbytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 113 + }, + "id": 137, + "panels": [], + "repeatIteration": 1618867139860, + "repeatPanelId": 11, + "scopedVars": { + "links": { + "selected": false, + "text": "NEAAR: New York to London 100GE", + "value": "NEAAR: New York to London 100GE" + } + }, + "title": "", + "type": "row" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 2, + "x": 0, + "y": 114 + }, + "id": 138, + "links": [], + "options": { + "content": "**$links**", + "mode": "markdown" + }, + "pluginVersion": "7.3.3", + "repeatIteration": 1618867139860, + "repeatPanelId": 12, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "NEAAR: New York to London 100GE", + "value": "NEAAR: New York to London 100GE" + } + }, + "title": "", + "transparent": true, + "type": "text" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 14, + "x": 2, + "y": 114 + }, + "hiddenSeries": false, + "id": 139, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeatIteration": 1618867139860, + "repeatPanelId": 13, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "NEAAR: New York to London 100GE", + "value": "NEAAR: New York to London 100GE" + } + }, + "seriesOverrides": [ + { + "alias": "A-Z", + "color": "#FBAE60" + }, + { + "alias": "Z-A", + "color": "#80B2E7" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "aggregate_all": false, + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": false, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 210, average)": "A-Z" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "refId": "A", + "series": "interface", + "target": "get link_name, aggregate(values.output, 210, average) between (1570571291, 1570657691) by link_name from interface where ((link_name like \"AmLight: Chile to Sao Paolo 100GE\"))", + "target_alias": "$VALUE", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "aggregate_all": false, + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 210, average)": "Z-A" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "orderby_field": "", + "outerGroupOperator": [""], + "refId": "B", + "series": "interface", + "target": "get link_name, aggregate(values.input, 210, average) between (1570571291, 1570657691) by link_name from interface where ((link_name like \"AmLight: Chile to Sao Paolo 100GE\"))", + "target_alias": "$VALUE", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bps", + "label": "Rate", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 114 + }, + "hiddenSeries": false, + "id": 140, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "show": false, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeatIteration": 1618867139860, + "repeatPanelId": 14, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "NEAAR: New York to London 100GE", + "value": "NEAAR: New York to London 100GE" + } + }, + "seriesOverrides": [ + { + "alias": "A-Z", + "color": "#FBAE60" + }, + { + "alias": "Z-A", + "color": "#80B2E7" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "* $TIMESPAN", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 310, average)": "A-Z" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "rawQuery": true, + "refId": "A", + "series": "interface", + "target": "get link_name, values.output * 3600 from (get link_name, aggregate(values.output, 3600, average) / 8 as values.output between ($START, $END) by link_name from interface where ((link_name like \"$links\")))", + "target_alias": "A-Z", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "* $TIMESPAN", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "hide": false, + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 310, average)": "Z-A" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "orderby_field": "", + "outerGroupOperator": [""], + "rawQuery": true, + "refId": "B", + "series": "interface", + "target": "get link_name, values.input * 3600 from (get link_name, aggregate(values.input, 3600, average) / 8 as values.input between ($START, $END) by link_name from interface where ((link_name like \"$links\")))", + "target_alias": "Z-A", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": true, + "values": ["total"] + }, + "yaxes": [ + { + "format": "decbytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 121 + }, + "id": 141, + "panels": [], + "repeatIteration": 1618867139860, + "repeatPanelId": 11, + "scopedVars": { + "links": { + "selected": false, + "text": "PIREN: Los Angeles to Mauna Lani 100GE", + "value": "PIREN: Los Angeles to Mauna Lani 100GE" + } + }, + "title": "", + "type": "row" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 2, + "x": 0, + "y": 122 + }, + "id": 142, + "links": [], + "options": { + "content": "**$links**", + "mode": "markdown" + }, + "pluginVersion": "7.3.3", + "repeatIteration": 1618867139860, + "repeatPanelId": 12, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "PIREN: Los Angeles to Mauna Lani 100GE", + "value": "PIREN: Los Angeles to Mauna Lani 100GE" + } + }, + "title": "", + "transparent": true, + "type": "text" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 14, + "x": 2, + "y": 122 + }, + "hiddenSeries": false, + "id": 143, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeatIteration": 1618867139860, + "repeatPanelId": 13, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "PIREN: Los Angeles to Mauna Lani 100GE", + "value": "PIREN: Los Angeles to Mauna Lani 100GE" + } + }, + "seriesOverrides": [ + { + "alias": "A-Z", + "color": "#FBAE60" + }, + { + "alias": "Z-A", + "color": "#80B2E7" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "aggregate_all": false, + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": false, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 210, average)": "A-Z" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "refId": "A", + "series": "interface", + "target": "get link_name, aggregate(values.output, 210, average) between (1570571291, 1570657691) by link_name from interface where ((link_name like \"AmLight: Chile to Sao Paolo 100GE\"))", + "target_alias": "$VALUE", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "aggregate_all": false, + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 210, average)": "Z-A" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "orderby_field": "", + "outerGroupOperator": [""], + "refId": "B", + "series": "interface", + "target": "get link_name, aggregate(values.input, 210, average) between (1570571291, 1570657691) by link_name from interface where ((link_name like \"AmLight: Chile to Sao Paolo 100GE\"))", + "target_alias": "$VALUE", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bps", + "label": "Rate", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 122 + }, + "hiddenSeries": false, + "id": 144, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "show": false, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeatIteration": 1618867139860, + "repeatPanelId": 14, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "PIREN: Los Angeles to Mauna Lani 100GE", + "value": "PIREN: Los Angeles to Mauna Lani 100GE" + } + }, + "seriesOverrides": [ + { + "alias": "A-Z", + "color": "#FBAE60" + }, + { + "alias": "Z-A", + "color": "#80B2E7" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "* $TIMESPAN", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 310, average)": "A-Z" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "rawQuery": true, + "refId": "A", + "series": "interface", + "target": "get link_name, values.output * 3600 from (get link_name, aggregate(values.output, 3600, average) / 8 as values.output between ($START, $END) by link_name from interface where ((link_name like \"$links\")))", + "target_alias": "A-Z", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "* $TIMESPAN", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "hide": false, + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 310, average)": "Z-A" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "orderby_field": "", + "outerGroupOperator": [""], + "rawQuery": true, + "refId": "B", + "series": "interface", + "target": "get link_name, values.input * 3600 from (get link_name, aggregate(values.input, 3600, average) / 8 as values.input between ($START, $END) by link_name from interface where ((link_name like \"$links\")))", + "target_alias": "Z-A", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": true, + "values": ["total"] + }, + "yaxes": [ + { + "format": "decbytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 129 + }, + "id": 145, + "panels": [], + "repeatIteration": 1618867139860, + "repeatPanelId": 11, + "scopedVars": { + "links": { + "selected": false, + "text": "PIREN: Mauna Lani to Sydney 100GE", + "value": "PIREN: Mauna Lani to Sydney 100GE" + } + }, + "title": "", + "type": "row" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 2, + "x": 0, + "y": 130 + }, + "id": 146, + "links": [], + "options": { + "content": "**$links**", + "mode": "markdown" + }, + "pluginVersion": "7.3.3", + "repeatIteration": 1618867139860, + "repeatPanelId": 12, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "PIREN: Mauna Lani to Sydney 100GE", + "value": "PIREN: Mauna Lani to Sydney 100GE" + } + }, + "title": "", + "transparent": true, + "type": "text" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 14, + "x": 2, + "y": 130 + }, + "hiddenSeries": false, + "id": 147, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeatIteration": 1618867139860, + "repeatPanelId": 13, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "PIREN: Mauna Lani to Sydney 100GE", + "value": "PIREN: Mauna Lani to Sydney 100GE" + } + }, + "seriesOverrides": [ + { + "alias": "A-Z", + "color": "#FBAE60" + }, + { + "alias": "Z-A", + "color": "#80B2E7" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "aggregate_all": false, + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": false, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 210, average)": "A-Z" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "refId": "A", + "series": "interface", + "target": "get link_name, aggregate(values.output, 210, average) between (1570571291, 1570657691) by link_name from interface where ((link_name like \"AmLight: Chile to Sao Paolo 100GE\"))", + "target_alias": "$VALUE", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "aggregate_all": false, + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 210, average)": "Z-A" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "orderby_field": "", + "outerGroupOperator": [""], + "refId": "B", + "series": "interface", + "target": "get link_name, aggregate(values.input, 210, average) between (1570571291, 1570657691) by link_name from interface where ((link_name like \"AmLight: Chile to Sao Paolo 100GE\"))", + "target_alias": "$VALUE", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bps", + "label": "Rate", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 130 + }, + "hiddenSeries": false, + "id": 148, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "show": false, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeatIteration": 1618867139860, + "repeatPanelId": 14, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "PIREN: Mauna Lani to Sydney 100GE", + "value": "PIREN: Mauna Lani to Sydney 100GE" + } + }, + "seriesOverrides": [ + { + "alias": "A-Z", + "color": "#FBAE60" + }, + { + "alias": "Z-A", + "color": "#80B2E7" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "* $TIMESPAN", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 310, average)": "A-Z" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "rawQuery": true, + "refId": "A", + "series": "interface", + "target": "get link_name, values.output * 3600 from (get link_name, aggregate(values.output, 3600, average) / 8 as values.output between ($START, $END) by link_name from interface where ((link_name like \"$links\")))", + "target_alias": "A-Z", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "* $TIMESPAN", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "hide": false, + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 310, average)": "Z-A" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "orderby_field": "", + "outerGroupOperator": [""], + "rawQuery": true, + "refId": "B", + "series": "interface", + "target": "get link_name, values.input * 3600 from (get link_name, aggregate(values.input, 3600, average) / 8 as values.input between ($START, $END) by link_name from interface where ((link_name like \"$links\")))", + "target_alias": "Z-A", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": true, + "values": ["total"] + }, + "yaxes": [ + { + "format": "decbytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 137 + }, + "id": 149, + "panels": [], + "repeatIteration": 1618867139860, + "repeatPanelId": 11, + "scopedVars": { + "links": { + "selected": false, + "text": "PIREN: Oahu to Guam 100GE", + "value": "PIREN: Oahu to Guam 100GE" + } + }, + "title": "", + "type": "row" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 2, + "x": 0, + "y": 138 + }, + "id": 150, + "links": [], + "options": { + "content": "**$links**", + "mode": "markdown" + }, + "pluginVersion": "7.3.3", + "repeatIteration": 1618867139860, + "repeatPanelId": 12, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "PIREN: Oahu to Guam 100GE", + "value": "PIREN: Oahu to Guam 100GE" + } + }, + "title": "", + "transparent": true, + "type": "text" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 14, + "x": 2, + "y": 138 + }, + "hiddenSeries": false, + "id": 151, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeatIteration": 1618867139860, + "repeatPanelId": 13, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "PIREN: Oahu to Guam 100GE", + "value": "PIREN: Oahu to Guam 100GE" + } + }, + "seriesOverrides": [ + { + "alias": "A-Z", + "color": "#FBAE60" + }, + { + "alias": "Z-A", + "color": "#80B2E7" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "aggregate_all": false, + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": false, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 210, average)": "A-Z" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "refId": "A", + "series": "interface", + "target": "get link_name, aggregate(values.output, 210, average) between (1570571291, 1570657691) by link_name from interface where ((link_name like \"AmLight: Chile to Sao Paolo 100GE\"))", + "target_alias": "$VALUE", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "aggregate_all": false, + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 210, average)": "Z-A" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "orderby_field": "", + "outerGroupOperator": [""], + "refId": "B", + "series": "interface", + "target": "get link_name, aggregate(values.input, 210, average) between (1570571291, 1570657691) by link_name from interface where ((link_name like \"AmLight: Chile to Sao Paolo 100GE\"))", + "target_alias": "$VALUE", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bps", + "label": "Rate", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 138 + }, + "hiddenSeries": false, + "id": 152, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "show": false, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeatIteration": 1618867139860, + "repeatPanelId": 14, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "PIREN: Oahu to Guam 100GE", + "value": "PIREN: Oahu to Guam 100GE" + } + }, + "seriesOverrides": [ + { + "alias": "A-Z", + "color": "#FBAE60" + }, + { + "alias": "Z-A", + "color": "#80B2E7" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "* $TIMESPAN", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 310, average)": "A-Z" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "rawQuery": true, + "refId": "A", + "series": "interface", + "target": "get link_name, values.output * 3600 from (get link_name, aggregate(values.output, 3600, average) / 8 as values.output between ($START, $END) by link_name from interface where ((link_name like \"$links\")))", + "target_alias": "A-Z", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "* $TIMESPAN", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "hide": false, + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 310, average)": "Z-A" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "orderby_field": "", + "outerGroupOperator": [""], + "rawQuery": true, + "refId": "B", + "series": "interface", + "target": "get link_name, values.input * 3600 from (get link_name, aggregate(values.input, 3600, average) / 8 as values.input between ($START, $END) by link_name from interface where ((link_name like \"$links\")))", + "target_alias": "Z-A", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": true, + "values": ["total"] + }, + "yaxes": [ + { + "format": "decbytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 145 + }, + "id": 153, + "panels": [], + "repeatIteration": 1618867139860, + "repeatPanelId": 11, + "scopedVars": { + "links": { + "selected": false, + "text": "PIREN: Oahu to Los Angeles 100GE", + "value": "PIREN: Oahu to Los Angeles 100GE" + } + }, + "title": "", + "type": "row" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 2, + "x": 0, + "y": 146 + }, + "id": 154, + "links": [], + "options": { + "content": "**$links**", + "mode": "markdown" + }, + "pluginVersion": "7.3.3", + "repeatIteration": 1618867139860, + "repeatPanelId": 12, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "PIREN: Oahu to Los Angeles 100GE", + "value": "PIREN: Oahu to Los Angeles 100GE" + } + }, + "title": "", + "transparent": true, + "type": "text" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 14, + "x": 2, + "y": 146 + }, + "hiddenSeries": false, + "id": 155, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeatIteration": 1618867139860, + "repeatPanelId": 13, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "PIREN: Oahu to Los Angeles 100GE", + "value": "PIREN: Oahu to Los Angeles 100GE" + } + }, + "seriesOverrides": [ + { + "alias": "A-Z", + "color": "#FBAE60" + }, + { + "alias": "Z-A", + "color": "#80B2E7" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "aggregate_all": false, + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": false, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 210, average)": "A-Z" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "refId": "A", + "series": "interface", + "target": "get link_name, aggregate(values.output, 210, average) between (1570571291, 1570657691) by link_name from interface where ((link_name like \"AmLight: Chile to Sao Paolo 100GE\"))", + "target_alias": "$VALUE", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "aggregate_all": false, + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 210, average)": "Z-A" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "orderby_field": "", + "outerGroupOperator": [""], + "refId": "B", + "series": "interface", + "target": "get link_name, aggregate(values.input, 210, average) between (1570571291, 1570657691) by link_name from interface where ((link_name like \"AmLight: Chile to Sao Paolo 100GE\"))", + "target_alias": "$VALUE", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bps", + "label": "Rate", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 146 + }, + "hiddenSeries": false, + "id": 156, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "show": false, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeatIteration": 1618867139860, + "repeatPanelId": 14, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "PIREN: Oahu to Los Angeles 100GE", + "value": "PIREN: Oahu to Los Angeles 100GE" + } + }, + "seriesOverrides": [ + { + "alias": "A-Z", + "color": "#FBAE60" + }, + { + "alias": "Z-A", + "color": "#80B2E7" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "* $TIMESPAN", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 310, average)": "A-Z" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "rawQuery": true, + "refId": "A", + "series": "interface", + "target": "get link_name, values.output * 3600 from (get link_name, aggregate(values.output, 3600, average) / 8 as values.output between ($START, $END) by link_name from interface where ((link_name like \"$links\")))", + "target_alias": "A-Z", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "* $TIMESPAN", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "hide": false, + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 310, average)": "Z-A" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "orderby_field": "", + "outerGroupOperator": [""], + "rawQuery": true, + "refId": "B", + "series": "interface", + "target": "get link_name, values.input * 3600 from (get link_name, aggregate(values.input, 3600, average) / 8 as values.input between ($START, $END) by link_name from interface where ((link_name like \"$links\")))", + "target_alias": "Z-A", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": true, + "values": ["total"] + }, + "yaxes": [ + { + "format": "decbytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 153 + }, + "id": 157, + "panels": [], + "repeatIteration": 1618867139860, + "repeatPanelId": 11, + "scopedVars": { + "links": { + "selected": false, + "text": "PIREN: Oahu to Sydney 100GE", + "value": "PIREN: Oahu to Sydney 100GE" + } + }, + "title": "", + "type": "row" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 2, + "x": 0, + "y": 154 + }, + "id": 158, + "links": [], + "options": { + "content": "**$links**", + "mode": "markdown" + }, + "pluginVersion": "7.3.3", + "repeatIteration": 1618867139860, + "repeatPanelId": 12, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "PIREN: Oahu to Sydney 100GE", + "value": "PIREN: Oahu to Sydney 100GE" + } + }, + "title": "", + "transparent": true, + "type": "text" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 14, + "x": 2, + "y": 154 + }, + "hiddenSeries": false, + "id": 159, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeatIteration": 1618867139860, + "repeatPanelId": 13, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "PIREN: Oahu to Sydney 100GE", + "value": "PIREN: Oahu to Sydney 100GE" + } + }, + "seriesOverrides": [ + { + "alias": "A-Z", + "color": "#FBAE60" + }, + { + "alias": "Z-A", + "color": "#80B2E7" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "aggregate_all": false, + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": false, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 210, average)": "A-Z" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "refId": "A", + "series": "interface", + "target": "get link_name, aggregate(values.output, 210, average) between (1570571291, 1570657691) by link_name from interface where ((link_name like \"AmLight: Chile to Sao Paolo 100GE\"))", + "target_alias": "$VALUE", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "aggregate_all": false, + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 210, average)": "Z-A" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "orderby_field": "", + "outerGroupOperator": [""], + "refId": "B", + "series": "interface", + "target": "get link_name, aggregate(values.input, 210, average) between (1570571291, 1570657691) by link_name from interface where ((link_name like \"AmLight: Chile to Sao Paolo 100GE\"))", + "target_alias": "$VALUE", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bps", + "label": "Rate", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 154 + }, + "hiddenSeries": false, + "id": 160, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "show": false, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeatIteration": 1618867139860, + "repeatPanelId": 14, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "PIREN: Oahu to Sydney 100GE", + "value": "PIREN: Oahu to Sydney 100GE" + } + }, + "seriesOverrides": [ + { + "alias": "A-Z", + "color": "#FBAE60" + }, + { + "alias": "Z-A", + "color": "#80B2E7" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "* $TIMESPAN", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 310, average)": "A-Z" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "rawQuery": true, + "refId": "A", + "series": "interface", + "target": "get link_name, values.output * 3600 from (get link_name, aggregate(values.output, 3600, average) / 8 as values.output between ($START, $END) by link_name from interface where ((link_name like \"$links\")))", + "target_alias": "A-Z", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "* $TIMESPAN", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "hide": false, + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 310, average)": "Z-A" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "orderby_field": "", + "outerGroupOperator": [""], + "rawQuery": true, + "refId": "B", + "series": "interface", + "target": "get link_name, values.input * 3600 from (get link_name, aggregate(values.input, 3600, average) / 8 as values.input between ($START, $END) by link_name from interface where ((link_name like \"$links\")))", + "target_alias": "Z-A", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": true, + "values": ["total"] + }, + "yaxes": [ + { + "format": "decbytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 161 + }, + "id": 161, + "panels": [], + "repeatIteration": 1618867139860, + "repeatPanelId": 11, + "scopedVars": { + "links": { + "selected": false, + "text": "PIREN: Seattle to Oahu 100GE", + "value": "PIREN: Seattle to Oahu 100GE" + } + }, + "title": "", + "type": "row" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 2, + "x": 0, + "y": 162 + }, + "id": 162, + "links": [], + "options": { + "content": "**$links**", + "mode": "markdown" + }, + "pluginVersion": "7.3.3", + "repeatIteration": 1618867139860, + "repeatPanelId": 12, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "PIREN: Seattle to Oahu 100GE", + "value": "PIREN: Seattle to Oahu 100GE" + } + }, + "title": "", + "transparent": true, + "type": "text" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 14, + "x": 2, + "y": 162 + }, + "hiddenSeries": false, + "id": 163, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeatIteration": 1618867139860, + "repeatPanelId": 13, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "PIREN: Seattle to Oahu 100GE", + "value": "PIREN: Seattle to Oahu 100GE" + } + }, + "seriesOverrides": [ + { + "alias": "A-Z", + "color": "#FBAE60" + }, + { + "alias": "Z-A", + "color": "#80B2E7" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "aggregate_all": false, + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": false, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 210, average)": "A-Z" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "refId": "A", + "series": "interface", + "target": "get link_name, aggregate(values.output, 210, average) between (1570571291, 1570657691) by link_name from interface where ((link_name like \"AmLight: Chile to Sao Paolo 100GE\"))", + "target_alias": "$VALUE", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "aggregate_all": false, + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 210, average)": "Z-A" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "orderby_field": "", + "outerGroupOperator": [""], + "refId": "B", + "series": "interface", + "target": "get link_name, aggregate(values.input, 210, average) between (1570571291, 1570657691) by link_name from interface where ((link_name like \"AmLight: Chile to Sao Paolo 100GE\"))", + "target_alias": "$VALUE", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bps", + "label": "Rate", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 162 + }, + "hiddenSeries": false, + "id": 164, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "show": false, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeatIteration": 1618867139860, + "repeatPanelId": 14, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "PIREN: Seattle to Oahu 100GE", + "value": "PIREN: Seattle to Oahu 100GE" + } + }, + "seriesOverrides": [ + { + "alias": "A-Z", + "color": "#FBAE60" + }, + { + "alias": "Z-A", + "color": "#80B2E7" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "* $TIMESPAN", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 310, average)": "A-Z" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "rawQuery": true, + "refId": "A", + "series": "interface", + "target": "get link_name, values.output * 3600 from (get link_name, aggregate(values.output, 3600, average) / 8 as values.output between ($START, $END) by link_name from interface where ((link_name like \"$links\")))", + "target_alias": "A-Z", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "* $TIMESPAN", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "hide": false, + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 310, average)": "Z-A" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "orderby_field": "", + "outerGroupOperator": [""], + "rawQuery": true, + "refId": "B", + "series": "interface", + "target": "get link_name, values.input * 3600 from (get link_name, aggregate(values.input, 3600, average) / 8 as values.input between ($START, $END) by link_name from interface where ((link_name like \"$links\")))", + "target_alias": "Z-A", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": true, + "values": ["total"] + }, + "yaxes": [ + { + "format": "decbytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 169 + }, + "id": 165, + "panels": [], + "repeatIteration": 1618867139860, + "repeatPanelId": 11, + "scopedVars": { + "links": { + "selected": false, + "text": "TransPAC: Hong Kong to Guam 10GE", + "value": "TransPAC: Hong Kong to Guam 10GE" + } + }, + "title": "", + "type": "row" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 2, + "x": 0, + "y": 170 + }, + "id": 166, + "links": [], + "options": { + "content": "**$links**", + "mode": "markdown" + }, + "pluginVersion": "7.3.3", + "repeatIteration": 1618867139860, + "repeatPanelId": 12, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "TransPAC: Hong Kong to Guam 10GE", + "value": "TransPAC: Hong Kong to Guam 10GE" + } + }, + "title": "", + "transparent": true, + "type": "text" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 14, + "x": 2, + "y": 170 + }, + "hiddenSeries": false, + "id": 167, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeatIteration": 1618867139860, + "repeatPanelId": 13, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "TransPAC: Hong Kong to Guam 10GE", + "value": "TransPAC: Hong Kong to Guam 10GE" + } + }, + "seriesOverrides": [ + { + "alias": "A-Z", + "color": "#FBAE60" + }, + { + "alias": "Z-A", + "color": "#80B2E7" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "aggregate_all": false, + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": false, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 210, average)": "A-Z" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "refId": "A", + "series": "interface", + "target": "get link_name, aggregate(values.output, 210, average) between (1570571291, 1570657691) by link_name from interface where ((link_name like \"AmLight: Chile to Sao Paolo 100GE\"))", + "target_alias": "$VALUE", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "aggregate_all": false, + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 210, average)": "Z-A" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "orderby_field": "", + "outerGroupOperator": [""], + "refId": "B", + "series": "interface", + "target": "get link_name, aggregate(values.input, 210, average) between (1570571291, 1570657691) by link_name from interface where ((link_name like \"AmLight: Chile to Sao Paolo 100GE\"))", + "target_alias": "$VALUE", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bps", + "label": "Rate", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 170 + }, + "hiddenSeries": false, + "id": 168, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "show": false, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeatIteration": 1618867139860, + "repeatPanelId": 14, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "TransPAC: Hong Kong to Guam 10GE", + "value": "TransPAC: Hong Kong to Guam 10GE" + } + }, + "seriesOverrides": [ + { + "alias": "A-Z", + "color": "#FBAE60" + }, + { + "alias": "Z-A", + "color": "#80B2E7" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "* $TIMESPAN", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 310, average)": "A-Z" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "rawQuery": true, + "refId": "A", + "series": "interface", + "target": "get link_name, values.output * 3600 from (get link_name, aggregate(values.output, 3600, average) / 8 as values.output between ($START, $END) by link_name from interface where ((link_name like \"$links\")))", + "target_alias": "A-Z", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "* $TIMESPAN", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "hide": false, + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 310, average)": "Z-A" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "orderby_field": "", + "outerGroupOperator": [""], + "rawQuery": true, + "refId": "B", + "series": "interface", + "target": "get link_name, values.input * 3600 from (get link_name, aggregate(values.input, 3600, average) / 8 as values.input between ($START, $END) by link_name from interface where ((link_name like \"$links\")))", + "target_alias": "Z-A", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": true, + "values": ["total"] + }, + "yaxes": [ + { + "format": "decbytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 177 + }, + "id": 169, + "panels": [], + "repeatIteration": 1618867139860, + "repeatPanelId": 11, + "scopedVars": { + "links": { + "selected": false, + "text": "TransPAC: Seattle to Tokyo 100GE", + "value": "TransPAC: Seattle to Tokyo 100GE" + } + }, + "title": "", + "type": "row" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 2, + "x": 0, + "y": 178 + }, + "id": 170, + "links": [], + "options": { + "content": "**$links**", + "mode": "markdown" + }, + "pluginVersion": "7.3.3", + "repeatIteration": 1618867139860, + "repeatPanelId": 12, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "TransPAC: Seattle to Tokyo 100GE", + "value": "TransPAC: Seattle to Tokyo 100GE" + } + }, + "title": "", + "transparent": true, + "type": "text" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 14, + "x": 2, + "y": 178 + }, + "hiddenSeries": false, + "id": 171, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeatIteration": 1618867139860, + "repeatPanelId": 13, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "TransPAC: Seattle to Tokyo 100GE", + "value": "TransPAC: Seattle to Tokyo 100GE" + } + }, + "seriesOverrides": [ + { + "alias": "A-Z", + "color": "#FBAE60" + }, + { + "alias": "Z-A", + "color": "#80B2E7" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "aggregate_all": false, + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": false, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 210, average)": "A-Z" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "refId": "A", + "series": "interface", + "target": "get link_name, aggregate(values.output, 210, average) between (1570571291, 1570657691) by link_name from interface where ((link_name like \"AmLight: Chile to Sao Paolo 100GE\"))", + "target_alias": "$VALUE", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "aggregate_all": false, + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 210, average)": "Z-A" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "orderby_field": "", + "outerGroupOperator": [""], + "refId": "B", + "series": "interface", + "target": "get link_name, aggregate(values.input, 210, average) between (1570571291, 1570657691) by link_name from interface where ((link_name like \"AmLight: Chile to Sao Paolo 100GE\"))", + "target_alias": "$VALUE", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bps", + "label": "Rate", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 178 + }, + "hiddenSeries": false, + "id": 172, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "show": false, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeatIteration": 1618867139860, + "repeatPanelId": 14, + "repeatedByRow": true, + "scopedVars": { + "links": { + "selected": false, + "text": "TransPAC: Seattle to Tokyo 100GE", + "value": "TransPAC: Seattle to Tokyo 100GE" + } + }, + "seriesOverrides": [ + { + "alias": "A-Z", + "color": "#FBAE60" + }, + { + "alias": "Z-A", + "color": "#80B2E7" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average", "average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "* $TIMESPAN", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 310, average)": "A-Z" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "", + "outerGroupOperator": [""], + "percentileValue": ["", ""], + "rawQuery": true, + "refId": "A", + "series": "interface", + "target": "get link_name, values.output * 3600 from (get link_name, aggregate(values.output, 3600, average) / 8 as values.output between ($START, $END) by link_name from interface where ((link_name like \"$links\")))", + "target_alias": "A-Z", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + }, + { + "aggregate_all": false, + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "func": [ + { + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": true, + "method": "average", + "operation": "* $TIMESPAN", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "hide": false, + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 310, average)": "Z-A" + }, + "metricValueAliases": [""], + "metricValues_array": ["Select Metric Value"], + "metric_array": ["link_name"], + "orderby_field": "", + "outerGroupOperator": [""], + "rawQuery": true, + "refId": "B", + "series": "interface", + "target": "get link_name, values.input * 3600 from (get link_name, aggregate(values.input, 3600, average) / 8 as values.input between ($START, $END) by link_name from interface where ((link_name like \"$links\")))", + "target_alias": "Z-A", + "templateVariableValue": [""], + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "left": "link_name", + "op": "like", + "right": "$links" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": true, + "values": ["total"] + }, + "yaxes": [ + { + "format": "decbytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 185 + }, + "id": 87, + "panels": [], + "title": "", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 14, + "w": 24, + "x": 0, + "y": 186 + }, + "hiddenSeries": false, + "id": 88, + "legend": { + "avg": true, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + {} + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": false, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 60, average)": "A-Z" + }, + "metricValueAliases": ["A-Z"], + "metricValues_array": ["output"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "link_name", + "outerGroupOperator": [""], + "percentileValue": [""], + "refId": "A", + "series": "interface", + "target": "get link_name, aggregate(values.output, 60, average) between (1570571291, 1570657691) by link_name from interface where (link_name like \".*\") ordered by link_name", + "target_alias": "$VALUES $link_name", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "$$hashKey": "object:284", + "left": "link_name", + "op": "like", + "right": ".*" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "(A to Z) Average Utilization Over Time", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bps", + "label": "Rate", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 200 + }, + "id": 89, + "panels": [], + "title": "", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 14, + "w": 24, + "x": 0, + "y": 201 + }, + "hiddenSeries": false, + "id": 90, + "legend": { + "avg": true, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + {} + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["average"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "bucketValue": [], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": false, + "method": "average", + "operation": "", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 60, average)": "Z-A" + }, + "metricValueAliases": ["Z-A"], + "metricValues_array": ["input"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "link_name", + "outerGroupOperator": [""], + "percentileValue": [""], + "refId": "A", + "series": "interface", + "target": "get link_name, aggregate(values.input, 60, average) between (1570571291, 1570657691) by link_name from interface where (link_name like \".*\") ordered by link_name", + "target_alias": "$VALUES $link_name", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "$$hashKey": "object:326", + "left": "link_name", + "op": "like", + "right": ".*" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "(Z to A) Average Utilization Over Time", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bps", + "label": "Rate", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 215 + }, + "id": 91, + "panels": [], + "title": "", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {}, + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 14, + "w": 24, + "x": 0, + "y": 216 + }, + "hiddenSeries": false, + "id": 92, + "legend": { + "avg": false, + "current": false, + "max": true, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["max"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "alias": "Z-A", + "align": "", + "bucket": "", + "expanded": false, + "method": "max", + "operation": "", + "percentile": "85", + "root": true, + "target": "output", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.output, 60, max)": "Z-A" + }, + "metricValueAliases": ["A-Z"], + "metricValues_array": ["output"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "link_name", + "outerGroupOperator": [""], + "percentileValue": [""], + "refId": "A", + "series": "interface", + "target": "get link_name, aggregate(values.output, 60, max) between (1570571291, 1570657691) by link_name from interface where (link_name like \".*\") ordered by link_name", + "target_alias": "$VALUES $link_name", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "$$hashKey": "object:457", + "left": "link_name", + "op": "like", + "right": ".*" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "(A to Z) Maximum Utilization Over Time", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bps", + "label": "Rate", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 230 + }, + "id": 93, + "panels": [], + "title": "", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Netsage TSDS", + "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 14, + "w": 24, + "x": 0, + "y": 231 + }, + "hiddenSeries": false, + "id": 94, + "legend": { + "avg": false, + "current": false, + "max": true, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "aggregate_all": false, + "aggregator": ["max"], + "bucket": [], + "bucketAggs": [ + { + "field": "start", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "combineAllBy": "nothing", + "condition": [], + "dateFormat": "", + "displayFormat": "series", + "drillDown": [], + "drillDownAlias": "", + "drillDownValue": [], + "dsType": "elasticsearch", + "func": [ + { + "alias": "A-Z", + "align": "", + "bucket": "", + "expanded": false, + "method": "max", + "operation": "", + "percentile": "85", + "root": true, + "target": "input", + "template": "", + "title": "Aggregate", + "type": "Aggregate", + "wrapper": [] + } + ], + "groupby_field": "link_name", + "inlineGroupOperator": [[""]], + "metricValueAliasMappings": { + "aggregate(values.input, 60, max)": "A-Z" + }, + "metricValueAliases": ["Z-A"], + "metricValues_array": ["input"], + "metric_array": ["link_name"], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "orderby_field": "link_name", + "outerGroupOperator": [""], + "percentileValue": [""], + "refId": "A", + "series": "interface", + "target": "get link_name, aggregate(values.input, 60, max) between (1570571291, 1570657691) by link_name from interface where (link_name like \".*\") ordered by link_name", + "target_alias": "$VALUES $link_name", + "templateVariableValue": [""], + "timeField": "start", + "type": "timeserie", + "whereClauseGroup": [ + [ + { + "$$hashKey": "object:521", + "left": "link_name", + "op": "like", + "right": ".*" + } + ] + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "(Z to A) Maximum Utilization Over Time", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bps", + "label": "Rate", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 245 + }, + "id": 95, + "panels": [], + "title": "", + "type": "row" + }, + { + "content": "\u003cdiv class=\"netsage_footer\"\u003e If you have any questions, concerns, or other issues, feel free to contact us at \u003ca href=\"mailto:netsage@lbl.gov\"\u003enetsage@lbl.gov \u003c/a\u003e Thanks! \u003cimg style=\"margin-left:10px\" src=\"https://www.nsf.gov/images/logos/NSF_4-Color_bitmap_Logo.png\" width=50 height=50\u003e \u003ca href=\"https://www.nsf.gov/awardsearch/showAward?AWD_ID=1540933\"\u003e NSF GRANT 1540933 \u003c/a\u003e \u003c/img\u003e \u003cspan style=\"float:right; position:relative; top:15px\"\u003e To Review the NetSage Data Policy \u003ca href=\"http://www.netsage.global/home/netsage-privacy-policy\"\u003e click here \u003c/a\u003e \u003c/div\u003e\n", + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 24, + "x": 0, + "y": 246 + }, + "id": 96, + "links": [], + "options": { + "content": "\u003cdiv\u003e If you have any questions, concerns, or other issues, feel free to contact us at \u003ca href=\"mailto:netsage@iu.edu\"\u003enetsage@iu.edu\u003c/a\u003e. Thanks! \u003cimg style=\"margin-left:10px\" src=\"https://www.nsf.gov/images/logos/NSF_4-Color_bitmap_Logo.png\" width=50 height=50\u003e \u003ca href=\"https://www.nsf.gov/awardsearch/showAward?AWD_ID=1540933\"\u003e NSF GRANT 1540933 \u003c/a\u003e \u003c/img\u003e \u003cspan style=\"float:right; position:relative; top:15px\"\u003e To Review the NetSage Data Policy \u003ca href=\"http://www.netsage.global/home/netsage-privacy-policy\"\u003e click here \u003c/a\u003e \u003c/div\u003e", + "mode": "html" + }, + "pluginVersion": "7.3.3", + "title": "", + "transparent": true, + "type": "text" + } + ], + "refresh": "", + "schemaVersion": 26, + "style": "dark", + "tags": ["netsage"], + "templating": { + "list": [ + { + "allValue": null, + "current": { + "text": "All", + "value": "$__all" + }, + "datasource": "Netsage TSDS", + "definition": "", + "error": null, + "hide": 2, + "includeAll": true, + "label": "Links", + "multi": true, + "name": "links", + "options": [], + "query": "get link_name between(1451606400, $END) by link_name from interface where link_name != null and link_name not like \"ACE\" limit 100 offset 0 ordered by link_name asc", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-24h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"] + }, + "timezone": "", + "title": "Bandwidth Dashboard", + "uid": "000000003", + "version": 1 +} diff --git a/website/content/en/docs/templating/_index.md b/website/content/en/docs/templating/_index.md new file mode 100644 index 00000000..99b5e8f5 --- /dev/null +++ b/website/content/en/docs/templating/_index.md @@ -0,0 +1,4 @@ +--- +title: "Templating Docs" +weight: 3 +--- diff --git a/website/content/en/docs/templating/description.md b/website/content/en/docs/templating/description.md new file mode 100644 index 00000000..13d621b4 --- /dev/null +++ b/website/content/en/docs/templating/description.md @@ -0,0 +1,174 @@ +--- +title: "Templating Tool " +weight: 1 +--- + +GDG has now introduced a new supporting tool that works in conjunction with GDG. It is currently dependent on the GDG +configuration +since it will operate on the currently selected context. You can confirm what the current context is by +running `gdg ctx show` + +For example, my current output is as follows: + +```yaml +---testing: +storage: "" +enterprise_support: true +url: http://localhost:3000 +token: "" +user_name: admin +password: admin +organization_id: 0 +watched_folders_override: [ ] +watched: + - General + - Other +connections: + exclude_filters: + - { } + credential_rules: + - rules: + - field: name + regex: misc + - field: url + auth: + user: user + password: password + - rules: + - field: url + regex: .*esproxy2* + auth: + user: admin + password: secret + - rules: + - field: name + regex: .* + auth: + user: user + password: password +datasources: { } +filter_override: + ignore_dashboard_filters: false +output_path: test/data +``` + +Most of the config isn't that interesting, except the output_path will be used to determine where the newly generated +dashboards will be. Make sure you have a valid configuration before continuing. + +## What does gdg-generate do? + +There are use cases where an almost identical dashboard is needed except we need to replace certain parts of it. + +For example, parts of a query need to be different, a different title, brand it to specific customer with a different +logo, or footer. All of these are difficult to control from grafana itself and even in the best case scenario it's not +great user experience. This allows you to configure and generate a new dashboard with any set of variables and +dictionaries that you will seed to the tool. + +The configuration that drives this application is `templates.yml`. You can see an example below. + +```yaml +entities: + dashboards: + - template_name: "template_example" ##Matches the name to a file under ouput_path/templates/*.go.tmpl + output: ## The section below defines one or multiple destination and the associated configuration + ## that goes with it. + - folder: "General" ## Name of the new folder where the template will be created + org_id: 2 ## Organization ID, will be converted to a name in a future version + dashboard_name: "" ## Optional, defaults to template_name.json + template_data: ## Template Data the dictionary of datasets that can be used in the template, + # it's basically your 'seed data'. Everything is contains is absolutely arbitrary + # and can have any structure as long as it's valid yaml + Title: "Bob Loves Candy" ## Dashboard Titlte + enabledlight: false ## Boolean check to enable/disable behavior + lightsources: ## some arbitrary list we get to play with + - sun + - moon + - lightbulb + - office lights + + +``` + +One caveat. The "Keys" will all be lowercased due to how the data is being read in. Meaning, even though +`Title` is specified, the template will see the value under "title" instead. + +### Available Functions + +Additionally, there a few functions exposed and available to you that allows you to modify + +| Function Name | Example | Input | Output | +|------------------|-----------------------------------------|----------------------|--------------------------| +| ToLower | {{ .title \|ToLower}} | Bob Candy | bob candy | +| ToSlug | {{ .title \| ToSlug }} | Bob Candy | bob-candy | +| DefaultString | {{ .title \| DefaultString }} | | [nil] | +| StringJoin | {{ .lightsources \| StringJoin }} | [sun,moon,lightbulb] | sun,moon,lightbulb | +| QuotedStringJoin | {{ .lightsources \| QuotedStringJoin }} | [sun,moon,lightbulb] | "sun","moon","lightbulb" | + +### Example Templating Snippets + + +Data Injection +```json +{ + "annotations": { + "list": [ + { + "$$hashKey": "{{ .title | ToLower | ToSlug}}", + /* Inserting data and piping it to two different functions. In this case, ToLower is redundant, but it serves as a chained example. */ + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations \u0026 Alerts", + "type": "dashboard" + } + ] + } +} +``` + +Iterating and conditionals. + +```json +{ + "link_text": [ + {{if .enabledlight}} /* conditional to check if to insert or not */ + {{ range $v := .lightsources}} /* Iterating through list */ + {{ $v }} /* Inserting value */ + {{ end }} + {{ end }} + ] +} +``` +Inserting a comma delimited list + +```json +"link_url": [ + "{{ .lightsources | StringJoin}}", /* Inserts comma delimited list as a quoted string */ + "/grafana/d/000000003/bandwidth-dashboard", + "/grafana/d/xk26IFhmk/flow-data", +] +``` +### Usage + +As part of the installation you will have access to gdg-generate. + +```sh +gdg-generate -c config/importer.yml --ct config/template.yaml -t template_example +``` +Example ouptut: + +```sh +2023-11-16 09:49:03 INF gen/main.go:16 Reading GDG configuration +2023-11-16 09:49:03 INF gen/main.go:20 Configuration file is: config=importer.yml +2023-11-16 09:49:03 INF gen/main.go:29 Context is set to: context=testing +2023-11-16 09:49:03 INF templating/templating.go:83 Processing template template=template_example +2023-11-16 09:49:03 INF templating/templating.go:97 Creating a new template folder=General orgId=2 data="map[enabledlight:false lightsources:[sun moon lightbulb office lights] title:Bob Loves Candy]" +2023-11-16 09:49:03 INF templating/templating.go:100 Writing data to destination output=test/data/org_2/dashboards +2023-11-16 09:49:03 INF templating/templating.go:131 template Path: path=test/data/templates + + +``` + +A new file has been created under test/data/org_2/dashboards/General/template_example.json