Compare commits

..

7 Commits

Author SHA1 Message Date
Nikhil Soni
d2d2ee01d4 fix(apm): use dynamic stepInterval for API monitoring time range on endpoints page
Replace hardcoded stepInterval: 300 (5 min) with the computed step value in
all four onViewAPIMonitoringPopupClick calls in External.tsx. Also fix the
endTime formula in util.ts — endTime should be `timestamp` (bucket end), not
`timestamp + stepInterval`, so the destination time range covers exactly the
clicked bar bucket [bucket_start, bucket_end].

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-25 16:58:43 +05:30
Vikrant Gupta
3ffb5bd43b feat(web): add support web settings (#11444)
* feat(web): add support web settings in index.html

* feat(web): remove settings from global config

* feat(web): fix openapi schemas

* feat(web): fix formatting issues

* feat(web): fix formatting issues

* feat(web): remove frontend script changes

* feat(web): remove the redundant test

* feat(web): update defaults
2026-05-25 09:24:12 +00:00
Nityananda Gohain
67324edb7e feat: opamp integration signozspanmapper (#11335)
* feat: opamp integration signozspanmapper

* fix: update go.mod

* fix: minor changes

* fix: keep action as a part of source

* fix: update go.mod

* fix: address comments

* fix: revert changes
2026-05-25 08:30:27 +00:00
Nikhil Soni
9ba57d323d refactor: merge tracedetail typse with spantypes (#11417)
* refactor: merge tracedetail typse with spantypes

* chore: update openapi specs
2026-05-25 06:52:34 +00:00
Tushar Vats
09f4ba33c9 fix: handle body json for default view (#11443) 2026-05-25 06:51:07 +00:00
swapnil-signoz
832930239e refactor: cloud integration dashboards migration to DB (#11382)
Some checks failed
build-staging / prepare (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
build-staging / go-build (push) Has been cancelled
build-staging / staging (push) Has been cancelled
build-staging / js-build (push) Has been cancelled
* chore: added migration setup

* feat(sqlmigration): add integration_dashboards table (migration 079)

Adds the `integration_dashboards` relations table that stores the
integration-specific identity for dashboards provisioned from cloud
or builtin integrations. Columns: id, org_id, dashboard_id, provider,
slug, created_at, updated_at. Includes a unique index on dashboard_id.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(sqlmigration): backfill cloud integration dashboards to DB (migration 080)

One-time idempotent migration that provisions dashboard rows for all
orgs with existing cloud integration services where metrics are enabled.
Each dashboard is inserted into the `dashboard` table with
source="integration" and locked=true, and a companion row is added to
`integration_dashboards` with provider="cloud_integrations" and
slug="{provider}-{service}-{dashboard}" (e.g. aws-alb-overview).
Idempotency is enforced by checking (org_id, provider, slug) on
integration_dashboards before each insert.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore(sqlmigration): clean up stale 079 artifacts, add 079 schema migration

Remove the pre-rename 079_migrate_cloud_integration_dashboards.go and
079_cloud_integration_dashboards/ directory that were left behind when
the backfill migration was renumbered to 080. Add the missing
079_add_integration_dashboards.go (schema-only migration creating the
integration_dashboards table) which provider.go already references.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore: adding comment for fk

* refactor: renaming table name

* refactor: rename and restructure cloud integration dashboard migration types

* chore: file rename

* refactor: dashboard creation and listing flow change

* refactor: removing loose strings

* refactor: adding DeleteBySource on dashboard module

* refactor: review changes and update service flow change

* refactor: simplify comments

* ci: lint staticcheck fix

* refactor: renaming migration and adding integration tests

* ci: py fmt lint fixes

* feat: adding ListSharedServices store method

* ci: golangci-lint fix

* refactor: code cleanup

* chore: revert changed due to js lint

* refactor: test assertion changes

* refactor: using bindparam for sql generation

* chore: migrate integration dashboards json to v5 (#11419)

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com>
2026-05-23 03:05:06 +00:00
Gaurav Tewari
f2a18e8b6c fix(trace-details): make back button reliably return to previous in-app page (#11414)
Some checks failed
build-staging / prepare (push) Has been cancelled
build-staging / js-build (push) Has been cancelled
build-staging / go-build (push) Has been cancelled
build-staging / staging (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
* fix: back button issue

* chore: add unit test

* fix : test cases

---------

Co-authored-by: Gaurav Tewari <tewarig@users.noreply.github.com>
2026-05-22 16:13:26 +00:00
132 changed files with 27108 additions and 12525 deletions

View File

@@ -115,7 +115,7 @@ func runServer(ctx context.Context, config signoz.Config, logger *slog.Logger) e
func(ps factory.ProviderSettings, q querier.Querier, a analytics.Analytics) querier.Handler {
return querier.NewHandler(ps, q, a)
},
func(_ sqlstore.SQLStore, _ global.Global, _ zeus.Zeus, _ gateway.Gateway, _ licensing.Licensing, _ serviceaccount.Module, _ cloudintegration.Config) (cloudintegration.Module, error) {
func(_ sqlstore.SQLStore, _ dashboard.Module, _ global.Global, _ zeus.Zeus, _ gateway.Gateway, _ licensing.Licensing, _ serviceaccount.Module, _ cloudintegration.Config) (cloudintegration.Module, error) {
return implcloudintegration.NewModule(), nil
},
func(c cache.Cache, am alertmanager.Alertmanager, ss sqlstore.SQLStore, ts telemetrystore.TelemetryStore, ms telemetrytypes.MetadataStore, p prometheus.Prometheus, og organization.Getter, rsh rulestatehistory.Module, q querier.Querier, qp queryparser.QueryParser) factory.NamedMap[factory.ProviderFactory[ruler.Ruler, ruler.Config]] {

View File

@@ -167,7 +167,7 @@ func runServer(ctx context.Context, config signoz.Config, logger *slog.Logger) e
communityHandler := querier.NewHandler(ps, q, a)
return eequerier.NewHandler(ps, q, communityHandler)
},
func(sqlStore sqlstore.SQLStore, global global.Global, zeus zeus.Zeus, gateway gateway.Gateway, licensing licensing.Licensing, serviceAccount serviceaccount.Module, config cloudintegration.Config) (cloudintegration.Module, error) {
func(sqlStore sqlstore.SQLStore, dashboardModule dashboard.Module, global global.Global, zeus zeus.Zeus, gateway gateway.Gateway, licensing licensing.Licensing, serviceAccount serviceaccount.Module, config cloudintegration.Config) (cloudintegration.Module, error) {
defStore := pkgcloudintegration.NewServiceDefinitionStore()
awsCloudProviderModule, err := implcloudprovider.NewAWSCloudProvider(defStore)
if err != nil {
@@ -179,7 +179,7 @@ func runServer(ctx context.Context, config signoz.Config, logger *slog.Logger) e
cloudintegrationtypes.CloudProviderTypeAzure: azureCloudProviderModule,
}
return implcloudintegration.NewModule(pkgcloudintegration.NewStore(sqlStore), global, zeus, gateway, licensing, serviceAccount, cloudProvidersMap, config)
return implcloudintegration.NewModule(pkgcloudintegration.NewStore(sqlStore), dashboardModule, global, zeus, gateway, licensing, serviceAccount, cloudProvidersMap, config)
},
func(c cache.Cache, am alertmanager.Alertmanager, ss sqlstore.SQLStore, ts telemetrystore.TelemetryStore, ms telemetrytypes.MetadataStore, p prometheus.Prometheus, og organization.Getter, rsh rulestatehistory.Module, q querier.Querier, qp queryparser.QueryParser) factory.NamedMap[factory.ProviderFactory[ruler.Ruler, ruler.Config]] {
return factory.MustNewNamedMap(signozruler.NewFactory(c, am, ss, ts, ms, p, og, rsh, q, qp, eerules.PrepareTaskFunc, eerules.TestNotification))

View File

@@ -60,6 +60,14 @@ web:
index: index.html
# The directory containing the static build files.
directory: /etc/signoz/web
# Settings exposed to the web.
settings:
posthog:
# Whether to enable PostHog in web.
enabled: true
appcues:
# Whether to enable Appcues in web.
enabled: true
##################### Cache #####################
cache:

View File

@@ -5641,6 +5641,19 @@ components:
type: object
Sigv4SigV4Config:
type: object
SpantypesEvent:
properties:
attributeMap:
additionalProperties: {}
type: object
isError:
type: boolean
name:
type: string
timeUnixNano:
minimum: 0
type: integer
type: object
SpantypesFieldContext:
enum:
- attribute
@@ -5655,6 +5668,50 @@ components:
required:
- items
type: object
SpantypesGettableWaterfallTrace:
properties:
aggregations:
items:
$ref: '#/components/schemas/SpantypesSpanAggregationResult'
nullable: true
type: array
endTimestampMillis:
minimum: 0
type: integer
hasMissingSpans:
type: boolean
hasMore:
type: boolean
rootServiceEntryPoint:
type: string
rootServiceName:
type: string
serviceNameToTotalDurationMap:
additionalProperties:
minimum: 0
type: integer
nullable: true
type: object
spans:
items:
$ref: '#/components/schemas/SpantypesWaterfallSpan'
nullable: true
type: array
startTimestampMillis:
minimum: 0
type: integer
totalErrorSpansCount:
minimum: 0
type: integer
totalSpansCount:
minimum: 0
type: integer
uncollapsedSpans:
items:
type: string
nullable: true
type: array
type: object
SpantypesPostableSpanMapper:
properties:
config:
@@ -5682,6 +5739,50 @@ components:
- name
- condition
type: object
SpantypesPostableWaterfall:
properties:
aggregations:
items:
$ref: '#/components/schemas/SpantypesSpanAggregation'
nullable: true
type: array
limit:
minimum: 0
type: integer
selectedSpanId:
type: string
uncollapsedSpans:
items:
type: string
nullable: true
type: array
type: object
SpantypesSpanAggregation:
properties:
aggregation:
$ref: '#/components/schemas/SpantypesSpanAggregationType'
field:
$ref: '#/components/schemas/TelemetrytypesTelemetryFieldKey'
type: object
SpantypesSpanAggregationResult:
properties:
aggregation:
$ref: '#/components/schemas/SpantypesSpanAggregationType'
field:
$ref: '#/components/schemas/TelemetrytypesTelemetryFieldKey'
value:
additionalProperties:
minimum: 0
type: integer
nullable: true
type: object
type: object
SpantypesSpanAggregationType:
enum:
- span_count
- execution_time_percentage
- duration
type: string
SpantypesSpanMapper:
properties:
config:
@@ -5812,6 +5913,78 @@ components:
nullable: true
type: string
type: object
SpantypesWaterfallSpan:
properties:
attributes:
additionalProperties: {}
nullable: true
type: object
db_name:
type: string
db_operation:
type: string
duration_nano:
minimum: 0
type: integer
events:
items:
$ref: '#/components/schemas/SpantypesEvent'
nullable: true
type: array
external_http_method:
type: string
external_http_url:
type: string
flags:
minimum: 0
type: integer
has_children:
type: boolean
has_error:
type: boolean
http_host:
type: string
http_method:
type: string
http_url:
type: string
is_remote:
type: string
kind_string:
type: string
level:
minimum: 0
type: integer
name:
type: string
parent_span_id:
type: string
resource:
additionalProperties:
type: string
nullable: true
type: object
response_status_code:
type: string
span_id:
type: string
status_code:
type: integer
status_code_string:
type: string
status_message:
type: string
sub_tree_node_count:
minimum: 0
type: integer
time_unix:
minimum: 0
type: integer
trace_id:
type: string
trace_state:
type: string
type: object
TelemetrytypesFieldContext:
enum:
- metric
@@ -5904,179 +6077,6 @@ components:
TimeDuration:
format: int64
type: integer
TracedetailtypesEvent:
properties:
attributeMap:
additionalProperties: {}
type: object
isError:
type: boolean
name:
type: string
timeUnixNano:
minimum: 0
type: integer
type: object
TracedetailtypesGettableWaterfallTrace:
properties:
aggregations:
items:
$ref: '#/components/schemas/TracedetailtypesSpanAggregationResult'
nullable: true
type: array
endTimestampMillis:
minimum: 0
type: integer
hasMissingSpans:
type: boolean
hasMore:
type: boolean
rootServiceEntryPoint:
type: string
rootServiceName:
type: string
serviceNameToTotalDurationMap:
additionalProperties:
minimum: 0
type: integer
nullable: true
type: object
spans:
items:
$ref: '#/components/schemas/TracedetailtypesWaterfallSpan'
nullable: true
type: array
startTimestampMillis:
minimum: 0
type: integer
totalErrorSpansCount:
minimum: 0
type: integer
totalSpansCount:
minimum: 0
type: integer
uncollapsedSpans:
items:
type: string
nullable: true
type: array
type: object
TracedetailtypesPostableWaterfall:
properties:
aggregations:
items:
$ref: '#/components/schemas/TracedetailtypesSpanAggregation'
nullable: true
type: array
limit:
minimum: 0
type: integer
selectedSpanId:
type: string
uncollapsedSpans:
items:
type: string
nullable: true
type: array
type: object
TracedetailtypesSpanAggregation:
properties:
aggregation:
$ref: '#/components/schemas/TracedetailtypesSpanAggregationType'
field:
$ref: '#/components/schemas/TelemetrytypesTelemetryFieldKey'
type: object
TracedetailtypesSpanAggregationResult:
properties:
aggregation:
$ref: '#/components/schemas/TracedetailtypesSpanAggregationType'
field:
$ref: '#/components/schemas/TelemetrytypesTelemetryFieldKey'
value:
additionalProperties:
minimum: 0
type: integer
nullable: true
type: object
type: object
TracedetailtypesSpanAggregationType:
enum:
- span_count
- execution_time_percentage
- duration
type: string
TracedetailtypesWaterfallSpan:
properties:
attributes:
additionalProperties: {}
nullable: true
type: object
db_name:
type: string
db_operation:
type: string
duration_nano:
minimum: 0
type: integer
events:
items:
$ref: '#/components/schemas/TracedetailtypesEvent'
nullable: true
type: array
external_http_method:
type: string
external_http_url:
type: string
flags:
minimum: 0
type: integer
has_children:
type: boolean
has_error:
type: boolean
http_host:
type: string
http_method:
type: string
http_url:
type: string
is_remote:
type: string
kind_string:
type: string
level:
minimum: 0
type: integer
name:
type: string
parent_span_id:
type: string
resource:
additionalProperties:
type: string
nullable: true
type: object
response_status_code:
type: string
span_id:
type: string
status_code:
type: integer
status_code_string:
type: string
status_message:
type: string
sub_tree_node_count:
minimum: 0
type: integer
time_unix:
minimum: 0
type: integer
trace_id:
type: string
trace_state:
type: string
type: object
TypesAlertStatus:
properties:
inhibitedBy:
@@ -18896,7 +18896,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/TracedetailtypesPostableWaterfall'
$ref: '#/components/schemas/SpantypesPostableWaterfall'
responses:
"200":
content:
@@ -18904,7 +18904,7 @@ paths:
schema:
properties:
data:
$ref: '#/components/schemas/TracedetailtypesGettableWaterfallTrace'
$ref: '#/components/schemas/SpantypesGettableWaterfallTrace'
status:
type: string
required:

View File

@@ -54,11 +54,6 @@ func (provider *awscloudprovider) GetServiceDefinition(ctx context.Context, serv
return nil, err
}
// override cloud integration dashboard id
for index, dashboard := range serviceDef.Assets.Dashboards {
serviceDef.Assets.Dashboards[index].ID = cloudintegrationtypes.GetCloudIntegrationDashboardID(cloudintegrationtypes.CloudProviderTypeAWS, serviceID.StringValue(), dashboard.ID)
}
return serviceDef, nil
}

View File

@@ -38,11 +38,6 @@ func (provider *azurecloudprovider) GetServiceDefinition(ctx context.Context, se
return nil, err
}
// override cloud integration dashboard id.
for index, dashboard := range serviceDef.Assets.Dashboards {
serviceDef.Assets.Dashboards[index].ID = cloudintegrationtypes.GetCloudIntegrationDashboardID(cloudintegrationtypes.CloudProviderTypeAzure, serviceID.StringValue(), dashboard.ID)
}
return serviceDef, nil
}

View File

@@ -3,7 +3,6 @@ package implcloudintegration
import (
"context"
"fmt"
"sort"
"time"
"github.com/SigNoz/signoz/pkg/errors"
@@ -11,6 +10,7 @@ import (
"github.com/SigNoz/signoz/pkg/global"
"github.com/SigNoz/signoz/pkg/licensing"
"github.com/SigNoz/signoz/pkg/modules/cloudintegration"
"github.com/SigNoz/signoz/pkg/modules/dashboard"
"github.com/SigNoz/signoz/pkg/modules/serviceaccount"
"github.com/SigNoz/signoz/pkg/types/authtypes"
"github.com/SigNoz/signoz/pkg/types/cloudintegrationtypes"
@@ -23,6 +23,7 @@ import (
type module struct {
store cloudintegrationtypes.Store
dashboardModule dashboard.Module
gateway gateway.Gateway
zeus zeus.Zeus
licensing licensing.Licensing
@@ -34,6 +35,7 @@ type module struct {
func NewModule(
store cloudintegrationtypes.Store,
dashboardModule dashboard.Module,
global global.Global,
zeus zeus.Zeus,
gateway gateway.Gateway,
@@ -44,6 +46,7 @@ func NewModule(
) (cloudintegration.Module, error) {
return &module{
store: store,
dashboardModule: dashboardModule,
global: global,
zeus: zeus,
gateway: gateway,
@@ -254,7 +257,41 @@ func (module *module) DisconnectAccount(ctx context.Context, orgID valuer.UUID,
return errors.New(errors.TypeLicenseUnavailable, errors.CodeLicenseUnavailable, "a valid license is not available").WithAdditional("this feature requires a valid license").WithAdditional(err.Error())
}
return module.store.RemoveAccount(ctx, orgID, accountID, provider)
return module.store.RunInTx(ctx, func(ctx context.Context) error {
services, err := module.store.ListServices(ctx, accountID)
if err != nil {
return err
}
sharedServices, err := module.store.ListSharedServices(ctx, orgID, provider, accountID)
if err != nil {
return err
}
for _, svc := range services {
svcCfg, err := cloudintegrationtypes.NewServiceConfigFromJSON(provider, svc.Config)
if err != nil {
return err
}
if !svcCfg.IsMetricsEnabled(provider) {
continue
}
if cloudintegrationtypes.IsServiceSharedWithMetricsEnabled(provider, sharedServices[svc.Type]) {
continue
}
if err := module.deprovisionDashboards(ctx, orgID, provider, svc.Type); err != nil {
return err
}
}
if err := module.store.DeleteServicesByCloudIntegrationID(ctx, orgID, accountID); err != nil {
return err
}
return module.store.RemoveAccount(ctx, orgID, accountID, provider)
})
}
func (module *module) ListServicesMetadata(ctx context.Context, orgID valuer.UUID, provider cloudintegrationtypes.CloudProviderType, integrationID valuer.UUID) ([]*cloudintegrationtypes.ServiceMetadata, error) {
@@ -331,12 +368,16 @@ func (module *module) GetService(ctx context.Context, orgID valuer.UUID, service
integrationService = cloudintegrationtypes.NewCloudIntegrationServiceFromStorable(storedService, serviceConfig)
}
if err := module.enrichDashboardIDs(ctx, orgID, provider, serviceID, serviceDefinition); err != nil {
return nil, err
}
}
return cloudintegrationtypes.NewService(*serviceDefinition, integrationService), nil
}
func (module *module) CreateService(ctx context.Context, orgID valuer.UUID, service *cloudintegrationtypes.CloudIntegrationService, provider cloudintegrationtypes.CloudProviderType) error {
func (module *module) CreateService(ctx context.Context, orgID valuer.UUID, createdBy string, creator valuer.UUID, service *cloudintegrationtypes.CloudIntegrationService, provider cloudintegrationtypes.CloudProviderType) error {
_, err := module.licensing.GetActive(ctx, orgID)
if err != nil {
return errors.New(errors.TypeLicenseUnavailable, errors.CodeLicenseUnavailable, "a valid license is not available").WithAdditional("this feature requires a valid license").WithAdditional(err.Error())
@@ -357,10 +398,21 @@ func (module *module) CreateService(ctx context.Context, orgID valuer.UUID, serv
return err
}
return module.store.CreateService(ctx, cloudintegrationtypes.NewStorableCloudIntegrationService(service, string(configJSON)))
metricsEnabled := service.Config.IsMetricsEnabled(provider)
storableService := cloudintegrationtypes.NewStorableCloudIntegrationService(service, string(configJSON))
return module.store.RunInTx(ctx, func(ctx context.Context) error {
if err := module.store.CreateService(ctx, storableService); err != nil {
return err
}
if metricsEnabled {
return module.provisionDashboards(ctx, orgID, createdBy, creator, provider, service, serviceDefinition)
}
return nil
})
}
func (module *module) UpdateService(ctx context.Context, orgID valuer.UUID, integrationService *cloudintegrationtypes.CloudIntegrationService, provider cloudintegrationtypes.CloudProviderType) error {
func (module *module) UpdateService(ctx context.Context, orgID valuer.UUID, createdBy string, creator valuer.UUID, integrationService *cloudintegrationtypes.CloudIntegrationService, provider cloudintegrationtypes.CloudProviderType) error {
_, err := module.licensing.GetActive(ctx, orgID)
if err != nil {
return errors.New(errors.TypeLicenseUnavailable, errors.CodeLicenseUnavailable, "a valid license is not available").WithAdditional("this feature requires a valid license").WithAdditional(err.Error())
@@ -381,43 +433,28 @@ func (module *module) UpdateService(ctx context.Context, orgID valuer.UUID, inte
return err
}
metricsEnabled := integrationService.Config.IsMetricsEnabled(provider)
storableService := cloudintegrationtypes.NewStorableCloudIntegrationService(integrationService, string(configJSON))
return module.store.UpdateService(ctx, storableService)
}
func (module *module) GetDashboardByID(ctx context.Context, orgID valuer.UUID, id string) (*dashboardtypes.Dashboard, error) {
_, err := module.licensing.GetActive(ctx, orgID)
if err != nil {
return nil, errors.New(errors.TypeLicenseUnavailable, errors.CodeLicenseUnavailable, "a valid license is not available").WithAdditional("this feature requires a valid license").WithAdditional(err.Error())
}
_, _, _, err = cloudintegrationtypes.ParseCloudIntegrationDashboardID(id)
if err != nil {
return nil, err
}
allDashboards, err := module.listDashboards(ctx, orgID)
if err != nil {
return nil, err
}
for _, d := range allDashboards {
if d.ID == id {
return d, nil
return module.store.RunInTx(ctx, func(ctx context.Context) error {
if err := module.store.UpdateService(ctx, storableService); err != nil {
return err
}
}
return nil, errors.New(errors.TypeNotFound, cloudintegrationtypes.ErrCodeCloudIntegrationNotFound, "cloud integration dashboard not found")
}
if metricsEnabled {
return module.provisionDashboards(ctx, orgID, createdBy, creator, provider, integrationService, serviceDefinition)
}
func (module *module) ListDashboards(ctx context.Context, orgID valuer.UUID) ([]*dashboardtypes.Dashboard, error) {
_, err := module.licensing.GetActive(ctx, orgID)
if err != nil {
return nil, errors.New(errors.TypeLicenseUnavailable, errors.CodeLicenseUnavailable, "a valid license is not available").WithAdditional("this feature requires a valid license").WithAdditional(err.Error())
}
sharedServices, err := module.store.ListSharedServices(ctx, orgID, provider, integrationService.CloudIntegrationID)
if err != nil {
return err
}
if cloudintegrationtypes.IsServiceSharedWithMetricsEnabled(provider, sharedServices[integrationService.Type]) {
return nil
}
return module.listDashboards(ctx, orgID)
return module.deprovisionDashboards(ctx, orgID, provider, integrationService.Type)
})
}
func (module *module) Collect(ctx context.Context, orgID valuer.UUID) (map[string]any, error) {
@@ -493,52 +530,73 @@ func (module *module) getOrCreateAPIKey(ctx context.Context, orgID valuer.UUID,
return factorAPIKey.Key, nil
}
func (module *module) listDashboards(ctx context.Context, orgID valuer.UUID) ([]*dashboardtypes.Dashboard, error) {
var allDashboards []*dashboardtypes.Dashboard
// provisionDashboards creates dashboard and integration_dashboard rows for each dashboard in the service definition.
// Must be called within a transaction (ctx carries the tx).
func (module *module) provisionDashboards(ctx context.Context, orgID valuer.UUID, createdBy string, creator valuer.UUID, provider cloudintegrationtypes.CloudProviderType, service *cloudintegrationtypes.CloudIntegrationService, serviceDefinition *cloudintegrationtypes.ServiceDefinition) error {
// TODO: DB calls are in for loop, can be optimized later.
for _, dashboard := range serviceDefinition.Assets.Dashboards {
slug := cloudintegrationtypes.IntegrationDashboardSlug(provider, service.Type, dashboard.ID)
for provider := range module.cloudProvidersMap {
cloudProvider, err := module.getCloudProvider(provider)
if err != nil {
return nil, err
existing, err := module.store.GetIntegrationDashboardBySlug(ctx, orgID, cloudintegrationtypes.IntegrationDashboardProviderCloudIntegration, slug)
if err != nil && !errors.Ast(err, errors.TypeNotFound) {
return err
}
if existing != nil {
continue
}
connectedAccounts, err := module.store.ListConnectedAccounts(ctx, orgID, provider)
createdDashboard, err := module.dashboardModule.Create(ctx, orgID, createdBy, creator, dashboardtypes.SourceIntegration, dashboardtypes.PostableDashboard(dashboard.Definition))
if err != nil {
return nil, err
return err
}
for _, storableAccount := range connectedAccounts {
storedServices, err := module.store.ListServices(ctx, storableAccount.ID)
if err != nil {
return nil, err
}
for _, storedSvc := range storedServices {
serviceConfig, err := cloudintegrationtypes.NewServiceConfigFromJSON(provider, storedSvc.Config)
if err != nil || !serviceConfig.IsMetricsEnabled(provider) {
continue
}
svcDef, err := cloudProvider.GetServiceDefinition(ctx, storedSvc.Type)
if err != nil || svcDef == nil {
continue
}
dashboards := cloudintegrationtypes.GetDashboardsFromAssets(
storedSvc.Type.StringValue(),
orgID,
provider,
storableAccount.CreatedAt,
svcDef.Assets,
)
allDashboards = append(allDashboards, dashboards...)
}
integrationDashboard := cloudintegrationtypes.NewStorableIntegrationDashboard(createdDashboard.ID, cloudintegrationtypes.IntegrationDashboardProviderCloudIntegration, slug)
if err := module.store.CreateIntegrationDashboard(ctx, integrationDashboard); err != nil {
return err
}
}
sort.Slice(allDashboards, func(i, j int) bool {
return allDashboards[i].ID < allDashboards[j].ID
})
return allDashboards, nil
return nil
}
// deprovisionDashboards deletes all dashboard and integration_dashboard rows for the given service.
// make sure to call this within a transaction.
func (module *module) deprovisionDashboards(ctx context.Context, orgID valuer.UUID, provider cloudintegrationtypes.CloudProviderType, serviceID cloudintegrationtypes.ServiceID) error {
slugPrefix := cloudintegrationtypes.IntegrationDashboardSlugPrefix(provider, serviceID)
rows, err := module.store.ListIntegrationDashboardsBySlugPrefix(ctx, orgID, cloudintegrationtypes.IntegrationDashboardProviderCloudIntegration, slugPrefix)
if err != nil {
return err
}
for _, row := range rows {
dashID, err := valuer.NewUUID(row.DashboardID)
if err != nil {
return err
}
if err := module.store.DeleteIntegrationDashboardBySlug(ctx, orgID, cloudintegrationtypes.IntegrationDashboardProviderCloudIntegration, row.Slug); err != nil {
return err
}
if err := module.dashboardModule.DeleteUnsafe(ctx, orgID, dashID); err != nil {
return err
}
}
return nil
}
// enrichDashboardIDs replaces the raw dashboard name in each Dashboard.ID with the provisioned UUID.
// TODO: remove this hack and send idiomatic response to client.
func (module *module) enrichDashboardIDs(ctx context.Context, orgID valuer.UUID, provider cloudintegrationtypes.CloudProviderType, serviceID cloudintegrationtypes.ServiceID, serviceDefinition *cloudintegrationtypes.ServiceDefinition) error {
for i, d := range serviceDefinition.Assets.Dashboards {
slug := cloudintegrationtypes.IntegrationDashboardSlug(provider, serviceID, d.ID)
row, err := module.store.GetIntegrationDashboardBySlug(ctx, orgID, cloudintegrationtypes.IntegrationDashboardProviderCloudIntegration, slug)
if err != nil {
if errors.Ast(err, errors.TypeNotFound) {
continue
}
return err
}
serviceDefinition.Assets.Dashboards[i].ID = row.DashboardID
}
return nil
}

View File

@@ -162,24 +162,11 @@ func (module *module) Delete(ctx context.Context, orgID valuer.UUID, id valuer.U
return errors.New(errors.TypeInvalidInput, errors.CodeInvalidInput, "dashboard is locked, please unlock the dashboard to be delete it")
}
err = module.store.RunInTx(ctx, func(ctx context.Context) error {
err := module.store.DeletePublic(ctx, id.String())
if err != nil && !errors.Ast(err, errors.TypeNotFound) {
return err
}
return module.delete(ctx, orgID, id)
}
err = module.store.Delete(ctx, orgID, id)
if err != nil {
return err
}
return nil
})
if err != nil {
return err
}
return nil
func (module *module) DeleteUnsafe(ctx context.Context, orgID, id valuer.UUID) error {
return module.delete(ctx, orgID, id)
}
func (module *module) DeletePublic(ctx context.Context, orgID valuer.UUID, dashboardID valuer.UUID) error {
@@ -221,8 +208,8 @@ func (module *module) Collect(ctx context.Context, orgID valuer.UUID) (map[strin
return stats, nil
}
func (module *module) Create(ctx context.Context, orgID valuer.UUID, createdBy string, creator valuer.UUID, data dashboardtypes.PostableDashboard) (*dashboardtypes.Dashboard, error) {
return module.pkgDashboardModule.Create(ctx, orgID, createdBy, creator, data)
func (module *module) Create(ctx context.Context, orgID valuer.UUID, createdBy string, creator valuer.UUID, source dashboardtypes.Source, data dashboardtypes.PostableDashboard) (*dashboardtypes.Dashboard, error) {
return module.pkgDashboardModule.Create(ctx, orgID, createdBy, creator, source, data)
}
func (module *module) Get(ctx context.Context, orgID valuer.UUID, id valuer.UUID) (*dashboardtypes.Dashboard, error) {
@@ -244,3 +231,12 @@ func (module *module) Update(ctx context.Context, orgID valuer.UUID, id valuer.U
func (module *module) LockUnlock(ctx context.Context, orgID valuer.UUID, id valuer.UUID, updatedBy string, isAdmin bool, lock bool) error {
return module.pkgDashboardModule.LockUnlock(ctx, orgID, id, updatedBy, isAdmin, lock)
}
func (module *module) delete(ctx context.Context, orgID, id valuer.UUID) error {
return module.store.RunInTx(ctx, func(ctx context.Context) error {
if err := module.store.DeletePublic(ctx, id.String()); err != nil && !errors.Ast(err, errors.TypeNotFound) {
return err
}
return module.store.Delete(ctx, orgID, id)
})
}

View File

@@ -6655,6 +6655,28 @@ export interface ServiceaccounttypesUpdatableFactorAPIKeyDTO {
name: string;
}
export type SpantypesEventDTOAttributeMap = { [key: string]: unknown };
export interface SpantypesEventDTO {
/**
* @type object
*/
attributeMap?: SpantypesEventDTOAttributeMap;
/**
* @type boolean
*/
isError?: boolean;
/**
* @type string
*/
name?: string;
/**
* @type integer
* @minimum 0
*/
timeUnixNano?: number;
}
export enum SpantypesFieldContextDTO {
attribute = 'attribute',
resource = 'resource',
@@ -6721,6 +6743,232 @@ export interface SpantypesGettableSpanMapperGroupsDTO {
items: SpantypesSpanMapperGroupDTO[];
}
export type SpantypesGettableWaterfallTraceDTOServiceNameToTotalDurationMapAnyOf =
{ [key: string]: number };
/**
* @nullable
*/
export type SpantypesGettableWaterfallTraceDTOServiceNameToTotalDurationMap =
SpantypesGettableWaterfallTraceDTOServiceNameToTotalDurationMapAnyOf | null;
export enum SpantypesSpanAggregationTypeDTO {
span_count = 'span_count',
execution_time_percentage = 'execution_time_percentage',
duration = 'duration',
}
export type SpantypesSpanAggregationResultDTOValueAnyOf = {
[key: string]: number;
};
/**
* @nullable
*/
export type SpantypesSpanAggregationResultDTOValue =
SpantypesSpanAggregationResultDTOValueAnyOf | null;
export interface SpantypesSpanAggregationResultDTO {
aggregation?: SpantypesSpanAggregationTypeDTO;
field?: TelemetrytypesTelemetryFieldKeyDTO;
/**
* @type object,null
*/
value?: SpantypesSpanAggregationResultDTOValue;
}
export type SpantypesWaterfallSpanDTOAttributesAnyOf = {
[key: string]: unknown;
};
/**
* @nullable
*/
export type SpantypesWaterfallSpanDTOAttributes =
SpantypesWaterfallSpanDTOAttributesAnyOf | null;
export type SpantypesWaterfallSpanDTOResourceAnyOf = { [key: string]: string };
/**
* @nullable
*/
export type SpantypesWaterfallSpanDTOResource =
SpantypesWaterfallSpanDTOResourceAnyOf | null;
export interface SpantypesWaterfallSpanDTO {
/**
* @type object,null
*/
attributes?: SpantypesWaterfallSpanDTOAttributes;
/**
* @type string
*/
db_name?: string;
/**
* @type string
*/
db_operation?: string;
/**
* @type integer
* @minimum 0
*/
duration_nano?: number;
/**
* @type array,null
*/
events?: SpantypesEventDTO[] | null;
/**
* @type string
*/
external_http_method?: string;
/**
* @type string
*/
external_http_url?: string;
/**
* @type integer
* @minimum 0
*/
flags?: number;
/**
* @type boolean
*/
has_children?: boolean;
/**
* @type boolean
*/
has_error?: boolean;
/**
* @type string
*/
http_host?: string;
/**
* @type string
*/
http_method?: string;
/**
* @type string
*/
http_url?: string;
/**
* @type string
*/
is_remote?: string;
/**
* @type string
*/
kind_string?: string;
/**
* @type integer
* @minimum 0
*/
level?: number;
/**
* @type string
*/
name?: string;
/**
* @type string
*/
parent_span_id?: string;
/**
* @type object,null
*/
resource?: SpantypesWaterfallSpanDTOResource;
/**
* @type string
*/
response_status_code?: string;
/**
* @type string
*/
span_id?: string;
/**
* @type integer
*/
status_code?: number;
/**
* @type string
*/
status_code_string?: string;
/**
* @type string
*/
status_message?: string;
/**
* @type integer
* @minimum 0
*/
sub_tree_node_count?: number;
/**
* @type integer
* @minimum 0
*/
time_unix?: number;
/**
* @type string
*/
trace_id?: string;
/**
* @type string
*/
trace_state?: string;
}
export interface SpantypesGettableWaterfallTraceDTO {
/**
* @type array,null
*/
aggregations?: SpantypesSpanAggregationResultDTO[] | null;
/**
* @type integer
* @minimum 0
*/
endTimestampMillis?: number;
/**
* @type boolean
*/
hasMissingSpans?: boolean;
/**
* @type boolean
*/
hasMore?: boolean;
/**
* @type string
*/
rootServiceEntryPoint?: string;
/**
* @type string
*/
rootServiceName?: string;
/**
* @type object,null
*/
serviceNameToTotalDurationMap?: SpantypesGettableWaterfallTraceDTOServiceNameToTotalDurationMap;
/**
* @type array,null
*/
spans?: SpantypesWaterfallSpanDTO[] | null;
/**
* @type integer
* @minimum 0
*/
startTimestampMillis?: number;
/**
* @type integer
* @minimum 0
*/
totalErrorSpansCount?: number;
/**
* @type integer
* @minimum 0
*/
totalSpansCount?: number;
/**
* @type array,null
*/
uncollapsedSpans?: string[] | null;
}
export enum SpantypesSpanMapperOperationDTO {
move = 'move',
copy = 'copy',
@@ -6770,6 +7018,31 @@ export interface SpantypesPostableSpanMapperGroupDTO {
name: string;
}
export interface SpantypesSpanAggregationDTO {
aggregation?: SpantypesSpanAggregationTypeDTO;
field?: TelemetrytypesTelemetryFieldKeyDTO;
}
export interface SpantypesPostableWaterfallDTO {
/**
* @type array,null
*/
aggregations?: SpantypesSpanAggregationDTO[] | null;
/**
* @type integer
* @minimum 0
*/
limit?: number;
/**
* @type string
*/
selectedSpanId?: string;
/**
* @type array,null
*/
uncollapsedSpans?: string[] | null;
}
export interface SpantypesSpanMapperDTO {
config: SpantypesSpanMapperConfigDTO;
/**
@@ -6878,281 +7151,6 @@ export interface TelemetrytypesGettableFieldValuesDTO {
values: TelemetrytypesTelemetryFieldValuesDTO;
}
export type TracedetailtypesEventDTOAttributeMap = { [key: string]: unknown };
export interface TracedetailtypesEventDTO {
/**
* @type object
*/
attributeMap?: TracedetailtypesEventDTOAttributeMap;
/**
* @type boolean
*/
isError?: boolean;
/**
* @type string
*/
name?: string;
/**
* @type integer
* @minimum 0
*/
timeUnixNano?: number;
}
export type TracedetailtypesGettableWaterfallTraceDTOServiceNameToTotalDurationMapAnyOf =
{ [key: string]: number };
/**
* @nullable
*/
export type TracedetailtypesGettableWaterfallTraceDTOServiceNameToTotalDurationMap =
TracedetailtypesGettableWaterfallTraceDTOServiceNameToTotalDurationMapAnyOf | null;
export enum TracedetailtypesSpanAggregationTypeDTO {
span_count = 'span_count',
execution_time_percentage = 'execution_time_percentage',
duration = 'duration',
}
export type TracedetailtypesSpanAggregationResultDTOValueAnyOf = {
[key: string]: number;
};
/**
* @nullable
*/
export type TracedetailtypesSpanAggregationResultDTOValue =
TracedetailtypesSpanAggregationResultDTOValueAnyOf | null;
export interface TracedetailtypesSpanAggregationResultDTO {
aggregation?: TracedetailtypesSpanAggregationTypeDTO;
field?: TelemetrytypesTelemetryFieldKeyDTO;
/**
* @type object,null
*/
value?: TracedetailtypesSpanAggregationResultDTOValue;
}
export type TracedetailtypesWaterfallSpanDTOAttributesAnyOf = {
[key: string]: unknown;
};
/**
* @nullable
*/
export type TracedetailtypesWaterfallSpanDTOAttributes =
TracedetailtypesWaterfallSpanDTOAttributesAnyOf | null;
export type TracedetailtypesWaterfallSpanDTOResourceAnyOf = {
[key: string]: string;
};
/**
* @nullable
*/
export type TracedetailtypesWaterfallSpanDTOResource =
TracedetailtypesWaterfallSpanDTOResourceAnyOf | null;
export interface TracedetailtypesWaterfallSpanDTO {
/**
* @type object,null
*/
attributes?: TracedetailtypesWaterfallSpanDTOAttributes;
/**
* @type string
*/
db_name?: string;
/**
* @type string
*/
db_operation?: string;
/**
* @type integer
* @minimum 0
*/
duration_nano?: number;
/**
* @type array,null
*/
events?: TracedetailtypesEventDTO[] | null;
/**
* @type string
*/
external_http_method?: string;
/**
* @type string
*/
external_http_url?: string;
/**
* @type integer
* @minimum 0
*/
flags?: number;
/**
* @type boolean
*/
has_children?: boolean;
/**
* @type boolean
*/
has_error?: boolean;
/**
* @type string
*/
http_host?: string;
/**
* @type string
*/
http_method?: string;
/**
* @type string
*/
http_url?: string;
/**
* @type string
*/
is_remote?: string;
/**
* @type string
*/
kind_string?: string;
/**
* @type integer
* @minimum 0
*/
level?: number;
/**
* @type string
*/
name?: string;
/**
* @type string
*/
parent_span_id?: string;
/**
* @type object,null
*/
resource?: TracedetailtypesWaterfallSpanDTOResource;
/**
* @type string
*/
response_status_code?: string;
/**
* @type string
*/
span_id?: string;
/**
* @type integer
*/
status_code?: number;
/**
* @type string
*/
status_code_string?: string;
/**
* @type string
*/
status_message?: string;
/**
* @type integer
* @minimum 0
*/
sub_tree_node_count?: number;
/**
* @type integer
* @minimum 0
*/
time_unix?: number;
/**
* @type string
*/
trace_id?: string;
/**
* @type string
*/
trace_state?: string;
}
export interface TracedetailtypesGettableWaterfallTraceDTO {
/**
* @type array,null
*/
aggregations?: TracedetailtypesSpanAggregationResultDTO[] | null;
/**
* @type integer
* @minimum 0
*/
endTimestampMillis?: number;
/**
* @type boolean
*/
hasMissingSpans?: boolean;
/**
* @type boolean
*/
hasMore?: boolean;
/**
* @type string
*/
rootServiceEntryPoint?: string;
/**
* @type string
*/
rootServiceName?: string;
/**
* @type object,null
*/
serviceNameToTotalDurationMap?: TracedetailtypesGettableWaterfallTraceDTOServiceNameToTotalDurationMap;
/**
* @type array,null
*/
spans?: TracedetailtypesWaterfallSpanDTO[] | null;
/**
* @type integer
* @minimum 0
*/
startTimestampMillis?: number;
/**
* @type integer
* @minimum 0
*/
totalErrorSpansCount?: number;
/**
* @type integer
* @minimum 0
*/
totalSpansCount?: number;
/**
* @type array,null
*/
uncollapsedSpans?: string[] | null;
}
export interface TracedetailtypesSpanAggregationDTO {
aggregation?: TracedetailtypesSpanAggregationTypeDTO;
field?: TelemetrytypesTelemetryFieldKeyDTO;
}
export interface TracedetailtypesPostableWaterfallDTO {
/**
* @type array,null
*/
aggregations?: TracedetailtypesSpanAggregationDTO[] | null;
/**
* @type integer
* @minimum 0
*/
limit?: number;
/**
* @type string
*/
selectedSpanId?: string;
/**
* @type array,null
*/
uncollapsedSpans?: string[] | null;
}
export interface TypesChangePasswordRequestDTO {
/**
* @type string
@@ -9232,7 +9230,7 @@ export type GetWaterfallPathParameters = {
traceID: string;
};
export type GetWaterfall200 = {
data: TracedetailtypesGettableWaterfallTraceDTO;
data: SpantypesGettableWaterfallTraceDTO;
/**
* @type string
*/

View File

@@ -15,7 +15,7 @@ import type {
GetWaterfall200,
GetWaterfallPathParameters,
RenderErrorResponseDTO,
TracedetailtypesPostableWaterfallDTO,
SpantypesPostableWaterfallDTO,
} from '../sigNoz.schemas';
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
@@ -27,14 +27,14 @@ import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
*/
export const getWaterfall = (
{ traceID }: GetWaterfallPathParameters,
tracedetailtypesPostableWaterfallDTO?: BodyType<TracedetailtypesPostableWaterfallDTO>,
spantypesPostableWaterfallDTO?: BodyType<SpantypesPostableWaterfallDTO>,
signal?: AbortSignal,
) => {
return GeneratedAPIInstance<GetWaterfall200>({
url: `/api/v3/traces/${traceID}/waterfall`,
method: 'POST',
headers: { 'Content-Type': 'application/json' },
data: tracedetailtypesPostableWaterfallDTO,
data: spantypesPostableWaterfallDTO,
signal,
});
};
@@ -48,7 +48,7 @@ export const getGetWaterfallMutationOptions = <
TError,
{
pathParams: GetWaterfallPathParameters;
data?: BodyType<TracedetailtypesPostableWaterfallDTO>;
data?: BodyType<SpantypesPostableWaterfallDTO>;
},
TContext
>;
@@ -57,7 +57,7 @@ export const getGetWaterfallMutationOptions = <
TError,
{
pathParams: GetWaterfallPathParameters;
data?: BodyType<TracedetailtypesPostableWaterfallDTO>;
data?: BodyType<SpantypesPostableWaterfallDTO>;
},
TContext
> => {
@@ -74,7 +74,7 @@ export const getGetWaterfallMutationOptions = <
Awaited<ReturnType<typeof getWaterfall>>,
{
pathParams: GetWaterfallPathParameters;
data?: BodyType<TracedetailtypesPostableWaterfallDTO>;
data?: BodyType<SpantypesPostableWaterfallDTO>;
}
> = (props) => {
const { pathParams, data } = props ?? {};
@@ -89,7 +89,7 @@ export type GetWaterfallMutationResult = NonNullable<
Awaited<ReturnType<typeof getWaterfall>>
>;
export type GetWaterfallMutationBody =
| BodyType<TracedetailtypesPostableWaterfallDTO>
| BodyType<SpantypesPostableWaterfallDTO>
| undefined;
export type GetWaterfallMutationError = ErrorType<RenderErrorResponseDTO>;
@@ -105,7 +105,7 @@ export const useGetWaterfall = <
TError,
{
pathParams: GetWaterfallPathParameters;
data?: BodyType<TracedetailtypesPostableWaterfallDTO>;
data?: BodyType<SpantypesPostableWaterfallDTO>;
},
TContext
>;
@@ -114,7 +114,7 @@ export const useGetWaterfall = <
TError,
{
pathParams: GetWaterfallPathParameters;
data?: BodyType<TracedetailtypesPostableWaterfallDTO>;
data?: BodyType<SpantypesPostableWaterfallDTO>;
},
TContext
> => {

View File

@@ -5,7 +5,10 @@ import cx from 'classnames';
import { VIEW_TYPES } from 'components/LogDetail/constants';
import { DATE_TIME_FORMATS } from 'constants/dateTimeFormats';
import { ChangeViewFunctionType } from 'container/ExplorerOptions/types';
import { getSanitizedLogBody } from 'container/LogDetailedView/utils';
import {
getBodyDisplayString,
getSanitizedLogBody,
} from 'container/LogDetailedView/utils';
import { FontSize } from 'container/OptionsMenu/types';
import { useCopyLogLink } from 'hooks/logs/useCopyLogLink';
import { useIsDarkMode } from 'hooks/useDarkMode';
@@ -196,7 +199,7 @@ function ListLogView({
{updatedSelecedFields.some((field) => field.name === 'body') && (
<LogGeneralField
fieldKey="Log"
fieldValue={flattenLogData.body}
fieldValue={getBodyDisplayString(logData.body)}
linesPerRow={linesPerRow}
fontSize={fontSize}
/>

View File

@@ -11,5 +11,4 @@ export enum FeatureKeys {
DOT_METRICS_ENABLED = 'dot_metrics_enabled',
USE_JSON_BODY = 'use_json_body',
USE_FINE_GRAINED_AUTHZ = 'use_fine_grained_authz',
DASHBOARD_V2 = 'dashboard_v2',
}

View File

@@ -42,5 +42,4 @@ export enum LOCALSTORAGE {
LICENSE_KEY_CALLOUT_DISMISSED = 'LICENSE_KEY_CALLOUT_DISMISSED',
DASHBOARD_PREFERENCES = 'DASHBOARD_PREFERENCES',
ACTIVE_SIGNOZ_INSTANCE_URL = 'ACTIVE_SIGNOZ_INSTANCE_URL',
DASHBOARDS_LIST_VISIBLE_COLUMNS = 'DASHBOARDS_LIST_VISIBLE_COLUMNS',
}

View File

@@ -263,7 +263,7 @@ function External(): JSX.Element {
timestamp: selectedTimeStamp,
domainName: selectedData?.address || '',
isError: true,
stepInterval: 300,
stepInterval,
safeNavigate,
})}
/>
@@ -306,7 +306,7 @@ function External(): JSX.Element {
timestamp: selectedTimeStamp,
domainName: selectedData?.address,
isError: false,
stepInterval: 300,
stepInterval,
safeNavigate,
})}
/>
@@ -352,7 +352,7 @@ function External(): JSX.Element {
timestamp: selectedTimeStamp,
domainName: selectedData?.address,
isError: false,
stepInterval: 300,
stepInterval,
safeNavigate,
})}
/>
@@ -395,7 +395,7 @@ function External(): JSX.Element {
timestamp: selectedTimeStamp,
domainName: selectedData?.address,
isError: false,
stepInterval: 300,
stepInterval,
safeNavigate,
})}
/>

View File

@@ -151,7 +151,7 @@ export function onViewAPIMonitoringPopupClick({
safeNavigate,
}: OnViewAPIMonitoringPopupClickProps): (e?: React.MouseEvent) => void {
return (e?: React.MouseEvent): void => {
const endTime = timestamp + (stepInterval || 60);
const endTime = timestamp;
const startTime = timestamp - (stepInterval || 60);
const filters = {
items: [

View File

@@ -1,9 +0,0 @@
import { FeatureKeys } from 'constants/features';
import { useAppContext } from 'providers/App/App';
export function useIsDashboardV2(): boolean {
const { featureFlags } = useAppContext();
return Boolean(
featureFlags?.find((flag) => flag.name === FeatureKeys.DASHBOARD_V2)?.active,
);
}

View File

@@ -1,4 +1,15 @@
import { createBrowserHistory } from 'history';
import { getBasePath } from 'utils/basePath';
export default createBrowserHistory({ basename: getBasePath() });
const history = createBrowserHistory({ basename: getBasePath() });
let inAppPushCount = 0;
history.listen((_, action) => {
if (action === 'PUSH') {
inAppPushCount += 1;
}
});
export const hasInAppHistory = (): boolean => inAppPushCount > 0;
export default history;

View File

@@ -1,5 +0,0 @@
function DashboardPageV2(): JSX.Element {
return <>DashboardPageV2</>;
}
export default DashboardPageV2;

View File

@@ -1,3 +1,8 @@
import DashboardPageV2 from './DashboardPageV2';
function DashboardPageV2(): JSX.Element {
return (
<div>
<h1>Dashboard Page V2</h1>
</div>
);
}
export default DashboardPageV2;

View File

@@ -1,35 +0,0 @@
.page {
display: flex;
flex-direction: column;
gap: 16px;
width: 100%;
}
.header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 8px;
gap: 8px;
height: 48px;
}
.headerLeft {
display: flex;
align-items: center;
gap: 8px;
}
.icon {
color: var(--l2-foreground);
}
.text {
color: var(--muted-foreground);
font-family: Inter;
font-size: 14px;
font-style: normal;
font-weight: 400;
line-height: 20px;
letter-spacing: -0.07px;
}

View File

@@ -1,41 +0,0 @@
import { useState } from 'react';
import { AnnouncementBanner } from '@signozhq/ui/announcement-banner';
import { Typography } from '@signozhq/ui/typography';
import { LayoutGrid } from '@signozhq/icons';
import HeaderRightSection from 'components/HeaderRightSection/HeaderRightSection';
import DashboardsList from './components/DashboardsList';
import styles from './DashboardsListPageV2.module.scss';
function DashboardsListPageV2(): JSX.Element {
const [showBanner, setShowBanner] = useState(true);
return (
<div className={styles.page}>
{showBanner && (
<AnnouncementBanner
type="warning"
onClose={(): void => setShowBanner(false)}
>
You&apos;re on the V2 dashboards page. If you landed here unintentionally,
please reach out to Ashwin.
</AnnouncementBanner>
)}
<div className={styles.header}>
<div className={styles.headerLeft}>
<LayoutGrid size={14} className={styles.icon} />
<Typography.Text className={styles.text}>Dashboards</Typography.Text>
</div>
<HeaderRightSection
enableAnnouncements={false}
enableShare
enableFeedback
/>
</div>
<DashboardsList />
</div>
);
}
export default DashboardsListPageV2;

View File

@@ -1,44 +0,0 @@
.content {
display: flex;
flex-direction: column;
}
.actionButton {
display: flex;
width: 100%;
justify-content: flex-start;
gap: 8px;
padding: 8px 12px;
color: var(--l2-foreground);
font-size: var(--font-size-sm);
font-weight: var(--font-weight-normal);
border-radius: 0;
}
.actionButton:hover {
background: color-mix(in srgb, var(--card) 60%, transparent);
}
.triggerIcon {
margin-left: 16px;
flex: 0 0 auto;
cursor: pointer;
}
:global(.dashboardActionsPopover) {
:global(.ant-popover-inner) {
width: 187px;
height: auto;
flex-shrink: 0;
border-radius: 4px;
border: 1px solid var(--l1-border);
background: linear-gradient(
139deg,
color-mix(in srgb, var(--card) 80%, transparent) 0%,
color-mix(in srgb, var(--card) 90%, transparent) 98.68%
);
box-shadow: 4px 10px 16px 2px rgba(0, 0, 0, 0.2);
backdrop-filter: blur(20px);
padding: 0px;
}
}

View File

@@ -1,96 +0,0 @@
import { Button, Popover } from 'antd';
import {
Expand,
EllipsisVertical,
Link2,
SquareArrowOutUpRight,
} from '@signozhq/icons';
import { useCopyToClipboard } from 'react-use';
import { DeleteButton } from 'container/ListOfDashboard/TableComponents/DeleteButton';
import { getAbsoluteUrl } from 'utils/basePath';
import { openInNewTab } from 'utils/navigation';
import styles from './ActionsPopover.module.scss';
interface Props {
link: string;
dashboardId: string;
dashboardName: string;
createdBy: string;
isLocked: boolean;
onView: (event: React.MouseEvent<HTMLElement>) => void;
}
function ActionsPopover({
link,
dashboardId,
dashboardName,
createdBy,
isLocked,
onView,
}: Props): JSX.Element {
const [, setCopy] = useCopyToClipboard();
return (
<Popover
content={
<div className={styles.content}>
<Button
type="text"
className={styles.actionButton}
icon={<Expand size={12} />}
onClick={onView}
>
View
</Button>
<Button
type="text"
className={styles.actionButton}
icon={<SquareArrowOutUpRight size={12} />}
onClick={(e): void => {
e.stopPropagation();
e.preventDefault();
openInNewTab(link);
}}
>
Open in New Tab
</Button>
<Button
type="text"
className={styles.actionButton}
icon={<Link2 size={12} />}
onClick={(e): void => {
e.stopPropagation();
e.preventDefault();
setCopy(getAbsoluteUrl(link));
}}
>
Copy Link
</Button>
<DeleteButton
name={dashboardName}
id={dashboardId}
isLocked={isLocked}
createdBy={createdBy}
/>
</div>
}
placement="bottomRight"
arrow={false}
rootClassName="dashboardActionsPopover"
trigger="click"
>
<EllipsisVertical
className={styles.triggerIcon}
size={14}
data-testid="dashboard-action-icon"
onClick={(e): void => {
e.stopPropagation();
e.preventDefault();
}}
/>
</Popover>
);
}
export default ActionsPopover;

View File

@@ -1,160 +0,0 @@
.content {
display: flex;
flex-direction: column;
gap: 14px;
}
.preview {
display: flex;
padding: 12px 14.634px;
flex-direction: column;
align-items: flex-start;
gap: 7.317px;
border-radius: 4px;
border: 0.915px solid var(--l1-border);
background: var(--l2-background);
}
.previewHeader {
display: flex;
gap: 4px;
align-items: center;
}
.previewIcon {
height: 14px;
width: 14px;
}
.previewTitle {
color: var(--l1-foreground);
font-family: Inter;
font-size: 12.805px;
font-style: normal;
font-weight: 500;
line-height: 18.293px;
letter-spacing: -0.064px;
}
.previewDetails {
display: flex;
flex-direction: column;
gap: 8px;
width: 100%;
}
.previewRow {
display: flex;
justify-content: space-between;
align-items: center;
}
.formattedTime {
display: flex;
gap: 4px;
align-items: center;
color: var(--l2-foreground);
font-family: Inter;
font-size: 12.805px;
font-style: normal;
font-weight: 400;
line-height: 16.463px;
letter-spacing: -0.064px;
}
.user {
display: flex;
align-items: center;
gap: 4px;
}
.userTag {
width: 12px;
height: 12px;
display: flex;
justify-content: center;
align-items: center;
color: var(--l2-foreground);
font-size: 8px;
font-style: normal;
font-weight: var(--font-weight-normal);
line-height: normal;
letter-spacing: -0.05px;
border-radius: 12.805px;
background-color: var(--l1-background);
}
.userLabel {
color: var(--l2-foreground);
font-family: Inter;
font-size: 12.805px;
font-weight: 400;
line-height: 16.463px;
letter-spacing: -0.064px;
}
.action {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0px 0px 0px 14.634px;
}
.actionLeft {
display: flex;
gap: 6px;
align-items: center;
}
.connectionLine {
border-top: 1px dashed var(--l1-border);
min-width: 20px;
flex-grow: 1;
margin: 0px 8px;
}
.actionRight {
display: flex;
align-items: center;
}
.saveChanges {
display: flex;
width: 100%;
height: 32px;
padding: 8px 16px;
justify-content: center;
align-items: center;
flex-shrink: 0;
border-radius: 2px;
border: 1px solid var(--l1-border);
background: var(--l1-border);
}
:global(.configureMetadataModalRoot) {
:global(.ant-modal-content) {
width: 500px;
flex-shrink: 0;
border-radius: 4px;
border: 1px solid var(--l1-border);
background: var(--card);
box-shadow: 0px -4px 16px 2px rgba(0, 0, 0, 0.2);
padding: 0px;
}
:global(.ant-modal-header) {
background: var(--card);
padding: 16px;
border-bottom: 1px solid var(--l1-border);
margin-bottom: 0px;
}
:global(.ant-modal-body) {
padding: 14px 16px;
}
:global(.ant-modal-footer) {
margin-top: 0px;
padding: 4px 16px 16px 16px;
}
}

View File

@@ -1,245 +0,0 @@
import { useEffect, useState } from 'react';
import { Button, Modal } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import { Switch } from '@signozhq/ui/switch';
import { CalendarClock, Check, Clock4 } from '@signozhq/icons';
import dayjs from 'dayjs';
import { get, isEmpty } from 'lodash-es';
import { Base64Icons } from 'container/DashboardContainer/DashboardSettings/General/utils';
import { DATE_TIME_FORMATS } from 'constants/dateTimeFormats';
import { useTimezone } from 'providers/Timezone';
import type { DashboardListItem } from '../../utils';
import {
DynamicColumns,
useDashboardsListVisibleColumnsStore,
type DashboardDynamicColumns,
} from './useDynamicColumns';
import styles from './ConfigureMetadataModal.module.scss';
interface Props {
open: boolean;
previewDashboard: DashboardListItem | undefined;
onClose: () => void;
}
function lastUpdatedLabel(time: string | undefined): string {
if (!time || isEmpty(time)) {
return 'No updates yet!';
}
const diff = dayjs();
const ref = dayjs(time);
const months = diff.diff(ref, 'months');
if (months > 0) {
return `Last Updated ${months} months ago`;
}
const days = diff.diff(ref, 'days');
if (days > 0) {
return `Last Updated ${days} days ago`;
}
const hours = diff.diff(ref, 'hours');
if (hours > 0) {
return `Last Updated ${hours} hrs ago`;
}
const minutes = diff.diff(ref, 'minutes');
if (minutes > 0) {
return `Last Updated ${minutes} mins ago`;
}
const seconds = diff.diff(ref, 'seconds');
return `Last Updated ${seconds} sec ago`;
}
function ConfigureMetadataModal({
open,
previewDashboard,
onClose,
}: Props): JSX.Element {
const { formatTimezoneAdjustedTimestamp } = useTimezone();
const storedColumns = useDashboardsListVisibleColumnsStore(
(s) => s.visibleColumns,
);
const setStoredColumns = useDashboardsListVisibleColumnsStore(
(s) => s.setVisibleColumns,
);
const [draftColumns, setDraftColumns] =
useState<DashboardDynamicColumns>(storedColumns);
useEffect(() => {
if (open) {
setDraftColumns(storedColumns);
}
}, [open, storedColumns]);
const handleSave = (): void => {
setStoredColumns(draftColumns);
onClose();
};
const previewImage = previewDashboard?.data?.metadata?.image || Base64Icons[0];
const previewName = previewDashboard?.data?.spec?.display?.name;
const previewCreatedBy = previewDashboard?.createdBy;
const previewUpdatedBy = previewDashboard?.updatedBy;
const previewUpdatedAt = previewDashboard?.updatedAt;
const formattedCreatedAt = previewDashboard
? formatTimezoneAdjustedTimestamp(
get(previewDashboard, 'createdAt', '') as string,
DATE_TIME_FORMATS.DASH_DATETIME_UTC,
)
: '';
return (
<Modal
open={open}
onCancel={onClose}
title="Configure Metadata"
footer={
<Button
type="text"
icon={<Check size={14} />}
className={styles.saveChanges}
onClick={handleSave}
>
Save Changes
</Button>
}
rootClassName="configureMetadataModalRoot"
>
<div className={styles.content}>
<div className={styles.preview}>
<section className={styles.previewHeader}>
<img
src={previewImage}
alt="dashboard-image"
className={styles.previewIcon}
/>
<Typography.Text className={styles.previewTitle}>
{previewName}
</Typography.Text>
</section>
<section className={styles.previewDetails}>
<section className={styles.previewRow}>
{draftColumns.createdAt && (
<Typography.Text className={styles.formattedTime}>
<CalendarClock size={14} />
{formattedCreatedAt}
</Typography.Text>
)}
{draftColumns.createdBy && (
<div className={styles.user}>
<Typography.Text className={styles.userTag}>
{previewCreatedBy?.substring(0, 1).toUpperCase()}
</Typography.Text>
<Typography.Text className={styles.userLabel}>
{previewCreatedBy}
</Typography.Text>
</div>
)}
</section>
<section className={styles.previewRow}>
{draftColumns.updatedAt && (
<Typography.Text className={styles.formattedTime}>
<CalendarClock size={14} />
{lastUpdatedLabel(previewUpdatedAt)}
</Typography.Text>
)}
{draftColumns.updatedBy && (
<div className={styles.user}>
<Typography.Text className={styles.userTag}>
{previewUpdatedBy?.substring(0, 1).toUpperCase()}
</Typography.Text>
<Typography.Text className={styles.userLabel}>
{previewUpdatedBy}
</Typography.Text>
</div>
)}
</section>
</section>
</div>
<div className={styles.action}>
<div className={styles.actionLeft}>
<CalendarClock size={14} />
<Typography.Text>Created at</Typography.Text>
</div>
<div className={styles.connectionLine} />
<div className={styles.actionRight}>
<Switch
size="small"
checked
disabled
onChange={(check): void =>
setDraftColumns((prev) => ({
...prev,
[DynamicColumns.CREATED_AT]: check,
}))
}
/>
</div>
</div>
<div className={styles.action}>
<div className={styles.actionLeft}>
<CalendarClock size={14} />
<Typography.Text>Created by</Typography.Text>
</div>
<div className={styles.connectionLine} />
<div className={styles.actionRight}>
<Switch
size="small"
checked
disabled
onChange={(check): void =>
setDraftColumns((prev) => ({
...prev,
[DynamicColumns.CREATED_BY]: check,
}))
}
/>
</div>
</div>
<div className={styles.action}>
<div className={styles.actionLeft}>
<Clock4 size={14} />
<Typography.Text>Updated at</Typography.Text>
</div>
<div className={styles.connectionLine} />
<div className={styles.actionRight}>
<Switch
size="small"
checked={draftColumns.updatedAt}
onChange={(check): void =>
setDraftColumns((prev) => ({
...prev,
[DynamicColumns.UPDATED_AT]: check,
}))
}
/>
</div>
</div>
<div className={styles.action}>
<div className={styles.actionLeft}>
<Clock4 size={14} />
<Typography.Text>Updated by</Typography.Text>
</div>
<div className={styles.connectionLine} />
<div className={styles.actionRight}>
<Switch
size="small"
checked={draftColumns.updatedBy}
onChange={(check): void =>
setDraftColumns((prev) => ({
...prev,
[DynamicColumns.UPDATED_BY]: check,
}))
}
/>
</div>
</div>
</div>
</Modal>
);
}
export default ConfigureMetadataModal;

View File

@@ -1,52 +0,0 @@
import { create } from 'zustand';
import { persist } from 'zustand/middleware';
import { LOCALSTORAGE } from 'constants/localStorage';
export interface DashboardDynamicColumns {
createdAt: boolean;
createdBy: boolean;
updatedAt: boolean;
updatedBy: boolean;
}
export enum DynamicColumns {
CREATED_AT = 'createdAt',
CREATED_BY = 'createdBy',
UPDATED_AT = 'updatedAt',
UPDATED_BY = 'updatedBy',
}
const DEFAULT_COLUMNS: DashboardDynamicColumns = {
createdAt: true,
createdBy: true,
updatedAt: false,
updatedBy: false,
};
interface DashboardsListVisibleColumnsState {
visibleColumns: DashboardDynamicColumns;
setVisibleColumns: (next: DashboardDynamicColumns) => void;
}
export const useDashboardsListVisibleColumnsStore =
create<DashboardsListVisibleColumnsState>()(
persist(
(set) => ({
visibleColumns: DEFAULT_COLUMNS,
setVisibleColumns: (next): void => {
set({ visibleColumns: next });
},
}),
{
name: LOCALSTORAGE.DASHBOARDS_LIST_VISIBLE_COLUMNS,
merge: (persisted, current) => ({
...current,
visibleColumns: {
...DEFAULT_COLUMNS,
...((persisted as Partial<DashboardsListVisibleColumnsState>)
?.visibleColumns ?? {}),
},
}),
},
),
);

View File

@@ -1,34 +0,0 @@
.menuItem {
display: flex;
align-items: center;
gap: 8px;
}
.templatesItem {
display: flex;
justify-content: space-between;
align-items: center;
gap: 8px;
width: 100%;
}
.primaryButton {
padding: 5.937px 11.875px;
}
.textButton {
display: flex;
width: 153px;
align-items: center;
height: 32px;
padding: 5.937px 11.875px;
justify-content: center;
gap: 5.937px;
border-radius: 1.484px;
background: var(--primary-background);
color: var(--l1-foreground);
}
:global(.createDashboardMenuOverlay) {
width: 200px;
}

View File

@@ -1,118 +0,0 @@
import { useMemo } from 'react';
import { Button, Dropdown, MenuProps } from 'antd';
import cx from 'classnames';
import logEvent from 'api/common/logEvent';
import {
ExternalLink,
Github,
LayoutGrid,
Plus,
Radius,
} from '@signozhq/icons';
import styles from './CreateDashboardDropdown.module.scss';
interface Props {
canCreate: boolean;
onCreate: () => void;
onImportJSON: () => void;
variant?: 'primary' | 'text';
}
const TEMPLATES_HREF =
'https://signoz.io/docs/dashboards/dashboard-templates/overview/';
function CreateDashboardDropdown({
canCreate,
onCreate,
onImportJSON,
variant = 'primary',
}: Props): JSX.Element {
const items: MenuProps['items'] = useMemo(() => {
const menuItems: MenuProps['items'] = [
{
key: 'import-json',
label: (
<div
className={styles.menuItem}
data-testid="import-json-menu-cta"
onClick={onImportJSON}
>
<Radius size={14} /> Import JSON
</div>
),
},
{
key: 'view-templates',
label: (
<a
href={TEMPLATES_HREF}
target="_blank"
rel="noopener noreferrer"
data-testid="view-templates-menu-cta"
>
<div className={styles.templatesItem}>
<div className={styles.menuItem}>
<Github size={14} /> View templates
</div>
<ExternalLink size={14} />
</div>
</a>
),
},
];
if (canCreate) {
menuItems.unshift({
key: 'create-dashboard',
label: (
<div
className={styles.menuItem}
data-testid="create-dashboard-menu-cta"
onClick={onCreate}
>
<LayoutGrid size={14} /> Create dashboard
</div>
),
});
}
return menuItems;
}, [canCreate, onCreate, onImportJSON]);
return (
<Dropdown
overlayClassName="createDashboardMenuOverlay"
menu={{ items }}
placement="bottomRight"
trigger={['click']}
>
{variant === 'primary' ? (
<Button
type="primary"
className={cx('periscope-btn primary', styles.primaryButton)}
icon={<Plus size={14} />}
data-testid="new-dashboard-cta"
onClick={(): void => {
logEvent('Dashboard List: New dashboard clicked', {});
}}
>
New dashboard
</Button>
) : (
<Button
type="text"
className={styles.textButton}
icon={<Plus size={14} />}
onClick={(): void => {
logEvent('Dashboard List: New dashboard clicked', {});
}}
>
New Dashboard
</Button>
)}
</Dropdown>
);
}
export default CreateDashboardDropdown;

View File

@@ -1,152 +0,0 @@
.row {
padding: 12px 16px 16px 16px;
border: 1px solid var(--l1-border);
border-top: none;
background: var(--l2-background);
cursor: pointer;
}
.titleWithAction {
display: flex;
justify-content: space-between;
align-items: center;
gap: 8px;
min-height: 24px;
}
.titleBlock {
display: flex;
align-items: center;
gap: 6px;
line-height: 20px;
flex: 1 1 auto;
min-width: 0;
}
.titleLink {
display: flex;
align-items: center;
gap: 8px;
}
.icon {
display: inline-block;
line-height: 20px;
height: 14px;
width: 14px;
}
.title {
color: var(--l1-foreground);
font-size: var(--font-size-sm);
font-style: normal;
font-weight: var(--font-weight-medium);
line-height: 20px;
letter-spacing: -0.07px;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
}
.tagsWithActions {
display: flex;
align-items: center;
flex: 0 1 auto;
min-width: 0;
justify-content: flex-end;
}
.tags {
display: flex;
flex-wrap: wrap;
gap: 8px;
justify-content: flex-end;
}
.tag {
display: flex;
padding: 4px 8px;
justify-content: center;
align-items: center;
gap: 4px;
height: 28px;
border-radius: 20px;
border: 1px solid color-mix(in srgb, var(--bg-sienna-500) 20%, transparent);
background: color-mix(in srgb, var(--bg-sienna-500) 10%, transparent);
color: var(--bg-sienna-400);
text-align: center;
font-family: Inter;
font-size: 14px;
font-style: normal;
font-weight: 400;
line-height: 20px;
letter-spacing: -0.07px;
margin-inline-end: 0px;
}
.details {
margin-top: 12px;
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 12px 24px;
}
.createdAt {
display: flex;
align-items: center;
gap: 6px;
color: var(--l2-foreground);
font-family: Inter;
font-size: 12px;
font-weight: 400;
line-height: 18px;
letter-spacing: -0.07px;
}
.createdBy {
display: flex;
align-items: center;
gap: 8px;
}
.avatar {
width: 14px;
height: 14px;
border-radius: 50px;
background: var(--l1-border);
display: flex;
justify-content: center;
align-items: center;
}
.avatarText {
color: var(--l2-foreground);
font-size: 8px;
font-weight: var(--font-weight-normal);
line-height: normal;
letter-spacing: -0.05px;
}
.byLabel {
color: var(--l2-foreground);
font-family: Inter;
font-size: 12px;
font-weight: 400;
line-height: 18px;
letter-spacing: -0.07px;
}
.updatedBy {
display: flex;
align-items: center;
gap: 6px;
}
:global(.titleTooltipOverlay) {
:global(.ant-tooltip-content) :global(.ant-tooltip-inner) {
max-height: 400px;
overflow: auto;
}
}

View File

@@ -1,181 +0,0 @@
import { Tag, Tooltip } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import { CalendarClock } from '@signozhq/icons';
import logEvent from 'api/common/logEvent';
import { generatePath } from 'react-router-dom';
import dayjs from 'dayjs';
import { isEmpty } from 'lodash-es';
import { Base64Icons } from 'container/DashboardContainer/DashboardSettings/General/utils';
import { DATE_TIME_FORMATS } from 'constants/dateTimeFormats';
import ROUTES from 'constants/routes';
import { useSafeNavigate } from 'hooks/useSafeNavigate';
import { useTimezone } from 'providers/Timezone';
import { isModifierKeyPressed } from 'utils/app';
import type { DashboardListItem } from '../../utils';
import { tagsToStrings } from '../../utils';
import ActionsPopover from '../ActionsPopover/ActionsPopover';
import styles from './DashboardRow.module.scss';
interface Props {
dashboard: DashboardListItem;
index: number;
canAct: boolean;
showUpdatedAt: boolean;
showUpdatedBy: boolean;
}
function lastUpdatedLabel(time: string | undefined): string {
if (!time || isEmpty(time)) {
return 'No updates yet!';
}
const diff = dayjs();
const ref = dayjs(time);
const months = diff.diff(ref, 'months');
if (months > 0) {
return `Last Updated ${months} months ago`;
}
const days = diff.diff(ref, 'days');
if (days > 0) {
return `Last Updated ${days} days ago`;
}
const hours = diff.diff(ref, 'hours');
if (hours > 0) {
return `Last Updated ${hours} hrs ago`;
}
const minutes = diff.diff(ref, 'minutes');
if (minutes > 0) {
return `Last Updated ${minutes} mins ago`;
}
const seconds = diff.diff(ref, 'seconds');
return `Last Updated ${seconds} sec ago`;
}
function DashboardRow({
dashboard,
index,
canAct,
showUpdatedAt,
showUpdatedBy,
}: Props): JSX.Element {
const { safeNavigate } = useSafeNavigate();
const { formatTimezoneAdjustedTimestamp } = useTimezone();
const id = dashboard.id;
const name = dashboard.data?.spec?.display?.name ?? '';
const image = dashboard.data?.metadata?.image || Base64Icons[0];
const createdBy = dashboard.createdBy ?? '';
const updatedBy = dashboard.updatedBy ?? '';
const createdAt = dashboard.createdAt ?? '';
const updatedAt = dashboard.updatedAt ?? '';
const isLocked = !!dashboard.locked;
const tags = tagsToStrings(dashboard.data?.metadata?.tags);
const link = generatePath(ROUTES.DASHBOARD, { dashboardId: id });
const formattedCreatedAt = formatTimezoneAdjustedTimestamp(
createdAt,
DATE_TIME_FORMATS.DASH_DATETIME_UTC,
);
const onClickHandler = (event: React.MouseEvent<HTMLElement>): void => {
event.stopPropagation();
safeNavigate(link, { newTab: isModifierKeyPressed(event) });
logEvent('Dashboard List: Clicked on dashboard', {
dashboardId: id,
dashboardName: name,
});
};
return (
<div className={styles.row} onClick={onClickHandler}>
<div className={styles.titleWithAction}>
<div className={styles.titleBlock}>
<Tooltip
title={name.length > 50 ? name : ''}
placement="left"
overlayClassName="titleTooltipOverlay"
>
<div className={styles.titleLink} onClick={onClickHandler}>
<img src={image} alt="dashboard-image" className={styles.icon} />
<Typography.Text
data-testid={`dashboard-title-${index}`}
className={styles.title}
>
{name}
</Typography.Text>
</div>
</Tooltip>
</div>
<div className={styles.tagsWithActions}>
{tags.length > 0 && (
<div className={styles.tags}>
{tags.slice(0, 3).map((tag) => (
<Tag className={styles.tag} key={tag}>
{tag}
</Tag>
))}
{tags.length > 3 && (
<Tag className={styles.tag} key={tags[3]}>
+ <span> {tags.length - 3} </span>
</Tag>
)}
</div>
)}
</div>
{canAct && (
<ActionsPopover
link={link}
dashboardId={id}
dashboardName={name}
createdBy={createdBy}
isLocked={isLocked}
onView={onClickHandler}
/>
)}
</div>
<div className={styles.details}>
<div className={styles.createdAt}>
<CalendarClock size={14} />
<Typography.Text>{formattedCreatedAt}</Typography.Text>
</div>
{createdBy && (
<div className={styles.createdBy}>
<div className={styles.avatar}>
<Typography.Text className={styles.avatarText}>
{createdBy.substring(0, 1).toUpperCase()}
</Typography.Text>
</div>
<Typography.Text className={styles.byLabel}>{createdBy}</Typography.Text>
</div>
)}
{showUpdatedAt && (
<div className={styles.createdAt}>
<CalendarClock size={14} />
<Typography.Text>{lastUpdatedLabel(updatedAt)}</Typography.Text>
</div>
)}
{updatedBy && showUpdatedBy && (
<div className={styles.updatedBy}>
<Typography.Text className={styles.byLabel}>
Last Updated By -
</Typography.Text>
<div className={styles.avatar}>
<Typography.Text className={styles.avatarText}>
{updatedBy.substring(0, 1).toUpperCase()}
</Typography.Text>
</div>
<Typography.Text className={styles.byLabel}>{updatedBy}</Typography.Text>
</div>
)}
</div>
</div>
);
}
export default DashboardRow;

View File

@@ -1,96 +0,0 @@
.container {
margin-top: 30px;
margin-bottom: 30px;
display: flex;
justify-content: center;
width: 100%;
}
.viewContent {
width: calc(100% - 30px);
max-width: 836px;
:global(.ant-table-wrapper) :global(.ant-table-cell) {
padding: 0 !important;
border: none !important;
background: var(--l1-background) !important;
}
:global(.ant-table-wrapper)
:global(.ant-table-tbody)
:global(.ant-table-row)
:global(.ant-table-cell)
> div {
// Row content is the only child of the td; it carries the borders.
}
:global(.ant-table-wrapper)
:global(.ant-table-tbody)
:global(.ant-table-row:last-child)
:global(.ant-table-cell)
> div {
border-radius: 0 0 6px 6px;
}
:global(.ant-pagination-item) {
display: flex;
justify-content: center;
align-items: center;
}
:global(.ant-pagination-item) > a {
color: var(--l2-foreground);
font-size: var(--font-size-sm);
font-weight: var(--font-weight-normal);
line-height: 20px;
}
:global(.ant-pagination-item-active) {
background-color: var(--primary-background);
}
:global(.ant-pagination-item-active) > a {
color: var(--foreground) !important;
font-weight: var(--font-weight-medium);
}
}
.titleContainer {
display: flex;
flex-direction: column;
gap: 4px;
}
.title {
color: var(--l1-foreground);
font-size: var(--font-size-lg);
font-style: normal;
font-weight: var(--font-weight-normal);
line-height: 28px;
letter-spacing: -0.09px;
}
.subtitle {
color: var(--l2-foreground);
font-size: var(--font-size-sm);
font-style: normal;
font-weight: var(--font-weight-normal);
line-height: 20px;
letter-spacing: -0.07px;
}
.integrationsContainer {
margin: 16px 0;
}
.integrationsContent {
max-width: 100%;
width: 100%;
}
.toolbar {
display: flex;
align-items: center;
gap: 8px;
margin: 16px 0;
}

View File

@@ -1,256 +0,0 @@
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { generatePath } from 'react-router-dom';
import { useTranslation } from 'react-i18next';
import { Typography } from '@signozhq/ui/typography';
import { AxiosError } from 'axios';
import logEvent from 'api/common/logEvent';
import {
createDashboardV2,
useListDashboardsV2,
} from 'api/generated/services/dashboard';
import ROUTES from 'constants/routes';
import { RequestDashboardBtn } from 'container/ListOfDashboard/RequestDashboardBtn';
import useComponentPermission from 'hooks/useComponentPermission';
import useDebounce from 'hooks/useDebounce';
import { useGetTenantLicense } from 'hooks/useGetTenantLicense';
import { useNotifications } from 'hooks/useNotifications';
import { useSafeNavigate } from 'hooks/useSafeNavigate';
import { useAppContext } from 'providers/App/App';
import { useErrorModal } from 'providers/ErrorModalProvider';
import APIError from 'types/api/error';
import {
usePage,
useSearch,
useSortColumn,
useSortOrder,
type SortColumn,
type SortOrder,
} from '../../hooks/useDashboardsListQueryParams';
import { buildSearchDSL, type DashboardListItem } from '../../utils';
import ConfigureMetadataModal from '../ConfigureMetadataModal/ConfigureMetadataModal';
import { useDashboardsListVisibleColumnsStore } from '../ConfigureMetadataModal/useDynamicColumns';
import CreateDashboardDropdown from '../CreateDashboardDropdown/CreateDashboardDropdown';
import EmptyState from '../EmptyState/EmptyState';
import ErrorState from '../ErrorState/ErrorState';
import ImportJSONModal from '../ImportJSONModal/ImportJSONModal';
import ListHeader from '../ListHeader/ListHeader';
import LoadingState from '../LoadingState/LoadingState';
import NoResultsState from '../NoResultsState/NoResultsState';
import SearchBar from '../SearchBar/SearchBar';
import DashboardsListContent from './DashboardsListContent';
import styles from './DashboardsList.module.scss';
const PAGE_SIZE = 20;
function DashboardsList(): JSX.Element {
const { safeNavigate } = useSafeNavigate();
const { t } = useTranslation('dashboard');
const { notifications } = useNotifications();
const { showErrorModal } = useErrorModal();
const { isCloudUser } = useGetTenantLicense();
const { user } = useAppContext();
const [action, canCreateNewDashboard] = useComponentPermission(
['action', 'create_new_dashboards'],
user.role,
);
const [searchString, setSearchString] = useSearch();
const [sortColumn, setSortColumn] = useSortColumn();
const [sortOrder, setSortOrder] = useSortOrder();
const [page, setPage] = usePage();
const [searchInput, setSearchInput] = useState(searchString);
const debouncedSearch = useDebounce(searchInput, 300);
useEffect(() => {
if (debouncedSearch === searchString) {
return;
}
setSearchString(debouncedSearch);
setPage(1);
}, [debouncedSearch, searchString, setSearchString, setPage]);
const listParams = useMemo(
() => ({
query: buildSearchDSL(searchString),
sort: sortColumn,
order: sortOrder,
limit: PAGE_SIZE,
offset: (page - 1) * PAGE_SIZE,
}),
[searchString, sortColumn, sortOrder, page],
);
const {
data: response,
isLoading,
isFetching,
error,
refetch,
} = useListDashboardsV2(listParams, { query: { keepPreviousData: true } });
const dashboards = useMemo<DashboardListItem[]>(
() => response?.data?.dashboards ?? [],
[response],
);
const total = response?.data?.total ?? 0;
const [isImportOpen, setIsImportOpen] = useState(false);
const [isConfigureOpen, setIsConfigureOpen] = useState(false);
const visibleColumns = useDashboardsListVisibleColumnsStore(
(s) => s.visibleColumns,
);
const [creating, setCreating] = useState(false);
const handleCreateNew = useCallback(async (): Promise<void> => {
try {
logEvent('Dashboard List: Create dashboard clicked', {});
setCreating(true);
const created = await createDashboardV2({
metadata: { schemaVersion: 'v6' },
spec: {
display: { name: t('new_dashboard_title', { ns: 'dashboard' }) },
},
});
safeNavigate(
generatePath(ROUTES.DASHBOARD, { dashboardId: created.data.id }),
);
} catch (e) {
showErrorModal(e as APIError);
notifications.error({
message: (e as AxiosError).toString() || 'Failed to create dashboard',
});
} finally {
setCreating(false);
}
}, [safeNavigate, showErrorModal, notifications, t]);
const handleImportToggle = useCallback((): void => {
logEvent('Dashboard List V2: Import JSON clicked', {});
setIsImportOpen((s) => !s);
}, []);
const onSortChange = useCallback(
(column: SortColumn): void => {
setSortColumn(column);
setPage(1);
},
[setSortColumn, setPage],
);
const onOrderChange = useCallback(
(order: SortOrder): void => {
setSortOrder(order);
setPage(1);
},
[setSortOrder, setPage],
);
const visitLoggedRef = useRef(false);
useEffect(() => {
if (!visitLoggedRef.current && !isLoading && response !== undefined) {
logEvent('Dashboard List V2: Page visited', { number: dashboards.length });
visitLoggedRef.current = true;
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [isLoading]);
return (
<div className={styles.container}>
<div className={styles.viewContent}>
<div className={styles.titleContainer}>
<Typography.Title className={styles.title}>Dashboards</Typography.Title>
<Typography.Text className={styles.subtitle}>
Create and manage dashboards for your workspace.
</Typography.Text>
{isCloudUser && (
<div className={styles.integrationsContainer}>
<div className={styles.integrationsContent}>
<RequestDashboardBtn />
</div>
</div>
)}
</div>
{isLoading ? (
<LoadingState />
) : error ? (
<ErrorState
isCloudUser={!!isCloudUser}
onRetry={(): void => {
refetch();
}}
/>
) : dashboards.length === 0 && !searchString && page === 1 ? (
<EmptyState
createDropdown={
canCreateNewDashboard ? (
<CreateDashboardDropdown
canCreate={!!canCreateNewDashboard}
onCreate={handleCreateNew}
onImportJSON={handleImportToggle}
variant="text"
/>
) : null
}
/>
) : (
<>
<div className={styles.toolbar}>
<SearchBar value={searchInput} onChange={setSearchInput} />
{canCreateNewDashboard && (
<CreateDashboardDropdown
canCreate={!!canCreateNewDashboard}
onCreate={handleCreateNew}
onImportJSON={handleImportToggle}
/>
)}
</div>
{dashboards.length === 0 ? (
<NoResultsState searchString={searchInput} />
) : (
<>
<ListHeader
sortColumn={sortColumn}
onSortChange={onSortChange}
sortOrder={sortOrder}
onOrderChange={onOrderChange}
onConfigureMetadata={(): void => setIsConfigureOpen(true)}
/>
<DashboardsListContent
dashboards={dashboards}
page={page}
pageSize={PAGE_SIZE}
total={total}
onPageChange={setPage}
canAct={!!action}
showUpdatedAt={visibleColumns.updatedAt}
showUpdatedBy={visibleColumns.updatedBy}
loading={creating || isFetching}
/>
</>
)}
</>
)}
<ImportJSONModal
open={isImportOpen}
onClose={(): void => setIsImportOpen(false)}
/>
<ConfigureMetadataModal
open={isConfigureOpen}
previewDashboard={dashboards[0]}
onClose={(): void => setIsConfigureOpen(false)}
/>
</div>
</div>
);
}
export default DashboardsList;

View File

@@ -1,71 +0,0 @@
import { useMemo } from 'react';
import { Table } from 'antd';
import type { TableProps } from 'antd/lib';
import type { DashboardListItem } from '../../utils';
import DashboardRow from '../DashboardRow/DashboardRow';
interface Props {
dashboards: DashboardListItem[];
page: number;
pageSize: number;
total: number;
onPageChange: (page: number) => void;
canAct: boolean;
showUpdatedAt: boolean;
showUpdatedBy: boolean;
loading: boolean;
}
function DashboardsListContent({
dashboards,
page,
pageSize,
total,
onPageChange,
canAct,
showUpdatedAt,
showUpdatedBy,
loading,
}: Props): JSX.Element {
const columns: TableProps<DashboardListItem>['columns'] = useMemo(
() => [
{
title: 'Dashboards',
key: 'dashboard',
render: (_, dashboard, index): JSX.Element => (
<DashboardRow
dashboard={dashboard}
index={index}
canAct={canAct}
showUpdatedAt={showUpdatedAt}
showUpdatedBy={showUpdatedBy}
/>
),
},
],
[canAct, showUpdatedAt, showUpdatedBy],
);
const paginationConfig = total > pageSize && {
pageSize,
showSizeChanger: false,
onChange: onPageChange,
current: page,
total,
hideOnSinglePage: true,
};
return (
<Table
columns={columns}
dataSource={dashboards.map((d) => ({ ...d, key: d.id }))}
showSorterTooltip
loading={loading}
showHeader={false}
pagination={paginationConfig}
/>
);
}
export default DashboardsListContent;

View File

@@ -1,3 +0,0 @@
import DashboardsList from './DashboardsList';
export default DashboardsList;

View File

@@ -1,64 +0,0 @@
.wrapper {
display: flex;
flex-direction: column;
height: 320px;
padding: 105px 141px;
margin-top: 16px;
justify-content: center;
align-items: flex-start;
border-radius: 6px;
border: 1px dashed var(--l1-border);
}
.image {
width: 32px;
height: 32px;
}
.copy {
margin-top: 4px;
}
.noDashboard {
color: var(--l1-foreground);
font-family: Inter;
font-size: 14px;
font-style: normal;
font-weight: 500;
line-height: 18px;
letter-spacing: -0.07px;
}
.info {
color: var(--l2-foreground);
font-family: Inter;
font-size: 14px;
font-style: normal;
font-weight: 400;
line-height: 18px;
letter-spacing: -0.07px;
}
.actions {
display: flex;
gap: 24px;
align-items: center;
margin-top: 24px;
}
.learnMore {
color: var(--bg-robin-400);
font-family: Inter;
font-size: 14px;
font-style: normal;
font-weight: 500;
line-height: 18px;
letter-spacing: -0.07px;
padding: 0px;
}
.learnMoreArrow {
margin-left: -20px;
color: var(--bg-robin-400);
cursor: pointer;
}

View File

@@ -1,53 +0,0 @@
import { ReactNode } from 'react';
import { Button } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import { ArrowUpRight } from '@signozhq/icons';
import logEvent from 'api/common/logEvent';
import dashboardsUrl from '@/assets/Icons/dashboards.svg';
import styles from './EmptyState.module.scss';
import { openInNewTab } from 'utils/navigation';
interface Props {
createDropdown?: ReactNode;
}
const LEARN_MORE_HREF =
'https://signoz.io/docs/userguide/manage-dashboards?utm_source=product&utm_medium=dashboard-list-empty-state';
function EmptyState({ createDropdown }: Props): JSX.Element {
return (
<div className={styles.wrapper}>
<img src={dashboardsUrl} alt="dashboards" className={styles.image} />
<section className={styles.copy}>
<Typography.Text className={styles.noDashboard}>
No dashboards yet.{' '}
</Typography.Text>
<Typography.Text className={styles.info}>
Create a dashboard to start visualizing your data
</Typography.Text>
</section>
{createDropdown ? (
<section className={styles.actions}>
{createDropdown}
<Button
type="text"
className={styles.learnMore}
data-testid="learn-more"
onClick={(): void => {
logEvent('Dashboard List: Learn more clicked', {});
openInNewTab(LEARN_MORE_HREF);
}}
>
Learn more
</Button>
<ArrowUpRight size={16} className={styles.learnMoreArrow} />
</section>
) : null}
</div>
);
}
export default EmptyState;

View File

@@ -1,62 +0,0 @@
.wrapper {
display: flex;
flex-direction: column;
height: 320px;
padding: 105px 141px;
margin-top: 16px;
justify-content: center;
align-items: flex-start;
border-radius: 6px;
border: 1px dashed var(--l1-border);
gap: 4px;
}
.img {
max-width: 100%;
}
.errorText {
color: var(--l1-foreground);
font-family: Inter;
font-size: 14px;
font-style: normal;
font-weight: 500;
line-height: 18px;
letter-spacing: -0.07px;
}
.actionButtons {
display: flex;
gap: 24px;
align-items: center;
margin-top: 20px;
}
.retryButton {
display: flex;
align-items: center;
height: 32px;
padding: 5.937px 11.875px;
justify-content: center;
gap: 5.937px;
border-radius: 1.484px;
background: var(--l1-border);
color: var(--l1-foreground);
}
.learnMore {
color: var(--bg-robin-400);
font-family: Inter;
font-size: 14px;
font-style: normal;
font-weight: 500;
line-height: 18px;
letter-spacing: -0.07px;
padding: 0px;
}
.learnMoreArrow {
margin-left: -20px;
color: var(--bg-robin-400);
cursor: pointer;
}

View File

@@ -1,44 +0,0 @@
import { Button } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import { ArrowUpRight, RotateCw } from '@signozhq/icons';
import { handleContactSupport } from 'container/Integrations/utils';
import awwSnapUrl from '@/assets/Icons/awwSnap.svg';
import styles from './ErrorState.module.scss';
interface Props {
isCloudUser: boolean;
onRetry: () => void;
}
function ErrorState({ isCloudUser, onRetry }: Props): JSX.Element {
return (
<div className={styles.wrapper}>
<img src={awwSnapUrl} alt="something went wrong" className={styles.img} />
<Typography.Text className={styles.errorText}>
Something went wrong :/ Please retry or contact support.
</Typography.Text>
<section className={styles.actionButtons}>
<Button
className={styles.retryButton}
type="text"
icon={<RotateCw size={16} />}
onClick={onRetry}
>
Retry
</Button>
<Button
type="text"
className={styles.learnMore}
onClick={(): void => handleContactSupport(isCloudUser)}
>
Contact Support
</Button>
<ArrowUpRight size={16} className={styles.learnMoreArrow} />
</section>
</div>
);
}
export default ErrorState;

View File

@@ -1,73 +0,0 @@
.contentContainer {
display: flex;
flex-direction: column;
}
.contentHeader {
padding: 16px;
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid var(--l1-border);
}
.footer {
display: flex;
flex-direction: column;
gap: 8px;
}
.jsonError {
display: flex;
align-items: center;
gap: 8px;
}
.errorText {
color: var(--warning-background);
}
.actions {
display: flex;
justify-content: space-between;
align-items: center;
}
:global(.importJsonModalWrapper) {
:global(.ant-modal-content) {
border-radius: 4px;
border: 1px solid var(--l1-border);
background: linear-gradient(
139deg,
color-mix(in srgb, var(--card) 80%, transparent) 0%,
color-mix(in srgb, var(--card) 90%, transparent) 98.68%
);
box-shadow: 4px 10px 16px 2px rgba(0, 0, 0, 0.2);
backdrop-filter: blur(20px);
padding: 0;
}
:global(.margin) {
background: linear-gradient(
139deg,
color-mix(in srgb, var(--card) 80%, transparent) 0%,
color-mix(in srgb, var(--card) 90%, transparent) 98.68%
);
backdrop-filter: blur(20px);
}
:global(.view-lines) {
background: linear-gradient(
139deg,
color-mix(in srgb, var(--card) 80%, transparent) 0%,
color-mix(in srgb, var(--card) 90%, transparent) 98.68%
);
backdrop-filter: blur(20px);
}
:global(.ant-modal-footer) {
margin-top: 0;
padding: 16px;
border-top: 1px solid var(--l1-border);
}
}

View File

@@ -1,224 +0,0 @@
import { useState } from 'react';
import { useTranslation } from 'react-i18next';
import { generatePath } from 'react-router-dom';
import { red } from '@ant-design/colors';
import MEditor, { Monaco } from '@monaco-editor/react';
import { Color } from '@signozhq/design-tokens';
import { Button, Flex, Modal, Upload, UploadProps } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import {
CircleAlert,
ExternalLink,
Github,
MonitorDot,
MoveRight,
Sparkles,
} from '@signozhq/icons';
import logEvent from 'api/common/logEvent';
import { createDashboardV2 } from 'api/generated/services/dashboard';
import ROUTES from 'constants/routes';
import { useIsDarkMode } from 'hooks/useDarkMode';
import { useNotifications } from 'hooks/useNotifications';
import { useSafeNavigate } from 'hooks/useSafeNavigate';
import { useErrorModal } from 'providers/ErrorModalProvider';
import APIError from 'types/api/error';
import sampleDashboard from './sampleDashboard.json';
import styles from './ImportJSONModal.module.scss';
import { normalizeToPostable } from './ImportJSONModalUtils';
interface Props {
open: boolean;
onClose: () => void;
}
function ImportJSONModal({ open, onClose }: Props): JSX.Element {
const { safeNavigate } = useSafeNavigate();
const { t } = useTranslation(['dashboard', 'common']);
const [isUploadError, setIsUploadError] = useState(false);
const [isCreateError, setIsCreateError] = useState(false);
const [isCreating, setIsCreating] = useState(false);
const [editorValue, setEditorValue] = useState('');
const { notifications } = useNotifications();
const { showErrorModal } = useErrorModal();
const isDarkMode = useIsDarkMode();
const handleUpload: UploadProps['onChange'] = (info) => {
const lastFile = info.fileList[info.fileList.length - 1];
if (!lastFile?.originFileObj) {
return;
}
const reader = new FileReader();
reader.onload = (event): void => {
try {
const target = event.target?.result;
if (!target) {
return;
}
const parsed = JSON.parse(target.toString());
setEditorValue(JSON.stringify(parsed, null, 2));
setIsUploadError(false);
} catch {
setIsUploadError(true);
}
};
reader.readAsText(lastFile.originFileObj);
};
const handleImport = async (): Promise<void> => {
try {
setIsCreating(true);
logEvent('Dashboard List V2: Import and next clicked', {});
const parsed = JSON.parse(editorValue) as Record<string, unknown>;
const payload = normalizeToPostable(parsed);
const response = await createDashboardV2(payload);
safeNavigate(
generatePath(ROUTES.DASHBOARD, { dashboardId: response.data.id }),
);
logEvent('Dashboard List V2: New dashboard imported successfully', {
dashboardId: response.data?.id,
});
} catch (error) {
showErrorModal(error as APIError);
setIsCreateError(true);
notifications.error({
message: error instanceof Error ? error.message : t('error_loading_json'),
});
} finally {
setIsCreating(false);
}
};
const handleClose = (): void => {
setIsUploadError(false);
setIsCreateError(false);
onClose();
};
const setEditorTheme = (monaco: Monaco): void => {
monaco.editor.defineTheme('my-theme', {
base: 'vs-dark',
inherit: true,
rules: [
{ token: 'string.key.json', foreground: Color.BG_VANILLA_400 },
{ token: 'string.value.json', foreground: Color.BG_ROBIN_400 },
],
colors: { 'editor.background': Color.BG_INK_300 },
});
};
const renderError = (msg: string): JSX.Element => (
<div className={styles.jsonError}>
<CircleAlert size="md" color={red[7]} />
<Typography className={styles.errorText}>{msg}</Typography>
</div>
);
return (
<Modal
wrapClassName="importJsonModalWrapper"
open={open}
centered
closable
keyboard
maskClosable
onCancel={handleClose}
destroyOnClose
width="60vw"
footer={
<div className={styles.footer}>
{isCreateError && renderError(t('error_loading_json'))}
{isUploadError && renderError(t('error_upload_json'))}
<div className={styles.actions}>
<Flex gap="small">
<Upload
accept=".json"
showUploadList={false}
multiple={false}
onChange={handleUpload}
beforeUpload={(): boolean => false}
action="none"
>
<Button
type="default"
className="periscope-btn"
icon={<MonitorDot size={14} />}
onClick={(): void => {
logEvent('Dashboard List V2: Upload JSON file clicked', {});
}}
>
{t('upload_json_file')}
</Button>
</Upload>
<Button
type="default"
className="periscope-btn"
icon={<Sparkles size={14} />}
onClick={(): void => {
setEditorValue(JSON.stringify(sampleDashboard, null, 2));
setIsUploadError(false);
logEvent('Dashboard List V2: Load sample clicked', {});
}}
>
Load sample
</Button>
<a
href="https://signoz.io/docs/dashboards/dashboard-templates/overview/"
target="_blank"
rel="noopener noreferrer"
>
<Button
type="default"
className="periscope-btn"
icon={<Github size={14} />}
>
{t('view_template')}&nbsp;
<ExternalLink size={14} />
</Button>
</a>
</Flex>
<Button
onClick={handleImport}
loading={isCreating}
className="periscope-btn primary"
type="primary"
>
{t('import_and_next')} &nbsp; <MoveRight size={14} />
</Button>
</div>
</div>
}
>
<div className={styles.contentContainer}>
<div className={styles.contentHeader}>
<Typography.Text>{t('import_json')}</Typography.Text>
</div>
<MEditor
language="json"
height="40vh"
onChange={(newValue): void => setEditorValue(newValue || '')}
value={editorValue}
options={{
scrollbar: { alwaysConsumeMouseWheel: false },
minimap: { enabled: false },
fontSize: 14,
fontFamily: 'Space Mono',
}}
theme={isDarkMode ? 'my-theme' : 'light'}
onMount={(_, monaco): void => {
document.fonts.ready.then(() => {
monaco.editor.remeasureFonts();
});
}}
beforeMount={setEditorTheme}
/>
</div>
</Modal>
);
}
export default ImportJSONModal;

View File

@@ -1,32 +0,0 @@
import {
DashboardtypesDashboardSpecDTO,
DashboardtypesPostableDashboardV2DTO,
DashboardtypesPostableDashboardV2MetadataDTO,
} from 'api/generated/services/sigNoz.schemas';
// Accept either a complete PostableDashboardV2 (`{ metadata, spec }`) or a
// bare spec — wrap the latter with default metadata so users can paste either
// of the shapes that exist in the wild (e.g. testdata/perses.json is a bare
// spec).
export function normalizeToPostable(
parsed: Record<string, unknown>,
): DashboardtypesPostableDashboardV2DTO {
const hasMetadata = 'metadata' in parsed;
const hasSpec = 'spec' in parsed;
if (hasMetadata && hasSpec) {
const meta = parsed.metadata as DashboardtypesPostableDashboardV2MetadataDTO;
const metadata: DashboardtypesPostableDashboardV2MetadataDTO = {
...meta,
schemaVersion: meta?.schemaVersion || 'v6',
};
return {
metadata,
spec: parsed.spec as DashboardtypesDashboardSpecDTO,
};
}
return {
metadata: { schemaVersion: 'v6' },
spec: parsed as unknown as DashboardtypesDashboardSpecDTO,
};
}

View File

@@ -1,154 +0,0 @@
{
"display": {
"name": "NV dashboard with sections",
"description": ""
},
"datasources": {
"SigNozDatasource": {
"default": true,
"plugin": {
"kind": "signoz/Datasource",
"spec": {}
}
}
},
"panels": {
"b424e23b": {
"kind": "Panel",
"spec": {
"display": {
"name": ""
},
"plugin": {
"kind": "signoz/NumberPanel",
"spec": {
"formatting": {
"unit": "s",
"decimalPrecision": "2"
}
}
},
"queries": [
{
"kind": "TimeSeriesQuery",
"spec": {
"plugin": {
"kind": "signoz/BuilderQuery",
"spec": {
"name": "A",
"signal": "metrics",
"aggregations": [
{
"metricName": "container.cpu.time",
"reduceTo": "sum",
"spaceAggregation": "sum",
"timeAggregation": "rate"
}
],
"filter": {
"expression": ""
}
}
}
}
}
]
}
},
"251df4d5": {
"kind": "Panel",
"spec": {
"display": {
"name": ""
},
"plugin": {
"kind": "signoz/TimeSeriesPanel",
"spec": {
"visualization": {
"fillSpans": false
},
"formatting": {
"unit": "recommendations",
"decimalPrecision": "2"
},
"chartAppearance": {
"lineInterpolation": "spline",
"showPoints": false,
"lineStyle": "solid",
"fillMode": "none",
"spanGaps": {"fillOnlyBelow": true}
},
"legend": {
"position": "bottom"
}
}
},
"queries": [
{
"kind": "TimeSeriesQuery",
"spec": {
"plugin": {
"kind": "signoz/BuilderQuery",
"spec": {
"name": "A",
"signal": "metrics",
"aggregations": [
{
"metricName": "app_recommendations_counter",
"reduceTo": "sum",
"spaceAggregation": "sum",
"timeAggregation": "rate"
}
],
"filter": {
"expression": ""
}
}
}
}
}
]
}
}
},
"layouts": [
{
"kind": "Grid",
"spec": {
"display": {
"title": "Bravo"
},
"items": [
{
"x": 0,
"y": 0,
"width": 6,
"height": 6,
"content": {
"$ref": "#/spec/panels/b424e23b"
}
}
]
}
},
{
"kind": "Grid",
"spec": {
"display": {
"title": "Alpha"
},
"items": [
{
"x": 0,
"y": 0,
"width": 6,
"height": 6,
"content": {
"$ref": "#/spec/panels/251df4d5"
}
}
]
}
}
]
}

View File

@@ -1,129 +0,0 @@
.wrapper {
display: flex;
justify-content: space-between;
align-items: center;
padding: 16px;
height: 44px;
flex-shrink: 0;
border-radius: 6px 6px 0px 0px;
border: 1px solid var(--l1-border);
background: var(--l2-background);
box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.1);
}
.label {
color: var(--l2-foreground);
font-family: Inter;
font-size: 14px;
font-style: normal;
font-weight: 400;
line-height: 20px;
letter-spacing: -0.07px;
}
.rightActions {
display: flex;
gap: 12px;
color: white;
cursor: pointer;
}
.sortContent {
display: flex;
flex-direction: column;
align-items: flex-start;
width: 140px;
}
.sortHeading {
color: var(--l3-foreground);
font-family: Inter;
font-size: 11px;
font-style: normal;
font-weight: 600;
line-height: 18px;
letter-spacing: 0.88px;
text-transform: uppercase;
padding: 12px 18px 6px 14px;
}
.sortDivider {
width: 100%;
height: 1px;
background: var(--l1-border);
margin: 4px 0;
}
.sortButton {
text-align: start;
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
color: var(--l2-foreground);
font-family: Inter;
font-size: 14px;
font-style: normal;
font-weight: 400;
line-height: normal;
letter-spacing: 0.14px;
padding: 12px 18px 12px 14px;
height: auto;
}
.configureContent {
display: flex;
flex-direction: column;
align-items: flex-start;
}
.configureButton {
display: flex;
text-align: start;
align-items: center;
width: 100%;
color: var(--l2-foreground);
font-family: Inter;
font-size: 14px;
font-style: normal;
font-weight: 400;
line-height: normal;
letter-spacing: 0.14px;
padding: 12px;
}
:global(.sortDashboardsPopover) {
:global(.ant-popover-inner) {
display: flex;
padding: 0px;
align-items: center;
border-radius: 4px;
border: 1px solid var(--l1-border);
background: linear-gradient(
139deg,
color-mix(in srgb, var(--card) 80%, transparent) 0%,
color-mix(in srgb, var(--card) 90%, transparent) 98.68%
);
box-shadow: 4px 10px 16px 2px rgba(0, 0, 0, 0.2);
backdrop-filter: blur(20px);
gap: 16px;
}
}
:global(.configureGroupPopover) {
:global(.ant-popover-inner) {
display: flex;
align-items: center;
border-radius: 4px;
padding: 0px;
border: 1px solid var(--l1-border);
background: linear-gradient(
139deg,
color-mix(in srgb, var(--card) 80%, transparent) 0%,
color-mix(in srgb, var(--card) 90%, transparent) 98.68%
);
box-shadow: 4px 10px 16px 2px rgba(0, 0, 0, 0.2);
backdrop-filter: blur(20px);
gap: 16px;
}
}

View File

@@ -1,129 +0,0 @@
import { Button, Popover, Tooltip } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import {
ArrowDownWideNarrow,
Check,
Ellipsis,
HdmiPort,
} from '@signozhq/icons';
import type {
SortColumn,
SortOrder,
} from '../../hooks/useDashboardsListQueryParams';
import styles from './ListHeader.module.scss';
interface Props {
sortColumn: SortColumn;
onSortChange: (column: SortColumn) => void;
sortOrder: SortOrder;
onOrderChange: (order: SortOrder) => void;
onConfigureMetadata: () => void;
}
function ListHeader({
sortColumn,
onSortChange,
sortOrder,
onOrderChange,
onConfigureMetadata,
}: Props): JSX.Element {
return (
<div className={styles.wrapper}>
<Typography.Text className={styles.label}>All Dashboards</Typography.Text>
<section className={styles.rightActions}>
<Tooltip title="Sort">
<Popover
trigger="click"
content={
<div className={styles.sortContent}>
<Typography.Text className={styles.sortHeading}>
Sort By
</Typography.Text>
<Button
type="text"
className={styles.sortButton}
onClick={(): void => onSortChange('name')}
data-testid="sort-by-name"
>
Name
{sortColumn === 'name' && <Check size={14} />}
</Button>
<Button
type="text"
className={styles.sortButton}
onClick={(): void => onSortChange('created_at')}
data-testid="sort-by-last-created"
>
Last created
{sortColumn === 'created_at' && <Check size={14} />}
</Button>
<Button
type="text"
className={styles.sortButton}
onClick={(): void => onSortChange('updated_at')}
data-testid="sort-by-last-updated"
>
Last updated
{sortColumn === 'updated_at' && <Check size={14} />}
</Button>
<div className={styles.sortDivider} />
<Typography.Text className={styles.sortHeading}>Order</Typography.Text>
<Button
type="text"
className={styles.sortButton}
onClick={(): void => onOrderChange('asc')}
data-testid="sort-order-asc"
>
Ascending
{sortOrder === 'asc' && <Check size={14} />}
</Button>
<Button
type="text"
className={styles.sortButton}
onClick={(): void => onOrderChange('desc')}
data-testid="sort-order-desc"
>
Descending
{sortOrder === 'desc' && <Check size={14} />}
</Button>
</div>
}
rootClassName="sortDashboardsPopover"
placement="bottomRight"
arrow={false}
>
<ArrowDownWideNarrow size={14} data-testid="sort-by" />
</Popover>
</Tooltip>
<Popover
trigger="click"
content={
<div className={styles.configureContent}>
<Button
type="text"
icon={<HdmiPort size={14} />}
className={styles.configureButton}
onClick={(e): void => {
e.preventDefault();
e.stopPropagation();
onConfigureMetadata();
}}
>
Configure metadata
</Button>
</div>
}
rootClassName="configureGroupPopover"
placement="bottomRight"
arrow={false}
>
<Ellipsis size={14} />
</Popover>
</section>
</div>
);
}
export default ListHeader;

View File

@@ -1,11 +0,0 @@
.wrapper {
display: flex;
flex-direction: column;
gap: 16px;
margin-top: 16px;
}
.skeleton {
height: 125px;
width: 100%;
}

View File

@@ -1,16 +0,0 @@
import { Skeleton } from 'antd';
import styles from './LoadingState.module.scss';
function LoadingState(): JSX.Element {
return (
<div className={styles.wrapper}>
<Skeleton.Input active size="large" className={styles.skeleton} />
<Skeleton.Input active size="large" className={styles.skeleton} />
<Skeleton.Input active size="large" className={styles.skeleton} />
<Skeleton.Input active size="large" className={styles.skeleton} />
</div>
);
}
export default LoadingState;

View File

@@ -1,12 +0,0 @@
.wrapper {
display: flex;
flex-direction: column;
height: 320px;
gap: 8px;
padding: 105px 190px;
margin-top: 16px;
justify-content: center;
align-items: flex-start;
border-radius: 6px;
border: 1px dashed var(--l1-border);
}

View File

@@ -1,22 +0,0 @@
import { Typography } from '@signozhq/ui/typography';
import emptyStateUrl from '@/assets/Icons/emptyState.svg';
import styles from './NoResultsState.module.scss';
interface Props {
searchString: string;
}
function NoResultsState({ searchString }: Props): JSX.Element {
return (
<div className={styles.wrapper}>
<img src={emptyStateUrl} alt="img" height={32} width={32} />
<Typography.Text>
No dashboards found for {searchString}. Create a new dashboard?
</Typography.Text>
</div>
);
}
export default NoResultsState;

View File

@@ -1,25 +0,0 @@
import { ChangeEvent } from 'react';
import { Input } from 'antd';
import { Color } from '@signozhq/design-tokens';
import { Search } from '@signozhq/icons';
interface Props {
value: string;
onChange: (value: string) => void;
}
function SearchBar({ value, onChange }: Props): JSX.Element {
return (
<Input
placeholder="Search by name, description, or tags..."
prefix={<Search size={12} color={Color.BG_VANILLA_400} />}
value={value}
data-testid="dashboards-list-search"
onChange={(e: ChangeEvent<HTMLInputElement>): void =>
onChange(e.target.value)
}
/>
);
}
export default SearchBar;

View File

@@ -1,36 +0,0 @@
import {
parseAsInteger,
parseAsString,
parseAsStringLiteral,
useQueryState,
type Options,
type UseQueryStateReturn,
} from 'nuqs';
export const SORT_COLUMNS = ['updated_at', 'created_at', 'name'] as const;
export type SortColumn = (typeof SORT_COLUMNS)[number];
export const SORT_ORDERS = ['asc', 'desc'] as const;
export type SortOrder = (typeof SORT_ORDERS)[number];
const opts: Options = { history: 'push' };
export const useSortColumn = (): UseQueryStateReturn<SortColumn, SortColumn> =>
useQueryState(
'sort',
parseAsStringLiteral(SORT_COLUMNS)
.withDefault('updated_at')
.withOptions(opts),
);
export const useSortOrder = (): UseQueryStateReturn<SortOrder, SortOrder> =>
useQueryState(
'order',
parseAsStringLiteral(SORT_ORDERS).withDefault('desc').withOptions(opts),
);
export const usePage = (): UseQueryStateReturn<number, number> =>
useQueryState('page', parseAsInteger.withDefault(1).withOptions(opts));
export const useSearch = (): UseQueryStateReturn<string, string> =>
useQueryState('search', parseAsString.withDefault('').withOptions(opts));

View File

@@ -1,3 +1,9 @@
import DashboardsListPageV2 from './DashboardsListPageV2';
function DashboardsListPageV2(): JSX.Element {
return (
<div>
<h1>Dashboards List Page V2</h1>
</div>
);
}
export default DashboardsListPageV2;

View File

@@ -1,24 +0,0 @@
import type { DashboardtypesGettableDashboardWithPinDTO } from 'api/generated/services/sigNoz.schemas';
export type DashboardListItem = DashboardtypesGettableDashboardWithPinDTO;
export const tagsToStrings = (
tags: { key: string; value: string }[] | null | undefined,
): string[] =>
(tags ?? []).map((tag) =>
tag.key === tag.value ? tag.key : `${tag.key}:${tag.value}`,
);
// Build a dashboard list filter DSL query from a free-text search input.
// Matches against name, description, and tags; empty input returns undefined so the
// `query` param is omitted from the API call.
// This is only for the old UX that uses v2. The new UX will actually have DSL search input,
// so it will pass the DSL directly and not use this function.
export const buildSearchDSL = (search: string): string | undefined => {
const trimmed = search.trim();
if (!trimmed) {
return undefined;
}
const escaped = trimmed.replace(/'/g, "''");
return `name CONTAINS '${escaped}' or description CONTAINS '${escaped}' or tags.key CONTAINS '${escaped}' or tags.value CONTAINS '${escaped}'`;
};

View File

@@ -16,7 +16,7 @@ import { LOCALSTORAGE } from 'constants/localStorage';
import ROUTES from 'constants/routes';
import { convertTimeToRelevantUnit } from 'container/TraceDetail/utils';
import dayjs from 'dayjs';
import history from 'lib/history';
import history, { hasInAppHistory } from 'lib/history';
import {
ArrowLeft,
CalendarClock,
@@ -96,13 +96,7 @@ function TraceDetailsHeader({
}, [traceID]);
const handlePreviousBtnClick = useCallback((): void => {
const isSpaNavigate =
document.referrer &&
// oxlint-disable-next-line signoz/no-raw-absolute-path
new URL(document.referrer).origin === window.location.origin;
const hasBackHistory = window.history.length > 1;
if (isSpaNavigate && hasBackHistory) {
if (hasInAppHistory()) {
history.goBack();
} else {
history.push(ROUTES.TRACES_EXPLORER);
@@ -130,6 +124,7 @@ function TraceDetailsHeader({
size="md"
className={styles.backBtn}
onClick={handlePreviousBtnClick}
aria-label="Back"
>
<ArrowLeft size={14} />
</Button>

View File

@@ -0,0 +1,60 @@
import { fireEvent, screen } from '@testing-library/react';
import ROUTES from 'constants/routes';
import { render } from 'tests/test-utils';
import TraceDetailsHeader from '../TraceDetailsHeader';
const mockGoBack = jest.fn();
const mockPush = jest.fn();
const mockHasInAppHistory = jest.fn();
jest.mock('lib/history', () => ({
__esModule: true,
default: {
goBack: (): void => mockGoBack(),
push: (path: string): void => mockPush(path),
replace: jest.fn(),
location: { pathname: '/', search: '' },
listen: (): (() => void) => (): void => undefined,
},
hasInAppHistory: (): boolean => mockHasInAppHistory(),
}));
const baseProps = {
filterMetadata: {
startTime: 0,
endTime: 1,
traceId: 'trace-123',
},
onFilteredSpansChange: jest.fn(),
isDataLoaded: false,
};
describe('TraceDetailsHeader back button', () => {
beforeEach(() => {
mockGoBack.mockClear();
mockPush.mockClear();
mockHasInAppHistory.mockReset();
});
it('calls history.goBack() when there is in-app SPA history', () => {
mockHasInAppHistory.mockReturnValue(true);
render(<TraceDetailsHeader {...baseProps} />);
fireEvent.click(screen.getByRole('button', { name: /back/i }));
expect(mockGoBack).toHaveBeenCalledTimes(1);
expect(mockPush).not.toHaveBeenCalled();
});
it('pushes to the traces explorer route when there is no in-app SPA history', () => {
mockHasInAppHistory.mockReturnValue(false);
render(<TraceDetailsHeader {...baseProps} />);
fireEvent.click(screen.getByRole('button', { name: /back/i }));
expect(mockPush).toHaveBeenCalledTimes(1);
expect(mockPush).toHaveBeenCalledWith(ROUTES.TRACES_EXPLORER);
expect(mockGoBack).not.toHaveBeenCalled();
});
});

View File

@@ -48,9 +48,7 @@
"node_modules",
"src/parser/*.ts",
"src/parser/TraceOperatorParser/*.ts",
"orval.config.ts",
"src/pages/DashboardsListPageV2/**/*",
"src/pages/DashboardPageV2/**/*"
"orval.config.ts"
],
"include": [
"./src",

View File

@@ -5,7 +5,7 @@ import (
"github.com/SigNoz/signoz/pkg/http/handler"
"github.com/SigNoz/signoz/pkg/types"
"github.com/SigNoz/signoz/pkg/types/tracedetailtypes"
"github.com/SigNoz/signoz/pkg/types/spantypes"
"github.com/gorilla/mux"
)
@@ -17,9 +17,9 @@ func (provider *provider) addTraceDetailRoutes(router *mux.Router) error {
Tags: []string{"tracedetail"},
Summary: "Get waterfall view for a trace",
Description: "Returns the waterfall view of spans for a given trace ID with tree structure, metadata, and windowed pagination",
Request: new(tracedetailtypes.PostableWaterfall),
Request: new(spantypes.PostableWaterfall),
RequestContentType: "application/json",
Response: new(tracedetailtypes.GettableWaterfallTrace),
Response: new(spantypes.GettableWaterfallTrace),
ResponseContentType: "application/json",
SuccessStatusCode: http.StatusOK,
ErrorStatusCodes: []int{http.StatusBadRequest, http.StatusNotFound},

View File

@@ -6,7 +6,6 @@ import (
"github.com/SigNoz/signoz/pkg/statsreporter"
citypes "github.com/SigNoz/signoz/pkg/types/cloudintegrationtypes"
"github.com/SigNoz/signoz/pkg/types/dashboardtypes"
"github.com/SigNoz/signoz/pkg/valuer"
)
@@ -43,23 +42,14 @@ type Module interface {
GetService(ctx context.Context, orgID valuer.UUID, serviceID citypes.ServiceID, provider citypes.CloudProviderType, integrationID valuer.UUID) (*citypes.Service, error)
// CreateService creates a new service for a cloud integration account.
CreateService(ctx context.Context, orgID valuer.UUID, service *citypes.CloudIntegrationService, provider citypes.CloudProviderType) error
CreateService(ctx context.Context, orgID valuer.UUID, createdBy string, creator valuer.UUID, service *citypes.CloudIntegrationService, provider citypes.CloudProviderType) error
// UpdateService updates cloud integration service
UpdateService(ctx context.Context, orgID valuer.UUID, service *citypes.CloudIntegrationService, provider citypes.CloudProviderType) error
UpdateService(ctx context.Context, orgID valuer.UUID, createdBy string, creator valuer.UUID, service *citypes.CloudIntegrationService, provider citypes.CloudProviderType) error
// AgentCheckIn is called by agent to send heartbeat and get latest config in response.
AgentCheckIn(ctx context.Context, orgID valuer.UUID, provider citypes.CloudProviderType, req *citypes.AgentCheckInRequest) (*citypes.AgentCheckInResponse, error)
// GetDashboardByID returns dashboard JSON for a given dashboard id.
// this only returns the dashboard when the service (embedded in dashboard id) is enabled
// in the org for any cloud integration account
GetDashboardByID(ctx context.Context, orgID valuer.UUID, id string) (*dashboardtypes.Dashboard, error)
// ListDashboards returns list of dashboards across all connected cloud integration accounts
// for enabled services in the org. This list gets added to dashboard list page
ListDashboards(ctx context.Context, orgID valuer.UUID) ([]*dashboardtypes.Dashboard, error)
statsreporter.StatsCollector
}

View File

@@ -122,7 +122,7 @@
"type": "QUERY"
}
},
"version": "v4",
"version": "v5",
"widgets": [
{
"bucketCount": 30,
@@ -140,74 +140,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_ApplicationELB_TargetResponseTime_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_ApplicationELB_TargetResponseTime_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_ApplicationELB_TargetResponseTime_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "b282d9f1",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "71837c70",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "5bfcc581",
"key": {
"dataType": "string",
"id": "TargetGroup--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "TargetGroup",
"type": "tag"
},
"op": "nexists",
"value": ""
},
{
"id": "a9e33e08",
"key": {
"dataType": "string",
"id": "AvailabilityZone--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "AvailabilityZone",
"type": "tag"
},
"op": "nexists",
"value": ""
}
],
"op": "AND"
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND TargetGroup NOT EXISTS AND AvailabilityZone NOT EXISTS)"
},
"functions": [],
"groupBy": [
@@ -236,15 +181,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{LoadBalancer}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -346,74 +290,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_ApplicationELB_RequestCount_sum--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_ApplicationELB_RequestCount_sum",
"type": "Gauge"
},
"aggregateOperator": "sum",
"aggregations": [
{
"metricName": "aws_ApplicationELB_RequestCount_sum",
"reduceTo": "avg",
"spaceAggregation": "sum",
"timeAggregation": "sum"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "448b551a",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "a8821216",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "f5a62c5a",
"key": {
"dataType": "string",
"id": "AvailabilityZone--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "AvailabilityZone",
"type": "tag"
},
"op": "nexists",
"value": ""
},
{
"id": "25e8abc8",
"key": {
"dataType": "string",
"id": "TargetGroup--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "TargetGroup",
"type": "tag"
},
"op": "nexists",
"value": ""
}
],
"op": "AND"
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND AvailabilityZone NOT EXISTS AND TargetGroup NOT EXISTS)"
},
"functions": [],
"groupBy": [
@@ -442,15 +331,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{LoadBalancer}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "sum",
"stepInterval": 60,
"timeAggregation": "sum"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -552,74 +440,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_ApplicationELB_HTTPCode_Target_5XX_Count_sum--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_ApplicationELB_HTTPCode_Target_5XX_Count_sum",
"type": "Gauge"
},
"aggregateOperator": "sum",
"aggregations": [
{
"metricName": "aws_ApplicationELB_HTTPCode_Target_5XX_Count_sum",
"reduceTo": "avg",
"spaceAggregation": "sum",
"timeAggregation": "sum"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "702a8765",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "32985f2d",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "e4cf3d8b",
"key": {
"dataType": "string",
"id": "TargetGroup--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "TargetGroup",
"type": "tag"
},
"op": "nexists",
"value": ""
},
{
"id": "234c77fd",
"key": {
"dataType": "string",
"id": "AvailabilityZone--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "AvailabilityZone",
"type": "tag"
},
"op": "nexists",
"value": ""
}
],
"op": "AND"
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND TargetGroup NOT EXISTS AND AvailabilityZone NOT EXISTS)"
},
"functions": [],
"groupBy": [
@@ -648,15 +481,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{LoadBalancer}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "sum",
"stepInterval": 60,
"timeAggregation": "sum"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -758,61 +590,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_ApplicationELB_HTTPCode_ELB_5XX_Count_sum--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_ApplicationELB_HTTPCode_ELB_5XX_Count_sum",
"type": "Gauge"
},
"aggregateOperator": "sum",
"aggregations": [
{
"metricName": "aws_ApplicationELB_HTTPCode_ELB_5XX_Count_sum",
"reduceTo": "avg",
"spaceAggregation": "sum",
"timeAggregation": "sum"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "5807a1e3",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "0dd63d0c",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "31ccfbae",
"key": {
"dataType": "string",
"id": "AvailabilityZone--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "AvailabilityZone",
"type": "tag"
},
"op": "nexists",
"value": ""
}
],
"op": "AND"
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND AvailabilityZone NOT EXISTS)"
},
"functions": [],
"groupBy": [
@@ -841,15 +631,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{LoadBalancer}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "sum",
"stepInterval": 60,
"timeAggregation": "sum"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -951,61 +740,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_ApplicationELB_ActiveConnectionCount_sum--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_ApplicationELB_ActiveConnectionCount_sum",
"type": "Gauge"
},
"aggregateOperator": "sum",
"aggregations": [
{
"metricName": "aws_ApplicationELB_ActiveConnectionCount_sum",
"reduceTo": "avg",
"spaceAggregation": "sum",
"timeAggregation": "sum"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "72c256c0",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "b433c2a1",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "8f5e7de0",
"key": {
"dataType": "string",
"id": "AvailabilityZone--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "AvailabilityZone",
"type": "tag"
},
"op": "nexists",
"value": ""
}
],
"op": "AND"
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND AvailabilityZone NOT EXISTS)"
},
"functions": [],
"groupBy": [
@@ -1034,15 +781,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{LoadBalancer}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "sum",
"stepInterval": 60,
"timeAggregation": "sum"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -1144,70 +890,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_ApplicationELB_TargetConnectionErrorCount_sum--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_ApplicationELB_TargetConnectionErrorCount_sum",
"type": "Gauge"
},
"aggregateOperator": "sum",
"aggregations": [
{
"metricName": "aws_ApplicationELB_TargetConnectionErrorCount_sum",
"reduceTo": "avg",
"spaceAggregation": "sum",
"timeAggregation": "sum"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "9226a37c",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "c3ff0c8f",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "e3317bc2",
"key": {
"dataType": "",
"isColumn": false,
"key": "TargetGroup",
"type": ""
},
"op": "nexists",
"value": ""
},
{
"id": "4e5c2324",
"key": {
"dataType": "",
"isColumn": false,
"key": "AvailabilityZone",
"type": ""
},
"op": "nexists",
"value": ""
}
],
"op": "AND"
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND TargetGroup NOT EXISTS AND AvailabilityZone NOT EXISTS)"
},
"functions": [],
"groupBy": [
@@ -1236,15 +931,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{LoadBalancer}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "sum",
"stepInterval": 60,
"timeAggregation": "sum"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -1346,48 +1040,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_ApplicationELB_ConsumedLCUs_sum--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_ApplicationELB_ConsumedLCUs_sum",
"type": "Gauge"
},
"aggregateOperator": "sum",
"aggregations": [
{
"metricName": "aws_ApplicationELB_ConsumedLCUs_sum",
"reduceTo": "avg",
"spaceAggregation": "sum",
"timeAggregation": "sum"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "20627274",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "cd861e27",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
}
],
"op": "AND"
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region)"
},
"functions": [],
"groupBy": [
@@ -1416,15 +1081,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{LoadBalancer}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "sum",
"stepInterval": 60,
"timeAggregation": "sum"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -1526,61 +1190,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_ApplicationELB_ProcessedBytes_sum--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_ApplicationELB_ProcessedBytes_sum",
"type": "Gauge"
},
"aggregateOperator": "sum",
"aggregations": [
{
"metricName": "aws_ApplicationELB_ProcessedBytes_sum",
"reduceTo": "avg",
"spaceAggregation": "sum",
"timeAggregation": "sum"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "7d4a3494",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "3c307858",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "fbca8724",
"key": {
"dataType": "string",
"id": "AvailabilityZone--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "AvailabilityZone",
"type": "tag"
},
"op": "nexists",
"value": ""
}
],
"op": "AND"
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND AvailabilityZone NOT EXISTS)"
},
"functions": [],
"groupBy": [
@@ -1609,15 +1231,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{LoadBalancer}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "sum",
"stepInterval": 60,
"timeAggregation": "sum"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -1719,48 +1340,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_ApplicationELB_PeakLCUs_sum--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_ApplicationELB_PeakLCUs_sum",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_ApplicationELB_PeakLCUs_sum",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "a416e862",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "ed7d0a39",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
}
],
"op": "AND"
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region)"
},
"functions": [],
"groupBy": [
@@ -1789,15 +1381,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{LoadBalancer}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
}
],
"queryFormulas": []

View File

@@ -94,7 +94,7 @@
"type": "QUERY"
}
},
"version": "v4",
"version": "v5",
"widgets": [
{
"bucketCount": 30,
@@ -112,61 +112,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_EC2_CPUUtilization_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_EC2_CPUUtilization_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_EC2_CPUUtilization_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "d302d50d",
"key": {
"dataType": "string",
"id": "service.instance.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "service.instance.id",
"type": "tag"
},
"op": "!=",
"value": ""
},
{
"id": "e6c54e87",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "7907211a",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
}
],
"op": "AND"
"filter": {
"expression": "(service.instance.id != '' AND cloud.account.id = $Account AND cloud.region = $Region)"
},
"functions": [],
"groupBy": [
@@ -195,15 +153,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{service.instance.id}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -305,61 +262,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_EC2_CPUCreditUsage_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_EC2_CPUCreditUsage_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_EC2_CPUCreditUsage_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "30ded0dc",
"key": {
"dataType": "string",
"id": "service.instance.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "service.instance.id",
"type": "tag"
},
"op": "!=",
"value": ""
},
{
"id": "c935f6ec",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "d092fef8",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
}
],
"op": "AND"
"filter": {
"expression": "(service.instance.id != '' AND cloud.account.id = $Account AND cloud.region = $Region)"
},
"functions": [],
"groupBy": [
@@ -388,15 +303,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{service.instance.id}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -498,61 +412,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_EC2_EBSReadBytes_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_EC2_EBSReadBytes_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_EC2_EBSReadBytes_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "a5fbfa4a",
"key": {
"dataType": "string",
"id": "service.instance.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "service.instance.id",
"type": "tag"
},
"op": "!=",
"value": ""
},
{
"id": "87071f13",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "c84a88c4",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
}
],
"op": "AND"
"filter": {
"expression": "(service.instance.id != '' AND cloud.account.id = $Account AND cloud.region = $Region)"
},
"functions": [],
"groupBy": [
@@ -581,72 +453,29 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{service.instance.id}} - Reads",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
},
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_EC2_EBSWriteBytes_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_EC2_EBSWriteBytes_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_EC2_EBSWriteBytes_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "B",
"filters": {
"items": [
{
"id": "4d10ca4b",
"key": {
"dataType": "string",
"id": "service.instance.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "service.instance.id",
"type": "tag"
},
"op": "!=",
"value": ""
},
{
"id": "fc2db932",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "a3fd74c0",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
}
],
"op": "AND"
"filter": {
"expression": "(service.instance.id != '' AND cloud.account.id = $Account AND cloud.region = $Region)"
},
"functions": [],
"groupBy": [
@@ -675,15 +504,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{service.instance.id}} - Writes",
"limit": null,
"orderBy": [],
"queryName": "B",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -785,61 +613,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_EC2_EBSReadOps_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_EC2_EBSReadOps_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_EC2_EBSReadOps_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "85d84806",
"key": {
"dataType": "string",
"id": "service.instance.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "service.instance.id",
"type": "tag"
},
"op": "!=",
"value": ""
},
{
"id": "f2074606",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "134c7ca9",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
}
],
"op": "AND"
"filter": {
"expression": "(service.instance.id != '' AND cloud.account.id = $Account AND cloud.region = $Region)"
},
"functions": [],
"groupBy": [
@@ -868,72 +654,29 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{service.instance.id}} - Reads",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
},
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_EC2_EBSWriteOps_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_EC2_EBSWriteOps_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_EC2_EBSWriteOps_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "B",
"filters": {
"items": [
{
"id": "47e0c00f",
"key": {
"dataType": "string",
"id": "service.instance.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "service.instance.id",
"type": "tag"
},
"op": "!=",
"value": ""
},
{
"id": "0a157dfe",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "a7d1e8df",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
}
],
"op": "AND"
"filter": {
"expression": "(service.instance.id != '' AND cloud.account.id = $Account AND cloud.region = $Region)"
},
"functions": [],
"groupBy": [
@@ -962,15 +705,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{service.instance.id}} - Writes",
"limit": null,
"orderBy": [],
"queryName": "B",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -1072,61 +814,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_EC2_NetworkIn_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_EC2_NetworkIn_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_EC2_NetworkIn_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "12d6748d",
"key": {
"dataType": "string",
"id": "service.instance.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "service.instance.id",
"type": "tag"
},
"op": "!=",
"value": ""
},
{
"id": "df3a8da1",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "81ec53f4",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
}
],
"op": "AND"
"filter": {
"expression": "(service.instance.id != '' AND cloud.account.id = $Account AND cloud.region = $Region)"
},
"functions": [],
"groupBy": [
@@ -1155,15 +855,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{service.instance.id}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -1265,61 +964,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_EC2_NetworkOut_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_EC2_NetworkOut_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_EC2_NetworkOut_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "d301aaa7",
"key": {
"dataType": "string",
"id": "service.instance.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "service.instance.id",
"type": "tag"
},
"op": "!=",
"value": ""
},
{
"id": "e8afaa3b",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "d67487ab",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
}
],
"op": "AND"
"filter": {
"expression": "(service.instance.id != '' AND cloud.account.id = $Account AND cloud.region = $Region)"
},
"functions": [],
"groupBy": [
@@ -1348,15 +1005,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{service.instance.id}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
}
],
"queryFormulas": []

View File

@@ -1,6 +1,6 @@
{
"description": "View key ECS ContainerInsights metrics with an out of the box dashboard.",
"image":"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2280px%22%20height%3D%2280px%22%20viewBox%3D%220%200%2080%2080%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%3C!--%20Generator%3A%20Sketch%2064%20(93537)%20-%20https%3A%2F%2Fsketch.com%20--%3E%3Ctitle%3EIcon-Architecture%2F64%2FArch_Amazon-Elastic-Container-Service_64%3C%2Ftitle%3E%3Cdesc%3ECreated%20with%20Sketch.%3C%2Fdesc%3E%3Cdefs%3E%3ClinearGradient%20x1%3D%220%25%22%20y1%3D%22100%25%22%20x2%3D%22100%25%22%20y2%3D%220%25%22%20id%3D%22linearGradient-1%22%3E%3Cstop%20stop-color%3D%22%23C8511B%22%20offset%3D%220%25%22%3E%3C%2Fstop%3E%3Cstop%20stop-color%3D%22%23FF9900%22%20offset%3D%22100%25%22%3E%3C%2Fstop%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Cg%20id%3D%22Icon-Architecture%2F64%2FArch_Amazon-Elastic-Container-Service_64%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Cg%20id%3D%22Icon-Architecture-BG%2F64%2FContainers%22%20fill%3D%22url(%23linearGradient-1)%22%3E%3Crect%20id%3D%22Rectangle%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2280%22%20height%3D%2280%22%3E%3C%2Frect%3E%3C%2Fg%3E%3Cpath%20d%3D%22M64%2C48.2340095%20L56%2C43.4330117%20L56%2C32.0000169%20C56%2C31.6440171%2055.812%2C31.3150172%2055.504%2C31.1360173%20L44%2C24.4260204%20L44%2C14.7520248%20L64%2C26.5710194%20L64%2C48.2340095%20Z%20M65.509%2C25.13902%20L43.509%2C12.139026%20C43.199%2C11.9560261%2042.818%2C11.9540261%2042.504%2C12.131026%20C42.193%2C12.3090259%2042%2C12.6410257%2042%2C13.0000256%20L42%2C25.0000201%20C42%2C25.3550199%2042.189%2C25.6840198%2042.496%2C25.8640197%20L54%2C32.5740166%20L54%2C44.0000114%20C54%2C44.3510113%2054.185%2C44.6770111%2054.486%2C44.857011%20L64.486%2C50.8570083%20C64.644%2C50.9520082%2064.822%2C51%2065%2C51%20C65.17%2C51%2065.34%2C50.9570082%2065.493%2C50.8700083%20C65.807%2C50.6930084%2066%2C50.3600085%2066%2C50%20L66%2C26.0000196%20C66%2C25.6460198%2065.814%2C25.31902%2065.509%2C25.13902%20L65.509%2C25.13902%20Z%20M40.445%2C66.863001%20L17%2C54.3990067%20L17%2C26.5710194%20L37%2C14.7520248%20L37%2C24.4510204%20L26.463%2C31.1560173%20C26.175%2C31.3400172%2026%2C31.6580171%2026%2C32.0000169%20L26%2C49.0000091%20C26%2C49.373009%2026.208%2C49.7150088%2026.538%2C49.8870087%20L39.991%2C56.8870055%20C40.28%2C57.0370055%2040.624%2C57.0380055%2040.912%2C56.8880055%20L53.964%2C50.1440086%20L61.996%2C54.9640064%20L40.445%2C66.863001%20Z%20M64.515%2C54.1420068%20L54.515%2C48.1420095%20C54.217%2C47.9640096%2053.849%2C47.9520096%2053.541%2C48.1120095%20L40.455%2C54.8730065%20L28%2C48.3930094%20L28%2C32.5490167%20L38.537%2C25.8440197%20C38.825%2C25.6600198%2039%2C25.3420199%2039%2C25.0000201%20L39%2C13.0000256%20C39%2C12.6410257%2038.808%2C12.3090259%2038.496%2C12.131026%20C38.184%2C11.9540261%2037.802%2C11.9560261%2037.491%2C12.139026%20L15.491%2C25.13902%20C15.187%2C25.31902%2015%2C25.6460198%2015%2C26.0000196%20L15%2C55%20C15%2C55.3690062%2015.204%2C55.7090061%2015.53%2C55.883006%20L39.984%2C68.8830001%20C40.131%2C68.961%2040.292%2C69%2040.453%2C69%20C40.62%2C69%2040.786%2C68.958%2040.937%2C68.8750001%20L64.484%2C55.875006%20C64.797%2C55.7020061%2064.993%2C55.3750062%2065.0001416%2C55.0180064%20C65.006%2C54.6600066%2064.821%2C54.3260067%2064.515%2C54.1420068%20L64.515%2C54.1420068%20Z%22%20id%3D%22Amazon-Elastic-Container-Service_Icon_64_Squid%22%20fill%3D%22%23FFFFFF%22%3E%3C%2Fpath%3E%3C%2Fg%3E%3C%2Fsvg%3E",
"image": "data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2280px%22%20height%3D%2280px%22%20viewBox%3D%220%200%2080%2080%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%3C!--%20Generator%3A%20Sketch%2064%20(93537)%20-%20https%3A%2F%2Fsketch.com%20--%3E%3Ctitle%3EIcon-Architecture%2F64%2FArch_Amazon-Elastic-Container-Service_64%3C%2Ftitle%3E%3Cdesc%3ECreated%20with%20Sketch.%3C%2Fdesc%3E%3Cdefs%3E%3ClinearGradient%20x1%3D%220%25%22%20y1%3D%22100%25%22%20x2%3D%22100%25%22%20y2%3D%220%25%22%20id%3D%22linearGradient-1%22%3E%3Cstop%20stop-color%3D%22%23C8511B%22%20offset%3D%220%25%22%3E%3C%2Fstop%3E%3Cstop%20stop-color%3D%22%23FF9900%22%20offset%3D%22100%25%22%3E%3C%2Fstop%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Cg%20id%3D%22Icon-Architecture%2F64%2FArch_Amazon-Elastic-Container-Service_64%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Cg%20id%3D%22Icon-Architecture-BG%2F64%2FContainers%22%20fill%3D%22url(%23linearGradient-1)%22%3E%3Crect%20id%3D%22Rectangle%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2280%22%20height%3D%2280%22%3E%3C%2Frect%3E%3C%2Fg%3E%3Cpath%20d%3D%22M64%2C48.2340095%20L56%2C43.4330117%20L56%2C32.0000169%20C56%2C31.6440171%2055.812%2C31.3150172%2055.504%2C31.1360173%20L44%2C24.4260204%20L44%2C14.7520248%20L64%2C26.5710194%20L64%2C48.2340095%20Z%20M65.509%2C25.13902%20L43.509%2C12.139026%20C43.199%2C11.9560261%2042.818%2C11.9540261%2042.504%2C12.131026%20C42.193%2C12.3090259%2042%2C12.6410257%2042%2C13.0000256%20L42%2C25.0000201%20C42%2C25.3550199%2042.189%2C25.6840198%2042.496%2C25.8640197%20L54%2C32.5740166%20L54%2C44.0000114%20C54%2C44.3510113%2054.185%2C44.6770111%2054.486%2C44.857011%20L64.486%2C50.8570083%20C64.644%2C50.9520082%2064.822%2C51%2065%2C51%20C65.17%2C51%2065.34%2C50.9570082%2065.493%2C50.8700083%20C65.807%2C50.6930084%2066%2C50.3600085%2066%2C50%20L66%2C26.0000196%20C66%2C25.6460198%2065.814%2C25.31902%2065.509%2C25.13902%20L65.509%2C25.13902%20Z%20M40.445%2C66.863001%20L17%2C54.3990067%20L17%2C26.5710194%20L37%2C14.7520248%20L37%2C24.4510204%20L26.463%2C31.1560173%20C26.175%2C31.3400172%2026%2C31.6580171%2026%2C32.0000169%20L26%2C49.0000091%20C26%2C49.373009%2026.208%2C49.7150088%2026.538%2C49.8870087%20L39.991%2C56.8870055%20C40.28%2C57.0370055%2040.624%2C57.0380055%2040.912%2C56.8880055%20L53.964%2C50.1440086%20L61.996%2C54.9640064%20L40.445%2C66.863001%20Z%20M64.515%2C54.1420068%20L54.515%2C48.1420095%20C54.217%2C47.9640096%2053.849%2C47.9520096%2053.541%2C48.1120095%20L40.455%2C54.8730065%20L28%2C48.3930094%20L28%2C32.5490167%20L38.537%2C25.8440197%20C38.825%2C25.6600198%2039%2C25.3420199%2039%2C25.0000201%20L39%2C13.0000256%20C39%2C12.6410257%2038.808%2C12.3090259%2038.496%2C12.131026%20C38.184%2C11.9540261%2037.802%2C11.9560261%2037.491%2C12.139026%20L15.491%2C25.13902%20C15.187%2C25.31902%2015%2C25.6460198%2015%2C26.0000196%20L15%2C55%20C15%2C55.3690062%2015.204%2C55.7090061%2015.53%2C55.883006%20L39.984%2C68.8830001%20C40.131%2C68.961%2040.292%2C69%2040.453%2C69%20C40.62%2C69%2040.786%2C68.958%2040.937%2C68.8750001%20L64.484%2C55.875006%20C64.797%2C55.7020061%2064.993%2C55.3750062%2065.0001416%2C55.0180064%20C65.006%2C54.6600066%2064.821%2C54.3260067%2064.515%2C54.1420068%20L64.515%2C54.1420068%20Z%22%20id%3D%22Amazon-Elastic-Container-Service_Icon_64_Squid%22%20fill%3D%22%23FFFFFF%22%3E%3C%2Fpath%3E%3C%2Fg%3E%3C%2Fsvg%3E",
"layout": [
{
"h": 3,
@@ -139,7 +139,7 @@
"type": "QUERY"
}
},
"version": "v4",
"version": "v5",
"widgets": [
{
"bucketCount": 30,
@@ -160,61 +160,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_ECS_MemoryUtilization_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_ECS_MemoryUtilization_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_ECS_MemoryUtilization_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "c002d3ea",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "d95dc93f",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "7eb7332c",
"key": {
"dataType": "string",
"id": "ClusterName--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "ClusterName",
"type": "tag"
},
"op": "=",
"value": "$Cluster"
}
],
"op": "AND"
"filter": {
"expression": "(cloud.region = $Region AND cloud.account.id = $Account AND ClusterName = $Cluster)"
},
"functions": [],
"groupBy": [
@@ -227,15 +185,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{ServiceName}} ",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -340,61 +297,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_ECS_CPUUtilization_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_ECS_CPUUtilization_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_ECS_CPUUtilization_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "8ae50256",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "dada2be4",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "adaf587a",
"key": {
"dataType": "string",
"id": "ClusterName--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "ClusterName",
"type": "tag"
},
"op": "=",
"value": "$Cluster"
}
],
"op": "AND"
"filter": {
"expression": "(cloud.region = $Region AND cloud.account.id = $Account AND ClusterName = $Cluster)"
},
"functions": [],
"groupBy": [
@@ -407,15 +322,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{ServiceName}} ",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -520,75 +434,30 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_ECS_ContainerInsights_CpuUtilized_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_ECS_ContainerInsights_CpuUtilized_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_ECS_ContainerInsights_CpuUtilized_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "840f6a82",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "e494eace",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "d615bfdb",
"key": {
"dataType": "string",
"id": "ClusterName--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "ClusterName",
"type": "tag"
},
"op": "in",
"value": [
"$Cluster"
]
}
],
"op": "AND"
"filter": {
"expression": "(cloud.region = $Region AND cloud.account.id = $Account AND ClusterName IN $Cluster)"
},
"functions": [],
"groupBy": [],
"having": [],
"having": {
"expression": ""
},
"legend": "",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -693,71 +562,30 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_ECS_ContainerInsights_CpuReserved_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_ECS_ContainerInsights_CpuReserved_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_ECS_ContainerInsights_CpuReserved_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "98cf55a2",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "dc2591e8",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "5fe36864",
"key": {
"dataType": "",
"isColumn": false,
"key": "ClusterName",
"type": ""
},
"op": "=",
"value": "$Cluster"
}
],
"op": "AND"
"filter": {
"expression": "(cloud.region = $Region AND cloud.account.id = $Account AND ClusterName = $Cluster)"
},
"functions": [],
"groupBy": [],
"having": [],
"having": {
"expression": ""
},
"legend": "",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -862,71 +690,30 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_ECS_ContainerInsights_MemoryUtilized_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_ECS_ContainerInsights_MemoryUtilized_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_ECS_ContainerInsights_MemoryUtilized_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "6d3fb70d",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "763ec68f",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "69a793fb",
"key": {
"dataType": "",
"isColumn": false,
"key": "ClusterName",
"type": ""
},
"op": "=",
"value": "$Cluster"
}
],
"op": "AND"
"filter": {
"expression": "(cloud.region = $Region AND cloud.account.id = $Account AND ClusterName = $Cluster)"
},
"functions": [],
"groupBy": [],
"having": [],
"having": {
"expression": ""
},
"legend": "",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -1031,71 +818,30 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_ECS_ContainerInsights_MemoryReserved_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_ECS_ContainerInsights_MemoryReserved_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_ECS_ContainerInsights_MemoryReserved_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "4cabe614",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "077e09db",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "71f30fef",
"key": {
"dataType": "",
"isColumn": false,
"key": "ClusterName",
"type": ""
},
"op": "=",
"value": "$Cluster"
}
],
"op": "AND"
"filter": {
"expression": "(cloud.region = $Region AND cloud.account.id = $Account AND ClusterName = $Cluster)"
},
"functions": [],
"groupBy": [],
"having": [],
"having": {
"expression": ""
},
"legend": "",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -1200,74 +946,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_ECS_ContainerInsights_NetworkRxBytes_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_ECS_ContainerInsights_NetworkRxBytes_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_ECS_ContainerInsights_NetworkRxBytes_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "8e15b10c",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "92d56544",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "7c5e0300",
"key": {
"dataType": "string",
"id": "ClusterName--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "ClusterName",
"type": "tag"
},
"op": "=",
"value": "$Cluster"
},
{
"id": "f41089a9",
"key": {
"dataType": "string",
"id": "ServiceName--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "ServiceName",
"type": "tag"
},
"op": "exists",
"value": ""
}
],
"op": "AND"
"filter": {
"expression": "(cloud.region = $Region AND cloud.account.id = $Account AND ClusterName = $Cluster AND ServiceName EXISTS)"
},
"functions": [],
"groupBy": [
@@ -1280,15 +971,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{ServiceName}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -1393,74 +1083,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_ECS_ContainerInsights_NetworkTxBytes_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_ECS_ContainerInsights_NetworkTxBytes_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_ECS_ContainerInsights_NetworkTxBytes_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "6a1059e5",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "fe0d40de",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "b6047f19",
"key": {
"dataType": "string",
"id": "ClusterName--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "ClusterName",
"type": "tag"
},
"op": "=",
"value": "$Cluster"
},
{
"id": "8e76d8f1",
"key": {
"dataType": "string",
"id": "ServiceName--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "ServiceName",
"type": "tag"
},
"op": "exists",
"value": ""
}
],
"op": "AND"
"filter": {
"expression": "(cloud.region = $Region AND cloud.account.id = $Account AND ClusterName = $Cluster AND ServiceName EXISTS)"
},
"functions": [],
"groupBy": [
@@ -1473,15 +1108,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{ServiceName}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -1586,74 +1220,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_ECS_ContainerInsights_StorageReadBytes_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_ECS_ContainerInsights_StorageReadBytes_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_ECS_ContainerInsights_StorageReadBytes_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "89f0e499",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "91ce3091",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "50782f6c",
"key": {
"dataType": "string",
"id": "ClusterName--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "ClusterName",
"type": "tag"
},
"op": "=",
"value": "$Cluster"
},
{
"id": "6eeed520",
"key": {
"dataType": "string",
"id": "ServiceName--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "ServiceName",
"type": "tag"
},
"op": "exists",
"value": ""
}
],
"op": "AND"
"filter": {
"expression": "(cloud.region = $Region AND cloud.account.id = $Account AND ClusterName = $Cluster AND ServiceName EXISTS)"
},
"functions": [],
"groupBy": [
@@ -1674,15 +1253,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{ServiceName}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -1787,74 +1365,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_ECS_ContainerInsights_StorageWriteBytes_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_ECS_ContainerInsights_StorageWriteBytes_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_ECS_ContainerInsights_StorageWriteBytes_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "edef4331",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "d6081c36",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "7ae5a9e4",
"key": {
"dataType": "string",
"id": "ClusterName--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "ClusterName",
"type": "tag"
},
"op": "=",
"value": "$Cluster"
},
{
"id": "5f7feeb2",
"key": {
"dataType": "string",
"id": "ServiceName--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "ServiceName",
"type": "tag"
},
"op": "exists",
"value": ""
}
],
"op": "AND"
"filter": {
"expression": "(cloud.region = $Region AND cloud.account.id = $Account AND ClusterName = $Cluster AND ServiceName EXISTS)"
},
"functions": [],
"groupBy": [
@@ -1867,15 +1390,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{ServiceName}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
}
],
"queryFormulas": []

View File

@@ -224,7 +224,6 @@
"metricName": "aws_ECS_ContainerInsights_ContainerCpuUtilization_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"temporality": "",
"timeAggregation": "max"
}
],
@@ -356,7 +355,6 @@
"metricName": "aws_ECS_ContainerInsights_ContainerCpuReserved_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"temporality": "",
"timeAggregation": "max"
}
],
@@ -488,7 +486,6 @@
"metricName": "aws_ECS_ContainerInsights_ContainerMemoryUtilization_max",
"reduceTo": "avg",
"spaceAggregation": "avg",
"temporality": "",
"timeAggregation": "avg"
}
],
@@ -620,7 +617,6 @@
"metricName": "aws_ECS_ContainerInsights_ContainerMemoryReserved_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"temporality": "",
"timeAggregation": "max"
}
],
@@ -752,7 +748,6 @@
"metricName": "aws_ECS_ContainerInsights_ContainerCpuUtilization_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"temporality": "",
"timeAggregation": "max"
}
],
@@ -893,7 +888,6 @@
"metricName": "aws_ECS_ContainerInsights_ContainerMemoryUtilization_max",
"reduceTo": "avg",
"spaceAggregation": "avg",
"temporality": "",
"timeAggregation": "avg"
}
],
@@ -1034,7 +1028,6 @@
"metricName": "aws_ECS_ContainerInsights_ContainerNetworkRxBytes_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"temporality": "",
"timeAggregation": "max"
}
],
@@ -1175,7 +1168,6 @@
"metricName": "aws_ECS_ContainerInsights_ContainerNetworkTxBytes_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"temporality": "",
"timeAggregation": "max"
}
],
@@ -1316,7 +1308,6 @@
"metricName": "aws_ECS_ContainerInsights_ContainerStorageReadBytes_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"temporality": "",
"timeAggregation": "max"
}
],
@@ -1457,7 +1448,6 @@
"metricName": "aws_ECS_ContainerInsights_ContainerStorageWriteBytes_max",
"reduceTo": "avg",
"spaceAggregation": "avg",
"temporality": "",
"timeAggregation": "avg"
}
],

View File

@@ -1,6 +1,6 @@
{
"description": "View key AWS ECS metrics with an out of the box dashboard.\n",
"image":"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2280px%22%20height%3D%2280px%22%20viewBox%3D%220%200%2080%2080%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%3C!--%20Generator%3A%20Sketch%2064%20(93537)%20-%20https%3A%2F%2Fsketch.com%20--%3E%3Ctitle%3EIcon-Architecture%2F64%2FArch_Amazon-Elastic-Container-Service_64%3C%2Ftitle%3E%3Cdesc%3ECreated%20with%20Sketch.%3C%2Fdesc%3E%3Cdefs%3E%3ClinearGradient%20x1%3D%220%25%22%20y1%3D%22100%25%22%20x2%3D%22100%25%22%20y2%3D%220%25%22%20id%3D%22linearGradient-1%22%3E%3Cstop%20stop-color%3D%22%23C8511B%22%20offset%3D%220%25%22%3E%3C%2Fstop%3E%3Cstop%20stop-color%3D%22%23FF9900%22%20offset%3D%22100%25%22%3E%3C%2Fstop%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Cg%20id%3D%22Icon-Architecture%2F64%2FArch_Amazon-Elastic-Container-Service_64%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Cg%20id%3D%22Icon-Architecture-BG%2F64%2FContainers%22%20fill%3D%22url(%23linearGradient-1)%22%3E%3Crect%20id%3D%22Rectangle%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2280%22%20height%3D%2280%22%3E%3C%2Frect%3E%3C%2Fg%3E%3Cpath%20d%3D%22M64%2C48.2340095%20L56%2C43.4330117%20L56%2C32.0000169%20C56%2C31.6440171%2055.812%2C31.3150172%2055.504%2C31.1360173%20L44%2C24.4260204%20L44%2C14.7520248%20L64%2C26.5710194%20L64%2C48.2340095%20Z%20M65.509%2C25.13902%20L43.509%2C12.139026%20C43.199%2C11.9560261%2042.818%2C11.9540261%2042.504%2C12.131026%20C42.193%2C12.3090259%2042%2C12.6410257%2042%2C13.0000256%20L42%2C25.0000201%20C42%2C25.3550199%2042.189%2C25.6840198%2042.496%2C25.8640197%20L54%2C32.5740166%20L54%2C44.0000114%20C54%2C44.3510113%2054.185%2C44.6770111%2054.486%2C44.857011%20L64.486%2C50.8570083%20C64.644%2C50.9520082%2064.822%2C51%2065%2C51%20C65.17%2C51%2065.34%2C50.9570082%2065.493%2C50.8700083%20C65.807%2C50.6930084%2066%2C50.3600085%2066%2C50%20L66%2C26.0000196%20C66%2C25.6460198%2065.814%2C25.31902%2065.509%2C25.13902%20L65.509%2C25.13902%20Z%20M40.445%2C66.863001%20L17%2C54.3990067%20L17%2C26.5710194%20L37%2C14.7520248%20L37%2C24.4510204%20L26.463%2C31.1560173%20C26.175%2C31.3400172%2026%2C31.6580171%2026%2C32.0000169%20L26%2C49.0000091%20C26%2C49.373009%2026.208%2C49.7150088%2026.538%2C49.8870087%20L39.991%2C56.8870055%20C40.28%2C57.0370055%2040.624%2C57.0380055%2040.912%2C56.8880055%20L53.964%2C50.1440086%20L61.996%2C54.9640064%20L40.445%2C66.863001%20Z%20M64.515%2C54.1420068%20L54.515%2C48.1420095%20C54.217%2C47.9640096%2053.849%2C47.9520096%2053.541%2C48.1120095%20L40.455%2C54.8730065%20L28%2C48.3930094%20L28%2C32.5490167%20L38.537%2C25.8440197%20C38.825%2C25.6600198%2039%2C25.3420199%2039%2C25.0000201%20L39%2C13.0000256%20C39%2C12.6410257%2038.808%2C12.3090259%2038.496%2C12.131026%20C38.184%2C11.9540261%2037.802%2C11.9560261%2037.491%2C12.139026%20L15.491%2C25.13902%20C15.187%2C25.31902%2015%2C25.6460198%2015%2C26.0000196%20L15%2C55%20C15%2C55.3690062%2015.204%2C55.7090061%2015.53%2C55.883006%20L39.984%2C68.8830001%20C40.131%2C68.961%2040.292%2C69%2040.453%2C69%20C40.62%2C69%2040.786%2C68.958%2040.937%2C68.8750001%20L64.484%2C55.875006%20C64.797%2C55.7020061%2064.993%2C55.3750062%2065.0001416%2C55.0180064%20C65.006%2C54.6600066%2064.821%2C54.3260067%2064.515%2C54.1420068%20L64.515%2C54.1420068%20Z%22%20id%3D%22Amazon-Elastic-Container-Service_Icon_64_Squid%22%20fill%3D%22%23FFFFFF%22%3E%3C%2Fpath%3E%3C%2Fg%3E%3C%2Fsvg%3E",
"image": "data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2280px%22%20height%3D%2280px%22%20viewBox%3D%220%200%2080%2080%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%3C!--%20Generator%3A%20Sketch%2064%20(93537)%20-%20https%3A%2F%2Fsketch.com%20--%3E%3Ctitle%3EIcon-Architecture%2F64%2FArch_Amazon-Elastic-Container-Service_64%3C%2Ftitle%3E%3Cdesc%3ECreated%20with%20Sketch.%3C%2Fdesc%3E%3Cdefs%3E%3ClinearGradient%20x1%3D%220%25%22%20y1%3D%22100%25%22%20x2%3D%22100%25%22%20y2%3D%220%25%22%20id%3D%22linearGradient-1%22%3E%3Cstop%20stop-color%3D%22%23C8511B%22%20offset%3D%220%25%22%3E%3C%2Fstop%3E%3Cstop%20stop-color%3D%22%23FF9900%22%20offset%3D%22100%25%22%3E%3C%2Fstop%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Cg%20id%3D%22Icon-Architecture%2F64%2FArch_Amazon-Elastic-Container-Service_64%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Cg%20id%3D%22Icon-Architecture-BG%2F64%2FContainers%22%20fill%3D%22url(%23linearGradient-1)%22%3E%3Crect%20id%3D%22Rectangle%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2280%22%20height%3D%2280%22%3E%3C%2Frect%3E%3C%2Fg%3E%3Cpath%20d%3D%22M64%2C48.2340095%20L56%2C43.4330117%20L56%2C32.0000169%20C56%2C31.6440171%2055.812%2C31.3150172%2055.504%2C31.1360173%20L44%2C24.4260204%20L44%2C14.7520248%20L64%2C26.5710194%20L64%2C48.2340095%20Z%20M65.509%2C25.13902%20L43.509%2C12.139026%20C43.199%2C11.9560261%2042.818%2C11.9540261%2042.504%2C12.131026%20C42.193%2C12.3090259%2042%2C12.6410257%2042%2C13.0000256%20L42%2C25.0000201%20C42%2C25.3550199%2042.189%2C25.6840198%2042.496%2C25.8640197%20L54%2C32.5740166%20L54%2C44.0000114%20C54%2C44.3510113%2054.185%2C44.6770111%2054.486%2C44.857011%20L64.486%2C50.8570083%20C64.644%2C50.9520082%2064.822%2C51%2065%2C51%20C65.17%2C51%2065.34%2C50.9570082%2065.493%2C50.8700083%20C65.807%2C50.6930084%2066%2C50.3600085%2066%2C50%20L66%2C26.0000196%20C66%2C25.6460198%2065.814%2C25.31902%2065.509%2C25.13902%20L65.509%2C25.13902%20Z%20M40.445%2C66.863001%20L17%2C54.3990067%20L17%2C26.5710194%20L37%2C14.7520248%20L37%2C24.4510204%20L26.463%2C31.1560173%20C26.175%2C31.3400172%2026%2C31.6580171%2026%2C32.0000169%20L26%2C49.0000091%20C26%2C49.373009%2026.208%2C49.7150088%2026.538%2C49.8870087%20L39.991%2C56.8870055%20C40.28%2C57.0370055%2040.624%2C57.0380055%2040.912%2C56.8880055%20L53.964%2C50.1440086%20L61.996%2C54.9640064%20L40.445%2C66.863001%20Z%20M64.515%2C54.1420068%20L54.515%2C48.1420095%20C54.217%2C47.9640096%2053.849%2C47.9520096%2053.541%2C48.1120095%20L40.455%2C54.8730065%20L28%2C48.3930094%20L28%2C32.5490167%20L38.537%2C25.8440197%20C38.825%2C25.6600198%2039%2C25.3420199%2039%2C25.0000201%20L39%2C13.0000256%20C39%2C12.6410257%2038.808%2C12.3090259%2038.496%2C12.131026%20C38.184%2C11.9540261%2037.802%2C11.9560261%2037.491%2C12.139026%20L15.491%2C25.13902%20C15.187%2C25.31902%2015%2C25.6460198%2015%2C26.0000196%20L15%2C55%20C15%2C55.3690062%2015.204%2C55.7090061%2015.53%2C55.883006%20L39.984%2C68.8830001%20C40.131%2C68.961%2040.292%2C69%2040.453%2C69%20C40.62%2C69%2040.786%2C68.958%2040.937%2C68.8750001%20L64.484%2C55.875006%20C64.797%2C55.7020061%2064.993%2C55.3750062%2065.0001416%2C55.0180064%20C65.006%2C54.6600066%2064.821%2C54.3260067%2064.515%2C54.1420068%20L64.515%2C54.1420068%20Z%22%20id%3D%22Amazon-Elastic-Container-Service_Icon_64_Squid%22%20fill%3D%22%23FFFFFF%22%3E%3C%2Fpath%3E%3C%2Fg%3E%3C%2Fsvg%3E",
"layout": [
{
"h": 6,
@@ -93,7 +93,7 @@
"type": "QUERY"
}
},
"version": "v4",
"version": "v5",
"widgets": [
{
"bucketCount": 30,
@@ -112,63 +112,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_ECS_MemoryUtilization_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_ECS_MemoryUtilization_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_ECS_MemoryUtilization_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "26ac617d",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "57172ed9",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "49b9f85e",
"key": {
"dataType": "string",
"id": "ClusterName--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "ClusterName",
"type": "tag"
},
"op": "in",
"value": [
"$Cluster"
]
}
],
"op": "AND"
"filter": {
"expression": "(cloud.region = $Region AND cloud.account.id = $Account AND ClusterName IN $Cluster)"
},
"functions": [],
"groupBy": [
@@ -189,15 +145,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{ServiceName}} ({{ClusterName}})",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -300,63 +255,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_ECS_MemoryUtilization_min--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_ECS_MemoryUtilization_min",
"type": "Gauge"
},
"aggregateOperator": "min",
"aggregations": [
{
"metricName": "aws_ECS_MemoryUtilization_min",
"reduceTo": "avg",
"spaceAggregation": "min",
"timeAggregation": "min"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "cd4b8848",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "aa5115c6",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "f60677b6",
"key": {
"dataType": "string",
"id": "ClusterName--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "ClusterName",
"type": "tag"
},
"op": "in",
"value": [
"$Cluster"
]
}
],
"op": "AND"
"filter": {
"expression": "(cloud.region = $Region AND cloud.account.id = $Account AND ClusterName IN $Cluster)"
},
"functions": [],
"groupBy": [
@@ -377,15 +288,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{ServiceName}} ({{ClusterName}})",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "min",
"stepInterval": 60,
"timeAggregation": "min"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -488,63 +398,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_ECS_CPUUtilization_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_ECS_CPUUtilization_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_ECS_CPUUtilization_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "2c13c8ee",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "f489f6a8",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "94012320",
"key": {
"dataType": "string",
"id": "ClusterName--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "ClusterName",
"type": "tag"
},
"op": "in",
"value": [
"$Cluster"
]
}
],
"op": "AND"
"filter": {
"expression": "(cloud.region = $Region AND cloud.account.id = $Account AND ClusterName IN $Cluster)"
},
"functions": [],
"groupBy": [
@@ -565,15 +431,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{ServiceName}} ({{ClusterName}})",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -676,63 +541,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_ECS_CPUUtilization_min--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_ECS_CPUUtilization_min",
"type": "Gauge"
},
"aggregateOperator": "min",
"aggregations": [
{
"metricName": "aws_ECS_CPUUtilization_min",
"reduceTo": "avg",
"spaceAggregation": "min",
"timeAggregation": "min"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "758ba906",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "4ffe6bf7",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "53d98059",
"key": {
"dataType": "string",
"id": "ClusterName--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "ClusterName",
"type": "tag"
},
"op": "in",
"value": [
"$Cluster"
]
}
],
"op": "AND"
"filter": {
"expression": "(cloud.region = $Region AND cloud.account.id = $Account AND ClusterName IN $Cluster)"
},
"functions": [],
"groupBy": [
@@ -753,15 +574,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{ServiceName}} ({{ClusterName}})",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "min",
"stepInterval": 60,
"timeAggregation": "min"
"stepInterval": 60
}
],
"queryFormulas": []

View File

@@ -103,7 +103,7 @@
"type": "QUERY"
}
},
"version": "v4",
"version": "v5",
"widgets": [
{
"bucketCount": 30,
@@ -121,70 +121,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_Lambda_Invocations_sum--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_Lambda_Invocations_sum",
"type": "Gauge"
},
"aggregateOperator": "sum",
"aggregations": [
{
"metricName": "aws_Lambda_Invocations_sum",
"reduceTo": "avg",
"spaceAggregation": "sum",
"timeAggregation": "sum"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "49d33567",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "b9dfa1c9",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "86defeb5",
"key": {
"dataType": "",
"isColumn": false,
"key": "FunctionName",
"type": ""
},
"op": "exists",
"value": ""
},
{
"id": "f89a10c4",
"key": {
"dataType": "",
"isColumn": false,
"key": "Resource",
"type": ""
},
"op": "nexists",
"value": ""
}
],
"op": "AND"
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND FunctionName EXISTS AND Resource NOT EXISTS)"
},
"functions": [],
"groupBy": [
@@ -213,15 +162,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{FunctionName}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "sum",
"stepInterval": 60,
"timeAggregation": "sum"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -323,74 +271,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_Lambda_Duration_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_Lambda_Duration_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_Lambda_Duration_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "af05252d",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "983efea5",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "88eb3092",
"key": {
"dataType": "string",
"id": "FunctionName--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "FunctionName",
"type": "tag"
},
"op": "exists",
"value": ""
},
{
"id": "a35c6406",
"key": {
"dataType": "string",
"id": "Resource--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "Resource",
"type": "tag"
},
"op": "nexists",
"value": ""
}
],
"op": "AND"
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND FunctionName EXISTS AND Resource NOT EXISTS)"
},
"functions": [],
"groupBy": [
@@ -419,15 +312,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{FunctionName}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -529,74 +421,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_Lambda_Errors_sum--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_Lambda_Errors_sum",
"type": "Gauge"
},
"aggregateOperator": "sum",
"aggregations": [
{
"metricName": "aws_Lambda_Errors_sum",
"reduceTo": "avg",
"spaceAggregation": "sum",
"timeAggregation": "sum"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "c67262c9",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "c5ccbbf4",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "c1b278d1",
"key": {
"dataType": "string",
"id": "FunctionName--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "FunctionName",
"type": "tag"
},
"op": "exists",
"value": ""
},
{
"id": "a45d80e1",
"key": {
"dataType": "string",
"id": "Resource--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "Resource",
"type": "tag"
},
"op": "nexists",
"value": ""
}
],
"op": "AND"
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND FunctionName EXISTS AND Resource NOT EXISTS)"
},
"functions": [],
"groupBy": [
@@ -625,15 +462,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{FunctionName}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "sum",
"stepInterval": 60,
"timeAggregation": "sum"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -735,74 +571,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_Lambda_Throttles_sum--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_Lambda_Throttles_sum",
"type": "Gauge"
},
"aggregateOperator": "sum",
"aggregations": [
{
"metricName": "aws_Lambda_Throttles_sum",
"reduceTo": "avg",
"spaceAggregation": "sum",
"timeAggregation": "sum"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "6c956b7d",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "5fef840b",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "6f892a9a",
"key": {
"dataType": "string",
"id": "FunctionName--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "FunctionName",
"type": "tag"
},
"op": "exists",
"value": ""
},
{
"id": "ce91320c",
"key": {
"dataType": "string",
"id": "Resource--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "Resource",
"type": "tag"
},
"op": "nexists",
"value": ""
}
],
"op": "AND"
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND FunctionName EXISTS AND Resource NOT EXISTS)"
},
"functions": [],
"groupBy": [
@@ -831,15 +612,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{FunctionName}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "sum",
"stepInterval": 60,
"timeAggregation": "sum"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -941,74 +721,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_Lambda_AsyncEventsReceived_sum--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_Lambda_AsyncEventsReceived_sum",
"type": "Gauge"
},
"aggregateOperator": "sum",
"aggregations": [
{
"metricName": "aws_Lambda_AsyncEventsReceived_sum",
"reduceTo": "avg",
"spaceAggregation": "sum",
"timeAggregation": "sum"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "f4c6246b",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "5b7a75a1",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "4e1ba051",
"key": {
"dataType": "string",
"id": "FunctionName--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "FunctionName",
"type": "tag"
},
"op": "exists",
"value": ""
},
{
"id": "5848f496",
"key": {
"dataType": "string",
"id": "Resource--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "Resource",
"type": "tag"
},
"op": "nexists",
"value": ""
}
],
"op": "AND"
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND FunctionName EXISTS AND Resource NOT EXISTS)"
},
"functions": [],
"groupBy": [
@@ -1037,15 +762,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{FunctionName}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "sum",
"stepInterval": 60,
"timeAggregation": "sum"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -1147,74 +871,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_Lambda_AsyncEventAge_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_Lambda_AsyncEventAge_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_Lambda_AsyncEventAge_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "1aee3626",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "11631fda",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "c5ea0a17",
"key": {
"dataType": "string",
"id": "FunctionName--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "FunctionName",
"type": "tag"
},
"op": "exists",
"value": ""
},
{
"id": "1952b27e",
"key": {
"dataType": "string",
"id": "Resource--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "Resource",
"type": "tag"
},
"op": "nexists",
"value": ""
}
],
"op": "AND"
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND FunctionName EXISTS AND Resource NOT EXISTS)"
},
"functions": [],
"groupBy": [
@@ -1243,15 +912,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{FunctionName}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -1353,74 +1021,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_Lambda_AsyncEventsDropped_sum--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_Lambda_AsyncEventsDropped_sum",
"type": "Gauge"
},
"aggregateOperator": "sum",
"aggregations": [
{
"metricName": "aws_Lambda_AsyncEventsDropped_sum",
"reduceTo": "avg",
"spaceAggregation": "sum",
"timeAggregation": "sum"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "a8c65389",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "2ab205c8",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "22d3c9b6",
"key": {
"dataType": "string",
"id": "FunctionName--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "FunctionName",
"type": "tag"
},
"op": "exists",
"value": ""
},
{
"id": "1e7060a6",
"key": {
"dataType": "string",
"id": "Resource--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "Resource",
"type": "tag"
},
"op": "nexists",
"value": ""
}
],
"op": "AND"
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND FunctionName EXISTS AND Resource NOT EXISTS)"
},
"functions": [],
"groupBy": [
@@ -1449,15 +1062,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{FunctionName}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "sum",
"stepInterval": 60,
"timeAggregation": "sum"
"stepInterval": 60
}
],
"queryFormulas": []

View File

@@ -94,7 +94,7 @@
"type": "QUERY"
}
},
"version": "v4",
"version": "v5",
"widgets": [
{
"bucketCount": 30,
@@ -112,61 +112,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_Kafka_KafkaDataLogsDiskUsed_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_Kafka_KafkaDataLogsDiskUsed_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_Kafka_KafkaDataLogsDiskUsed_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "be8452fb",
"key": {
"dataType": "string",
"id": "Broker_ID--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "Broker_ID",
"type": "tag"
},
"op": "exists",
"value": ""
},
{
"id": "8b658843",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "9cbc21ee",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
}
],
"op": "AND"
"filter": {
"expression": "(Broker_ID EXISTS AND cloud.account.id = $Account AND cloud.region = $Region)"
},
"functions": [],
"groupBy": [
@@ -187,15 +145,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "Broker {{Broker_ID}} ({{Cluster_Name}})",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -297,61 +254,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_Kafka_CpuUser_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_Kafka_CpuUser_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_Kafka_CpuUser_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "03054a63",
"key": {
"dataType": "string",
"id": "Broker_ID--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "Broker_ID",
"type": "tag"
},
"op": "exists",
"value": ""
},
{
"id": "754c3c99",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "09ad3a79",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
}
],
"op": "AND"
"filter": {
"expression": "(Broker_ID EXISTS AND cloud.account.id = $Account AND cloud.region = $Region)"
},
"functions": [],
"groupBy": [
@@ -372,15 +287,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "Broker {{Broker_ID}} ({{Cluster_Name}})",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -482,61 +396,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_Kafka_CpuSystem_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_Kafka_CpuSystem_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_Kafka_CpuSystem_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "1c4feb03",
"key": {
"dataType": "string",
"id": "Broker_ID--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "Broker_ID",
"type": "tag"
},
"op": "exists",
"value": ""
},
{
"id": "3e5db1d7",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "9e9bf94c",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
}
],
"op": "AND"
"filter": {
"expression": "(Broker_ID EXISTS AND cloud.account.id = $Account AND cloud.region = $Region)"
},
"functions": [],
"groupBy": [
@@ -557,15 +429,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "Broker {{Broker_ID}} ({{Cluster_Name}})",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -667,61 +538,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_Kafka_NetworkTxPackets_sum--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_Kafka_NetworkTxPackets_sum",
"type": "Gauge"
},
"aggregateOperator": "sum",
"aggregations": [
{
"metricName": "aws_Kafka_NetworkTxPackets_sum",
"reduceTo": "avg",
"spaceAggregation": "sum",
"timeAggregation": "sum"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "df3f9941",
"key": {
"dataType": "string",
"id": "Broker_ID--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "Broker_ID",
"type": "tag"
},
"op": "exists",
"value": ""
},
{
"id": "2233f9a5",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "52bd69d4",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
}
],
"op": "AND"
"filter": {
"expression": "(Broker_ID EXISTS AND cloud.region = $Region AND cloud.account.id = $Account)"
},
"functions": [],
"groupBy": [
@@ -742,15 +571,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "Broker {{Broker_ID}} ({{Cluster_Name}})",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "sum",
"stepInterval": 60,
"timeAggregation": "sum"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -852,61 +680,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_Kafka_NetworkRxPackets_sum--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_Kafka_NetworkRxPackets_sum",
"type": "Gauge"
},
"aggregateOperator": "sum",
"aggregations": [
{
"metricName": "aws_Kafka_NetworkRxPackets_sum",
"reduceTo": "avg",
"spaceAggregation": "sum",
"timeAggregation": "sum"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "a00425be",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "726d60d7",
"key": {
"dataType": "string",
"id": "Broker_ID--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "Broker_ID",
"type": "tag"
},
"op": "exists",
"value": ""
},
{
"id": "02adea69",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
}
],
"op": "AND"
"filter": {
"expression": "(cloud.region = $Region AND Broker_ID EXISTS AND cloud.account.id = $Account)"
},
"functions": [],
"groupBy": [
@@ -927,15 +713,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "Broker {{Broker_ID}} ({{Cluster_Name}})",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "sum",
"stepInterval": 60,
"timeAggregation": "sum"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -1037,48 +822,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_Kafka_SumOffsetLag_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_Kafka_SumOffsetLag_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_Kafka_SumOffsetLag_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "0626eebd",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "b633d867",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
}
],
"op": "AND"
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region)"
},
"functions": [],
"groupBy": [
@@ -1091,15 +847,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "({{Cluster_Name}})",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
}
],
"queryFormulas": []

View File

@@ -113,7 +113,7 @@
"type": "QUERY"
}
},
"version": "v4",
"version": "v5",
"widgets": [
{
"bucketCount": 30,
@@ -131,61 +131,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_RDS_CPUUtilization_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_RDS_CPUUtilization_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_RDS_CPUUtilization_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "f8e72efc",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "4e68256a",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "a5082e1b",
"key": {
"dataType": "string",
"id": "DBInstanceIdentifier--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "DBInstanceIdentifier",
"type": "tag"
},
"op": "!=",
"value": ""
}
],
"op": "AND"
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND DBInstanceIdentifier != '')"
},
"functions": [],
"groupBy": [
@@ -214,15 +172,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{DBInstanceIdentifier}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -324,61 +281,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_RDS_FreeableMemory_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_RDS_FreeableMemory_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_RDS_FreeableMemory_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "723ba84a",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "f8227b55",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "3951e8ed",
"key": {
"dataType": "string",
"id": "DBInstanceIdentifier--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "DBInstanceIdentifier",
"type": "tag"
},
"op": "!=",
"value": ""
}
],
"op": "AND"
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND DBInstanceIdentifier != '')"
},
"functions": [],
"groupBy": [
@@ -407,15 +322,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{DBInstanceIdentifier}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -517,61 +431,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_RDS_DatabaseConnections_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_RDS_DatabaseConnections_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_RDS_DatabaseConnections_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "31191f74",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "aa644bbf",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "e5b31a18",
"key": {
"dataType": "string",
"id": "DBInstanceIdentifier--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "DBInstanceIdentifier",
"type": "tag"
},
"op": "!=",
"value": ""
}
],
"op": "AND"
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND DBInstanceIdentifier != '')"
},
"functions": [],
"groupBy": [
@@ -600,15 +472,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{DBInstanceIdentifier}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -710,61 +581,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_RDS_ReadLatency_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_RDS_ReadLatency_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_RDS_ReadLatency_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "83f232af",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "2677873f",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "78eddd81",
"key": {
"dataType": "string",
"id": "DBInstanceIdentifier--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "DBInstanceIdentifier",
"type": "tag"
},
"op": "!=",
"value": ""
}
],
"op": "AND"
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND DBInstanceIdentifier != '')"
},
"functions": [],
"groupBy": [
@@ -793,72 +622,29 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{DBInstanceIdentifier}} - Reads",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
},
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_RDS_WriteLatency_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_RDS_WriteLatency_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_RDS_WriteLatency_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "B",
"filters": {
"items": [
{
"id": "e2df7981",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "6daad748",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "28057159",
"key": {
"dataType": "string",
"id": "DBInstanceIdentifier--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "DBInstanceIdentifier",
"type": "tag"
},
"op": "!=",
"value": ""
}
],
"op": "AND"
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND DBInstanceIdentifier != '')"
},
"functions": [],
"groupBy": [
@@ -887,15 +673,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{DBInstanceIdentifier}} - Writes",
"limit": null,
"orderBy": [],
"queryName": "B",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -997,61 +782,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_RDS_ReadIOPS_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_RDS_ReadIOPS_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_RDS_ReadIOPS_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "17142c3d",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "27fcc87d",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "5510ad1d",
"key": {
"dataType": "string",
"id": "DBInstanceIdentifier--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "DBInstanceIdentifier",
"type": "tag"
},
"op": "!=",
"value": ""
}
],
"op": "AND"
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND DBInstanceIdentifier != '')"
},
"functions": [],
"groupBy": [
@@ -1080,72 +823,29 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{DBInstanceIdentifier}} - Reads",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
},
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_RDS_WriteIOPS_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_RDS_WriteIOPS_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_RDS_WriteIOPS_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "B",
"filters": {
"items": [
{
"id": "a050e23a",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "6df80990",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "72bc50d0",
"key": {
"dataType": "string",
"id": "DBInstanceIdentifier--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "DBInstanceIdentifier",
"type": "tag"
},
"op": "!=",
"value": ""
}
],
"op": "AND"
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND DBInstanceIdentifier != '')"
},
"functions": [],
"groupBy": [
@@ -1174,15 +874,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{DBInstanceIdentifier}} - Writes",
"limit": null,
"orderBy": [],
"queryName": "B",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -1284,61 +983,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_RDS_ReadThroughput_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_RDS_ReadThroughput_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_RDS_ReadThroughput_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "a298d4bd",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "810c0586",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "fa40ae81",
"key": {
"dataType": "string",
"id": "DBInstanceIdentifier--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "DBInstanceIdentifier",
"type": "tag"
},
"op": "!=",
"value": ""
}
],
"op": "AND"
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND DBInstanceIdentifier != '')"
},
"functions": [],
"groupBy": [
@@ -1367,72 +1024,29 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{DBInstanceIdentifier}} - Reads",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
},
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_RDS_WriteThroughput_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_RDS_WriteThroughput_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_RDS_WriteThroughput_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "B",
"filters": {
"items": [
{
"id": "d46f3f53",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "4ec47a19",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "a0e648d6",
"key": {
"dataType": "string",
"id": "DBInstanceIdentifier--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "DBInstanceIdentifier",
"type": "tag"
},
"op": "!=",
"value": ""
}
],
"op": "AND"
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND DBInstanceIdentifier != '')"
},
"functions": [],
"groupBy": [
@@ -1461,15 +1075,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{DBInstanceIdentifier}} - Writes",
"limit": null,
"orderBy": [],
"queryName": "B",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -1571,61 +1184,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_RDS_DiskQueueDepth_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_RDS_DiskQueueDepth_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_RDS_DiskQueueDepth_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "f64f0096",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "18ad7c1e",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "5d3f4963",
"key": {
"dataType": "string",
"id": "DBInstanceIdentifier--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "DBInstanceIdentifier",
"type": "tag"
},
"op": "!=",
"value": ""
}
],
"op": "AND"
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND DBInstanceIdentifier != '')"
},
"functions": [],
"groupBy": [
@@ -1654,15 +1225,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{DBInstanceIdentifier}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -1764,61 +1334,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_RDS_FreeStorageSpace_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_RDS_FreeStorageSpace_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_RDS_FreeStorageSpace_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "7786e529",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
},
{
"id": "f27b4616",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "51ca6d55",
"key": {
"dataType": "string",
"id": "DBInstanceIdentifier--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "DBInstanceIdentifier",
"type": "tag"
},
"op": "!=",
"value": ""
}
],
"op": "AND"
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND DBInstanceIdentifier != '')"
},
"functions": [],
"groupBy": [
@@ -1847,15 +1375,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{DBInstanceIdentifier}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
}
],
"queryFormulas": []

View File

@@ -92,7 +92,7 @@
"type": "QUERY"
}
},
"version": "v4",
"version": "v5",
"widgets": [
{
"bucketCount": 30,
@@ -111,63 +111,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_SNS_NumberOfMessagesPublished_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_SNS_NumberOfMessagesPublished_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_SNS_NumberOfMessagesPublished_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "8fd51b53",
"key": {
"dataType": "string",
"id": "TopicName--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "TopicName",
"type": "tag"
},
"op": "in",
"value": [
"$Topic"
]
},
{
"id": "b18187c3",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "eebe4578",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
}
],
"op": "AND"
"filter": {
"expression": "(TopicName IN $Topic AND cloud.region = $Region AND cloud.account.id = $Account)"
},
"functions": [],
"groupBy": [
@@ -180,15 +136,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{TopicName}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -291,63 +246,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_SNS_PublishSize_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_SNS_PublishSize_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_SNS_PublishSize_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "1aa0d1a9",
"key": {
"dataType": "string",
"id": "TopicName--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "TopicName",
"type": "tag"
},
"op": "in",
"value": [
"$Topic"
]
},
{
"id": "62255cff",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "17c7153e",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
}
],
"op": "AND"
"filter": {
"expression": "(TopicName IN $Topic AND cloud.region = $Region AND cloud.account.id = $Account)"
},
"functions": [],
"groupBy": [
@@ -360,15 +271,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{TopicName}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -471,63 +381,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_SNS_NumberOfNotificationsDelivered_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_SNS_NumberOfNotificationsDelivered_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_SNS_NumberOfNotificationsDelivered_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "c96a4ac0",
"key": {
"dataType": "string",
"id": "TopicName--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "TopicName",
"type": "tag"
},
"op": "in",
"value": [
"$Topic"
]
},
{
"id": "8ca86829",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "8a444f66",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
}
],
"op": "AND"
"filter": {
"expression": "(TopicName IN $Topic AND cloud.region = $Region AND cloud.account.id = $Account)"
},
"functions": [],
"groupBy": [
@@ -540,15 +406,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{TopicName}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
}
],
"queryFormulas": []
@@ -651,63 +516,19 @@
"builder": {
"queryData": [
{
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_SNS_NumberOfNotificationsFailed_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_SNS_NumberOfNotificationsFailed_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"aggregations": [
{
"metricName": "aws_SNS_NumberOfNotificationsFailed_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filters": {
"items": [
{
"id": "6175f3d5",
"key": {
"dataType": "string",
"id": "TopicName--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "TopicName",
"type": "tag"
},
"op": "in",
"value": [
"$Topic"
]
},
{
"id": "e2084931",
"key": {
"dataType": "string",
"id": "cloud.region--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.region",
"type": "tag"
},
"op": "=",
"value": "$Region"
},
{
"id": "0b05209a",
"key": {
"dataType": "string",
"id": "cloud.account.id--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "cloud.account.id",
"type": "tag"
},
"op": "=",
"value": "$Account"
}
],
"op": "AND"
"filter": {
"expression": "(TopicName IN $Topic AND cloud.region = $Region AND cloud.account.id = $Account)"
},
"functions": [],
"groupBy": [
@@ -720,15 +541,14 @@
"type": "tag"
}
],
"having": [],
"having": {
"expression": ""
},
"legend": "{{TopicName}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
"stepInterval": 60
}
],
"queryFormulas": []

View File

@@ -313,7 +313,6 @@
"metricName": "azure_totallatency_average",
"reduceTo": "avg",
"spaceAggregation": "max",
"temporality": "",
"timeAggregation": "avg"
}
],
@@ -323,35 +322,6 @@
"filter": {
"expression": "azuremonitor.subscription_id = $azuremonitor.subscription_id AND resource_group = $resource_group AND name IN $cdnprofile AND type = 'Microsoft.Cdn/profiles'"
},
"filters": {
"items": [
{
"id": "f001-name",
"key": { "dataType": "string", "id": "name--string--", "key": "name", "type": "" },
"op": "IN",
"value": "$cdnprofile"
},
{
"id": "f001-sub",
"key": { "id": "azuremonitor.subscription_id", "key": "azuremonitor.subscription_id", "type": "" },
"op": "=",
"value": "$azuremonitor.subscription_id"
},
{
"id": "f001-rg",
"key": { "id": "resource_group", "key": "resource_group", "type": "" },
"op": "=",
"value": "$resource_group"
},
{
"id": "f001-type",
"key": { "id": "type", "key": "type", "type": "" },
"op": "=",
"value": "Microsoft.Cdn/profiles"
}
],
"op": "AND"
},
"functions": [],
"groupBy": [
{
@@ -430,7 +400,6 @@
"metricName": "azure_originlatency_average",
"reduceTo": "avg",
"spaceAggregation": "max",
"temporality": "",
"timeAggregation": "avg"
}
],
@@ -440,35 +409,6 @@
"filter": {
"expression": "azuremonitor.subscription_id = $azuremonitor.subscription_id AND resource_group = $resource_group AND name IN $cdnprofile AND type = 'Microsoft.Cdn/profiles'"
},
"filters": {
"items": [
{
"id": "f002-name",
"key": { "dataType": "string", "id": "name--string--", "key": "name", "type": "" },
"op": "IN",
"value": "$cdnprofile"
},
{
"id": "f002-sub",
"key": { "id": "azuremonitor.subscription_id", "key": "azuremonitor.subscription_id", "type": "" },
"op": "=",
"value": "$azuremonitor.subscription_id"
},
{
"id": "f002-rg",
"key": { "id": "resource_group", "key": "resource_group", "type": "" },
"op": "=",
"value": "$resource_group"
},
{
"id": "f002-type",
"key": { "id": "type", "key": "type", "type": "" },
"op": "=",
"value": "Microsoft.Cdn/profiles"
}
],
"op": "AND"
},
"functions": [],
"groupBy": [
{
@@ -547,7 +487,6 @@
"metricName": "azure_averagewebsocketconnectionduration_average",
"reduceTo": "avg",
"spaceAggregation": "avg",
"temporality": "",
"timeAggregation": "avg"
}
],
@@ -557,35 +496,6 @@
"filter": {
"expression": "azuremonitor.subscription_id = $azuremonitor.subscription_id AND resource_group = $resource_group AND name IN $cdnprofile AND type = 'Microsoft.Cdn/profiles'"
},
"filters": {
"items": [
{
"id": "f003-name",
"key": { "dataType": "string", "id": "name--string--", "key": "name", "type": "" },
"op": "IN",
"value": "$cdnprofile"
},
{
"id": "f003-sub",
"key": { "id": "azuremonitor.subscription_id", "key": "azuremonitor.subscription_id", "type": "" },
"op": "=",
"value": "$azuremonitor.subscription_id"
},
{
"id": "f003-rg",
"key": { "id": "resource_group", "key": "resource_group", "type": "" },
"op": "=",
"value": "$resource_group"
},
{
"id": "f003-type",
"key": { "id": "type", "key": "type", "type": "" },
"op": "=",
"value": "Microsoft.Cdn/profiles"
}
],
"op": "AND"
},
"functions": [],
"groupBy": [
{
@@ -669,7 +579,6 @@
"metricName": "azure_originhealthpercentage_average",
"reduceTo": "avg",
"spaceAggregation": "avg",
"temporality": "",
"timeAggregation": "avg"
}
],
@@ -679,35 +588,6 @@
"filter": {
"expression": "azuremonitor.subscription_id = $azuremonitor.subscription_id AND resource_group = $resource_group AND name IN $cdnprofile AND type = 'Microsoft.Cdn/profiles'"
},
"filters": {
"items": [
{
"id": "f004-name",
"key": { "dataType": "string", "id": "name--string--", "key": "name", "type": "" },
"op": "IN",
"value": "$cdnprofile"
},
{
"id": "f004-sub",
"key": { "id": "azuremonitor.subscription_id", "key": "azuremonitor.subscription_id", "type": "" },
"op": "=",
"value": "$azuremonitor.subscription_id"
},
{
"id": "f004-rg",
"key": { "id": "resource_group", "key": "resource_group", "type": "" },
"op": "=",
"value": "$resource_group"
},
{
"id": "f004-type",
"key": { "id": "type", "key": "type", "type": "" },
"op": "=",
"value": "Microsoft.Cdn/profiles"
}
],
"op": "AND"
},
"functions": [],
"groupBy": [
{
@@ -791,7 +671,6 @@
"metricName": "azure_bytehitratio_average",
"reduceTo": "avg",
"spaceAggregation": "avg",
"temporality": "",
"timeAggregation": "avg"
}
],
@@ -801,35 +680,6 @@
"filter": {
"expression": "azuremonitor.subscription_id = $azuremonitor.subscription_id AND resource_group = $resource_group AND name IN $cdnprofile AND type = 'Microsoft.Cdn/profiles'"
},
"filters": {
"items": [
{
"id": "f005-name",
"key": { "dataType": "string", "id": "name--string--", "key": "name", "type": "" },
"op": "IN",
"value": "$cdnprofile"
},
{
"id": "f005-sub",
"key": { "id": "azuremonitor.subscription_id", "key": "azuremonitor.subscription_id", "type": "" },
"op": "=",
"value": "$azuremonitor.subscription_id"
},
{
"id": "f005-rg",
"key": { "id": "resource_group", "key": "resource_group", "type": "" },
"op": "=",
"value": "$resource_group"
},
{
"id": "f005-type",
"key": { "id": "type", "key": "type", "type": "" },
"op": "=",
"value": "Microsoft.Cdn/profiles"
}
],
"op": "AND"
},
"functions": [],
"groupBy": [
{
@@ -908,7 +758,6 @@
"metricName": "azure_percentage4xx_average",
"reduceTo": "avg",
"spaceAggregation": "max",
"temporality": "",
"timeAggregation": "avg"
}
],
@@ -918,35 +767,6 @@
"filter": {
"expression": "azuremonitor.subscription_id = $azuremonitor.subscription_id AND resource_group = $resource_group AND name IN $cdnprofile AND type = 'Microsoft.Cdn/profiles'"
},
"filters": {
"items": [
{
"id": "f006-name",
"key": { "dataType": "string", "id": "name--string--", "key": "name", "type": "" },
"op": "IN",
"value": "$cdnprofile"
},
{
"id": "f006-sub",
"key": { "id": "azuremonitor.subscription_id", "key": "azuremonitor.subscription_id", "type": "" },
"op": "=",
"value": "$azuremonitor.subscription_id"
},
{
"id": "f006-rg",
"key": { "id": "resource_group", "key": "resource_group", "type": "" },
"op": "=",
"value": "$resource_group"
},
{
"id": "f006-type",
"key": { "id": "type", "key": "type", "type": "" },
"op": "=",
"value": "Microsoft.Cdn/profiles"
}
],
"op": "AND"
},
"functions": [],
"groupBy": [
{
@@ -1025,7 +845,6 @@
"metricName": "azure_percentage5xx_average",
"reduceTo": "avg",
"spaceAggregation": "max",
"temporality": "",
"timeAggregation": "avg"
}
],
@@ -1035,35 +854,6 @@
"filter": {
"expression": "azuremonitor.subscription_id = $azuremonitor.subscription_id AND resource_group = $resource_group AND name IN $cdnprofile AND type = 'Microsoft.Cdn/profiles'"
},
"filters": {
"items": [
{
"id": "f007-name",
"key": { "dataType": "string", "id": "name--string--", "key": "name", "type": "" },
"op": "IN",
"value": "$cdnprofile"
},
{
"id": "f007-sub",
"key": { "id": "azuremonitor.subscription_id", "key": "azuremonitor.subscription_id", "type": "" },
"op": "=",
"value": "$azuremonitor.subscription_id"
},
{
"id": "f007-rg",
"key": { "id": "resource_group", "key": "resource_group", "type": "" },
"op": "=",
"value": "$resource_group"
},
{
"id": "f007-type",
"key": { "id": "type", "key": "type", "type": "" },
"op": "=",
"value": "Microsoft.Cdn/profiles"
}
],
"op": "AND"
},
"functions": [],
"groupBy": [
{
@@ -1127,15 +917,9 @@
"query": {
"builder": {
"queryData": [{
"aggregations": [{ "metricName": "azure_requestcount_total", "reduceTo": "sum", "spaceAggregation": "sum", "temporality": "", "timeAggregation": "sum" }],
"aggregations": [{ "metricName": "azure_requestcount_total", "reduceTo": "sum", "spaceAggregation": "sum", "timeAggregation": "sum" }],
"dataSource": "metrics", "disabled": false, "expression": "A",
"filter": { "expression": "azuremonitor.subscription_id = $azuremonitor.subscription_id AND resource_group = $resource_group AND name IN $cdnprofile AND type = 'Microsoft.Cdn/profiles'" },
"filters": { "items": [
{ "id": "f008-name", "key": { "dataType": "string", "id": "name--string--", "key": "name", "type": "" }, "op": "IN", "value": "$cdnprofile" },
{ "id": "f008-sub", "key": { "id": "azuremonitor.subscription_id", "key": "azuremonitor.subscription_id", "type": "" }, "op": "=", "value": "$azuremonitor.subscription_id" },
{ "id": "f008-rg", "key": { "id": "resource_group", "key": "resource_group", "type": "" }, "op": "=", "value": "$resource_group" },
{ "id": "f008-type", "key": { "id": "type", "key": "type", "type": "" }, "op": "=", "value": "Microsoft.Cdn/profiles" }
], "op": "AND" },
"functions": [], "groupBy": [{ "dataType": "string", "id": "name--string--tag", "isColumn": false, "isJSON": false, "key": "name", "type": "tag" }],
"having": { "expression": "" }, "legend": "{{name}}", "limit": null, "orderBy": [], "queryName": "A", "source": "", "stepInterval": null
}],
@@ -1168,15 +952,9 @@
"query": {
"builder": {
"queryData": [{
"aggregations": [{ "metricName": "azure_originrequestcount_total", "reduceTo": "sum", "spaceAggregation": "sum", "temporality": "", "timeAggregation": "sum" }],
"aggregations": [{ "metricName": "azure_originrequestcount_total", "reduceTo": "sum", "spaceAggregation": "sum", "timeAggregation": "sum" }],
"dataSource": "metrics", "disabled": false, "expression": "A",
"filter": { "expression": "azuremonitor.subscription_id = $azuremonitor.subscription_id AND resource_group = $resource_group AND name IN $cdnprofile AND type = 'Microsoft.Cdn/profiles'" },
"filters": { "items": [
{ "id": "f009-name", "key": { "dataType": "string", "id": "name--string--", "key": "name", "type": "" }, "op": "IN", "value": "$cdnprofile" },
{ "id": "f009-sub", "key": { "id": "azuremonitor.subscription_id", "key": "azuremonitor.subscription_id", "type": "" }, "op": "=", "value": "$azuremonitor.subscription_id" },
{ "id": "f009-rg", "key": { "id": "resource_group", "key": "resource_group", "type": "" }, "op": "=", "value": "$resource_group" },
{ "id": "f009-type", "key": { "id": "type", "key": "type", "type": "" }, "op": "=", "value": "Microsoft.Cdn/profiles" }
], "op": "AND" },
"functions": [], "groupBy": [{ "dataType": "string", "id": "name--string--tag", "isColumn": false, "isJSON": false, "key": "name", "type": "tag" }],
"having": { "expression": "" }, "legend": "{{name}}", "limit": null, "orderBy": [], "queryName": "A", "source": "", "stepInterval": null
}],
@@ -1209,15 +987,9 @@
"query": {
"builder": {
"queryData": [{
"aggregations": [{ "metricName": "azure_requestsize_total", "reduceTo": "sum", "spaceAggregation": "sum", "temporality": "", "timeAggregation": "sum" }],
"aggregations": [{ "metricName": "azure_requestsize_total", "reduceTo": "sum", "spaceAggregation": "sum", "timeAggregation": "sum" }],
"dataSource": "metrics", "disabled": false, "expression": "A",
"filter": { "expression": "azuremonitor.subscription_id = $azuremonitor.subscription_id AND resource_group = $resource_group AND name IN $cdnprofile AND type = 'Microsoft.Cdn/profiles'" },
"filters": { "items": [
{ "id": "f010-name", "key": { "dataType": "string", "id": "name--string--", "key": "name", "type": "" }, "op": "IN", "value": "$cdnprofile" },
{ "id": "f010-sub", "key": { "id": "azuremonitor.subscription_id", "key": "azuremonitor.subscription_id", "type": "" }, "op": "=", "value": "$azuremonitor.subscription_id" },
{ "id": "f010-rg", "key": { "id": "resource_group", "key": "resource_group", "type": "" }, "op": "=", "value": "$resource_group" },
{ "id": "f010-type", "key": { "id": "type", "key": "type", "type": "" }, "op": "=", "value": "Microsoft.Cdn/profiles" }
], "op": "AND" },
"functions": [], "groupBy": [{ "dataType": "string", "id": "name--string--tag", "isColumn": false, "isJSON": false, "key": "name", "type": "tag" }],
"having": { "expression": "" }, "legend": "{{name}}", "limit": null, "orderBy": [], "queryName": "A", "source": "", "stepInterval": null
}],
@@ -1250,15 +1022,9 @@
"query": {
"builder": {
"queryData": [{
"aggregations": [{ "metricName": "azure_responsesize_total", "reduceTo": "sum", "spaceAggregation": "sum", "temporality": "", "timeAggregation": "sum" }],
"aggregations": [{ "metricName": "azure_responsesize_total", "reduceTo": "sum", "spaceAggregation": "sum", "timeAggregation": "sum" }],
"dataSource": "metrics", "disabled": false, "expression": "A",
"filter": { "expression": "azuremonitor.subscription_id = $azuremonitor.subscription_id AND resource_group = $resource_group AND name IN $cdnprofile AND type = 'Microsoft.Cdn/profiles'" },
"filters": { "items": [
{ "id": "f011-name", "key": { "dataType": "string", "id": "name--string--", "key": "name", "type": "" }, "op": "IN", "value": "$cdnprofile" },
{ "id": "f011-sub", "key": { "id": "azuremonitor.subscription_id", "key": "azuremonitor.subscription_id", "type": "" }, "op": "=", "value": "$azuremonitor.subscription_id" },
{ "id": "f011-rg", "key": { "id": "resource_group", "key": "resource_group", "type": "" }, "op": "=", "value": "$resource_group" },
{ "id": "f011-type", "key": { "id": "type", "key": "type", "type": "" }, "op": "=", "value": "Microsoft.Cdn/profiles" }
], "op": "AND" },
"functions": [], "groupBy": [{ "dataType": "string", "id": "name--string--tag", "isColumn": false, "isJSON": false, "key": "name", "type": "tag" }],
"having": { "expression": "" }, "legend": "{{name}}", "limit": null, "orderBy": [], "queryName": "A", "source": "", "stepInterval": null
}],
@@ -1291,15 +1057,9 @@
"query": {
"builder": {
"queryData": [{
"aggregations": [{ "metricName": "azure_activewebsocketconnections_total", "reduceTo": "max", "spaceAggregation": "sum", "temporality": "", "timeAggregation": "max" }],
"aggregations": [{ "metricName": "azure_activewebsocketconnections_total", "reduceTo": "max", "spaceAggregation": "sum", "timeAggregation": "max" }],
"dataSource": "metrics", "disabled": false, "expression": "A",
"filter": { "expression": "azuremonitor.subscription_id = $azuremonitor.subscription_id AND resource_group = $resource_group AND name IN $cdnprofile AND type = 'Microsoft.Cdn/profiles'" },
"filters": { "items": [
{ "id": "f012-name", "key": { "dataType": "string", "id": "name--string--", "key": "name", "type": "" }, "op": "IN", "value": "$cdnprofile" },
{ "id": "f012-sub", "key": { "id": "azuremonitor.subscription_id", "key": "azuremonitor.subscription_id", "type": "" }, "op": "=", "value": "$azuremonitor.subscription_id" },
{ "id": "f012-rg", "key": { "id": "resource_group", "key": "resource_group", "type": "" }, "op": "=", "value": "$resource_group" },
{ "id": "f012-type", "key": { "id": "type", "key": "type", "type": "" }, "op": "=", "value": "Microsoft.Cdn/profiles" }
], "op": "AND" },
"functions": [], "groupBy": [{ "dataType": "string", "id": "name--string--tag", "isColumn": false, "isJSON": false, "key": "name", "type": "tag" }],
"having": { "expression": "" }, "legend": "{{name}}", "limit": null, "orderBy": [], "queryName": "A", "source": "", "stepInterval": null
}],
@@ -1332,15 +1092,9 @@
"query": {
"builder": {
"queryData": [{
"aggregations": [{ "metricName": "azure_websocketconnections_total", "reduceTo": "sum", "spaceAggregation": "sum", "temporality": "", "timeAggregation": "sum" }],
"aggregations": [{ "metricName": "azure_websocketconnections_total", "reduceTo": "sum", "spaceAggregation": "sum", "timeAggregation": "sum" }],
"dataSource": "metrics", "disabled": false, "expression": "A",
"filter": { "expression": "azuremonitor.subscription_id = $azuremonitor.subscription_id AND resource_group = $resource_group AND name IN $cdnprofile AND type = 'Microsoft.Cdn/profiles'" },
"filters": { "items": [
{ "id": "f013-name", "key": { "dataType": "string", "id": "name--string--", "key": "name", "type": "" }, "op": "IN", "value": "$cdnprofile" },
{ "id": "f013-sub", "key": { "id": "azuremonitor.subscription_id", "key": "azuremonitor.subscription_id", "type": "" }, "op": "=", "value": "$azuremonitor.subscription_id" },
{ "id": "f013-rg", "key": { "id": "resource_group", "key": "resource_group", "type": "" }, "op": "=", "value": "$resource_group" },
{ "id": "f013-type", "key": { "id": "type", "key": "type", "type": "" }, "op": "=", "value": "Microsoft.Cdn/profiles" }
], "op": "AND" },
"functions": [], "groupBy": [{ "dataType": "string", "id": "name--string--tag", "isColumn": false, "isJSON": false, "key": "name", "type": "tag" }],
"having": { "expression": "" }, "legend": "{{name}}", "limit": null, "orderBy": [], "queryName": "A", "source": "", "stepInterval": null
}],
@@ -1373,15 +1127,9 @@
"query": {
"builder": {
"queryData": [{
"aggregations": [{ "metricName": "azure_webapplicationfirewallrequestcount_total", "reduceTo": "sum", "spaceAggregation": "sum", "temporality": "", "timeAggregation": "sum" }],
"aggregations": [{ "metricName": "azure_webapplicationfirewallrequestcount_total", "reduceTo": "sum", "spaceAggregation": "sum", "timeAggregation": "sum" }],
"dataSource": "metrics", "disabled": false, "expression": "A",
"filter": { "expression": "azuremonitor.subscription_id = $azuremonitor.subscription_id AND resource_group = $resource_group AND name IN $cdnprofile AND type = 'Microsoft.Cdn/profiles'" },
"filters": { "items": [
{ "id": "f014-name", "key": { "dataType": "string", "id": "name--string--", "key": "name", "type": "" }, "op": "IN", "value": "$cdnprofile" },
{ "id": "f014-sub", "key": { "id": "azuremonitor.subscription_id", "key": "azuremonitor.subscription_id", "type": "" }, "op": "=", "value": "$azuremonitor.subscription_id" },
{ "id": "f014-rg", "key": { "id": "resource_group", "key": "resource_group", "type": "" }, "op": "=", "value": "$resource_group" },
{ "id": "f014-type", "key": { "id": "type", "key": "type", "type": "" }, "op": "=", "value": "Microsoft.Cdn/profiles" }
], "op": "AND" },
"functions": [], "groupBy": [{ "dataType": "string", "id": "name--string--tag", "isColumn": false, "isJSON": false, "key": "name", "type": "tag" }],
"having": { "expression": "" }, "legend": "{{name}}", "limit": null, "orderBy": [], "queryName": "A", "source": "", "stepInterval": null
}],
@@ -1414,15 +1162,9 @@
"query": {
"builder": {
"queryData": [{
"aggregations": [{ "metricName": "azure_webapplicationfirewallcaptcharequestcount_total", "reduceTo": "sum", "spaceAggregation": "sum", "temporality": "", "timeAggregation": "sum" }],
"aggregations": [{ "metricName": "azure_webapplicationfirewallcaptcharequestcount_total", "reduceTo": "sum", "spaceAggregation": "sum", "timeAggregation": "sum" }],
"dataSource": "metrics", "disabled": false, "expression": "A",
"filter": { "expression": "azuremonitor.subscription_id = $azuremonitor.subscription_id AND resource_group = $resource_group AND name IN $cdnprofile AND type = 'Microsoft.Cdn/profiles'" },
"filters": { "items": [
{ "id": "f015-name", "key": { "dataType": "string", "id": "name--string--", "key": "name", "type": "" }, "op": "IN", "value": "$cdnprofile" },
{ "id": "f015-sub", "key": { "id": "azuremonitor.subscription_id", "key": "azuremonitor.subscription_id", "type": "" }, "op": "=", "value": "$azuremonitor.subscription_id" },
{ "id": "f015-rg", "key": { "id": "resource_group", "key": "resource_group", "type": "" }, "op": "=", "value": "$resource_group" },
{ "id": "f015-type", "key": { "id": "type", "key": "type", "type": "" }, "op": "=", "value": "Microsoft.Cdn/profiles" }
], "op": "AND" },
"functions": [], "groupBy": [{ "dataType": "string", "id": "name--string--tag", "isColumn": false, "isJSON": false, "key": "name", "type": "tag" }],
"having": { "expression": "" }, "legend": "{{name}}", "limit": null, "orderBy": [], "queryName": "A", "source": "", "stepInterval": null
}],
@@ -1455,15 +1197,9 @@
"query": {
"builder": {
"queryData": [{
"aggregations": [{ "metricName": "azure_webapplicationfirewalljsrequestcount_total", "reduceTo": "sum", "spaceAggregation": "sum", "temporality": "", "timeAggregation": "sum" }],
"aggregations": [{ "metricName": "azure_webapplicationfirewalljsrequestcount_total", "reduceTo": "sum", "spaceAggregation": "sum", "timeAggregation": "sum" }],
"dataSource": "metrics", "disabled": false, "expression": "A",
"filter": { "expression": "azuremonitor.subscription_id = $azuremonitor.subscription_id AND resource_group = $resource_group AND name IN $cdnprofile AND type = 'Microsoft.Cdn/profiles'" },
"filters": { "items": [
{ "id": "f016-name", "key": { "dataType": "string", "id": "name--string--", "key": "name", "type": "" }, "op": "IN", "value": "$cdnprofile" },
{ "id": "f016-sub", "key": { "id": "azuremonitor.subscription_id", "key": "azuremonitor.subscription_id", "type": "" }, "op": "=", "value": "$azuremonitor.subscription_id" },
{ "id": "f016-rg", "key": { "id": "resource_group", "key": "resource_group", "type": "" }, "op": "=", "value": "$resource_group" },
{ "id": "f016-type", "key": { "id": "type", "key": "type", "type": "" }, "op": "=", "value": "Microsoft.Cdn/profiles" }
], "op": "AND" },
"functions": [], "groupBy": [{ "dataType": "string", "id": "name--string--tag", "isColumn": false, "isJSON": false, "key": "name", "type": "tag" }],
"having": { "expression": "" }, "legend": "{{name}}", "limit": null, "orderBy": [], "queryName": "A", "source": "", "stepInterval": null
}],

View File

@@ -272,7 +272,6 @@
"metricName": "azure_blobcapacity_average",
"reduceTo": "avg",
"spaceAggregation": "sum",
"temporality": "",
"timeAggregation": "avg"
}
],
@@ -282,52 +281,6 @@
"filter": {
"expression": "azuremonitor.subscription_id = $azuremonitor.subscription_id AND resource_group = $resource_group AND name IN $storageaccount AND type = 'Microsoft.Storage/storageAccounts/blobServices'"
},
"filters": {
"items": [
{
"id": "8ad4d515-5e1e-440c-870b-05315f919297",
"key": {
"dataType": "string",
"id": "name--string--",
"key": "name",
"type": ""
},
"op": "IN",
"value": "$storageaccount"
},
{
"id": "e4fcdf44-7f3a-498a-a940-7e51c0ee0207",
"key": {
"id": "azuremonitor.subscription_id",
"key": "azuremonitor.subscription_id",
"type": ""
},
"op": "=",
"value": "$azuremonitor.subscription_id"
},
{
"id": "35a98ed2-e48d-4eb5-80e2-53452199c5a9",
"key": {
"id": "resource_group",
"key": "resource_group",
"type": ""
},
"op": "=",
"value": "$resource_group"
},
{
"id": "8c85d60a-985b-474d-b92a-0303fa02ba7d",
"key": {
"id": "type",
"key": "type",
"type": ""
},
"op": "=",
"value": "Microsoft.Storage/storageAccounts/blobServices"
}
],
"op": "AND"
},
"functions": [],
"groupBy": [
{
@@ -465,7 +418,6 @@
"metricName": "azure_blobcount_average",
"reduceTo": "avg",
"spaceAggregation": "avg",
"temporality": "",
"timeAggregation": "avg"
}
],
@@ -475,52 +427,6 @@
"filter": {
"expression": "azuremonitor.subscription_id = $azuremonitor.subscription_id AND resource_group = $resource_group AND name IN $storageaccount AND type = 'Microsoft.Storage/storageAccounts/blobServices'"
},
"filters": {
"items": [
{
"id": "8ad4d515-5e1e-440c-870b-05315f919297",
"key": {
"dataType": "string",
"id": "name--string--",
"key": "name",
"type": ""
},
"op": "IN",
"value": "$storageaccount"
},
{
"id": "d14f31c6-ad28-43cc-91a3-f7c18231c7e6",
"key": {
"id": "azuremonitor.subscription_id",
"key": "azuremonitor.subscription_id",
"type": ""
},
"op": "=",
"value": "$azuremonitor.subscription_id"
},
{
"id": "246f20e4-558c-4a69-9488-6fc3b0824264",
"key": {
"id": "resource_group",
"key": "resource_group",
"type": ""
},
"op": "=",
"value": "$resource_group"
},
{
"id": "a2a4fa45-7b95-4bd8-8737-1109215c489d",
"key": {
"id": "type",
"key": "type",
"type": ""
},
"op": "=",
"value": "Microsoft.Storage/storageAccounts/blobServices"
}
],
"op": "AND"
},
"functions": [],
"groupBy": [
{
@@ -658,7 +564,6 @@
"metricName": "azure_containercount_average",
"reduceTo": "avg",
"spaceAggregation": "avg",
"temporality": "",
"timeAggregation": "avg"
}
],
@@ -668,52 +573,6 @@
"filter": {
"expression": "azuremonitor.subscription_id = $azuremonitor.subscription_id AND resource_group = $resource_group AND name IN $storageaccount AND type = 'Microsoft.Storage/storageAccounts/blobServices'"
},
"filters": {
"items": [
{
"id": "8ad4d515-5e1e-440c-870b-05315f919297",
"key": {
"dataType": "string",
"id": "name--string--",
"key": "name",
"type": ""
},
"op": "IN",
"value": "$storageaccount"
},
{
"id": "08a10d11-770a-4518-9eed-1cede51180cc",
"key": {
"id": "azuremonitor.subscription_id",
"key": "azuremonitor.subscription_id",
"type": ""
},
"op": "=",
"value": "$azuremonitor.subscription_id"
},
{
"id": "7a1fe360-f53f-486a-9581-8f975aa9dfd8",
"key": {
"id": "resource_group",
"key": "resource_group",
"type": ""
},
"op": "=",
"value": "$resource_group"
},
{
"id": "3864e736-3761-4b6b-8715-5dba6f9eae53",
"key": {
"id": "type",
"key": "type",
"type": ""
},
"op": "=",
"value": "Microsoft.Storage/storageAccounts/blobServices"
}
],
"op": "AND"
},
"functions": [],
"groupBy": [
{
@@ -863,7 +722,6 @@
"metricName": "azure_availability_average",
"reduceTo": "avg",
"spaceAggregation": "min",
"temporality": "",
"timeAggregation": "avg"
}
],
@@ -873,52 +731,6 @@
"filter": {
"expression": "azuremonitor.subscription_id = $azuremonitor.subscription_id AND resource_group = $resource_group AND name IN $storageaccount AND type = 'Microsoft.Storage/storageAccounts/blobServices'"
},
"filters": {
"items": [
{
"id": "8ad4d515-5e1e-440c-870b-05315f919297",
"key": {
"dataType": "string",
"id": "name--string--",
"key": "name",
"type": ""
},
"op": "IN",
"value": "$storageaccount"
},
{
"id": "2e256002-761e-46da-ab9a-8dc0f33ac187",
"key": {
"id": "azuremonitor.subscription_id",
"key": "azuremonitor.subscription_id",
"type": ""
},
"op": "=",
"value": "$azuremonitor.subscription_id"
},
{
"id": "cb12f76b-e16e-4d92-aa88-d1bccf1fe9c0",
"key": {
"id": "resource_group",
"key": "resource_group",
"type": ""
},
"op": "=",
"value": "$resource_group"
},
{
"id": "fb865049-0636-4851-9da5-3c61ddff26a2",
"key": {
"id": "type",
"key": "type",
"type": ""
},
"op": "=",
"value": "Microsoft.Storage/storageAccounts/blobServices"
}
],
"op": "AND"
},
"functions": [],
"groupBy": [
{
@@ -1056,7 +868,6 @@
"metricName": "azure_egress_average",
"reduceTo": "sum",
"spaceAggregation": "sum",
"temporality": "",
"timeAggregation": "avg"
}
],
@@ -1066,52 +877,6 @@
"filter": {
"expression": "azuremonitor.subscription_id = $azuremonitor.subscription_id AND resource_group = $resource_group AND name IN $storageaccount AND type = 'Microsoft.Storage/storageAccounts/blobServices'"
},
"filters": {
"items": [
{
"id": "8ad4d515-5e1e-440c-870b-05315f919297",
"key": {
"dataType": "string",
"id": "name--string--",
"key": "name",
"type": ""
},
"op": "IN",
"value": "$storageaccount"
},
{
"id": "9716a7c9-ed42-4921-bad8-c5fb6b68fef2",
"key": {
"id": "azuremonitor.subscription_id",
"key": "azuremonitor.subscription_id",
"type": ""
},
"op": "=",
"value": "$azuremonitor.subscription_id"
},
{
"id": "2a7a68bf-9033-4494-b5c7-e82af92423e2",
"key": {
"id": "resource_group",
"key": "resource_group",
"type": ""
},
"op": "=",
"value": "$resource_group"
},
{
"id": "c9ea764d-b6af-4e93-b097-093ff562cc8e",
"key": {
"id": "type",
"key": "type",
"type": ""
},
"op": "=",
"value": "Microsoft.Storage/storageAccounts/blobServices"
}
],
"op": "AND"
},
"functions": [],
"groupBy": [
{
@@ -1247,7 +1012,6 @@
"metricName": "azure_ingress_average",
"reduceTo": "sum",
"spaceAggregation": "sum",
"temporality": "",
"timeAggregation": "avg"
}
],
@@ -1257,52 +1021,6 @@
"filter": {
"expression": "azuremonitor.subscription_id = $azuremonitor.subscription_id AND resource_group = $resource_group AND name IN $storageaccount AND type = 'Microsoft.Storage/storageAccounts/blobServices'"
},
"filters": {
"items": [
{
"id": "8ad4d515-5e1e-440c-870b-05315f919297",
"key": {
"dataType": "string",
"id": "name--string--",
"key": "name",
"type": ""
},
"op": "IN",
"value": "$storageaccount"
},
{
"id": "c5bb4e0b-f88a-4041-85f7-cbc07b5073bc",
"key": {
"id": "azuremonitor.subscription_id",
"key": "azuremonitor.subscription_id",
"type": ""
},
"op": "=",
"value": "$azuremonitor.subscription_id"
},
{
"id": "2b3de77d-2fde-465d-ba7e-9d7be8b6853a",
"key": {
"id": "resource_group",
"key": "resource_group",
"type": ""
},
"op": "=",
"value": "$resource_group"
},
{
"id": "adf659d5-6609-4720-98d0-4129321b63f7",
"key": {
"id": "type",
"key": "type",
"type": ""
},
"op": "=",
"value": "Microsoft.Storage/storageAccounts/blobServices"
}
],
"op": "AND"
},
"functions": [],
"groupBy": [
{
@@ -1438,7 +1156,6 @@
"metricName": "azure_successe2elatency_average",
"reduceTo": "avg",
"spaceAggregation": "max",
"temporality": "",
"timeAggregation": "avg"
}
],
@@ -1448,52 +1165,6 @@
"filter": {
"expression": "azuremonitor.subscription_id = $azuremonitor.subscription_id AND resource_group = $resource_group AND name IN $storageaccount AND type = 'Microsoft.Storage/storageAccounts/blobServices'"
},
"filters": {
"items": [
{
"id": "8ad4d515-5e1e-440c-870b-05315f919297",
"key": {
"dataType": "string",
"id": "name--string--",
"key": "name",
"type": ""
},
"op": "IN",
"value": "$storageaccount"
},
{
"id": "725192d6-cdfa-466f-87b3-960980c26bc4",
"key": {
"id": "azuremonitor.subscription_id",
"key": "azuremonitor.subscription_id",
"type": ""
},
"op": "=",
"value": "$azuremonitor.subscription_id"
},
{
"id": "301cb143-a872-4b17-b335-cb638d8d7022",
"key": {
"id": "resource_group",
"key": "resource_group",
"type": ""
},
"op": "=",
"value": "$resource_group"
},
{
"id": "22b7d4ca-56b5-4bfc-b123-0f4988a961d0",
"key": {
"id": "type",
"key": "type",
"type": ""
},
"op": "=",
"value": "Microsoft.Storage/storageAccounts/blobServices"
}
],
"op": "AND"
},
"functions": [],
"groupBy": [
{
@@ -1629,7 +1300,6 @@
"metricName": "azure_successserverlatency_average",
"reduceTo": "avg",
"spaceAggregation": "max",
"temporality": "",
"timeAggregation": "avg"
}
],
@@ -1639,52 +1309,6 @@
"filter": {
"expression": "azuremonitor.subscription_id = $azuremonitor.subscription_id AND resource_group = $resource_group AND name IN $storageaccount AND type = 'Microsoft.Storage/storageAccounts/blobServices'"
},
"filters": {
"items": [
{
"id": "8ad4d515-5e1e-440c-870b-05315f919297",
"key": {
"dataType": "string",
"id": "name--string--",
"key": "name",
"type": ""
},
"op": "IN",
"value": "$storageaccount"
},
{
"id": "cccb9c11-9e54-40e3-9b75-21a753f0651a",
"key": {
"id": "azuremonitor.subscription_id",
"key": "azuremonitor.subscription_id",
"type": ""
},
"op": "=",
"value": "$azuremonitor.subscription_id"
},
{
"id": "32b7a033-1da0-43da-83cf-0beb7fb6eb5d",
"key": {
"id": "resource_group",
"key": "resource_group",
"type": ""
},
"op": "=",
"value": "$resource_group"
},
{
"id": "77d3f853-9720-46a6-ac71-405ccd2d16e1",
"key": {
"id": "type",
"key": "type",
"type": ""
},
"op": "=",
"value": "Microsoft.Storage/storageAccounts/blobServices"
}
],
"op": "AND"
},
"functions": [],
"groupBy": [
{
@@ -1820,7 +1444,6 @@
"metricName": "azure_transactions_total",
"reduceTo": "sum",
"spaceAggregation": "sum",
"temporality": "",
"timeAggregation": "sum"
}
],
@@ -1830,52 +1453,6 @@
"filter": {
"expression": "azuremonitor.subscription_id = $azuremonitor.subscription_id AND resource_group = $resource_group AND name IN $storageaccount AND type = 'Microsoft.Storage/storageAccounts/blobServices'"
},
"filters": {
"items": [
{
"id": "8ad4d515-5e1e-440c-870b-05315f919297",
"key": {
"dataType": "string",
"id": "name--string--",
"key": "name",
"type": ""
},
"op": "IN",
"value": "$storageaccount"
},
{
"id": "bbef20d9-4b62-49a2-b522-079f814406ca",
"key": {
"id": "azuremonitor.subscription_id",
"key": "azuremonitor.subscription_id",
"type": ""
},
"op": "=",
"value": "$azuremonitor.subscription_id"
},
{
"id": "ffbdf757-11b8-45d1-8190-50b4ec067839",
"key": {
"id": "resource_group",
"key": "resource_group",
"type": ""
},
"op": "=",
"value": "$resource_group"
},
{
"id": "65021cbd-add8-44c3-b5a3-16e1c582ccbb",
"key": {
"id": "type",
"key": "type",
"type": ""
},
"op": "=",
"value": "Microsoft.Storage/storageAccounts/blobServices"
}
],
"op": "AND"
},
"functions": [],
"groupBy": [
{

View File

@@ -380,7 +380,7 @@ func (handler *handler) UpdateService(rw http.ResponseWriter, r *http.Request) {
return
}
err = handler.module.CreateService(ctx, orgID, cloudIntegrationService, provider)
err = handler.module.CreateService(ctx, orgID, claims.Email, valuer.MustNewUUID(claims.IdentityID()), cloudIntegrationService, provider)
} else {
err = svc.CloudIntegrationService.Update(provider, serviceID, req.Config)
if err != nil {
@@ -388,7 +388,7 @@ func (handler *handler) UpdateService(rw http.ResponseWriter, r *http.Request) {
return
}
err = handler.module.UpdateService(ctx, orgID, svc.CloudIntegrationService, provider)
err = handler.module.UpdateService(ctx, orgID, claims.Email, valuer.MustNewUUID(claims.IdentityID()), svc.CloudIntegrationService, provider)
}
if err != nil {
render.Error(rw, err)

View File

@@ -6,7 +6,6 @@ import (
"github.com/SigNoz/signoz/pkg/errors"
"github.com/SigNoz/signoz/pkg/modules/cloudintegration"
"github.com/SigNoz/signoz/pkg/types/cloudintegrationtypes"
"github.com/SigNoz/signoz/pkg/types/dashboardtypes"
"github.com/SigNoz/signoz/pkg/valuer"
)
@@ -45,7 +44,7 @@ func (module *module) DisconnectAccount(ctx context.Context, orgID valuer.UUID,
return errors.New(errors.TypeUnsupported, cloudintegrationtypes.ErrCodeUnsupported, "disconnect account is not supported")
}
func (module *module) CreateService(ctx context.Context, orgID valuer.UUID, service *cloudintegrationtypes.CloudIntegrationService, provider cloudintegrationtypes.CloudProviderType) error {
func (module *module) CreateService(ctx context.Context, orgID valuer.UUID, createdBy string, creator valuer.UUID, service *cloudintegrationtypes.CloudIntegrationService, provider cloudintegrationtypes.CloudProviderType) error {
return errors.New(errors.TypeUnsupported, cloudintegrationtypes.ErrCodeUnsupported, "create service is not supported")
}
@@ -57,7 +56,7 @@ func (module *module) ListServicesMetadata(ctx context.Context, orgID valuer.UUI
return nil, errors.New(errors.TypeUnsupported, cloudintegrationtypes.ErrCodeUnsupported, "list services metadata is not supported")
}
func (module *module) UpdateService(ctx context.Context, orgID valuer.UUID, service *cloudintegrationtypes.CloudIntegrationService, provider cloudintegrationtypes.CloudProviderType) error {
func (module *module) UpdateService(ctx context.Context, orgID valuer.UUID, createdBy string, creator valuer.UUID, service *cloudintegrationtypes.CloudIntegrationService, provider cloudintegrationtypes.CloudProviderType) error {
return errors.New(errors.TypeUnsupported, cloudintegrationtypes.ErrCodeUnsupported, "update service is not supported")
}
@@ -69,14 +68,6 @@ func (module *module) AgentCheckIn(ctx context.Context, orgID valuer.UUID, provi
return nil, errors.New(errors.TypeUnsupported, cloudintegrationtypes.ErrCodeUnsupported, "agent check-in is not supported")
}
func (module *module) GetDashboardByID(ctx context.Context, orgID valuer.UUID, id string) (*dashboardtypes.Dashboard, error) {
return nil, errors.New(errors.TypeUnsupported, cloudintegrationtypes.ErrCodeUnsupported, "get dashboard by ID is not supported")
}
func (module *module) ListDashboards(ctx context.Context, orgID valuer.UUID) ([]*dashboardtypes.Dashboard, error) {
return nil, errors.New(errors.TypeUnsupported, cloudintegrationtypes.ErrCodeUnsupported, "list dashboards is not supported")
}
func (module *module) Collect(context.Context, valuer.UUID) (map[string]any, error) {
return nil, errors.New(errors.TypeUnsupported, cloudintegrationtypes.ErrCodeUnsupported, "stats collection is not supported")
}

View File

@@ -4,6 +4,7 @@ import (
"context"
"time"
"github.com/SigNoz/signoz/pkg/errors"
"github.com/SigNoz/signoz/pkg/sqlstore"
"github.com/SigNoz/signoz/pkg/types/cloudintegrationtypes"
"github.com/SigNoz/signoz/pkg/valuer"
@@ -186,6 +187,41 @@ func (store *store) ListServices(ctx context.Context, cloudIntegrationID valuer.
return services, nil
}
func (store *store) ListSharedServices(ctx context.Context, orgID valuer.UUID, provider cloudintegrationtypes.CloudProviderType, cloudIntegrationID valuer.UUID) (map[cloudintegrationtypes.ServiceID][]*cloudintegrationtypes.StorableCloudIntegrationService, error) {
// Subquery: service types that belong to the given account
ownTypes := store.store.BunDBCtx(ctx).
NewSelect().
TableExpr("cloud_integration_service").
ColumnExpr("type").
Where("cloud_integration_id = ?", cloudIntegrationID)
var services []*cloudintegrationtypes.StorableCloudIntegrationService
err := store.
store.
BunDBCtx(ctx).
NewSelect().
TableExpr("cloud_integration_service AS cis").
ColumnExpr("cis.*").
Join("JOIN cloud_integration AS ci ON ci.id = cis.cloud_integration_id").
Where("ci.org_id = ?", orgID).
Where("ci.provider = ?", provider).
Where("ci.removed_at IS NULL").
Where("ci.account_id IS NOT NULL").
Where("ci.last_agent_report IS NOT NULL").
Where("cis.cloud_integration_id != ?", cloudIntegrationID).
Where("cis.type IN (?)", ownTypes).
Scan(ctx, &services)
if err != nil {
return nil, err
}
result := make(map[cloudintegrationtypes.ServiceID][]*cloudintegrationtypes.StorableCloudIntegrationService)
for _, svc := range services {
result[svc.Type] = append(result[svc.Type], svc)
}
return result, nil
}
func (store *store) CreateService(ctx context.Context, service *cloudintegrationtypes.StorableCloudIntegrationService) error {
_, err := store.
store.
@@ -200,6 +236,24 @@ func (store *store) CreateService(ctx context.Context, service *cloudintegration
return nil
}
func (store *store) DeleteServicesByCloudIntegrationID(ctx context.Context, orgID, cloudIntegrationID valuer.UUID) error {
cte := store.store.BunDBCtx(ctx).
NewSelect().
TableExpr("cloud_integration_service AS cis_inner").
ColumnExpr("cis_inner.id").
Join("JOIN cloud_integration AS ci ON cis_inner.cloud_integration_id = ci.id").
Where("ci.org_id = ?", orgID).
Where("cis_inner.cloud_integration_id = ?", cloudIntegrationID)
_, err := store.store.BunDBCtx(ctx).
NewDelete().
Model(new(cloudintegrationtypes.StorableCloudIntegrationService)).
With("target", cte).
Where("id IN (SELECT id FROM target)").
Exec(ctx)
return err
}
func (store *store) UpdateService(ctx context.Context, service *cloudintegrationtypes.StorableCloudIntegrationService) error {
_, err := store.
store.
@@ -213,6 +267,62 @@ func (store *store) UpdateService(ctx context.Context, service *cloudintegration
return err
}
func (store *store) CreateIntegrationDashboard(ctx context.Context, integrationDashboard *cloudintegrationtypes.StorableIntegrationDashboard) error {
_, err := store.store.BunDBCtx(ctx).NewInsert().Model(integrationDashboard).Exec(ctx)
return err
}
func (store *store) GetIntegrationDashboardBySlug(ctx context.Context, orgID valuer.UUID, provider cloudintegrationtypes.IntegrationDashboardProviderType, slug string) (*cloudintegrationtypes.StorableIntegrationDashboard, error) {
integrationDashboard := new(cloudintegrationtypes.StorableIntegrationDashboard)
err := store.store.BunDBCtx(ctx).
NewSelect().
Model(integrationDashboard).
Join("JOIN dashboard AS d ON storable_integration_dashboard.dashboard_id = d.id").
Where("d.org_id = ?", orgID).
Where("storable_integration_dashboard.provider = ?", provider).
Where("storable_integration_dashboard.slug = ?", slug).
Scan(ctx)
if err != nil {
return nil, store.store.WrapNotFoundErrf(err, errors.CodeNotFound, "integration dashboard with slug %s not found", slug)
}
return integrationDashboard, nil
}
func (store *store) ListIntegrationDashboardsBySlugPrefix(ctx context.Context, orgID valuer.UUID, provider cloudintegrationtypes.IntegrationDashboardProviderType, slugPrefix string) ([]*cloudintegrationtypes.StorableIntegrationDashboard, error) {
var integrationDashboards []*cloudintegrationtypes.StorableIntegrationDashboard
err := store.store.BunDBCtx(ctx).
NewSelect().
Model(&integrationDashboards).
Join("JOIN dashboard AS d ON storable_integration_dashboard.dashboard_id = d.id").
Where("d.org_id = ?", orgID).
Where("storable_integration_dashboard.provider = ?", provider).
Where("storable_integration_dashboard.slug LIKE ?", slugPrefix+"%").
Scan(ctx)
if err != nil {
return nil, err
}
return integrationDashboards, nil
}
func (store *store) DeleteIntegrationDashboardBySlug(ctx context.Context, orgID valuer.UUID, provider cloudintegrationtypes.IntegrationDashboardProviderType, slug string) error {
cte := store.store.BunDBCtx(ctx).
NewSelect().
TableExpr("integration_dashboard AS id_inner").
ColumnExpr("id_inner.id").
Join("JOIN dashboard AS d ON id_inner.dashboard_id = d.id").
Where("d.org_id = ?", orgID).
Where("id_inner.provider = ?", provider).
Where("id_inner.slug = ?", slug)
_, err := store.store.BunDBCtx(ctx).
NewDelete().
Model(new(cloudintegrationtypes.StorableIntegrationDashboard)).
With("target", cte).
Where("id IN (SELECT id FROM target)").
Exec(ctx)
return err
}
func (store *store) RunInTx(ctx context.Context, cb func(ctx context.Context) error) error {
return store.store.RunInTxCtx(ctx, nil, func(ctx context.Context) error {
return cb(ctx)

View File

@@ -34,7 +34,7 @@ type Module interface {
// deletes the public sharing config and disables public sharing for the dashboard
DeletePublic(context.Context, valuer.UUID, valuer.UUID) error
Create(ctx context.Context, orgID valuer.UUID, createdBy string, creator valuer.UUID, data dashboardtypes.PostableDashboard) (*dashboardtypes.Dashboard, error)
Create(ctx context.Context, orgID valuer.UUID, createdBy string, creator valuer.UUID, source dashboardtypes.Source, data dashboardtypes.PostableDashboard) (*dashboardtypes.Dashboard, error)
Get(ctx context.Context, orgID valuer.UUID, id valuer.UUID) (*dashboardtypes.Dashboard, error)
@@ -46,6 +46,9 @@ type Module interface {
Delete(ctx context.Context, orgID valuer.UUID, id valuer.UUID) error
// DeleteUnsafe deletes a dashboard bypassing the guards. Intended for internal system callers.
DeleteUnsafe(ctx context.Context, orgID valuer.UUID, id valuer.UUID) error
GetByMetricNames(ctx context.Context, orgID valuer.UUID, metricNames []string) (map[string][]map[string]string, error)
statsreporter.StatsCollector

View File

@@ -60,7 +60,7 @@ func (handler *handler) Create(rw http.ResponseWriter, r *http.Request) {
dashboardMigrator.Migrate(ctx, req)
}
dashboard, err := handler.module.Create(ctx, orgID, claims.Email, valuer.MustNewUUID(claims.IdentityID()), req)
dashboard, err := handler.module.Create(ctx, orgID, claims.Email, valuer.MustNewUUID(claims.IdentityID()), dashboardtypes.SourceUser, req)
if err != nil {
render.Error(rw, err)
return

View File

@@ -37,8 +37,8 @@ func NewModule(store dashboardtypes.Store, settings factory.ProviderSettings, an
}
}
func (module *module) Create(ctx context.Context, orgID valuer.UUID, createdBy string, creator valuer.UUID, postableDashboard dashboardtypes.PostableDashboard) (*dashboardtypes.Dashboard, error) {
dashboard, err := dashboardtypes.NewDashboard(orgID, createdBy, dashboardtypes.SourceUser, postableDashboard)
func (module *module) Create(ctx context.Context, orgID valuer.UUID, createdBy string, creator valuer.UUID, source dashboardtypes.Source, postableDashboard dashboardtypes.PostableDashboard) (*dashboardtypes.Dashboard, error) {
dashboard, err := dashboardtypes.NewDashboard(orgID, createdBy, source, postableDashboard)
if err != nil {
return nil, err
}
@@ -161,6 +161,10 @@ func (module *module) Delete(ctx context.Context, orgID valuer.UUID, id valuer.U
return nil
}
func (module *module) DeleteUnsafe(ctx context.Context, orgID valuer.UUID, id valuer.UUID) error {
return module.store.Delete(ctx, orgID, id)
}
func (module *module) GetByMetricNames(ctx context.Context, orgID valuer.UUID, metricNames []string) (map[string][]map[string]string, error) {
dashboards, err := module.List(ctx, orgID)
if err != nil {

View File

@@ -21,7 +21,7 @@ func NewStore(sqlstore sqlstore.SQLStore) dashboardtypes.Store {
func (store *store) Create(ctx context.Context, storabledashboard *dashboardtypes.StorableDashboard) error {
_, err := store.
sqlstore.
BunDB().
BunDBCtx(ctx).
NewInsert().
Model(storabledashboard).
Exec(ctx)

View File

@@ -2,8 +2,11 @@ package implspanmapper
import (
"context"
"encoding/json"
"github.com/SigNoz/signoz/pkg/modules/spanmapper"
"github.com/SigNoz/signoz/pkg/query-service/agentConf"
"github.com/SigNoz/signoz/pkg/types/opamptypes"
"github.com/SigNoz/signoz/pkg/types/spantypes"
"github.com/SigNoz/signoz/pkg/valuer"
)
@@ -34,11 +37,22 @@ func (module *module) UpdateGroup(ctx context.Context, orgID, id valuer.UUID, na
return err
}
group.Update(name, condition, enabled, updatedBy)
return module.store.UpdateGroup(ctx, group)
err = module.store.UpdateGroup(ctx, group)
if err != nil {
return err
}
agentConf.NotifyConfigUpdate(ctx)
return nil
}
func (module *module) DeleteGroup(ctx context.Context, orgID, id valuer.UUID) error {
return module.store.DeleteGroup(ctx, orgID, id)
err := module.store.DeleteGroup(ctx, orgID, id)
if err != nil {
return err
}
agentConf.NotifyConfigUpdate(ctx)
return nil
}
func (module *module) ListMappers(ctx context.Context, orgID, groupID valuer.UUID) ([]*spantypes.SpanMapper, error) {
@@ -54,7 +68,12 @@ func (module *module) CreateMapper(ctx context.Context, orgID, groupID valuer.UU
if _, err := module.store.GetGroup(ctx, orgID, groupID); err != nil {
return err
}
return module.store.CreateMapper(ctx, mapper)
err := module.store.CreateMapper(ctx, mapper)
if err != nil {
return err
}
agentConf.NotifyConfigUpdate(ctx)
return nil
}
func (module *module) UpdateMapper(ctx context.Context, orgID, groupID, id valuer.UUID, fieldContext spantypes.FieldContext, config *spantypes.SpanMapperConfig, enabled *bool, updatedBy string) error {
@@ -66,9 +85,72 @@ func (module *module) UpdateMapper(ctx context.Context, orgID, groupID, id value
return err
}
mapper.Update(fieldContext, config, enabled, updatedBy)
return module.store.UpdateMapper(ctx, mapper)
err = module.store.UpdateMapper(ctx, mapper)
if err != nil {
return err
}
agentConf.NotifyConfigUpdate(ctx)
return nil
}
func (module *module) DeleteMapper(ctx context.Context, orgID, groupID, id valuer.UUID) error {
return module.store.DeleteMapper(ctx, orgID, groupID, id)
err := module.store.DeleteMapper(ctx, orgID, groupID, id)
if err != nil {
return err
}
agentConf.NotifyConfigUpdate(ctx)
return nil
}
func (module *module) AgentFeatureType() agentConf.AgentFeatureType {
return spantypes.SpanAttrMappingFeatureType
}
func (module *module) RecommendAgentConfig(orgID valuer.UUID, currentConfYaml []byte, configVersion *opamptypes.AgentConfigVersion) ([]byte, string, error) {
ctx := context.Background()
enabled, err := module.listEnabledGroupsWithMappers(ctx, orgID)
if err != nil {
return nil, "", err
}
updatedConf, err := spantypes.GenerateCollectorConfigWithSpanMapperProcessor(currentConfYaml, enabled)
if err != nil {
return nil, "", err
}
serialized, err := json.Marshal(enabled)
if err != nil {
return nil, "", err
}
return updatedConf, string(serialized), nil
}
// listEnabledGroupsWithMappers returns groups with their mappers.
func (module *module) listEnabledGroupsWithMappers(ctx context.Context, orgID valuer.UUID) ([]*spantypes.SpanMapperGroupWithMappers, error) {
enabled := true
groups, err := module.store.ListGroups(ctx, orgID, &spantypes.ListSpanMapperGroupsQuery{Enabled: &enabled})
if err != nil {
return nil, err
}
out := make([]*spantypes.SpanMapperGroupWithMappers, 0, len(groups))
for _, g := range groups {
mappers, err := module.store.ListMappers(ctx, orgID, g.ID)
if err != nil {
return nil, err
}
enabledMappers := make([]*spantypes.SpanMapper, 0, len(mappers))
for _, m := range mappers {
if m.Enabled {
enabledMappers = append(enabledMappers, m)
}
}
if len(enabledMappers) == 0 {
continue
}
out = append(out, &spantypes.SpanMapperGroupWithMappers{Group: g, Mappers: enabledMappers})
}
return out, nil
}

View File

@@ -4,12 +4,16 @@ import (
"context"
"net/http"
"github.com/SigNoz/signoz/pkg/query-service/agentConf"
"github.com/SigNoz/signoz/pkg/types/spantypes"
"github.com/SigNoz/signoz/pkg/valuer"
)
// Module defines the business logic for span attribute mapping groups and mappers.
type Module interface {
// Since this module interacts with OpAMP, it must implement the AgentFeature interface.
agentConf.AgentFeature
// Group operations
ListGroups(ctx context.Context, orgID valuer.UUID, q *spantypes.ListSpanMapperGroupsQuery) ([]*spantypes.SpanMapperGroup, error)
GetGroup(ctx context.Context, orgID, id valuer.UUID) (*spantypes.SpanMapperGroup, error)

View File

@@ -6,7 +6,7 @@ import (
"github.com/SigNoz/signoz/pkg/http/binding"
"github.com/SigNoz/signoz/pkg/http/render"
"github.com/SigNoz/signoz/pkg/modules/tracedetail"
"github.com/SigNoz/signoz/pkg/types/tracedetailtypes"
"github.com/SigNoz/signoz/pkg/types/spantypes"
"github.com/gorilla/mux"
)
@@ -19,7 +19,7 @@ func NewHandler(module tracedetail.Module) tracedetail.Handler {
}
func (h *handler) GetWaterfall(rw http.ResponseWriter, r *http.Request) {
req := new(tracedetailtypes.PostableWaterfall)
req := new(spantypes.PostableWaterfall)
if err := binding.JSON.BindBody(r.Body, req); err != nil {
render.Error(rw, err)
return

View File

@@ -5,16 +5,16 @@ import (
"github.com/SigNoz/signoz/pkg/factory"
"github.com/SigNoz/signoz/pkg/modules/tracedetail"
"github.com/SigNoz/signoz/pkg/types/tracedetailtypes"
"github.com/SigNoz/signoz/pkg/types/spantypes"
)
type module struct {
store tracedetailtypes.TraceStore
store spantypes.TraceStore
settings factory.ScopedProviderSettings
config tracedetail.Config
}
func NewModule(traceStore tracedetailtypes.TraceStore, providerSettings factory.ProviderSettings, cfg tracedetail.Config) *module {
func NewModule(traceStore spantypes.TraceStore, providerSettings factory.ProviderSettings, cfg tracedetail.Config) *module {
scopedProviderSettings := factory.NewScopedProviderSettings(providerSettings, "github.com/SigNoz/signoz/pkg/modules/tracedetail/impltracedetail")
return &module{
config: cfg,
@@ -23,7 +23,7 @@ func NewModule(traceStore tracedetailtypes.TraceStore, providerSettings factory.
}
}
func (m *module) GetWaterfall(ctx context.Context, traceID string, req *tracedetailtypes.PostableWaterfall) (*tracedetailtypes.GettableWaterfallTrace, error) {
func (m *module) GetWaterfall(ctx context.Context, traceID string, req *spantypes.PostableWaterfall) (*spantypes.GettableWaterfallTrace, error) {
waterfallTrace, err := m.getTraceData(ctx, traceID)
if err != nil {
return nil, err
@@ -37,16 +37,16 @@ func (m *module) GetWaterfall(ctx context.Context, traceID string, req *tracedet
m.config.Waterfall.MaxDepthToAutoExpand,
)
aggregationResults := make([]tracedetailtypes.SpanAggregationResult, 0, len(req.Aggregations))
aggregationResults := make([]spantypes.SpanAggregationResult, 0, len(req.Aggregations))
for _, a := range req.Aggregations {
aggregationResults = append(aggregationResults, waterfallTrace.GetSpanAggregation(a.Aggregation, a.Field))
}
return tracedetailtypes.NewGettableWaterfallTrace(waterfallTrace, selectedSpans, uncollapsedSpans, selectedAllSpans, aggregationResults), nil
return spantypes.NewGettableWaterfallTrace(waterfallTrace, selectedSpans, uncollapsedSpans, selectedAllSpans, aggregationResults), nil
}
// getTraceData returns the waterfall cache for the given traceID with fallback on DB.
func (m *module) getTraceData(ctx context.Context, traceID string) (*tracedetailtypes.WaterfallTrace, error) {
func (m *module) getTraceData(ctx context.Context, traceID string) (*spantypes.WaterfallTrace, error) {
summary, err := m.store.GetTraceSummary(ctx, traceID)
if err != nil {
return nil, err
@@ -58,9 +58,9 @@ func (m *module) getTraceData(ctx context.Context, traceID string) (*tracedetail
}
if len(spanItems) == 0 {
return nil, tracedetailtypes.ErrTraceNotFound
return nil, spantypes.ErrTraceNotFound
}
traceData := tracedetailtypes.NewWaterfallTraceFromSpans(spanItems)
traceData := spantypes.NewWaterfallTraceFromSpans(spanItems)
return traceData, nil
}

View File

@@ -9,7 +9,7 @@ import (
"github.com/SigNoz/signoz/pkg/errors"
"github.com/SigNoz/signoz/pkg/telemetrystore"
"github.com/SigNoz/signoz/pkg/types/tracedetailtypes"
"github.com/SigNoz/signoz/pkg/types/spantypes"
)
type traceStore struct {
@@ -20,28 +20,28 @@ func NewTraceStore(ts telemetrystore.TelemetryStore) *traceStore {
return &traceStore{telemetryStore: ts}
}
func (s *traceStore) GetTraceSummary(ctx context.Context, traceID string) (*tracedetailtypes.TraceSummary, error) {
func (s *traceStore) GetTraceSummary(ctx context.Context, traceID string) (*spantypes.TraceSummary, error) {
sb := sqlbuilder.NewSelectBuilder()
sb.Select("trace_id", "min(start) AS start", "max(end) AS end", "sum(num_spans) AS num_spans")
sb.From(fmt.Sprintf("%s.%s", tracedetailtypes.TraceDB, tracedetailtypes.TraceSummaryTable))
sb.From(fmt.Sprintf("%s.%s", spantypes.TraceDB, spantypes.TraceSummaryTable))
sb.Where(sb.E("trace_id", traceID))
sb.GroupBy("trace_id")
query, args := sb.BuildWithFlavor(sqlbuilder.ClickHouse)
var summary tracedetailtypes.TraceSummary
var summary spantypes.TraceSummary
err := s.telemetryStore.ClickhouseDB().QueryRow(ctx, query, args...).Scan(
&summary.TraceID, &summary.Start, &summary.End, &summary.NumSpans,
)
if err != nil {
if errors.Is(err, sql.ErrNoRows) {
return nil, tracedetailtypes.ErrTraceNotFound
return nil, spantypes.ErrTraceNotFound
}
return nil, errors.WrapInternalf(err, errors.CodeInternal, "error querying trace summary")
}
return &summary, nil
}
func (s *traceStore) GetTraceSpans(ctx context.Context, traceID string, summary *tracedetailtypes.TraceSummary) ([]tracedetailtypes.StorableSpan, error) {
func (s *traceStore) GetTraceSpans(ctx context.Context, traceID string, summary *spantypes.TraceSummary) ([]spantypes.StorableSpan, error) {
// DISTINCT ON (span_id) is ClickHouse-specific syntax not supported by sqlbuilder
query := fmt.Sprintf(`
SELECT DISTINCT ON (span_id)
@@ -55,9 +55,9 @@ func (s *traceStore) GetTraceSpans(ctx context.Context, traceID string, summary
FROM %s.%s
WHERE trace_id=? AND ts_bucket_start>=? AND ts_bucket_start<=?
ORDER BY timestamp ASC, name ASC`,
tracedetailtypes.TraceDB, tracedetailtypes.TraceTable,
spantypes.TraceDB, spantypes.TraceTable,
)
var spanItems []tracedetailtypes.StorableSpan
var spanItems []spantypes.StorableSpan
err := s.telemetryStore.ClickhouseDB().Select(
ctx, &spanItems, query,
traceID,

View File

@@ -37,7 +37,7 @@ import (
"fmt"
"testing"
"github.com/SigNoz/signoz/pkg/types/tracedetailtypes"
"github.com/SigNoz/signoz/pkg/types/spantypes"
"github.com/stretchr/testify/assert"
)
@@ -45,8 +45,8 @@ import (
// Helpers
// ─────────────────────────────────────────────────────────────────────────────
func mkSpan(id, service string, children ...*tracedetailtypes.WaterfallSpan) *tracedetailtypes.WaterfallSpan {
return &tracedetailtypes.WaterfallSpan{
func mkSpan(id, service string, children ...*spantypes.WaterfallSpan) *spantypes.WaterfallSpan {
return &spantypes.WaterfallSpan{
SpanID: id,
ServiceName: service,
Name: id + "-op",
@@ -54,7 +54,7 @@ func mkSpan(id, service string, children ...*tracedetailtypes.WaterfallSpan) *tr
}
}
func spanIDs(spans []*tracedetailtypes.WaterfallSpan) []string {
func spanIDs(spans []*spantypes.WaterfallSpan) []string {
ids := make([]string, len(spans))
for i, s := range spans {
ids[i] = s.SpanID
@@ -62,10 +62,10 @@ func spanIDs(spans []*tracedetailtypes.WaterfallSpan) []string {
return ids
}
func buildSpanMap(roots ...*tracedetailtypes.WaterfallSpan) map[string]*tracedetailtypes.WaterfallSpan {
m := map[string]*tracedetailtypes.WaterfallSpan{}
var walk func(*tracedetailtypes.WaterfallSpan)
walk = func(s *tracedetailtypes.WaterfallSpan) {
func buildSpanMap(roots ...*spantypes.WaterfallSpan) map[string]*spantypes.WaterfallSpan {
m := map[string]*spantypes.WaterfallSpan{}
var walk func(*spantypes.WaterfallSpan)
walk = func(s *spantypes.WaterfallSpan) {
m[s.SpanID] = s
for _, c := range s.Children {
walk(c)
@@ -80,8 +80,8 @@ func buildSpanMap(roots ...*tracedetailtypes.WaterfallSpan) map[string]*tracedet
}
// makeChain builds a linear trace: span0 → span1 → … → span(n-1).
func makeChain(n int) (*tracedetailtypes.WaterfallSpan, map[string]*tracedetailtypes.WaterfallSpan, []string) {
spans := make([]*tracedetailtypes.WaterfallSpan, n)
func makeChain(n int) (*spantypes.WaterfallSpan, map[string]*spantypes.WaterfallSpan, []string) {
spans := make([]*spantypes.WaterfallSpan, n)
for i := n - 1; i >= 0; i-- {
if i == n-1 {
spans[i] = mkSpan(fmt.Sprintf("span%d", i), "svc")
@@ -96,8 +96,8 @@ func makeChain(n int) (*tracedetailtypes.WaterfallSpan, map[string]*tracedetailt
return spans[0], buildSpanMap(spans[0]), uncollapsed
}
func getWaterfallTrace(roots []*tracedetailtypes.WaterfallSpan, spanMap map[string]*tracedetailtypes.WaterfallSpan) *tracedetailtypes.WaterfallTrace {
return tracedetailtypes.NewWaterfallTrace(0, 0, uint64(len(spanMap)), 0, spanMap, nil, roots, false)
func getWaterfallTrace(roots []*spantypes.WaterfallSpan, spanMap map[string]*spantypes.WaterfallSpan) *spantypes.WaterfallTrace {
return spantypes.NewWaterfallTrace(0, 0, uint64(len(spanMap)), 0, spanMap, nil, roots, false)
}
// ─────────────────────────────────────────────────────────────────────────────
@@ -107,7 +107,7 @@ func getWaterfallTrace(roots []*tracedetailtypes.WaterfallSpan, spanMap map[stri
func TestGetSelectedSpans_SpanOrdering(t *testing.T) {
tests := []struct {
name string
buildRoots func() ([]*tracedetailtypes.WaterfallSpan, map[string]*tracedetailtypes.WaterfallSpan)
buildRoots func() ([]*spantypes.WaterfallSpan, map[string]*spantypes.WaterfallSpan)
uncollapsedSpans []string
selectedSpanID string
wantSpanIDs []string
@@ -115,12 +115,12 @@ func TestGetSelectedSpans_SpanOrdering(t *testing.T) {
{
// Pre-order traversal is preserved: parent before children, siblings left-to-right.
name: "pre_order_traversal",
buildRoots: func() ([]*tracedetailtypes.WaterfallSpan, map[string]*tracedetailtypes.WaterfallSpan) {
buildRoots: func() ([]*spantypes.WaterfallSpan, map[string]*spantypes.WaterfallSpan) {
root := mkSpan("root", "svc",
mkSpan("child1", "svc", mkSpan("grandchild", "svc")),
mkSpan("child2", "svc"),
)
return []*tracedetailtypes.WaterfallSpan{root}, buildSpanMap(root)
return []*spantypes.WaterfallSpan{root}, buildSpanMap(root)
},
uncollapsedSpans: []string{"root", "child1"},
selectedSpanID: "root",
@@ -133,12 +133,12 @@ func TestGetSelectedSpans_SpanOrdering(t *testing.T) {
// ├─ childA (uncollapsed) → grandchildA ✓
// └─ childB (uncollapsed) → grandchildB ✓
name: "multiple_uncollapsed",
buildRoots: func() ([]*tracedetailtypes.WaterfallSpan, map[string]*tracedetailtypes.WaterfallSpan) {
buildRoots: func() ([]*spantypes.WaterfallSpan, map[string]*spantypes.WaterfallSpan) {
root := mkSpan("root", "svc",
mkSpan("childA", "svc", mkSpan("grandchildA", "svc")),
mkSpan("childB", "svc", mkSpan("grandchildB", "svc")),
)
return []*tracedetailtypes.WaterfallSpan{root}, buildSpanMap(root)
return []*spantypes.WaterfallSpan{root}, buildSpanMap(root)
},
uncollapsedSpans: []string{"root", "childA", "childB"},
selectedSpanID: "root",
@@ -154,7 +154,7 @@ func TestGetSelectedSpans_SpanOrdering(t *testing.T) {
// │ └─ grandchild2 ✓
// └─ childB ← selected (not expanded)
name: "manual_uncollapse",
buildRoots: func() ([]*tracedetailtypes.WaterfallSpan, map[string]*tracedetailtypes.WaterfallSpan) {
buildRoots: func() ([]*spantypes.WaterfallSpan, map[string]*spantypes.WaterfallSpan) {
root := mkSpan("root", "svc",
mkSpan("childA", "svc",
mkSpan("grandchild1", "svc", mkSpan("greatGrandchild", "svc")),
@@ -162,7 +162,7 @@ func TestGetSelectedSpans_SpanOrdering(t *testing.T) {
),
mkSpan("childB", "svc"),
)
return []*tracedetailtypes.WaterfallSpan{root}, buildSpanMap(root)
return []*spantypes.WaterfallSpan{root}, buildSpanMap(root)
},
uncollapsedSpans: []string{"childA"},
selectedSpanID: "childB",
@@ -171,12 +171,12 @@ func TestGetSelectedSpans_SpanOrdering(t *testing.T) {
{
// A collapsed span hides all children.
name: "collapsed_span_hides_children",
buildRoots: func() ([]*tracedetailtypes.WaterfallSpan, map[string]*tracedetailtypes.WaterfallSpan) {
buildRoots: func() ([]*spantypes.WaterfallSpan, map[string]*spantypes.WaterfallSpan) {
root := mkSpan("root", "svc",
mkSpan("child1", "svc"),
mkSpan("child2", "svc"),
)
return []*tracedetailtypes.WaterfallSpan{root}, buildSpanMap(root)
return []*spantypes.WaterfallSpan{root}, buildSpanMap(root)
},
uncollapsedSpans: []string{},
selectedSpanID: "root",
@@ -187,13 +187,13 @@ func TestGetSelectedSpans_SpanOrdering(t *testing.T) {
//
// root → parent → selected
name: "path_to_selected_is_uncollapsed",
buildRoots: func() ([]*tracedetailtypes.WaterfallSpan, map[string]*tracedetailtypes.WaterfallSpan) {
buildRoots: func() ([]*spantypes.WaterfallSpan, map[string]*spantypes.WaterfallSpan) {
root := mkSpan("root", "svc",
mkSpan("parent", "svc",
mkSpan("selected", "svc"),
),
)
return []*tracedetailtypes.WaterfallSpan{root}, buildSpanMap(root)
return []*spantypes.WaterfallSpan{root}, buildSpanMap(root)
},
uncollapsedSpans: []string{},
selectedSpanID: "selected",
@@ -206,14 +206,14 @@ func TestGetSelectedSpans_SpanOrdering(t *testing.T) {
// ├─ unrelated → unrelated-child (✗)
// └─ parent → selected
name: "siblings_not_expanded",
buildRoots: func() ([]*tracedetailtypes.WaterfallSpan, map[string]*tracedetailtypes.WaterfallSpan) {
buildRoots: func() ([]*spantypes.WaterfallSpan, map[string]*spantypes.WaterfallSpan) {
root := mkSpan("root", "svc",
mkSpan("unrelated", "svc", mkSpan("unrelated-child", "svc")),
mkSpan("parent", "svc",
mkSpan("selected", "svc"),
),
)
return []*tracedetailtypes.WaterfallSpan{root}, buildSpanMap(root)
return []*spantypes.WaterfallSpan{root}, buildSpanMap(root)
},
uncollapsedSpans: []string{},
selectedSpanID: "selected",
@@ -223,9 +223,9 @@ func TestGetSelectedSpans_SpanOrdering(t *testing.T) {
{
// An unknown selectedSpanID must not panic; returns a window from index 0.
name: "unknown_selected_span",
buildRoots: func() ([]*tracedetailtypes.WaterfallSpan, map[string]*tracedetailtypes.WaterfallSpan) {
buildRoots: func() ([]*spantypes.WaterfallSpan, map[string]*spantypes.WaterfallSpan) {
root := mkSpan("root", "svc", mkSpan("child", "svc"))
return []*tracedetailtypes.WaterfallSpan{root}, buildSpanMap(root)
return []*spantypes.WaterfallSpan{root}, buildSpanMap(root)
},
uncollapsedSpans: []string{},
selectedSpanID: "nonexistent",
@@ -257,10 +257,10 @@ func TestGetSelectedSpans_MultipleRoots(t *testing.T) {
root2 := mkSpan("root2", "svc-b", mkSpan("child2", "svc-b"))
spanMap := buildSpanMap(root1, root2)
trace := getWaterfallTrace([]*tracedetailtypes.WaterfallSpan{root1, root2}, spanMap)
trace := getWaterfallTrace([]*spantypes.WaterfallSpan{root1, root2}, spanMap)
spans, _ := trace.GetSelectedSpans([]string{"root1", "root2"}, "root1", 500, 5)
traceRespnose := tracedetailtypes.NewGettableWaterfallTrace(trace, spans, nil, false, nil)
traceRespnose := spantypes.NewGettableWaterfallTrace(trace, spans, nil, false, nil)
assert.Equal(t, []string{"root1", "child1", "root2", "child2"}, spanIDs(spans), "root1 subtree must precede root2 subtree")
assert.Equal(t, "svc-a", traceRespnose.RootServiceName, "metadata comes from first root")
@@ -274,7 +274,7 @@ func TestGetSelectedSpans_MultipleRoots(t *testing.T) {
func TestGetSelectedSpans_UncollapsedTracking(t *testing.T) {
tests := []struct {
name string
buildRoot func() (*tracedetailtypes.WaterfallSpan, map[string]*tracedetailtypes.WaterfallSpan)
buildRoot func() (*spantypes.WaterfallSpan, map[string]*spantypes.WaterfallSpan)
uncollapsedSpans []string
selectedSpanID string
wantSpanIDs []string
@@ -283,7 +283,7 @@ func TestGetSelectedSpans_UncollapsedTracking(t *testing.T) {
{
// The path-to-selected spans are returned in updatedUncollapsedSpans.
name: "path_returned_in_uncollapsed",
buildRoot: func() (*tracedetailtypes.WaterfallSpan, map[string]*tracedetailtypes.WaterfallSpan) {
buildRoot: func() (*spantypes.WaterfallSpan, map[string]*spantypes.WaterfallSpan) {
root := mkSpan("root", "svc",
mkSpan("parent", "svc",
mkSpan("selected", "svc"),
@@ -301,7 +301,7 @@ func TestGetSelectedSpans_UncollapsedTracking(t *testing.T) {
{
// Siblings of ancestors are not tracked as uncollapsed.
name: "siblings_not_in_uncollapsed",
buildRoot: func() (*tracedetailtypes.WaterfallSpan, map[string]*tracedetailtypes.WaterfallSpan) {
buildRoot: func() (*spantypes.WaterfallSpan, map[string]*spantypes.WaterfallSpan) {
root := mkSpan("root", "svc",
mkSpan("unrelated", "svc", mkSpan("unrelated-child", "svc")),
mkSpan("parent", "svc",
@@ -330,7 +330,7 @@ func TestGetSelectedSpans_UncollapsedTracking(t *testing.T) {
// └─ grandchildB (internal ✓)
// └─ leafB (leaf ✗)
name: "auto_expanded_spans_returned",
buildRoot: func() (*tracedetailtypes.WaterfallSpan, map[string]*tracedetailtypes.WaterfallSpan) {
buildRoot: func() (*spantypes.WaterfallSpan, map[string]*spantypes.WaterfallSpan) {
root := mkSpan("root", "svc",
mkSpan("childA", "svc",
mkSpan("grandchildA", "svc",
@@ -361,7 +361,7 @@ func TestGetSelectedSpans_UncollapsedTracking(t *testing.T) {
// If the selected span is already in uncollapsedSpans,
// it should appear exactly once in the result.
name: "duplicate_in_uncollapsed",
buildRoot: func() (*tracedetailtypes.WaterfallSpan, map[string]*tracedetailtypes.WaterfallSpan) {
buildRoot: func() (*spantypes.WaterfallSpan, map[string]*spantypes.WaterfallSpan) {
root := mkSpan("root", "svc",
mkSpan("selected", "svc", mkSpan("child", "svc")),
)
@@ -384,7 +384,7 @@ func TestGetSelectedSpans_UncollapsedTracking(t *testing.T) {
for _, tc := range tests {
t.Run(tc.name, func(t *testing.T) {
root, spanMap := tc.buildRoot()
trace := getWaterfallTrace([]*tracedetailtypes.WaterfallSpan{root}, spanMap)
trace := getWaterfallTrace([]*spantypes.WaterfallSpan{root}, spanMap)
spans, uncollapsed := trace.GetSelectedSpans(tc.uncollapsedSpans, tc.selectedSpanID, 500, 5)
if tc.wantSpanIDs != nil {
assert.Equal(t, tc.wantSpanIDs, spanIDs(spans))
@@ -412,10 +412,10 @@ func TestGetSelectedSpans_SpanMetadata(t *testing.T) {
mkSpan("child2", "svc"),
)
spanMap := buildSpanMap(root)
trace := getWaterfallTrace([]*tracedetailtypes.WaterfallSpan{root}, spanMap)
trace := getWaterfallTrace([]*spantypes.WaterfallSpan{root}, spanMap)
spans, _ := trace.GetSelectedSpans([]string{"root", "child1"}, "root", 500, 5)
byID := map[string]*tracedetailtypes.WaterfallSpan{}
byID := map[string]*spantypes.WaterfallSpan{}
for _, s := range spans {
byID[s.SpanID] = s
}
@@ -478,7 +478,7 @@ func TestGetSelectedSpans_Window(t *testing.T) {
for _, tc := range tests {
t.Run(tc.name, func(t *testing.T) {
root, spanMap, uncollapsed := makeChain(600)
trace := getWaterfallTrace([]*tracedetailtypes.WaterfallSpan{root}, spanMap)
trace := getWaterfallTrace([]*spantypes.WaterfallSpan{root}, spanMap)
spans, _ := trace.GetSelectedSpans(uncollapsed, tc.selectedSpanID, 500, 5)
assert.Equal(t, tc.wantLen, len(spans), "window size")
@@ -536,7 +536,7 @@ func TestGetSelectedSpans_DepthCountedFromSelectedSpan(t *testing.T) {
root := mkSpan("root", "svc", mkSpan("A", "svc", selected))
spanMap := buildSpanMap(root)
trace := getWaterfallTrace([]*tracedetailtypes.WaterfallSpan{root}, spanMap)
trace := getWaterfallTrace([]*spantypes.WaterfallSpan{root}, spanMap)
spans, _ := trace.GetSelectedSpans([]string{"selected"}, "selected", 500, 5)
ids := spanIDs(spans)
@@ -565,9 +565,9 @@ func TestGetAllSpans(t *testing.T) {
),
),
)
trace := getWaterfallTrace([]*tracedetailtypes.WaterfallSpan{root}, nil)
trace := getWaterfallTrace([]*spantypes.WaterfallSpan{root}, nil)
spans := trace.GetAllSpans()
traceResponse := tracedetailtypes.NewGettableWaterfallTrace(trace, spans, nil, true, nil)
traceResponse := spantypes.NewGettableWaterfallTrace(trace, spans, nil, true, nil)
assert.ElementsMatch(t, spanIDs(spans), []string{"root", "childA", "grandchildA", "leafA", "childB", "grandchildB", "leafB"})
assert.Equal(t, "svc", traceResponse.RootServiceName)
assert.Equal(t, "root-op", traceResponse.RootServiceEntryPoint)

View File

@@ -4,7 +4,7 @@ import (
"context"
"net/http"
"github.com/SigNoz/signoz/pkg/types/tracedetailtypes"
"github.com/SigNoz/signoz/pkg/types/spantypes"
)
// Handler exposes HTTP handlers for trace detail APIs.
@@ -14,5 +14,5 @@ type Handler interface {
// Module defines the business logic for trace detail operations.
type Module interface {
GetWaterfall(ctx context.Context, traceID string, req *tracedetailtypes.PostableWaterfall) (*tracedetailtypes.GettableWaterfallTrace, error)
GetWaterfall(ctx context.Context, traceID string, req *spantypes.PostableWaterfall) (*spantypes.GettableWaterfallTrace, error)
}

View File

@@ -63,7 +63,6 @@ import (
"github.com/SigNoz/signoz/pkg/query-service/postprocess"
"github.com/SigNoz/signoz/pkg/types"
"github.com/SigNoz/signoz/pkg/types/authtypes"
"github.com/SigNoz/signoz/pkg/types/cloudintegrationtypes"
"github.com/SigNoz/signoz/pkg/types/ctxtypes"
"github.com/SigNoz/signoz/pkg/types/dashboardtypes"
"github.com/SigNoz/signoz/pkg/types/featuretypes"
@@ -1113,20 +1112,7 @@ func (aH *APIHandler) Get(rw http.ResponseWriter, r *http.Request) {
dashboard := new(dashboardtypes.Dashboard)
if _, _, _, err := cloudintegrationtypes.ParseCloudIntegrationDashboardID(id); err == nil {
cloudIntegrationDashboard, err := aH.Signoz.Modules.CloudIntegration.GetDashboardByID(ctx, orgID, id)
if err != nil && !errorsV2.Ast(err, errorsV2.TypeLicenseUnavailable) {
render.Error(rw, errorsV2.Wrapf(err, errorsV2.TypeInternal, errorsV2.CodeInternal, "failed to get dashboard"))
return
}
if cloudIntegrationDashboard == nil {
render.Error(rw, errorsV2.Newf(errorsV2.TypeNotFound, errorsV2.CodeNotFound, "dashboard not found"))
return
}
dashboard = cloudIntegrationDashboard
} else if aH.IntegrationsController.IsInstalledIntegrationDashboardID(id) {
if aH.IntegrationsController.IsInstalledIntegrationDashboardID(id) {
integrationDashboard, apiErr := aH.IntegrationsController.GetInstalledIntegrationDashboardById(ctx, orgID, id)
if apiErr != nil {
render.Error(rw, errorsV2.Wrapf(apiErr, errorsV2.TypeInternal, errorsV2.CodeInternal, "failed to get dashboard"))
@@ -1189,15 +1175,6 @@ func (aH *APIHandler) List(rw http.ResponseWriter, r *http.Request) {
dashboards = append(dashboards, installedIntegrationDashboards...)
}
cloudIntegrationDashboards, err := aH.Signoz.Modules.CloudIntegration.ListDashboards(ctx, orgID)
if err != nil {
if !errors.Ast(err, errorsV2.TypeLicenseUnavailable) {
aH.logger.ErrorContext(ctx, "failed to get dashboards for cloud integrations", errors.Attr(err))
}
} else {
dashboards = append(dashboards, cloudIntegrationDashboards...)
}
gettableDashboards, err := dashboardtypes.NewGettableDashboardsFromDashboards(dashboards)
if err != nil {
render.Error(rw, err)

View File

@@ -205,6 +205,7 @@ func NewSQLMigrationProviderFactories(
sqlmigration.NewAddRoleCRUDTuplesFactory(sqlstore),
sqlmigration.NewAddIntegrationDashboardFactory(sqlstore, sqlschema),
sqlmigration.NewAddSourceToDashboardFactory(sqlstore, sqlschema),
sqlmigration.NewMigrateCloudIntegrationDashboardsFactory(sqlstore),
)
}

View File

@@ -112,7 +112,7 @@ func New(
auditorProviderFactories func(licensing.Licensing) factory.NamedMap[factory.ProviderFactory[auditor.Auditor, auditor.Config]],
meterReporterProviderFactories func(context.Context, factory.ProviderSettings, flagger.Flagger, licensing.Licensing, telemetrystore.TelemetryStore, retention.Getter, organization.Getter, zeus.Zeus) (factory.NamedMap[factory.ProviderFactory[meterreporter.Reporter, meterreporter.Config]], string),
querierHandlerCallback func(factory.ProviderSettings, querier.Querier, analytics.Analytics) querier.Handler,
cloudIntegrationCallback func(sqlstore.SQLStore, global.Global, zeus.Zeus, gateway.Gateway, licensing.Licensing, serviceaccount.Module, cloudintegration.Config) (cloudintegration.Module, error),
cloudIntegrationCallback func(sqlstore.SQLStore, dashboard.Module, global.Global, zeus.Zeus, gateway.Gateway, licensing.Licensing, serviceaccount.Module, cloudintegration.Config) (cloudintegration.Module, error),
rulerProviderFactories func(cache.Cache, alertmanager.Alertmanager, sqlstore.SQLStore, telemetrystore.TelemetryStore, telemetrytypes.MetadataStore, prometheus.Prometheus, organization.Getter, rulestatehistory.Module, querier.Querier, queryparser.QueryParser) factory.NamedMap[factory.ProviderFactory[ruler.Ruler, ruler.Config]],
) (*SigNoz, error) {
// Initialize instrumentation
@@ -458,7 +458,7 @@ func New(
serviceAccount := implserviceaccount.NewModule(implserviceaccount.NewStore(sqlstore), authz, cache, analytics, providerSettings, config.ServiceAccount)
cloudIntegrationModule, err := cloudIntegrationCallback(sqlstore, global, zeus, gateway, licensing, serviceAccount, config.CloudIntegration)
cloudIntegrationModule, err := cloudIntegrationCallback(sqlstore, dashboard, global, zeus, gateway, licensing, serviceAccount, config.CloudIntegration)
if err != nil {
return nil, err
}

View File

@@ -0,0 +1,284 @@
package sqlmigration
import (
"context"
"embed"
"encoding/json"
"fmt"
"io/fs"
"path/filepath"
"strings"
"time"
"github.com/SigNoz/signoz/pkg/factory"
"github.com/SigNoz/signoz/pkg/sqlstore"
"github.com/SigNoz/signoz/pkg/valuer"
"github.com/uptrace/bun"
"github.com/uptrace/bun/migrate"
)
//go:embed 086_migrate_ci_dashboards
var cloudIntegrationDashboardFiles embed.FS
var (
cloudProviderAWS = valuer.NewString("aws")
cloudProviderAzure = valuer.NewString("azure")
integrationSource = valuer.NewString("integration")
cloudIntegrationProvider = valuer.NewString("cloud_integration")
)
type migrateCloudIntegrationDashboards struct {
sqlstore sqlstore.SQLStore
}
type cloudIntegrationAccountRow struct {
bun.BaseModel `bun:"table:cloud_integration"`
ID string `bun:"id"`
OrgID string `bun:"org_id"`
Provider string `bun:"provider"`
}
type cloudIntegrationServiceRow struct {
bun.BaseModel `bun:"table:cloud_integration_service"`
Type string `bun:"type"`
Config string `bun:"config"`
CloudIntegrationID string `bun:"cloud_integration_id"`
}
type cloudIntegrationAWSServiceConfig struct {
Metrics *cloudIntegrationMetricsConfig `json:"metrics"`
}
type cloudIntegrationAzureServiceConfig struct {
Metrics *cloudIntegrationMetricsConfig `json:"metrics"`
}
type cloudIntegrationMetricsConfig struct {
Enabled bool `json:"enabled"`
}
type cloudIntegrationDashboardRow struct {
bun.BaseModel `bun:"table:dashboard"`
ID string `bun:"id,pk,type:text"`
CreatedAt time.Time `bun:"created_at"`
UpdatedAt time.Time `bun:"updated_at"`
CreatedBy *string `bun:"created_by,type:text"`
UpdatedBy *string `bun:"updated_by,type:text"`
Data string `bun:"data,type:text"`
Locked bool `bun:"locked"`
OrgID string `bun:"org_id,type:text"`
Source string `bun:"source,type:text"`
}
type cloudIntegrationAccountMeta struct {
orgID string
provider string
}
type cloudIntegrationOrgService struct {
orgID string
provider string
serviceID string
}
type integrationDashboardRow struct {
bun.BaseModel `bun:"table:integration_dashboard"`
ID string `bun:"id,pk,type:text"`
DashboardID string `bun:"dashboard_id,type:text"`
Provider string `bun:"provider,type:text"`
Slug string `bun:"slug,type:text"`
CreatedAt time.Time `bun:"created_at"`
UpdatedAt time.Time `bun:"updated_at"`
}
func NewMigrateCloudIntegrationDashboardsFactory(sqlstore sqlstore.SQLStore) factory.ProviderFactory[SQLMigration, Config] {
return factory.NewProviderFactory(
// migrate_cloud_integration_dashboards name is intentionally kept short to avoid hitting identifier length limits
factory.MustNewName("migrate_ci_dashboards"),
func(ctx context.Context, ps factory.ProviderSettings, c Config) (SQLMigration, error) {
return &migrateCloudIntegrationDashboards{sqlstore: sqlstore}, nil
},
)
}
func (m *migrateCloudIntegrationDashboards) Register(migrations *migrate.Migrations) error {
return migrations.Register(m.Up, m.Down)
}
func (m *migrateCloudIntegrationDashboards) Up(ctx context.Context, db *bun.DB) error {
dashboardDefs, err := m.loadDashboardDefs()
if err != nil {
return err
}
tx, err := db.BeginTx(ctx, nil)
if err != nil {
return err
}
defer func() { _ = tx.Rollback() }()
var accounts []*cloudIntegrationAccountRow
if err := tx.NewSelect().
Model(&accounts).
Where("removed_at IS NULL").
Where("account_id IS NOT NULL").
Scan(ctx); err != nil {
return err
}
accountsMap := make(map[string]cloudIntegrationAccountMeta, len(accounts))
for _, a := range accounts {
accountsMap[a.ID] = cloudIntegrationAccountMeta{orgID: a.OrgID, provider: a.Provider}
}
var services []*cloudIntegrationServiceRow
if err := tx.NewSelect().Model(&services).Scan(ctx); err != nil {
return err
}
seen := make(map[string]struct{})
var toProvision []cloudIntegrationOrgService
for _, svc := range services {
meta, ok := accountsMap[svc.CloudIntegrationID]
if !ok {
continue
}
if !m.isMetricsEnabled(svc.Config, meta.provider) {
continue
}
key := fmt.Sprintf("%s|%s|%s", meta.orgID, meta.provider, svc.Type)
if _, dup := seen[key]; dup {
continue
}
seen[key] = struct{}{}
toProvision = append(toProvision, cloudIntegrationOrgService{
orgID: meta.orgID,
provider: meta.provider,
serviceID: svc.Type,
})
}
now := time.Now()
for _, service := range toProvision {
serviceDashboards, ok := dashboardDefs[service.provider][service.serviceID]
if !ok {
continue
}
for dashName, dashboardJSON := range serviceDashboards {
slug := fmt.Sprintf("%s-%s-%s", service.provider, service.serviceID, dashName)
count, err := tx.NewSelect().
TableExpr("integration_dashboard AS id").
Join("JOIN dashboard AS d ON id.dashboard_id = d.id").
Where("d.org_id = ?", service.orgID).
Where("id.provider = ?", "cloud_integration").
Where("id.slug = ?", slug).
Count(ctx)
if err != nil {
return err
}
if count > 0 {
continue
}
dashID := valuer.GenerateUUID().StringValue()
dashRow := &cloudIntegrationDashboardRow{
ID: dashID,
CreatedAt: now,
UpdatedAt: now,
Data: string(dashboardJSON),
Locked: true,
OrgID: service.orgID,
Source: integrationSource.StringValue(),
}
if _, err := tx.NewInsert().Model(dashRow).Exec(ctx); err != nil {
return err
}
intRow := &integrationDashboardRow{
ID: valuer.GenerateUUID().StringValue(),
DashboardID: dashID,
Provider: cloudIntegrationProvider.StringValue(),
Slug: slug,
CreatedAt: now,
UpdatedAt: now,
}
if _, err := tx.NewInsert().Model(intRow).Exec(ctx); err != nil {
return err
}
}
}
return tx.Commit()
}
func (m *migrateCloudIntegrationDashboards) Down(context.Context, *bun.DB) error {
return nil
}
func (m *migrateCloudIntegrationDashboards) loadDashboardDefs() (map[string]map[string]map[string]json.RawMessage, error) {
result := make(map[string]map[string]map[string]json.RawMessage)
err := fs.WalkDir(cloudIntegrationDashboardFiles, "086_migrate_ci_dashboards", func(path string, d fs.DirEntry, err error) error {
if err != nil {
return err
}
if d.IsDir() || filepath.Ext(path) != ".json" {
return nil
}
// path: 086_cloud_integration_dashboards/{provider}/{service}/{file}.json
rel := strings.TrimPrefix(path, "086_migrate_ci_dashboards/")
parts := strings.SplitN(rel, "/", 3)
if len(parts) != 3 {
return nil
}
provider := parts[0]
serviceID := parts[1]
dashName := strings.TrimSuffix(parts[2], ".json")
data, err := cloudIntegrationDashboardFiles.ReadFile(path)
if err != nil {
return err
}
if result[provider] == nil {
result[provider] = make(map[string]map[string]json.RawMessage)
}
if result[provider][serviceID] == nil {
result[provider][serviceID] = make(map[string]json.RawMessage)
}
result[provider][serviceID][dashName] = json.RawMessage(data)
return nil
})
return result, err
}
func (m *migrateCloudIntegrationDashboards) isMetricsEnabled(configJSON string, provider string) bool {
switch provider {
case cloudProviderAWS.String():
cfg := new(cloudIntegrationAWSServiceConfig)
if err := json.Unmarshal([]byte(configJSON), cfg); err != nil {
return false
}
return cfg.Metrics != nil && cfg.Metrics.Enabled
case cloudProviderAzure.String():
cfg := new(cloudIntegrationAzureServiceConfig)
if err := json.Unmarshal([]byte(configJSON), cfg); err != nil {
return false
}
return cfg.Metrics != nil && cfg.Metrics.Enabled
}
return false
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,671 @@
{
"description": "View key AWS ECS metrics with an out of the box dashboard.\n",
"image": "data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2280px%22%20height%3D%2280px%22%20viewBox%3D%220%200%2080%2080%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%3C!--%20Generator%3A%20Sketch%2064%20(93537)%20-%20https%3A%2F%2Fsketch.com%20--%3E%3Ctitle%3EIcon-Architecture%2F64%2FArch_Amazon-Elastic-Container-Service_64%3C%2Ftitle%3E%3Cdesc%3ECreated%20with%20Sketch.%3C%2Fdesc%3E%3Cdefs%3E%3ClinearGradient%20x1%3D%220%25%22%20y1%3D%22100%25%22%20x2%3D%22100%25%22%20y2%3D%220%25%22%20id%3D%22linearGradient-1%22%3E%3Cstop%20stop-color%3D%22%23C8511B%22%20offset%3D%220%25%22%3E%3C%2Fstop%3E%3Cstop%20stop-color%3D%22%23FF9900%22%20offset%3D%22100%25%22%3E%3C%2Fstop%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Cg%20id%3D%22Icon-Architecture%2F64%2FArch_Amazon-Elastic-Container-Service_64%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Cg%20id%3D%22Icon-Architecture-BG%2F64%2FContainers%22%20fill%3D%22url(%23linearGradient-1)%22%3E%3Crect%20id%3D%22Rectangle%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2280%22%20height%3D%2280%22%3E%3C%2Frect%3E%3C%2Fg%3E%3Cpath%20d%3D%22M64%2C48.2340095%20L56%2C43.4330117%20L56%2C32.0000169%20C56%2C31.6440171%2055.812%2C31.3150172%2055.504%2C31.1360173%20L44%2C24.4260204%20L44%2C14.7520248%20L64%2C26.5710194%20L64%2C48.2340095%20Z%20M65.509%2C25.13902%20L43.509%2C12.139026%20C43.199%2C11.9560261%2042.818%2C11.9540261%2042.504%2C12.131026%20C42.193%2C12.3090259%2042%2C12.6410257%2042%2C13.0000256%20L42%2C25.0000201%20C42%2C25.3550199%2042.189%2C25.6840198%2042.496%2C25.8640197%20L54%2C32.5740166%20L54%2C44.0000114%20C54%2C44.3510113%2054.185%2C44.6770111%2054.486%2C44.857011%20L64.486%2C50.8570083%20C64.644%2C50.9520082%2064.822%2C51%2065%2C51%20C65.17%2C51%2065.34%2C50.9570082%2065.493%2C50.8700083%20C65.807%2C50.6930084%2066%2C50.3600085%2066%2C50%20L66%2C26.0000196%20C66%2C25.6460198%2065.814%2C25.31902%2065.509%2C25.13902%20L65.509%2C25.13902%20Z%20M40.445%2C66.863001%20L17%2C54.3990067%20L17%2C26.5710194%20L37%2C14.7520248%20L37%2C24.4510204%20L26.463%2C31.1560173%20C26.175%2C31.3400172%2026%2C31.6580171%2026%2C32.0000169%20L26%2C49.0000091%20C26%2C49.373009%2026.208%2C49.7150088%2026.538%2C49.8870087%20L39.991%2C56.8870055%20C40.28%2C57.0370055%2040.624%2C57.0380055%2040.912%2C56.8880055%20L53.964%2C50.1440086%20L61.996%2C54.9640064%20L40.445%2C66.863001%20Z%20M64.515%2C54.1420068%20L54.515%2C48.1420095%20C54.217%2C47.9640096%2053.849%2C47.9520096%2053.541%2C48.1120095%20L40.455%2C54.8730065%20L28%2C48.3930094%20L28%2C32.5490167%20L38.537%2C25.8440197%20C38.825%2C25.6600198%2039%2C25.3420199%2039%2C25.0000201%20L39%2C13.0000256%20C39%2C12.6410257%2038.808%2C12.3090259%2038.496%2C12.131026%20C38.184%2C11.9540261%2037.802%2C11.9560261%2037.491%2C12.139026%20L15.491%2C25.13902%20C15.187%2C25.31902%2015%2C25.6460198%2015%2C26.0000196%20L15%2C55%20C15%2C55.3690062%2015.204%2C55.7090061%2015.53%2C55.883006%20L39.984%2C68.8830001%20C40.131%2C68.961%2040.292%2C69%2040.453%2C69%20C40.62%2C69%2040.786%2C68.958%2040.937%2C68.8750001%20L64.484%2C55.875006%20C64.797%2C55.7020061%2064.993%2C55.3750062%2065.0001416%2C55.0180064%20C65.006%2C54.6600066%2064.821%2C54.3260067%2064.515%2C54.1420068%20L64.515%2C54.1420068%20Z%22%20id%3D%22Amazon-Elastic-Container-Service_Icon_64_Squid%22%20fill%3D%22%23FFFFFF%22%3E%3C%2Fpath%3E%3C%2Fg%3E%3C%2Fsvg%3E",
"layout": [
{
"h": 6,
"i": "f78becf8-0328-48b4-84b6-ff4dac325940",
"moved": false,
"static": false,
"w": 6,
"x": 0,
"y": 0
},
{
"h": 6,
"i": "2b4eac06-b426-4f78-b874-2e1734c4104b",
"moved": false,
"static": false,
"w": 6,
"x": 6,
"y": 0
},
{
"h": 6,
"i": "5bea2bc0-13a2-4937-bccb-60ffe8a43ad5",
"moved": false,
"static": false,
"w": 6,
"x": 0,
"y": 6
},
{
"h": 6,
"i": "6fac67b0-50ec-4b43-ac4b-320a303d0369",
"moved": false,
"static": false,
"w": 6,
"x": 6,
"y": 6
}
],
"panelMap": {},
"tags": [],
"title": "AWS ECS Overview",
"uploadedGrafana": false,
"variables": {
"51f4fa2b-89c7-47c2-9795-f32cffaab985": {
"allSelected": false,
"customValue": "",
"description": "AWS Account ID",
"id": "51f4fa2b-89c7-47c2-9795-f32cffaab985",
"key": "51f4fa2b-89c7-47c2-9795-f32cffaab985",
"modificationUUID": "7b814d17-8fff-4ed6-a4ea-90e3b1a97584",
"multiSelect": false,
"name": "Account",
"order": 0,
"queryValue": "SELECT DISTINCT JSONExtractString(labels, 'cloud.account.id') AS `cloud.account.id`\nFROM signoz_metrics.distributed_time_series_v4_1day\nWHERE metric_name = 'aws_ECS_MemoryUtilization_max' GROUP BY `cloud.account.id`",
"showALLOption": false,
"sort": "DISABLED",
"textboxValue": "",
"type": "QUERY"
},
"9faf0f4b-b245-4b3c-83a3-60cfa76dfeb0": {
"allSelected": false,
"customValue": "",
"description": "Account Region",
"id": "9faf0f4b-b245-4b3c-83a3-60cfa76dfeb0",
"key": "9faf0f4b-b245-4b3c-83a3-60cfa76dfeb0",
"modificationUUID": "3b5f499b-22a3-4c8a-847c-8d3811c9e6b2",
"multiSelect": false,
"name": "Region",
"order": 1,
"queryValue": "SELECT DISTINCT JSONExtractString(labels, 'cloud.region') AS region\nFROM signoz_metrics.distributed_time_series_v4_1day\nWHERE metric_name = 'aws_ECS_MemoryUtilization_max' AND JSONExtractString(labels, 'cloud.account.id') IN {{.Account}} GROUP BY region",
"showALLOption": false,
"sort": "ASC",
"textboxValue": "",
"type": "QUERY"
},
"bfbdbcbe-a168-4d81-b108-36339e249116": {
"allSelected": true,
"customValue": "",
"description": "ECS Cluster Name",
"id": "bfbdbcbe-a168-4d81-b108-36339e249116",
"key": "bfbdbcbe-a168-4d81-b108-36339e249116",
"modificationUUID": "9fb0d63c-ac6c-497d-82b3-17d95944e245",
"multiSelect": true,
"name": "Cluster",
"order": 2,
"queryValue": "SELECT DISTINCT JSONExtractString(labels, 'ClusterName') AS cluster\nFROM signoz_metrics.distributed_time_series_v4_1day\nWHERE metric_name = 'aws_ECS_MemoryUtilization_max' AND JSONExtractString(labels, 'cloud.account.id') IN {{.Account}} AND JSONExtractString(labels, 'cloud.region') IN {{.Region}}\nGROUP BY cluster",
"showALLOption": true,
"sort": "ASC",
"textboxValue": "",
"type": "QUERY"
}
},
"version": "v5",
"widgets": [
{
"bucketCount": 30,
"bucketWidth": 0,
"columnUnits": {},
"description": "",
"fillSpans": false,
"id": "f78becf8-0328-48b4-84b6-ff4dac325940",
"isLogScale": false,
"isStacked": false,
"mergeAllActiveQueries": false,
"nullZeroValues": "zero",
"opacity": "1",
"panelTypes": "graph",
"query": {
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_ECS_MemoryUtilization_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.region = $Region AND cloud.account.id = $Account AND ClusterName IN $Cluster)"
},
"functions": [],
"groupBy": [
{
"dataType": "string",
"id": "ServiceName--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "ServiceName",
"type": "tag"
},
{
"dataType": "string",
"id": "ClusterName--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "ClusterName",
"type": "tag"
}
],
"having": {
"expression": ""
},
"legend": "{{ServiceName}} ({{ClusterName}})",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
}
],
"queryFormulas": []
},
"clickhouse_sql": [
{
"disabled": false,
"legend": "",
"name": "A",
"query": ""
}
],
"id": "56068fdd-d523-4117-92fa-87c6518ad07c",
"promql": [
{
"disabled": false,
"legend": "",
"name": "A",
"query": ""
}
],
"queryType": "builder"
},
"selectedLogFields": [
{
"dataType": "string",
"name": "body",
"type": ""
},
{
"dataType": "string",
"name": "timestamp",
"type": ""
}
],
"selectedTracesFields": [
{
"dataType": "string",
"id": "serviceName--string--tag--true",
"isColumn": true,
"isJSON": false,
"key": "serviceName",
"type": "tag"
},
{
"dataType": "string",
"id": "name--string--tag--true",
"isColumn": true,
"isJSON": false,
"key": "name",
"type": "tag"
},
{
"dataType": "float64",
"id": "durationNano--float64--tag--true",
"isColumn": true,
"isJSON": false,
"key": "durationNano",
"type": "tag"
},
{
"dataType": "string",
"id": "httpMethod--string--tag--true",
"isColumn": true,
"isJSON": false,
"key": "httpMethod",
"type": "tag"
},
{
"dataType": "string",
"id": "responseStatusCode--string--tag--true",
"isColumn": true,
"isJSON": false,
"key": "responseStatusCode",
"type": "tag"
}
],
"softMax": 0,
"softMin": 0,
"stackedBarChart": false,
"thresholds": [],
"timePreferance": "GLOBAL_TIME",
"title": "Maximum Memory Utilization",
"yAxisUnit": "none"
},
{
"bucketCount": 30,
"bucketWidth": 0,
"columnUnits": {},
"description": "",
"fillSpans": false,
"id": "2b4eac06-b426-4f78-b874-2e1734c4104b",
"isLogScale": false,
"isStacked": false,
"mergeAllActiveQueries": false,
"nullZeroValues": "zero",
"opacity": "1",
"panelTypes": "graph",
"query": {
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_ECS_MemoryUtilization_min",
"reduceTo": "avg",
"spaceAggregation": "min",
"timeAggregation": "min"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.region = $Region AND cloud.account.id = $Account AND ClusterName IN $Cluster)"
},
"functions": [],
"groupBy": [
{
"dataType": "string",
"id": "ServiceName--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "ServiceName",
"type": "tag"
},
{
"dataType": "string",
"id": "ClusterName--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "ClusterName",
"type": "tag"
}
],
"having": {
"expression": ""
},
"legend": "{{ServiceName}} ({{ClusterName}})",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
}
],
"queryFormulas": []
},
"clickhouse_sql": [
{
"disabled": false,
"legend": "",
"name": "A",
"query": ""
}
],
"id": "fb19342e-cbde-40d8-b12f-ad108698356b",
"promql": [
{
"disabled": false,
"legend": "",
"name": "A",
"query": ""
}
],
"queryType": "builder"
},
"selectedLogFields": [
{
"dataType": "string",
"name": "body",
"type": ""
},
{
"dataType": "string",
"name": "timestamp",
"type": ""
}
],
"selectedTracesFields": [
{
"dataType": "string",
"id": "serviceName--string--tag--true",
"isColumn": true,
"isJSON": false,
"key": "serviceName",
"type": "tag"
},
{
"dataType": "string",
"id": "name--string--tag--true",
"isColumn": true,
"isJSON": false,
"key": "name",
"type": "tag"
},
{
"dataType": "float64",
"id": "durationNano--float64--tag--true",
"isColumn": true,
"isJSON": false,
"key": "durationNano",
"type": "tag"
},
{
"dataType": "string",
"id": "httpMethod--string--tag--true",
"isColumn": true,
"isJSON": false,
"key": "httpMethod",
"type": "tag"
},
{
"dataType": "string",
"id": "responseStatusCode--string--tag--true",
"isColumn": true,
"isJSON": false,
"key": "responseStatusCode",
"type": "tag"
}
],
"softMax": 0,
"softMin": 0,
"stackedBarChart": false,
"thresholds": [],
"timePreferance": "GLOBAL_TIME",
"title": "Minimum Memory Utilization",
"yAxisUnit": "none"
},
{
"bucketCount": 30,
"bucketWidth": 0,
"columnUnits": {},
"description": "",
"fillSpans": false,
"id": "5bea2bc0-13a2-4937-bccb-60ffe8a43ad5",
"isLogScale": false,
"isStacked": false,
"mergeAllActiveQueries": false,
"nullZeroValues": "zero",
"opacity": "1",
"panelTypes": "graph",
"query": {
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_ECS_CPUUtilization_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.region = $Region AND cloud.account.id = $Account AND ClusterName IN $Cluster)"
},
"functions": [],
"groupBy": [
{
"dataType": "string",
"id": "ServiceName--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "ServiceName",
"type": "tag"
},
{
"dataType": "string",
"id": "ClusterName--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "ClusterName",
"type": "tag"
}
],
"having": {
"expression": ""
},
"legend": "{{ServiceName}} ({{ClusterName}})",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
}
],
"queryFormulas": []
},
"clickhouse_sql": [
{
"disabled": false,
"legend": "",
"name": "A",
"query": ""
}
],
"id": "273e0a76-c780-4b9a-9b03-2649d4227173",
"promql": [
{
"disabled": false,
"legend": "",
"name": "A",
"query": ""
}
],
"queryType": "builder"
},
"selectedLogFields": [
{
"dataType": "string",
"name": "body",
"type": ""
},
{
"dataType": "string",
"name": "timestamp",
"type": ""
}
],
"selectedTracesFields": [
{
"dataType": "string",
"id": "serviceName--string--tag--true",
"isColumn": true,
"isJSON": false,
"key": "serviceName",
"type": "tag"
},
{
"dataType": "string",
"id": "name--string--tag--true",
"isColumn": true,
"isJSON": false,
"key": "name",
"type": "tag"
},
{
"dataType": "float64",
"id": "durationNano--float64--tag--true",
"isColumn": true,
"isJSON": false,
"key": "durationNano",
"type": "tag"
},
{
"dataType": "string",
"id": "httpMethod--string--tag--true",
"isColumn": true,
"isJSON": false,
"key": "httpMethod",
"type": "tag"
},
{
"dataType": "string",
"id": "responseStatusCode--string--tag--true",
"isColumn": true,
"isJSON": false,
"key": "responseStatusCode",
"type": "tag"
}
],
"softMax": 0,
"softMin": 0,
"stackedBarChart": false,
"thresholds": [],
"timePreferance": "GLOBAL_TIME",
"title": "Maximum CPU Utilization",
"yAxisUnit": "none"
},
{
"bucketCount": 30,
"bucketWidth": 0,
"columnUnits": {},
"description": "",
"fillSpans": false,
"id": "6fac67b0-50ec-4b43-ac4b-320a303d0369",
"isLogScale": false,
"isStacked": false,
"mergeAllActiveQueries": false,
"nullZeroValues": "zero",
"opacity": "1",
"panelTypes": "graph",
"query": {
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_ECS_CPUUtilization_min",
"reduceTo": "avg",
"spaceAggregation": "min",
"timeAggregation": "min"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.region = $Region AND cloud.account.id = $Account AND ClusterName IN $Cluster)"
},
"functions": [],
"groupBy": [
{
"dataType": "string",
"id": "ServiceName--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "ServiceName",
"type": "tag"
},
{
"dataType": "string",
"id": "ClusterName--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "ClusterName",
"type": "tag"
}
],
"having": {
"expression": ""
},
"legend": "{{ServiceName}} ({{ClusterName}})",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
}
],
"queryFormulas": []
},
"clickhouse_sql": [
{
"disabled": false,
"legend": "",
"name": "A",
"query": ""
}
],
"id": "c89482b3-5a98-4e2c-be0d-ef036d7dac05",
"promql": [
{
"disabled": false,
"legend": "",
"name": "A",
"query": ""
}
],
"queryType": "builder"
},
"selectedLogFields": [
{
"dataType": "string",
"name": "body",
"type": ""
},
{
"dataType": "string",
"name": "timestamp",
"type": ""
}
],
"selectedTracesFields": [
{
"dataType": "string",
"id": "serviceName--string--tag--true",
"isColumn": true,
"isJSON": false,
"key": "serviceName",
"type": "tag"
},
{
"dataType": "string",
"id": "name--string--tag--true",
"isColumn": true,
"isJSON": false,
"key": "name",
"type": "tag"
},
{
"dataType": "float64",
"id": "durationNano--float64--tag--true",
"isColumn": true,
"isJSON": false,
"key": "durationNano",
"type": "tag"
},
{
"dataType": "string",
"id": "httpMethod--string--tag--true",
"isColumn": true,
"isJSON": false,
"key": "httpMethod",
"type": "tag"
},
{
"dataType": "string",
"id": "responseStatusCode--string--tag--true",
"isColumn": true,
"isJSON": false,
"key": "responseStatusCode",
"type": "tag"
}
],
"softMax": 0,
"softMin": 0,
"stackedBarChart": false,
"thresholds": [],
"timePreferance": "GLOBAL_TIME",
"title": "Minimum CPU Utilization",
"yAxisUnit": "none"
}
]
}

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More