Compare commits

..

1 Commits

Author SHA1 Message Date
SagarRajput-7
7807a6df44 feat(boot-settings): move SDK config from build-time env vars to runtime boot data injection 2026-05-22 18:39:13 +05:30
94 changed files with 9512 additions and 26213 deletions

7
.github/CODEOWNERS vendored
View File

@@ -118,9 +118,6 @@ go.mod @therealpandey
/tests/integration/ @therealpandey
# e2e tests
/tests/e2e/ @AshwinBhatkal
# Flagger Owners
/pkg/flagger/ @therealpandey
@@ -165,7 +162,3 @@ go.mod @therealpandey
/frontend/src/lib/dashboard/ @SigNoz/pulse-frontend
/frontend/src/lib/dashboardVariables/ @SigNoz/pulse-frontend
/frontend/src/components/NewSelect/ @SigNoz/pulse-frontend
## Dashboard V2
/frontend/src/pages/DashboardPageV2/ @SigNoz/pulse-frontend
/frontend/src/pages/DashboardsListPageV2/ @SigNoz/pulse-frontend

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, _ dashboard.Module, _ global.Global, _ zeus.Zeus, _ gateway.Gateway, _ licensing.Licensing, _ serviceaccount.Module, _ cloudintegration.Config) (cloudintegration.Module, error) {
func(_ sqlstore.SQLStore, _ 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, dashboardModule dashboard.Module, 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, 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), dashboardModule, global, zeus, gateway, licensing, serviceAccount, cloudProvidersMap, config)
return implcloudintegration.NewModule(pkgcloudintegration.NewStore(sqlStore), 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

@@ -54,6 +54,11 @@ 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,6 +38,11 @@ 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,6 +3,7 @@ package implcloudintegration
import (
"context"
"fmt"
"sort"
"time"
"github.com/SigNoz/signoz/pkg/errors"
@@ -10,7 +11,6 @@ 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,7 +23,6 @@ import (
type module struct {
store cloudintegrationtypes.Store
dashboardModule dashboard.Module
gateway gateway.Gateway
zeus zeus.Zeus
licensing licensing.Licensing
@@ -35,7 +34,6 @@ type module struct {
func NewModule(
store cloudintegrationtypes.Store,
dashboardModule dashboard.Module,
global global.Global,
zeus zeus.Zeus,
gateway gateway.Gateway,
@@ -46,7 +44,6 @@ func NewModule(
) (cloudintegration.Module, error) {
return &module{
store: store,
dashboardModule: dashboardModule,
global: global,
zeus: zeus,
gateway: gateway,
@@ -257,41 +254,7 @@ 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.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)
})
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) {
@@ -368,16 +331,12 @@ 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, createdBy string, creator valuer.UUID, service *cloudintegrationtypes.CloudIntegrationService, provider cloudintegrationtypes.CloudProviderType) error {
func (module *module) CreateService(ctx context.Context, orgID 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())
@@ -398,21 +357,10 @@ func (module *module) CreateService(ctx context.Context, orgID valuer.UUID, crea
return err
}
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
})
return module.store.CreateService(ctx, cloudintegrationtypes.NewStorableCloudIntegrationService(service, string(configJSON)))
}
func (module *module) UpdateService(ctx context.Context, orgID valuer.UUID, createdBy string, creator valuer.UUID, integrationService *cloudintegrationtypes.CloudIntegrationService, provider cloudintegrationtypes.CloudProviderType) error {
func (module *module) UpdateService(ctx context.Context, orgID 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())
@@ -433,28 +381,43 @@ func (module *module) UpdateService(ctx context.Context, orgID valuer.UUID, crea
return err
}
metricsEnabled := integrationService.Config.IsMetricsEnabled(provider)
storableService := cloudintegrationtypes.NewStorableCloudIntegrationService(integrationService, string(configJSON))
return module.store.RunInTx(ctx, func(ctx context.Context) error {
if err := module.store.UpdateService(ctx, storableService); err != nil {
return err
}
return module.store.UpdateService(ctx, storableService)
}
if metricsEnabled {
return module.provisionDashboards(ctx, orgID, createdBy, creator, provider, integrationService, serviceDefinition)
}
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())
}
sharedServices, err := module.store.ListSharedServices(ctx, orgID, provider, integrationService.CloudIntegrationID)
if err != nil {
return err
}
if cloudintegrationtypes.IsServiceSharedWithMetricsEnabled(provider, sharedServices[integrationService.Type]) {
return nil
}
_, _, _, err = cloudintegrationtypes.ParseCloudIntegrationDashboardID(id)
if err != nil {
return nil, err
}
return module.deprovisionDashboards(ctx, orgID, provider, integrationService.Type)
})
allDashboards, err := module.listDashboards(ctx, orgID)
if err != nil {
return nil, err
}
for _, d := range allDashboards {
if d.ID == id {
return d, nil
}
}
return nil, errors.New(errors.TypeNotFound, cloudintegrationtypes.ErrCodeCloudIntegrationNotFound, "cloud integration dashboard not found")
}
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())
}
return module.listDashboards(ctx, orgID)
}
func (module *module) Collect(ctx context.Context, orgID valuer.UUID) (map[string]any, error) {
@@ -530,73 +493,52 @@ func (module *module) getOrCreateAPIKey(ctx context.Context, orgID valuer.UUID,
return factorAPIKey.Key, nil
}
// 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)
func (module *module) listDashboards(ctx context.Context, orgID valuer.UUID) ([]*dashboardtypes.Dashboard, error) {
var allDashboards []*dashboardtypes.Dashboard
existing, err := module.store.GetIntegrationDashboardBySlug(ctx, orgID, cloudintegrationtypes.IntegrationDashboardProviderCloudIntegration, slug)
if err != nil && !errors.Ast(err, errors.TypeNotFound) {
return err
}
if existing != nil {
continue
}
createdDashboard, err := module.dashboardModule.Create(ctx, orgID, createdBy, creator, dashboardtypes.SourceIntegration, dashboardtypes.PostableDashboard(dashboard.Definition))
for provider := range module.cloudProvidersMap {
cloudProvider, err := module.getCloudProvider(provider)
if err != nil {
return err
return nil, err
}
integrationDashboard := cloudintegrationtypes.NewStorableIntegrationDashboard(createdDashboard.ID, cloudintegrationtypes.IntegrationDashboardProviderCloudIntegration, slug)
if err := module.store.CreateIntegrationDashboard(ctx, integrationDashboard); err != nil {
return err
}
}
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)
connectedAccounts, err := module.store.ListConnectedAccounts(ctx, orgID, provider)
if err != nil {
return err
return nil, 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
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...)
}
return err
}
serviceDefinition.Assets.Dashboards[i].ID = row.DashboardID
}
return nil
sort.Slice(allDashboards, func(i, j int) bool {
return allDashboards[i].ID < allDashboards[j].ID
})
return allDashboards, nil
}

View File

@@ -162,11 +162,24 @@ 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")
}
return module.delete(ctx, orgID, id)
}
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
}
func (module *module) DeleteUnsafe(ctx context.Context, orgID, id valuer.UUID) error {
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) DeletePublic(ctx context.Context, orgID valuer.UUID, dashboardID valuer.UUID) error {
@@ -208,8 +221,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, source dashboardtypes.Source, data dashboardtypes.PostableDashboard) (*dashboardtypes.Dashboard, error) {
return module.pkgDashboardModule.Create(ctx, orgID, createdBy, creator, source, data)
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) Get(ctx context.Context, orgID valuer.UUID, id valuer.UUID) (*dashboardtypes.Dashboard, error) {
@@ -231,12 +244,3 @@ 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

@@ -94,12 +94,15 @@
}
})();
</script>
<script>
window.signozBootData = { settings: [[.BootSettings]] };
</script>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script>
var PYLON_APP_ID = '<%- PYLON_APP_ID %>';
if (PYLON_APP_ID) {
var pylonAppId = (window.signozBootData?.settings?.pylon || {}).appId || '';
if (pylonAppId) {
(function () {
var e = window;
var t = document;
@@ -115,10 +118,7 @@
var e = t.createElement('script');
e.setAttribute('type', 'text/javascript');
e.setAttribute('async', 'true');
e.setAttribute(
'src',
'https://widget.usepylon.com/widget/' + PYLON_APP_ID,
);
e.setAttribute('src', 'https://widget.usepylon.com/widget/' + pylonAppId);
var n = t.getElementsByTagName('script')[0];
n.parentNode.insertBefore(e, n);
};
@@ -130,16 +130,15 @@
})();
}
</script>
<script type="text/javascript">
window.AppcuesSettings = { enableURLDetection: true };
</script>
<script>
var APPCUES_APP_ID = '<%- APPCUES_APP_ID %>';
if (APPCUES_APP_ID) {
var appcuesAppId =
(window.signozBootData?.settings?.appcues || {}).appId || '';
if (appcuesAppId) {
window.AppcuesSettings = { enableURLDetection: true };
(function (d, t) {
var a = d.createElement(t);
a.async = 1;
a.src = '//fast.appcues.com/' + APPCUES_APP_ID + '.js';
a.src = '//fast.appcues.com/' + appcuesAppId + '.js';
var s = d.getElementsByTagName(t)[0];
s.parentNode.insertBefore(a, s);
})(document, 'script');

View File

@@ -18,7 +18,6 @@ const BANNED_COMPONENTS = {
'Use @signozhq/ui/typography Typography instead of antd Typography.',
Switch: 'Use @signozhq/ui/switch Switch instead of antd Switch.',
Badge: 'Use @signozhq/ui/badge instead of antd Badge.',
Progress: 'Use @signozhq/ui/progress instead of antd Progress.',
};
export default {

View File

@@ -35,6 +35,7 @@ import { PreferenceContextProvider } from 'providers/preferences/context/Prefere
import { QueryBuilderProvider } from 'providers/QueryBuilder';
import { LicenseStatus } from 'types/api/licensesV3/getActive';
import { extractDomain } from 'utils/app';
import { bootSettings } from 'utils/bootData';
import { Home } from './pageComponents';
import PrivateRoute from './Private';
@@ -293,7 +294,7 @@ function App(): JSX.Element {
(isCloudUser || isEnterpriseSelfHostedUser)
) {
const email = user.email || '';
const secret = process.env.PYLON_IDENTITY_SECRET || '';
const secret = bootSettings.pylon.identSecret ?? '';
let emailHash = '';
if (email && secret) {
@@ -302,7 +303,7 @@ function App(): JSX.Element {
window.pylon = {
chat_settings: {
app_id: process.env.PYLON_APP_ID,
app_id: bootSettings.pylon.appId,
email: user.email,
name: user.displayName || user.email,
email_hash: emailHash,
@@ -332,8 +333,8 @@ function App(): JSX.Element {
useEffect(() => {
if (isCloudUser || isEnterpriseSelfHostedUser) {
if (process.env.POSTHOG_KEY) {
posthog.init(process.env.POSTHOG_KEY, {
if (bootSettings.posthog.key) {
posthog.init(bootSettings.posthog.key, {
api_host: 'https://us.i.posthog.com',
person_profiles: 'identified_only', // or 'always' to create profiles for anonymous users as well
});
@@ -341,8 +342,8 @@ function App(): JSX.Element {
if (!isSentryInitialized) {
Sentry.init({
dsn: process.env.SENTRY_DSN,
tunnel: process.env.TUNNEL_URL,
dsn: bootSettings.sentry.dsn,
tunnel: bootSettings.sentry.tunnelUrl,
environment: 'production',
integrations: [
Sentry.browserTracingIntegration(),

View File

@@ -51,6 +51,13 @@
background: var(--l1-background);
}
.progress-container {
.ant-progress-bg {
height: 8px !important;
border-radius: 4px;
}
}
.ant-table-tbody > tr:hover > td {
background: color-mix(in srgb, var(--l1-foreground) 4%, transparent);
}

View File

@@ -9,13 +9,13 @@ import {
Flex,
Input,
InputRef,
Progress,
Space,
Spin,
TableColumnsType,
TableColumnType,
Tooltip,
} from 'antd';
import { Progress } from '@signozhq/ui/progress';
import { Typography } from '@signozhq/ui/typography';
import type { FilterDropdownProps } from 'antd/lib/table/interface';
import logEvent from 'api/common/logEvent';
@@ -59,7 +59,7 @@ function ProgressRender(item: string | number): JSX.Element {
<Progress
percent={percent}
strokeLinecap="butt"
showInfo
size="small"
strokeColor={((): string => {
const cpuPercent = percent;
if (cpuPercent >= 90) {

View File

@@ -45,10 +45,6 @@
.contributors-row {
height: 80px;
}
.top-contributors-progress {
--progress-background: transparent;
}
&__content {
.ant-table {
&-cell {

View File

@@ -1,7 +1,6 @@
import { HTMLAttributes } from 'react';
import { Color } from '@signozhq/design-tokens';
import { Table, TableColumnsType as ColumnsType } from 'antd';
import { Progress } from '@signozhq/ui/progress';
import { Progress, Table, TableColumnsType as ColumnsType } from 'antd';
import logEvent from 'api/common/logEvent';
import { ConditionalAlertPopover } from 'container/AlertHistory/AlertPopover/AlertPopover';
import AlertLabels from 'pages/AlertDetails/AlertHeader/AlertLabels/AlertLabels';
@@ -52,8 +51,8 @@ function TopContributorsRows({
<Progress
percent={(count / totalCurrentTriggers) * 100}
showInfo={false}
trailColor="rgba(255, 255, 255, 0)"
strokeColor={Color.BG_ROBIN_500}
className="top-contributors-progress"
/>
</ConditionalAlertPopover>
),

View File

@@ -141,9 +141,12 @@
.progress-container {
width: 158px;
.ant-progress {
margin: 0;
span {
font-weight: 600;
.ant-progress-text {
font-weight: 600;
}
}
}

View File

@@ -1,8 +1,7 @@
import { useMemo } from 'react';
import { useQueries } from 'react-query';
import { Color } from '@signozhq/design-tokens';
import { Skeleton, Tooltip } from 'antd';
import { Progress } from '@signozhq/ui/progress';
import { Progress, Skeleton, Tooltip } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import { ENTITY_VERSION_V5 } from 'constants/app';
import { REACT_QUERY_KEY } from 'constants/reactQueryKeys';
@@ -137,11 +136,12 @@ function DomainMetrics({
<Tooltip title={formattedDomainMetricsData.errorRate}>
{formattedDomainMetricsData.errorRate !== '-' ? (
<Progress
status="active"
percent={Number(
Number(formattedDomainMetricsData.errorRate).toFixed(2),
)}
strokeLinecap="butt"
showInfo
size="small"
strokeColor={((): string => {
const errorRatePercent = Number(
Number(formattedDomainMetricsData.errorRate).toFixed(2),

View File

@@ -1,8 +1,7 @@
import { useMemo } from 'react';
import { UseQueryResult } from 'react-query';
import { Color } from '@signozhq/design-tokens';
import { Skeleton, Tooltip } from 'antd';
import { Progress } from '@signozhq/ui/progress';
import { Progress, Skeleton, Tooltip } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import {
getDisplayValue,
@@ -81,9 +80,10 @@ function EndPointMetrics({
<Tooltip title={metricsData?.errorRate}>
{metricsData?.errorRate !== '-' ? (
<Progress
status="active"
percent={Number(Number(metricsData?.errorRate ?? 0).toFixed(2))}
strokeLinecap="butt"
showInfo
size="small"
strokeColor={((): string => {
const errorRatePercent = Number(
Number(metricsData?.errorRate ?? 0).toFixed(2),

View File

@@ -1,7 +1,6 @@
import { ReactNode } from 'react';
import { Color } from '@signozhq/design-tokens';
import { TableColumnType as ColumnType, Tag, Tooltip } from 'antd';
import { Progress } from '@signozhq/ui/progress';
import { Progress, TableColumnType as ColumnType, Tag, Tooltip } from 'antd';
import { convertFiltersToExpressionWithExistingQuery } from 'components/QueryBuilderV2/utils';
import {
FiltersType,
@@ -258,9 +257,10 @@ export const columnsConfig: ColumnType<APIDomainsRowData>[] = [
errorRate === 'n/a' || errorRate === '-' ? 0 : errorRate;
return (
<Progress
status="active"
percent={Number((errorRateValue as number).toFixed(2))}
strokeLinecap="butt"
showInfo
size="small"
strokeColor={((): string => {
const errorRatePercent = Number((errorRateValue as number).toFixed(2));
if (errorRatePercent >= 90) {
@@ -1022,13 +1022,14 @@ export const getEndPointsColumnsConfig = (
className: `column`,
render: (errorRate: number | string): React.ReactNode => (
<Progress
status="active"
percent={Number(
(
(errorRate === 'n/a' || errorRate === '-' ? 0 : errorRate) as number
).toFixed(1),
)}
strokeLinecap="butt"
showInfo
size="small"
strokeColor={((): string => {
const errorRatePercent = Number((errorRate as number).toFixed(1));
if (errorRatePercent >= 90) {
@@ -2513,9 +2514,10 @@ export const dependentServicesColumns: ColumnType<DependentServicesData>[] = [
render: (errorPercentage: number | string): React.ReactNode =>
errorPercentage !== '-' ? (
<Progress
status="active"
percent={Number((errorPercentage as number).toFixed(2))}
strokeLinecap="butt"
showInfo
size="small"
strokeColor={((): string => {
const errorPercentagePercent = Number(
(errorPercentage as number).toFixed(2),
@@ -3020,13 +3022,14 @@ export const getAllEndpointsWidgetData = (
),
F1: (errorRate: any): ReactNode => (
<Progress
status="active"
percent={Number(
(
(errorRate === 'n/a' || errorRate === '-' ? 0 : errorRate) as number
).toFixed(2),
)}
strokeLinecap="butt"
showInfo
size="small"
strokeColor={((): string => {
const errorRatePercent = Number(
(

View File

@@ -39,5 +39,7 @@
width: 100% !important;
--progress-width: 100%;
.ant-progress-steps-outer {
width: 100% !important;
}
}

View File

@@ -1,4 +1,4 @@
import { Progress } from '@signozhq/ui/progress';
import { Progress } from 'antd';
import { ChecklistItem } from '../HomeChecklist/HomeChecklist';
@@ -15,7 +15,9 @@ function StepsProgress({
const totalChecklistItems = checklistItems.length;
const progress = (completedChecklistItems.length / totalChecklistItems) * 100;
const progress = Math.round(
(completedChecklistItems.length / totalChecklistItems) * 100,
);
return (
<div className="steps-progress-container">

View File

@@ -1,7 +1,6 @@
import React from 'react';
import { Color } from '@signozhq/design-tokens';
import { Tag } from 'antd';
import { Progress } from '@signozhq/ui/progress';
import { Progress, Tag } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import {
getHostLists,
@@ -80,8 +79,8 @@ export const hostDetailsMetadataConfig: K8sDetailsMetadataConfig<HostData>[] = [
render: (value): React.ReactNode => (
<Progress
percent={Number(Number(value).toFixed(1))}
size="small"
strokeColor={getProgressColor(Number(value))}
showInfo
/>
),
},
@@ -91,8 +90,8 @@ export const hostDetailsMetadataConfig: K8sDetailsMetadataConfig<HostData>[] = [
render: (value): React.ReactNode => (
<Progress
percent={Number(Number(value).toFixed(1))}
size="small"
strokeColor={getMemoryProgressColor(Number(value))}
showInfo
/>
),
},

View File

@@ -60,6 +60,11 @@
& > div {
width: 100%;
}
:global(.ant-progress-bg) {
height: 8px !important;
border-radius: 4px;
}
}
.progressBar {

View File

@@ -103,8 +103,12 @@
.progress-container {
width: 158px;
span {
font-weight: 600;
.ant-progress {
margin: 0;
.ant-progress-text {
font-weight: 600;
}
}
}
@@ -288,6 +292,10 @@
}
.progress-container {
.ant-progress-bg {
height: 8px !important;
border-radius: 4px;
}
}
.ant-table-tbody > tr:hover > td {

View File

@@ -1,4 +1,4 @@
import { Progress } from '@signozhq/ui/progress';
import { Progress } from 'antd';
import TanStackTable from 'components/TanStackTableView';
import {
getMemoryProgressColor,
@@ -53,6 +53,7 @@ export function EntityProgressBar({
<Progress
percent={percentage}
strokeLinecap="butt"
size="small"
status="normal"
strokeColor={getStrokeColor(type, value)}
className={styles.progressBar}

View File

@@ -142,6 +142,13 @@
}
}
.progress-container {
.ant-progress-bg {
height: 8px !important;
border-radius: 4px;
}
}
.ant-table-tbody > tr:hover > td {
background: color-mix(in srgb, var(--l1-foreground) 4%, transparent);
}

View File

@@ -153,18 +153,3 @@
border-radius: 3px;
}
// Disable default fade so the JS-driven clip-path ripple isn't crossfaded.
::view-transition-old(root),
::view-transition-new(root) {
animation: none;
mix-blend-mode: normal;
}
::view-transition-old(root) {
z-index: 1;
}
::view-transition-new(root) {
z-index: 2;
}

View File

@@ -15,11 +15,6 @@ import { UserPreference } from 'types/api/preferences/preference';
import { showErrorNotification } from 'utils/error';
import LicenseSection from './LicenseSection';
import {
canAnimateThemeRipple,
getRippleOrigin,
runThemeRipple,
} from './themeRipple';
import TimezoneAdaptation from './TimezoneAdaptation/TimezoneAdaptation';
import UserInfo from './UserInfo';
@@ -93,35 +88,22 @@ function MySettings(): JSX.Element {
return isDarkMode ? 'dark' : 'light';
});
const handleThemeChange = (event: RadioChangeEvent): void => {
const { value } = event.target;
logEvent('Account Settings: Theme Changed', { theme: value });
const handleThemeChange = ({ target: { value } }: RadioChangeEvent): void => {
logEvent('Account Settings: Theme Changed', {
theme: value,
});
setTheme(value);
const willFlipDarkMode =
value !== 'auto' && (value === 'dark') !== isDarkMode;
const applyChange = (): void => {
setTheme(value);
if (value === 'auto') {
setAutoSwitch(true);
return;
}
if (value === 'auto') {
setAutoSwitch(true);
} else {
setAutoSwitch(false);
if (willFlipDarkMode) {
// Only toggle if the current theme is different from the target
const targetIsDark = value === 'dark';
if (targetIsDark !== isDarkMode) {
toggleTheme();
}
};
// Only ripple on a real dark↔light flip, and only when the browser
// supports View Transitions and the user hasn't opted out of motion.
if (!willFlipDarkMode || !canAnimateThemeRipple()) {
applyChange();
return;
}
const clickedTarget = event.nativeEvent?.target as HTMLElement | null;
const clickedButton = clickedTarget?.closest('.ant-radio-button-wrapper');
runThemeRipple(getRippleOrigin(clickedButton), applyChange);
};
useEffect(() => {
@@ -161,7 +143,7 @@ function MySettings(): JSX.Element {
value: checked,
},
{
onError: (error: unknown) => {
onError: (error) => {
// Revert the state if the API call fails
setSideNavPinned(!checked);
updateUserPreferenceInContext({

View File

@@ -1,76 +0,0 @@
import { flushSync } from 'react-dom';
const RIPPLE_DURATION_MS = 500;
const RIPPLE_EASING = 'ease-in-out';
type ViewTransition = { ready: Promise<void> };
type DocumentWithVT = Document & {
startViewTransition?: (callback: () => void) => ViewTransition;
};
export type RippleOrigin = { x: number; y: number };
export function getRippleOrigin(
element: Element | null | undefined,
): RippleOrigin {
const rect = element?.getBoundingClientRect();
if (!rect) {
return { x: window.innerWidth / 2, y: window.innerHeight / 2 };
}
return {
x: rect.left + rect.width / 2,
y: rect.top + rect.height / 2,
};
}
export function canAnimateThemeRipple(): boolean {
const doc = document as DocumentWithVT;
if (typeof doc.startViewTransition !== 'function') {
return false;
}
return !window.matchMedia('(prefers-reduced-motion: reduce)').matches;
}
// Runs `applyChange` inside a View Transition and grows a circular clip-path
// from `origin` until it covers the viewport. Callers should gate on
// canAnimateThemeRipple() first; this is a safe no-animation fallback otherwise.
export function runThemeRipple(
origin: RippleOrigin,
applyChange: () => void,
): void {
const doc = document as DocumentWithVT;
if (!doc.startViewTransition) {
applyChange();
return;
}
const transition = doc.startViewTransition(() => {
flushSync(applyChange);
});
const endRadius = distanceToFurthestCorner(origin);
const fromCircle = `circle(0px at ${origin.x}px ${origin.y}px)`;
const toCircle = `circle(${endRadius}px at ${origin.x}px ${origin.y}px)`;
transition.ready
.then(() => {
document.documentElement.animate(
{ clipPath: [fromCircle, toCircle] },
{
duration: RIPPLE_DURATION_MS,
easing: RIPPLE_EASING,
pseudoElement: '::view-transition-new(root)',
},
);
})
.catch(() => {
// Transition cancelled — applyChange has already run, so nothing to do.
});
}
function distanceToFurthestCorner({ x, y }: RippleOrigin): number {
return Math.hypot(
Math.max(x, window.innerWidth - x),
Math.max(y, window.innerHeight - y),
);
}

View File

@@ -87,7 +87,12 @@
.service-progress-indicator {
width: fit-content;
--progress-width: 30px;
margin-inline-end: 0px !important;
margin-bottom: 0px !important;
.ant-progress-inner {
width: 30px;
}
}
.percent-value {

View File

@@ -1,7 +1,6 @@
import { useEffect, useMemo, useState } from 'react';
import { useParams } from 'react-router-dom';
import { Skeleton, Tooltip } from 'antd';
import { Progress } from '@signozhq/ui/progress';
import { Progress, Skeleton, Tooltip } from 'antd';
import { Typography } from '@signozhq/ui/typography';
import { AxiosError } from 'axios';
import Spinner from 'components/Spinner';

View File

@@ -1,15 +1,4 @@
import { createBrowserHistory } from 'history';
import { getBasePath } from 'utils/basePath';
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;
export default createBrowserHistory({ basename: getBasePath() });

View File

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

View File

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

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, { hasInAppHistory } from 'lib/history';
import history from 'lib/history';
import {
ArrowLeft,
CalendarClock,
@@ -96,7 +96,13 @@ function TraceDetailsHeader({
}, [traceID]);
const handlePreviousBtnClick = useCallback((): void => {
if (hasInAppHistory()) {
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) {
history.goBack();
} else {
history.push(ROUTES.TRACES_EXPLORER);
@@ -124,7 +130,6 @@ function TraceDetailsHeader({
size="md"
className={styles.backBtn}
onClick={handlePreviousBtnClick}
aria-label="Back"
>
<ArrowLeft size={14} />
</Button>

View File

@@ -1,60 +0,0 @@
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

@@ -1,5 +1,6 @@
// eslint-disable-next-line no-restricted-imports
import { compose, Store } from 'redux';
import type { SignozBootSettings } from 'utils/bootData';
declare global {
interface Window {
@@ -7,6 +8,7 @@ declare global {
pylon: any;
Appcues: Record<string, any>;
__REDUX_DEVTOOLS_EXTENSION_COMPOSE__: typeof compose;
signozBootData?: { settings?: Partial<SignozBootSettings> };
}
}

View File

@@ -0,0 +1,99 @@
export {};
type BootData = typeof import('../bootData');
function loadModule(settings?: object): BootData {
(window as any).signozBootData =
settings !== undefined ? { settings } : undefined;
let mod!: BootData;
jest.isolateModules(() => {
// oxlint-disable-next-line typescript-eslint/no-require-imports, typescript-eslint/no-var-requires
mod = require('../bootData');
});
return mod;
}
afterEach(() => {
delete (window as any).signozBootData;
});
describe('when window.signozBootData is absent', () => {
it('all sub-objects are defined and empty', () => {
const { bootSettings } = loadModule();
expect(bootSettings.sentry).toStrictEqual({});
expect(bootSettings.posthog).toStrictEqual({});
expect(bootSettings.pylon).toStrictEqual({});
expect(bootSettings.appcues).toStrictEqual({});
expect(bootSettings.roles).toStrictEqual({});
});
it('optional fields are undefined', () => {
const { bootSettings } = loadModule();
expect(bootSettings.sentry.dsn).toBeUndefined();
expect(bootSettings.sentry.tunnelUrl).toBeUndefined();
expect(bootSettings.posthog.key).toBeUndefined();
expect(bootSettings.pylon.appId).toBeUndefined();
expect(bootSettings.pylon.identSecret).toBeUndefined();
expect(bootSettings.appcues.appId).toBeUndefined();
expect(bootSettings.roles.isRolesDetailEnabled).toBeUndefined();
});
});
describe('when window.signozBootData.settings is populated', () => {
it('reads sentry config', () => {
const { bootSettings } = loadModule({
sentry: { dsn: 'https://abc@sentry.io/1', tunnelUrl: '/tunnel' },
});
expect(bootSettings.sentry.dsn).toBe('https://abc@sentry.io/1');
expect(bootSettings.sentry.tunnelUrl).toBe('/tunnel');
});
it('reads posthog config', () => {
const { bootSettings } = loadModule({ posthog: { key: 'phk_xxx' } });
expect(bootSettings.posthog.key).toBe('phk_xxx');
});
it('reads pylon config', () => {
const { bootSettings } = loadModule({
pylon: { appId: 'pylon-abc', identSecret: 'secret-xyz' },
});
expect(bootSettings.pylon.appId).toBe('pylon-abc');
expect(bootSettings.pylon.identSecret).toBe('secret-xyz');
});
it('reads appcues config', () => {
const { bootSettings } = loadModule({ appcues: { appId: 'appcues-123' } });
expect(bootSettings.appcues.appId).toBe('appcues-123');
});
it('reads roles config', () => {
const { bootSettings } = loadModule({
roles: { isRolesDetailEnabled: true },
});
expect(bootSettings.roles.isRolesDetailEnabled).toBe(true);
});
it('missing sub-namespaces fall back to empty objects', () => {
const { bootSettings } = loadModule({
sentry: { dsn: 'https://abc@sentry.io/1' },
});
expect(bootSettings.posthog).toStrictEqual({});
expect(bootSettings.posthog.key).toBeUndefined();
expect(bootSettings.pylon).toStrictEqual({});
expect(bootSettings.appcues).toStrictEqual({});
expect(bootSettings.roles).toStrictEqual({});
});
});
describe('when window.signozBootData exists but settings is undefined', () => {
it('all sub-objects are empty', () => {
(window as any).signozBootData = {};
let mod!: BootData;
jest.isolateModules(() => {
// oxlint-disable-next-line typescript-eslint/no-require-imports, typescript-eslint/no-var-requires
mod = require('../bootData');
});
expect(mod.bootSettings.sentry).toStrictEqual({});
expect(mod.bootSettings.posthog).toStrictEqual({});
});
});

View File

@@ -0,0 +1,35 @@
export interface SentryConfig {
dsn?: string;
tunnelUrl?: string;
}
export interface PosthogConfig {
key?: string;
}
export interface PylonConfig {
appId?: string;
identSecret?: string;
}
export interface AppcuesConfig {
appId?: string;
}
export interface RolesConfig {
isRolesDetailEnabled?: boolean;
}
export interface SignozBootSettings {
sentry: SentryConfig;
posthog: PosthogConfig;
pylon: PylonConfig;
appcues: AppcuesConfig;
roles: RolesConfig;
}
const raw = window.signozBootData?.settings;
export const bootSettings: Readonly<SignozBootSettings> = {
sentry: raw?.sentry ?? {},
posthog: raw?.posthog ?? {},
pylon: raw?.pylon ?? {},
appcues: raw?.appcues ?? {},
roles: raw?.roles ?? {},
};

View File

@@ -13,16 +13,9 @@ declare module '*.md?raw' {
interface ImportMetaEnv {
readonly VITE_FRONTEND_API_ENDPOINT: string;
readonly VITE_WEBSOCKET_API_ENDPOINT: string;
readonly VITE_PYLON_APP_ID: string;
readonly VITE_PYLON_IDENTITY_SECRET: string;
readonly VITE_APPCUES_APP_ID: string;
readonly VITE_POSTHOG_KEY: string;
readonly VITE_SENTRY_AUTH_TOKEN: string;
readonly VITE_SENTRY_ORG: string;
readonly VITE_SENTRY_PROJECT_ID: string;
readonly VITE_SENTRY_DSN: string;
readonly VITE_TUNNEL_URL: string;
readonly VITE_TUNNEL_DOMAIN: string;
readonly VITE_DOCS_BASE_URL: string;
}

View File

@@ -6,7 +6,6 @@ import type { Plugin, TransformResult, UserConfig } from 'vite';
import { defineConfig, loadEnv } from 'vite';
import vitePluginChecker from 'vite-plugin-checker';
import viteCompression from 'vite-plugin-compression';
import { createHtmlPlugin } from 'vite-plugin-html';
import { ViteImageOptimizer } from 'vite-plugin-image-optimizer';
import tsconfigPaths from 'vite-tsconfig-paths';
@@ -23,6 +22,29 @@ function devBasePathPlugin(basePath: string): Plugin {
};
}
function devBootDataPlugin(env: Record<string, string>): Plugin {
return {
name: 'dev-boot-data',
apply: 'serve',
transformIndexHtml(html): string {
const bootSettings = {
sentry: {
dsn: env.VITE_SENTRY_DSN || undefined,
tunnelUrl: env.VITE_TUNNEL_URL || undefined,
},
posthog: { key: env.VITE_POSTHOG_KEY || undefined },
pylon: {
appId: env.VITE_PYLON_APP_ID || undefined,
identSecret: env.VITE_PYLON_IDENTITY_SECRET || undefined,
},
appcues: { appId: env.VITE_APPCUES_APP_ID || undefined },
roles: {},
};
return html.replaceAll('[[.BootSettings]]', JSON.stringify(bootSettings));
},
};
}
function rawMarkdownPlugin(): Plugin {
return {
name: 'raw-markdown',
@@ -47,15 +69,8 @@ export default defineConfig(({ mode }): UserConfig => {
tsconfigPaths(),
rawMarkdownPlugin(),
devBasePathPlugin(basePath),
devBootDataPlugin(env),
react(),
createHtmlPlugin({
inject: {
data: {
PYLON_APP_ID: env.VITE_PYLON_APP_ID || '',
APPCUES_APP_ID: env.VITE_APPCUES_APP_ID || '',
},
},
}),
vitePluginChecker({
typescript: true,
// this doubles the build tim
@@ -126,17 +141,8 @@ export default defineConfig(({ mode }): UserConfig => {
'process.env.WEBSOCKET_API_ENDPOINT': JSON.stringify(
env.VITE_WEBSOCKET_API_ENDPOINT,
),
'process.env.PYLON_APP_ID': JSON.stringify(env.VITE_PYLON_APP_ID),
'process.env.PYLON_IDENTITY_SECRET': JSON.stringify(
env.VITE_PYLON_IDENTITY_SECRET,
),
'process.env.APPCUES_APP_ID': JSON.stringify(env.VITE_APPCUES_APP_ID),
'process.env.POSTHOG_KEY': JSON.stringify(env.VITE_POSTHOG_KEY),
'process.env.SENTRY_ORG': JSON.stringify(env.VITE_SENTRY_ORG),
'process.env.SENTRY_PROJECT_ID': JSON.stringify(env.VITE_SENTRY_PROJECT_ID),
'process.env.SENTRY_DSN': JSON.stringify(env.VITE_SENTRY_DSN),
'process.env.TUNNEL_URL': JSON.stringify(env.VITE_TUNNEL_URL),
'process.env.TUNNEL_DOMAIN': JSON.stringify(env.VITE_TUNNEL_DOMAIN),
'process.env.DOCS_BASE_URL': JSON.stringify(env.VITE_DOCS_BASE_URL),
},
// In production, use relative paths so assets work with any base path injected by the backend.

View File

@@ -6,6 +6,7 @@ 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"
)
@@ -42,14 +43,23 @@ 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, createdBy string, creator valuer.UUID, service *citypes.CloudIntegrationService, provider citypes.CloudProviderType) error
CreateService(ctx context.Context, orgID valuer.UUID, service *citypes.CloudIntegrationService, provider citypes.CloudProviderType) error
// UpdateService updates cloud integration service
UpdateService(ctx context.Context, orgID valuer.UUID, createdBy string, creator valuer.UUID, service *citypes.CloudIntegrationService, provider citypes.CloudProviderType) error
UpdateService(ctx context.Context, orgID 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": "v5",
"version": "v4",
"widgets": [
{
"bucketCount": 30,
@@ -140,19 +140,74 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_ApplicationELB_TargetResponseTime_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_ApplicationELB_TargetResponseTime_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_ApplicationELB_TargetResponseTime_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND TargetGroup NOT EXISTS AND AvailabilityZone NOT EXISTS)"
"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"
},
"functions": [],
"groupBy": [
@@ -181,14 +236,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{LoadBalancer}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
}
],
"queryFormulas": []
@@ -290,19 +346,74 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_ApplicationELB_RequestCount_sum",
"reduceTo": "avg",
"spaceAggregation": "sum",
"timeAggregation": "sum"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_ApplicationELB_RequestCount_sum--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_ApplicationELB_RequestCount_sum",
"type": "Gauge"
},
"aggregateOperator": "sum",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND AvailabilityZone NOT EXISTS AND TargetGroup NOT EXISTS)"
"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"
},
"functions": [],
"groupBy": [
@@ -331,14 +442,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{LoadBalancer}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "sum",
"stepInterval": 60,
"timeAggregation": "sum"
}
],
"queryFormulas": []
@@ -440,19 +552,74 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_ApplicationELB_HTTPCode_Target_5XX_Count_sum",
"reduceTo": "avg",
"spaceAggregation": "sum",
"timeAggregation": "sum"
}
],
"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",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND TargetGroup NOT EXISTS AND AvailabilityZone NOT EXISTS)"
"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"
},
"functions": [],
"groupBy": [
@@ -481,14 +648,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{LoadBalancer}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "sum",
"stepInterval": 60,
"timeAggregation": "sum"
}
],
"queryFormulas": []
@@ -590,19 +758,61 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_ApplicationELB_HTTPCode_ELB_5XX_Count_sum",
"reduceTo": "avg",
"spaceAggregation": "sum",
"timeAggregation": "sum"
}
],
"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",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND AvailabilityZone NOT EXISTS)"
"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"
},
"functions": [],
"groupBy": [
@@ -631,14 +841,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{LoadBalancer}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "sum",
"stepInterval": 60,
"timeAggregation": "sum"
}
],
"queryFormulas": []
@@ -740,19 +951,61 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_ApplicationELB_ActiveConnectionCount_sum",
"reduceTo": "avg",
"spaceAggregation": "sum",
"timeAggregation": "sum"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_ApplicationELB_ActiveConnectionCount_sum--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_ApplicationELB_ActiveConnectionCount_sum",
"type": "Gauge"
},
"aggregateOperator": "sum",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND AvailabilityZone NOT EXISTS)"
"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"
},
"functions": [],
"groupBy": [
@@ -781,14 +1034,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{LoadBalancer}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "sum",
"stepInterval": 60,
"timeAggregation": "sum"
}
],
"queryFormulas": []
@@ -890,19 +1144,70 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_ApplicationELB_TargetConnectionErrorCount_sum",
"reduceTo": "avg",
"spaceAggregation": "sum",
"timeAggregation": "sum"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_ApplicationELB_TargetConnectionErrorCount_sum--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_ApplicationELB_TargetConnectionErrorCount_sum",
"type": "Gauge"
},
"aggregateOperator": "sum",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND TargetGroup NOT EXISTS AND AvailabilityZone NOT EXISTS)"
"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"
},
"functions": [],
"groupBy": [
@@ -931,14 +1236,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{LoadBalancer}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "sum",
"stepInterval": 60,
"timeAggregation": "sum"
}
],
"queryFormulas": []
@@ -1040,19 +1346,48 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_ApplicationELB_ConsumedLCUs_sum",
"reduceTo": "avg",
"spaceAggregation": "sum",
"timeAggregation": "sum"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_ApplicationELB_ConsumedLCUs_sum--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_ApplicationELB_ConsumedLCUs_sum",
"type": "Gauge"
},
"aggregateOperator": "sum",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region)"
"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"
},
"functions": [],
"groupBy": [
@@ -1081,14 +1416,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{LoadBalancer}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "sum",
"stepInterval": 60,
"timeAggregation": "sum"
}
],
"queryFormulas": []
@@ -1190,19 +1526,61 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_ApplicationELB_ProcessedBytes_sum",
"reduceTo": "avg",
"spaceAggregation": "sum",
"timeAggregation": "sum"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_ApplicationELB_ProcessedBytes_sum--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_ApplicationELB_ProcessedBytes_sum",
"type": "Gauge"
},
"aggregateOperator": "sum",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND AvailabilityZone NOT EXISTS)"
"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"
},
"functions": [],
"groupBy": [
@@ -1231,14 +1609,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{LoadBalancer}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "sum",
"stepInterval": 60,
"timeAggregation": "sum"
}
],
"queryFormulas": []
@@ -1340,19 +1719,48 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_ApplicationELB_PeakLCUs_sum",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_ApplicationELB_PeakLCUs_sum--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_ApplicationELB_PeakLCUs_sum",
"type": "Gauge"
},
"aggregateOperator": "max",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region)"
"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"
},
"functions": [],
"groupBy": [
@@ -1381,14 +1789,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{LoadBalancer}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
}
],
"queryFormulas": []

View File

@@ -94,7 +94,7 @@
"type": "QUERY"
}
},
"version": "v5",
"version": "v4",
"widgets": [
{
"bucketCount": 30,
@@ -112,19 +112,61 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_EC2_CPUUtilization_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_EC2_CPUUtilization_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_EC2_CPUUtilization_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(service.instance.id != '' AND cloud.account.id = $Account AND cloud.region = $Region)"
"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"
},
"functions": [],
"groupBy": [
@@ -153,14 +195,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{service.instance.id}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
}
],
"queryFormulas": []
@@ -262,19 +305,61 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_EC2_CPUCreditUsage_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_EC2_CPUCreditUsage_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_EC2_CPUCreditUsage_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(service.instance.id != '' AND cloud.account.id = $Account AND cloud.region = $Region)"
"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"
},
"functions": [],
"groupBy": [
@@ -303,14 +388,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{service.instance.id}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
}
],
"queryFormulas": []
@@ -412,19 +498,61 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_EC2_EBSReadBytes_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_EC2_EBSReadBytes_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_EC2_EBSReadBytes_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(service.instance.id != '' AND cloud.account.id = $Account AND cloud.region = $Region)"
"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"
},
"functions": [],
"groupBy": [
@@ -453,29 +581,72 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{service.instance.id}} - Reads",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
},
{
"aggregations": [
{
"metricName": "aws_EC2_EBSWriteBytes_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_EC2_EBSWriteBytes_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_EC2_EBSWriteBytes_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"dataSource": "metrics",
"disabled": false,
"expression": "B",
"filter": {
"expression": "(service.instance.id != '' AND cloud.account.id = $Account AND cloud.region = $Region)"
"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"
},
"functions": [],
"groupBy": [
@@ -504,14 +675,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{service.instance.id}} - Writes",
"limit": null,
"orderBy": [],
"queryName": "B",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
}
],
"queryFormulas": []
@@ -613,19 +785,61 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_EC2_EBSReadOps_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_EC2_EBSReadOps_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_EC2_EBSReadOps_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(service.instance.id != '' AND cloud.account.id = $Account AND cloud.region = $Region)"
"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"
},
"functions": [],
"groupBy": [
@@ -654,29 +868,72 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{service.instance.id}} - Reads",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
},
{
"aggregations": [
{
"metricName": "aws_EC2_EBSWriteOps_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_EC2_EBSWriteOps_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_EC2_EBSWriteOps_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"dataSource": "metrics",
"disabled": false,
"expression": "B",
"filter": {
"expression": "(service.instance.id != '' AND cloud.account.id = $Account AND cloud.region = $Region)"
"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"
},
"functions": [],
"groupBy": [
@@ -705,14 +962,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{service.instance.id}} - Writes",
"limit": null,
"orderBy": [],
"queryName": "B",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
}
],
"queryFormulas": []
@@ -814,19 +1072,61 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_EC2_NetworkIn_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_EC2_NetworkIn_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_EC2_NetworkIn_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(service.instance.id != '' AND cloud.account.id = $Account AND cloud.region = $Region)"
"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"
},
"functions": [],
"groupBy": [
@@ -855,14 +1155,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{service.instance.id}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
}
],
"queryFormulas": []
@@ -964,19 +1265,61 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_EC2_NetworkOut_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_EC2_NetworkOut_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_EC2_NetworkOut_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(service.instance.id != '' AND cloud.account.id = $Account AND cloud.region = $Region)"
"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"
},
"functions": [],
"groupBy": [
@@ -1005,14 +1348,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{service.instance.id}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
}
],
"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": "v5",
"version": "v4",
"widgets": [
{
"bucketCount": 30,
@@ -160,19 +160,61 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_ECS_MemoryUtilization_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_ECS_MemoryUtilization_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_ECS_MemoryUtilization_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.region = $Region AND cloud.account.id = $Account AND ClusterName = $Cluster)"
"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"
},
"functions": [],
"groupBy": [
@@ -185,14 +227,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{ServiceName}} ",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
}
],
"queryFormulas": []
@@ -297,19 +340,61 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_ECS_CPUUtilization_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_ECS_CPUUtilization_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_ECS_CPUUtilization_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.region = $Region AND cloud.account.id = $Account AND ClusterName = $Cluster)"
"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"
},
"functions": [],
"groupBy": [
@@ -322,14 +407,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{ServiceName}} ",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
}
],
"queryFormulas": []
@@ -434,30 +520,75 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_ECS_ContainerInsights_CpuUtilized_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"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",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.region = $Region AND cloud.account.id = $Account AND ClusterName IN $Cluster)"
"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"
},
"functions": [],
"groupBy": [],
"having": {
"expression": ""
},
"having": [],
"legend": "",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
}
],
"queryFormulas": []
@@ -562,30 +693,71 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_ECS_ContainerInsights_CpuReserved_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"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",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.region = $Region AND cloud.account.id = $Account AND ClusterName = $Cluster)"
"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"
},
"functions": [],
"groupBy": [],
"having": {
"expression": ""
},
"having": [],
"legend": "",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
}
],
"queryFormulas": []
@@ -690,30 +862,71 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_ECS_ContainerInsights_MemoryUtilized_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"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",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.region = $Region AND cloud.account.id = $Account AND ClusterName = $Cluster)"
"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"
},
"functions": [],
"groupBy": [],
"having": {
"expression": ""
},
"having": [],
"legend": "",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
}
],
"queryFormulas": []
@@ -818,30 +1031,71 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_ECS_ContainerInsights_MemoryReserved_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"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",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.region = $Region AND cloud.account.id = $Account AND ClusterName = $Cluster)"
"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"
},
"functions": [],
"groupBy": [],
"having": {
"expression": ""
},
"having": [],
"legend": "",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
}
],
"queryFormulas": []
@@ -946,19 +1200,74 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_ECS_ContainerInsights_NetworkRxBytes_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"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",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.region = $Region AND cloud.account.id = $Account AND ClusterName = $Cluster AND ServiceName EXISTS)"
"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"
},
"functions": [],
"groupBy": [
@@ -971,14 +1280,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{ServiceName}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
}
],
"queryFormulas": []
@@ -1083,19 +1393,74 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_ECS_ContainerInsights_NetworkTxBytes_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"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",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.region = $Region AND cloud.account.id = $Account AND ClusterName = $Cluster AND ServiceName EXISTS)"
"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"
},
"functions": [],
"groupBy": [
@@ -1108,14 +1473,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{ServiceName}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
}
],
"queryFormulas": []
@@ -1220,19 +1586,74 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_ECS_ContainerInsights_StorageReadBytes_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"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",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.region = $Region AND cloud.account.id = $Account AND ClusterName = $Cluster AND ServiceName EXISTS)"
"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"
},
"functions": [],
"groupBy": [
@@ -1253,14 +1674,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{ServiceName}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
}
],
"queryFormulas": []
@@ -1365,19 +1787,74 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_ECS_ContainerInsights_StorageWriteBytes_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"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",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.region = $Region AND cloud.account.id = $Account AND ClusterName = $Cluster AND ServiceName EXISTS)"
"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"
},
"functions": [],
"groupBy": [
@@ -1390,14 +1867,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{ServiceName}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
}
],
"queryFormulas": []

View File

@@ -224,6 +224,7 @@
"metricName": "aws_ECS_ContainerInsights_ContainerCpuUtilization_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"temporality": "",
"timeAggregation": "max"
}
],
@@ -355,6 +356,7 @@
"metricName": "aws_ECS_ContainerInsights_ContainerCpuReserved_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"temporality": "",
"timeAggregation": "max"
}
],
@@ -486,6 +488,7 @@
"metricName": "aws_ECS_ContainerInsights_ContainerMemoryUtilization_max",
"reduceTo": "avg",
"spaceAggregation": "avg",
"temporality": "",
"timeAggregation": "avg"
}
],
@@ -617,6 +620,7 @@
"metricName": "aws_ECS_ContainerInsights_ContainerMemoryReserved_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"temporality": "",
"timeAggregation": "max"
}
],
@@ -748,6 +752,7 @@
"metricName": "aws_ECS_ContainerInsights_ContainerCpuUtilization_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"temporality": "",
"timeAggregation": "max"
}
],
@@ -888,6 +893,7 @@
"metricName": "aws_ECS_ContainerInsights_ContainerMemoryUtilization_max",
"reduceTo": "avg",
"spaceAggregation": "avg",
"temporality": "",
"timeAggregation": "avg"
}
],
@@ -1028,6 +1034,7 @@
"metricName": "aws_ECS_ContainerInsights_ContainerNetworkRxBytes_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"temporality": "",
"timeAggregation": "max"
}
],
@@ -1168,6 +1175,7 @@
"metricName": "aws_ECS_ContainerInsights_ContainerNetworkTxBytes_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"temporality": "",
"timeAggregation": "max"
}
],
@@ -1308,6 +1316,7 @@
"metricName": "aws_ECS_ContainerInsights_ContainerStorageReadBytes_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"temporality": "",
"timeAggregation": "max"
}
],
@@ -1448,6 +1457,7 @@
"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": "v5",
"version": "v4",
"widgets": [
{
"bucketCount": 30,
@@ -112,19 +112,63 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_ECS_MemoryUtilization_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_ECS_MemoryUtilization_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_ECS_MemoryUtilization_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.region = $Region AND cloud.account.id = $Account AND ClusterName IN $Cluster)"
"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"
},
"functions": [],
"groupBy": [
@@ -145,14 +189,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{ServiceName}} ({{ClusterName}})",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
}
],
"queryFormulas": []
@@ -255,19 +300,63 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_ECS_MemoryUtilization_min",
"reduceTo": "avg",
"spaceAggregation": "min",
"timeAggregation": "min"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_ECS_MemoryUtilization_min--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_ECS_MemoryUtilization_min",
"type": "Gauge"
},
"aggregateOperator": "min",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.region = $Region AND cloud.account.id = $Account AND ClusterName IN $Cluster)"
"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"
},
"functions": [],
"groupBy": [
@@ -288,14 +377,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{ServiceName}} ({{ClusterName}})",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "min",
"stepInterval": 60,
"timeAggregation": "min"
}
],
"queryFormulas": []
@@ -398,19 +488,63 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_ECS_CPUUtilization_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_ECS_CPUUtilization_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_ECS_CPUUtilization_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.region = $Region AND cloud.account.id = $Account AND ClusterName IN $Cluster)"
"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"
},
"functions": [],
"groupBy": [
@@ -431,14 +565,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{ServiceName}} ({{ClusterName}})",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
}
],
"queryFormulas": []
@@ -541,19 +676,63 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_ECS_CPUUtilization_min",
"reduceTo": "avg",
"spaceAggregation": "min",
"timeAggregation": "min"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_ECS_CPUUtilization_min--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_ECS_CPUUtilization_min",
"type": "Gauge"
},
"aggregateOperator": "min",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.region = $Region AND cloud.account.id = $Account AND ClusterName IN $Cluster)"
"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"
},
"functions": [],
"groupBy": [
@@ -574,14 +753,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{ServiceName}} ({{ClusterName}})",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "min",
"stepInterval": 60,
"timeAggregation": "min"
}
],
"queryFormulas": []

View File

@@ -103,7 +103,7 @@
"type": "QUERY"
}
},
"version": "v5",
"version": "v4",
"widgets": [
{
"bucketCount": 30,
@@ -121,19 +121,70 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_Lambda_Invocations_sum",
"reduceTo": "avg",
"spaceAggregation": "sum",
"timeAggregation": "sum"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_Lambda_Invocations_sum--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_Lambda_Invocations_sum",
"type": "Gauge"
},
"aggregateOperator": "sum",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND FunctionName EXISTS AND Resource NOT EXISTS)"
"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"
},
"functions": [],
"groupBy": [
@@ -162,14 +213,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{FunctionName}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "sum",
"stepInterval": 60,
"timeAggregation": "sum"
}
],
"queryFormulas": []
@@ -271,19 +323,74 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_Lambda_Duration_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_Lambda_Duration_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_Lambda_Duration_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND FunctionName EXISTS AND Resource NOT EXISTS)"
"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"
},
"functions": [],
"groupBy": [
@@ -312,14 +419,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{FunctionName}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
}
],
"queryFormulas": []
@@ -421,19 +529,74 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_Lambda_Errors_sum",
"reduceTo": "avg",
"spaceAggregation": "sum",
"timeAggregation": "sum"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_Lambda_Errors_sum--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_Lambda_Errors_sum",
"type": "Gauge"
},
"aggregateOperator": "sum",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND FunctionName EXISTS AND Resource NOT EXISTS)"
"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"
},
"functions": [],
"groupBy": [
@@ -462,14 +625,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{FunctionName}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "sum",
"stepInterval": 60,
"timeAggregation": "sum"
}
],
"queryFormulas": []
@@ -571,19 +735,74 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_Lambda_Throttles_sum",
"reduceTo": "avg",
"spaceAggregation": "sum",
"timeAggregation": "sum"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_Lambda_Throttles_sum--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_Lambda_Throttles_sum",
"type": "Gauge"
},
"aggregateOperator": "sum",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND FunctionName EXISTS AND Resource NOT EXISTS)"
"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"
},
"functions": [],
"groupBy": [
@@ -612,14 +831,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{FunctionName}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "sum",
"stepInterval": 60,
"timeAggregation": "sum"
}
],
"queryFormulas": []
@@ -721,19 +941,74 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_Lambda_AsyncEventsReceived_sum",
"reduceTo": "avg",
"spaceAggregation": "sum",
"timeAggregation": "sum"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_Lambda_AsyncEventsReceived_sum--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_Lambda_AsyncEventsReceived_sum",
"type": "Gauge"
},
"aggregateOperator": "sum",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND FunctionName EXISTS AND Resource NOT EXISTS)"
"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"
},
"functions": [],
"groupBy": [
@@ -762,14 +1037,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{FunctionName}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "sum",
"stepInterval": 60,
"timeAggregation": "sum"
}
],
"queryFormulas": []
@@ -871,19 +1147,74 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_Lambda_AsyncEventAge_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_Lambda_AsyncEventAge_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_Lambda_AsyncEventAge_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND FunctionName EXISTS AND Resource NOT EXISTS)"
"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"
},
"functions": [],
"groupBy": [
@@ -912,14 +1243,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{FunctionName}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
}
],
"queryFormulas": []
@@ -1021,19 +1353,74 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_Lambda_AsyncEventsDropped_sum",
"reduceTo": "avg",
"spaceAggregation": "sum",
"timeAggregation": "sum"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_Lambda_AsyncEventsDropped_sum--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_Lambda_AsyncEventsDropped_sum",
"type": "Gauge"
},
"aggregateOperator": "sum",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND FunctionName EXISTS AND Resource NOT EXISTS)"
"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"
},
"functions": [],
"groupBy": [
@@ -1062,14 +1449,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{FunctionName}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "sum",
"stepInterval": 60,
"timeAggregation": "sum"
}
],
"queryFormulas": []

View File

@@ -94,7 +94,7 @@
"type": "QUERY"
}
},
"version": "v5",
"version": "v4",
"widgets": [
{
"bucketCount": 30,
@@ -112,19 +112,61 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_Kafka_KafkaDataLogsDiskUsed_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_Kafka_KafkaDataLogsDiskUsed_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_Kafka_KafkaDataLogsDiskUsed_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(Broker_ID EXISTS AND cloud.account.id = $Account AND cloud.region = $Region)"
"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"
},
"functions": [],
"groupBy": [
@@ -145,14 +187,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "Broker {{Broker_ID}} ({{Cluster_Name}})",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
}
],
"queryFormulas": []
@@ -254,19 +297,61 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_Kafka_CpuUser_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_Kafka_CpuUser_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_Kafka_CpuUser_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(Broker_ID EXISTS AND cloud.account.id = $Account AND cloud.region = $Region)"
"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"
},
"functions": [],
"groupBy": [
@@ -287,14 +372,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "Broker {{Broker_ID}} ({{Cluster_Name}})",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
}
],
"queryFormulas": []
@@ -396,19 +482,61 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_Kafka_CpuSystem_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_Kafka_CpuSystem_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_Kafka_CpuSystem_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(Broker_ID EXISTS AND cloud.account.id = $Account AND cloud.region = $Region)"
"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"
},
"functions": [],
"groupBy": [
@@ -429,14 +557,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "Broker {{Broker_ID}} ({{Cluster_Name}})",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
}
],
"queryFormulas": []
@@ -538,19 +667,61 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_Kafka_NetworkTxPackets_sum",
"reduceTo": "avg",
"spaceAggregation": "sum",
"timeAggregation": "sum"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_Kafka_NetworkTxPackets_sum--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_Kafka_NetworkTxPackets_sum",
"type": "Gauge"
},
"aggregateOperator": "sum",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(Broker_ID EXISTS AND cloud.region = $Region AND cloud.account.id = $Account)"
"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"
},
"functions": [],
"groupBy": [
@@ -571,14 +742,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "Broker {{Broker_ID}} ({{Cluster_Name}})",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "sum",
"stepInterval": 60,
"timeAggregation": "sum"
}
],
"queryFormulas": []
@@ -680,19 +852,61 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_Kafka_NetworkRxPackets_sum",
"reduceTo": "avg",
"spaceAggregation": "sum",
"timeAggregation": "sum"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_Kafka_NetworkRxPackets_sum--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_Kafka_NetworkRxPackets_sum",
"type": "Gauge"
},
"aggregateOperator": "sum",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.region = $Region AND Broker_ID EXISTS AND cloud.account.id = $Account)"
"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"
},
"functions": [],
"groupBy": [
@@ -713,14 +927,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "Broker {{Broker_ID}} ({{Cluster_Name}})",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "sum",
"stepInterval": 60,
"timeAggregation": "sum"
}
],
"queryFormulas": []
@@ -822,19 +1037,48 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_Kafka_SumOffsetLag_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_Kafka_SumOffsetLag_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_Kafka_SumOffsetLag_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region)"
"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"
},
"functions": [],
"groupBy": [
@@ -847,14 +1091,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "({{Cluster_Name}})",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
}
],
"queryFormulas": []

View File

@@ -113,7 +113,7 @@
"type": "QUERY"
}
},
"version": "v5",
"version": "v4",
"widgets": [
{
"bucketCount": 30,
@@ -131,19 +131,61 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_RDS_CPUUtilization_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_RDS_CPUUtilization_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_RDS_CPUUtilization_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND DBInstanceIdentifier != '')"
"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"
},
"functions": [],
"groupBy": [
@@ -172,14 +214,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{DBInstanceIdentifier}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
}
],
"queryFormulas": []
@@ -281,19 +324,61 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_RDS_FreeableMemory_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_RDS_FreeableMemory_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_RDS_FreeableMemory_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND DBInstanceIdentifier != '')"
"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"
},
"functions": [],
"groupBy": [
@@ -322,14 +407,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{DBInstanceIdentifier}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
}
],
"queryFormulas": []
@@ -431,19 +517,61 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_RDS_DatabaseConnections_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_RDS_DatabaseConnections_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_RDS_DatabaseConnections_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND DBInstanceIdentifier != '')"
"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"
},
"functions": [],
"groupBy": [
@@ -472,14 +600,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{DBInstanceIdentifier}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
}
],
"queryFormulas": []
@@ -581,19 +710,61 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_RDS_ReadLatency_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_RDS_ReadLatency_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_RDS_ReadLatency_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND DBInstanceIdentifier != '')"
"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"
},
"functions": [],
"groupBy": [
@@ -622,29 +793,72 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{DBInstanceIdentifier}} - Reads",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
},
{
"aggregations": [
{
"metricName": "aws_RDS_WriteLatency_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_RDS_WriteLatency_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_RDS_WriteLatency_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"dataSource": "metrics",
"disabled": false,
"expression": "B",
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND DBInstanceIdentifier != '')"
"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"
},
"functions": [],
"groupBy": [
@@ -673,14 +887,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{DBInstanceIdentifier}} - Writes",
"limit": null,
"orderBy": [],
"queryName": "B",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
}
],
"queryFormulas": []
@@ -782,19 +997,61 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_RDS_ReadIOPS_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_RDS_ReadIOPS_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_RDS_ReadIOPS_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND DBInstanceIdentifier != '')"
"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"
},
"functions": [],
"groupBy": [
@@ -823,29 +1080,72 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{DBInstanceIdentifier}} - Reads",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
},
{
"aggregations": [
{
"metricName": "aws_RDS_WriteIOPS_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_RDS_WriteIOPS_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_RDS_WriteIOPS_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"dataSource": "metrics",
"disabled": false,
"expression": "B",
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND DBInstanceIdentifier != '')"
"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"
},
"functions": [],
"groupBy": [
@@ -874,14 +1174,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{DBInstanceIdentifier}} - Writes",
"limit": null,
"orderBy": [],
"queryName": "B",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
}
],
"queryFormulas": []
@@ -983,19 +1284,61 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_RDS_ReadThroughput_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_RDS_ReadThroughput_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_RDS_ReadThroughput_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND DBInstanceIdentifier != '')"
"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"
},
"functions": [],
"groupBy": [
@@ -1024,29 +1367,72 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{DBInstanceIdentifier}} - Reads",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
},
{
"aggregations": [
{
"metricName": "aws_RDS_WriteThroughput_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_RDS_WriteThroughput_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_RDS_WriteThroughput_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"dataSource": "metrics",
"disabled": false,
"expression": "B",
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND DBInstanceIdentifier != '')"
"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"
},
"functions": [],
"groupBy": [
@@ -1075,14 +1461,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{DBInstanceIdentifier}} - Writes",
"limit": null,
"orderBy": [],
"queryName": "B",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
}
],
"queryFormulas": []
@@ -1184,19 +1571,61 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_RDS_DiskQueueDepth_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_RDS_DiskQueueDepth_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_RDS_DiskQueueDepth_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND DBInstanceIdentifier != '')"
"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"
},
"functions": [],
"groupBy": [
@@ -1225,14 +1654,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{DBInstanceIdentifier}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
}
],
"queryFormulas": []
@@ -1334,19 +1764,61 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_RDS_FreeStorageSpace_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_RDS_FreeStorageSpace_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_RDS_FreeStorageSpace_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(cloud.account.id = $Account AND cloud.region = $Region AND DBInstanceIdentifier != '')"
"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"
},
"functions": [],
"groupBy": [
@@ -1375,14 +1847,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{DBInstanceIdentifier}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
}
],
"queryFormulas": []

View File

@@ -92,7 +92,7 @@
"type": "QUERY"
}
},
"version": "v5",
"version": "v4",
"widgets": [
{
"bucketCount": 30,
@@ -111,19 +111,63 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_SNS_NumberOfMessagesPublished_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_SNS_NumberOfMessagesPublished_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_SNS_NumberOfMessagesPublished_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(TopicName IN $Topic AND cloud.region = $Region AND cloud.account.id = $Account)"
"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"
},
"functions": [],
"groupBy": [
@@ -136,14 +180,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{TopicName}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
}
],
"queryFormulas": []
@@ -246,19 +291,63 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_SNS_PublishSize_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_SNS_PublishSize_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_SNS_PublishSize_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(TopicName IN $Topic AND cloud.region = $Region AND cloud.account.id = $Account)"
"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"
},
"functions": [],
"groupBy": [
@@ -271,14 +360,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{TopicName}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
}
],
"queryFormulas": []
@@ -381,19 +471,63 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_SNS_NumberOfNotificationsDelivered_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_SNS_NumberOfNotificationsDelivered_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_SNS_NumberOfNotificationsDelivered_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(TopicName IN $Topic AND cloud.region = $Region AND cloud.account.id = $Account)"
"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"
},
"functions": [],
"groupBy": [
@@ -406,14 +540,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{TopicName}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
}
],
"queryFormulas": []
@@ -516,19 +651,63 @@
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_SNS_NumberOfNotificationsFailed_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"aggregateAttribute": {
"dataType": "float64",
"id": "aws_SNS_NumberOfNotificationsFailed_max--float64--Gauge--true",
"isColumn": true,
"isJSON": false,
"key": "aws_SNS_NumberOfNotificationsFailed_max",
"type": "Gauge"
},
"aggregateOperator": "max",
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(TopicName IN $Topic AND cloud.region = $Region AND cloud.account.id = $Account)"
"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"
},
"functions": [],
"groupBy": [
@@ -541,14 +720,15 @@
"type": "tag"
}
],
"having": {
"expression": ""
},
"having": [],
"legend": "{{TopicName}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
"reduceTo": "avg",
"spaceAggregation": "max",
"stepInterval": 60,
"timeAggregation": "max"
}
],
"queryFormulas": []

View File

@@ -313,6 +313,7 @@
"metricName": "azure_totallatency_average",
"reduceTo": "avg",
"spaceAggregation": "max",
"temporality": "",
"timeAggregation": "avg"
}
],
@@ -322,6 +323,35 @@
"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": [
{
@@ -400,6 +430,7 @@
"metricName": "azure_originlatency_average",
"reduceTo": "avg",
"spaceAggregation": "max",
"temporality": "",
"timeAggregation": "avg"
}
],
@@ -409,6 +440,35 @@
"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": [
{
@@ -487,6 +547,7 @@
"metricName": "azure_averagewebsocketconnectionduration_average",
"reduceTo": "avg",
"spaceAggregation": "avg",
"temporality": "",
"timeAggregation": "avg"
}
],
@@ -496,6 +557,35 @@
"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": [
{
@@ -579,6 +669,7 @@
"metricName": "azure_originhealthpercentage_average",
"reduceTo": "avg",
"spaceAggregation": "avg",
"temporality": "",
"timeAggregation": "avg"
}
],
@@ -588,6 +679,35 @@
"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": [
{
@@ -671,6 +791,7 @@
"metricName": "azure_bytehitratio_average",
"reduceTo": "avg",
"spaceAggregation": "avg",
"temporality": "",
"timeAggregation": "avg"
}
],
@@ -680,6 +801,35 @@
"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": [
{
@@ -758,6 +908,7 @@
"metricName": "azure_percentage4xx_average",
"reduceTo": "avg",
"spaceAggregation": "max",
"temporality": "",
"timeAggregation": "avg"
}
],
@@ -767,6 +918,35 @@
"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": [
{
@@ -845,6 +1025,7 @@
"metricName": "azure_percentage5xx_average",
"reduceTo": "avg",
"spaceAggregation": "max",
"temporality": "",
"timeAggregation": "avg"
}
],
@@ -854,6 +1035,35 @@
"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": [
{
@@ -917,9 +1127,15 @@
"query": {
"builder": {
"queryData": [{
"aggregations": [{ "metricName": "azure_requestcount_total", "reduceTo": "sum", "spaceAggregation": "sum", "timeAggregation": "sum" }],
"aggregations": [{ "metricName": "azure_requestcount_total", "reduceTo": "sum", "spaceAggregation": "sum", "temporality": "", "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
}],
@@ -952,9 +1168,15 @@
"query": {
"builder": {
"queryData": [{
"aggregations": [{ "metricName": "azure_originrequestcount_total", "reduceTo": "sum", "spaceAggregation": "sum", "timeAggregation": "sum" }],
"aggregations": [{ "metricName": "azure_originrequestcount_total", "reduceTo": "sum", "spaceAggregation": "sum", "temporality": "", "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
}],
@@ -987,9 +1209,15 @@
"query": {
"builder": {
"queryData": [{
"aggregations": [{ "metricName": "azure_requestsize_total", "reduceTo": "sum", "spaceAggregation": "sum", "timeAggregation": "sum" }],
"aggregations": [{ "metricName": "azure_requestsize_total", "reduceTo": "sum", "spaceAggregation": "sum", "temporality": "", "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
}],
@@ -1022,9 +1250,15 @@
"query": {
"builder": {
"queryData": [{
"aggregations": [{ "metricName": "azure_responsesize_total", "reduceTo": "sum", "spaceAggregation": "sum", "timeAggregation": "sum" }],
"aggregations": [{ "metricName": "azure_responsesize_total", "reduceTo": "sum", "spaceAggregation": "sum", "temporality": "", "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
}],
@@ -1057,9 +1291,15 @@
"query": {
"builder": {
"queryData": [{
"aggregations": [{ "metricName": "azure_activewebsocketconnections_total", "reduceTo": "max", "spaceAggregation": "sum", "timeAggregation": "max" }],
"aggregations": [{ "metricName": "azure_activewebsocketconnections_total", "reduceTo": "max", "spaceAggregation": "sum", "temporality": "", "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
}],
@@ -1092,9 +1332,15 @@
"query": {
"builder": {
"queryData": [{
"aggregations": [{ "metricName": "azure_websocketconnections_total", "reduceTo": "sum", "spaceAggregation": "sum", "timeAggregation": "sum" }],
"aggregations": [{ "metricName": "azure_websocketconnections_total", "reduceTo": "sum", "spaceAggregation": "sum", "temporality": "", "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
}],
@@ -1127,9 +1373,15 @@
"query": {
"builder": {
"queryData": [{
"aggregations": [{ "metricName": "azure_webapplicationfirewallrequestcount_total", "reduceTo": "sum", "spaceAggregation": "sum", "timeAggregation": "sum" }],
"aggregations": [{ "metricName": "azure_webapplicationfirewallrequestcount_total", "reduceTo": "sum", "spaceAggregation": "sum", "temporality": "", "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
}],
@@ -1162,9 +1414,15 @@
"query": {
"builder": {
"queryData": [{
"aggregations": [{ "metricName": "azure_webapplicationfirewallcaptcharequestcount_total", "reduceTo": "sum", "spaceAggregation": "sum", "timeAggregation": "sum" }],
"aggregations": [{ "metricName": "azure_webapplicationfirewallcaptcharequestcount_total", "reduceTo": "sum", "spaceAggregation": "sum", "temporality": "", "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
}],
@@ -1197,9 +1455,15 @@
"query": {
"builder": {
"queryData": [{
"aggregations": [{ "metricName": "azure_webapplicationfirewalljsrequestcount_total", "reduceTo": "sum", "spaceAggregation": "sum", "timeAggregation": "sum" }],
"aggregations": [{ "metricName": "azure_webapplicationfirewalljsrequestcount_total", "reduceTo": "sum", "spaceAggregation": "sum", "temporality": "", "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,6 +272,7 @@
"metricName": "azure_blobcapacity_average",
"reduceTo": "avg",
"spaceAggregation": "sum",
"temporality": "",
"timeAggregation": "avg"
}
],
@@ -281,6 +282,52 @@
"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": [
{
@@ -418,6 +465,7 @@
"metricName": "azure_blobcount_average",
"reduceTo": "avg",
"spaceAggregation": "avg",
"temporality": "",
"timeAggregation": "avg"
}
],
@@ -427,6 +475,52 @@
"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": [
{
@@ -564,6 +658,7 @@
"metricName": "azure_containercount_average",
"reduceTo": "avg",
"spaceAggregation": "avg",
"temporality": "",
"timeAggregation": "avg"
}
],
@@ -573,6 +668,52 @@
"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": [
{
@@ -722,6 +863,7 @@
"metricName": "azure_availability_average",
"reduceTo": "avg",
"spaceAggregation": "min",
"temporality": "",
"timeAggregation": "avg"
}
],
@@ -731,6 +873,52 @@
"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": [
{
@@ -868,6 +1056,7 @@
"metricName": "azure_egress_average",
"reduceTo": "sum",
"spaceAggregation": "sum",
"temporality": "",
"timeAggregation": "avg"
}
],
@@ -877,6 +1066,52 @@
"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": [
{
@@ -1012,6 +1247,7 @@
"metricName": "azure_ingress_average",
"reduceTo": "sum",
"spaceAggregation": "sum",
"temporality": "",
"timeAggregation": "avg"
}
],
@@ -1021,6 +1257,52 @@
"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": [
{
@@ -1156,6 +1438,7 @@
"metricName": "azure_successe2elatency_average",
"reduceTo": "avg",
"spaceAggregation": "max",
"temporality": "",
"timeAggregation": "avg"
}
],
@@ -1165,6 +1448,52 @@
"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": [
{
@@ -1300,6 +1629,7 @@
"metricName": "azure_successserverlatency_average",
"reduceTo": "avg",
"spaceAggregation": "max",
"temporality": "",
"timeAggregation": "avg"
}
],
@@ -1309,6 +1639,52 @@
"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": [
{
@@ -1444,6 +1820,7 @@
"metricName": "azure_transactions_total",
"reduceTo": "sum",
"spaceAggregation": "sum",
"temporality": "",
"timeAggregation": "sum"
}
],
@@ -1453,6 +1830,52 @@
"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, claims.Email, valuer.MustNewUUID(claims.IdentityID()), cloudIntegrationService, provider)
err = handler.module.CreateService(ctx, orgID, 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, claims.Email, valuer.MustNewUUID(claims.IdentityID()), svc.CloudIntegrationService, provider)
err = handler.module.UpdateService(ctx, orgID, svc.CloudIntegrationService, provider)
}
if err != nil {
render.Error(rw, err)

View File

@@ -6,6 +6,7 @@ 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"
)
@@ -44,7 +45,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, createdBy string, creator valuer.UUID, service *cloudintegrationtypes.CloudIntegrationService, provider cloudintegrationtypes.CloudProviderType) error {
func (module *module) CreateService(ctx context.Context, orgID valuer.UUID, service *cloudintegrationtypes.CloudIntegrationService, provider cloudintegrationtypes.CloudProviderType) error {
return errors.New(errors.TypeUnsupported, cloudintegrationtypes.ErrCodeUnsupported, "create service is not supported")
}
@@ -56,7 +57,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, createdBy string, creator valuer.UUID, service *cloudintegrationtypes.CloudIntegrationService, provider cloudintegrationtypes.CloudProviderType) error {
func (module *module) UpdateService(ctx context.Context, orgID valuer.UUID, service *cloudintegrationtypes.CloudIntegrationService, provider cloudintegrationtypes.CloudProviderType) error {
return errors.New(errors.TypeUnsupported, cloudintegrationtypes.ErrCodeUnsupported, "update service is not supported")
}
@@ -68,6 +69,14 @@ 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,7 +4,6 @@ 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"
@@ -187,41 +186,6 @@ 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.
@@ -236,24 +200,6 @@ 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.
@@ -267,62 +213,6 @@ 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, source dashboardtypes.Source, data dashboardtypes.PostableDashboard) (*dashboardtypes.Dashboard, error)
Create(ctx context.Context, orgID valuer.UUID, createdBy string, creator valuer.UUID, data dashboardtypes.PostableDashboard) (*dashboardtypes.Dashboard, error)
Get(ctx context.Context, orgID valuer.UUID, id valuer.UUID) (*dashboardtypes.Dashboard, error)
@@ -46,9 +46,6 @@ 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()), dashboardtypes.SourceUser, req)
dashboard, err := handler.module.Create(ctx, orgID, claims.Email, valuer.MustNewUUID(claims.IdentityID()), 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, source dashboardtypes.Source, postableDashboard dashboardtypes.PostableDashboard) (*dashboardtypes.Dashboard, error) {
dashboard, err := dashboardtypes.NewDashboard(orgID, createdBy, source, postableDashboard)
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)
if err != nil {
return nil, err
}
@@ -161,10 +161,6 @@ 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.
BunDBCtx(ctx).
BunDB().
NewInsert().
Model(storabledashboard).
Exec(ctx)

View File

@@ -1,50 +0,0 @@
package impllogspipeline
import (
"context"
"github.com/SigNoz/signoz/pkg/modules/logspipeline"
"github.com/SigNoz/signoz/pkg/sqlstore"
"github.com/SigNoz/signoz/pkg/valuer"
)
const elementType = "log_pipelines"
type module struct {
sqlStore sqlstore.SQLStore
}
func NewModule(sqlStore sqlstore.SQLStore) logspipeline.Module {
return &module{sqlStore: sqlStore}
}
func (m *module) Collect(ctx context.Context, orgID valuer.UUID) (map[string]any, error) {
subq := m.sqlStore.BunDB().NewSelect().
TableExpr("agent_config_version").
ColumnExpr("MAX(version)").
Where("org_id = ?", orgID).
Where("element_type = ?", elementType)
var result struct {
Total int `bun:"total"`
Enabled int `bun:"enabled_count"`
}
err := m.sqlStore.BunDB().NewSelect().
TableExpr("agent_config_element AS e").
Join("JOIN agent_config_version AS v ON v.id = e.version_id").
Join("JOIN pipelines AS p ON p.id = e.element_id").
Where("v.org_id = ?", orgID).
Where("v.element_type = ?", elementType).
Where("v.version = (?)", subq).
ColumnExpr("COUNT(*) AS total").
ColumnExpr("SUM(CASE WHEN p.enabled THEN 1 ELSE 0 END) AS enabled_count").
Scan(ctx, &result)
if err != nil {
return nil, err
}
return map[string]any{
"logs_pipeline.total.count": result.Total,
"logs_pipeline.enabled.count": result.Enabled,
}, nil
}

View File

@@ -1,7 +0,0 @@
package logspipeline
import "github.com/SigNoz/signoz/pkg/statsreporter"
type Module interface {
statsreporter.StatsCollector
}

View File

@@ -63,6 +63,7 @@ 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"
@@ -1112,7 +1113,20 @@ func (aH *APIHandler) Get(rw http.ResponseWriter, r *http.Request) {
dashboard := new(dashboardtypes.Dashboard)
if aH.IntegrationsController.IsInstalledIntegrationDashboardID(id) {
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) {
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"))
@@ -1175,6 +1189,15 @@ 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

@@ -19,8 +19,6 @@ import (
"github.com/SigNoz/signoz/pkg/modules/inframonitoring/implinframonitoring"
"github.com/SigNoz/signoz/pkg/modules/llmpricingrule"
"github.com/SigNoz/signoz/pkg/modules/llmpricingrule/impllmpricingrule"
"github.com/SigNoz/signoz/pkg/modules/logspipeline"
"github.com/SigNoz/signoz/pkg/modules/logspipeline/impllogspipeline"
"github.com/SigNoz/signoz/pkg/modules/metricsexplorer"
"github.com/SigNoz/signoz/pkg/modules/metricsexplorer/implmetricsexplorer"
"github.com/SigNoz/signoz/pkg/modules/organization"
@@ -87,7 +85,6 @@ type Modules struct {
Promote promote.Module
ServiceAccount serviceaccount.Module
CloudIntegration cloudintegration.Module
LogsPipeline logspipeline.Module
RuleStateHistory rulestatehistory.Module
TraceDetail tracedetail.Module
SpanMapper spanmapper.Module
@@ -146,7 +143,6 @@ func NewModules(
InfraMonitoring: implinframonitoring.NewModule(telemetryStore, telemetryMetadataStore, querier, providerSettings, config.InfraMonitoring),
Promote: implpromote.NewModule(telemetryMetadataStore, telemetryStore),
ServiceAccount: serviceAccount,
LogsPipeline: impllogspipeline.NewModule(sqlstore),
RuleStateHistory: implrulestatehistory.NewModule(implrulestatehistory.NewStore(telemetryStore, telemetryMetadataStore, providerSettings.Logger)),
CloudIntegration: cloudIntegrationModule,
TraceDetail: impltracedetail.NewModule(impltracedetail.NewTraceStore(telemetryStore), providerSettings, config.TraceDetail),

View File

@@ -205,7 +205,6 @@ 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, dashboard.Module, global.Global, zeus.Zeus, gateway.Gateway, licensing.Licensing, serviceaccount.Module, cloudintegration.Config) (cloudintegration.Module, error),
cloudIntegrationCallback func(sqlstore.SQLStore, 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, dashboard, global, zeus, gateway, licensing, serviceAccount, config.CloudIntegration)
cloudIntegrationModule, err := cloudIntegrationCallback(sqlstore, global, zeus, gateway, licensing, serviceAccount, config.CloudIntegration)
if err != nil {
return nil, err
}
@@ -497,7 +497,6 @@ func New(
modules.AuthDomain,
serviceAccount,
cloudIntegrationModule,
modules.LogsPipeline,
}
// Initialize stats reporter from the available stats reporter provider factories

View File

@@ -1,284 +0,0 @@
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 one or more lines are too long

View File

@@ -1,671 +0,0 @@
{
"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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,638 +0,0 @@
{
"description": "View key AWS SNS metrics with an out of the box dashboard.",
"image": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iODBweCIgaGVpZ2h0PSI4MHB4IiB2aWV3Qm94PSIwIDAgODAgODAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDY0ICg5MzUzNykgLSBodHRwczovL3NrZXRjaC5jb20gLS0+CiAgICA8dGl0bGU+SWNvbi1BcmNoaXRlY3R1cmUvNjQvQXJjaF9BV1MtU2ltcGxlLU5vdGlmaWNhdGlvbi1TZXJ2aWNlXzY0PC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGRlZnM+CiAgICAgICAgPGxpbmVhckdyYWRpZW50IHgxPSIwJSIgeTE9IjEwMCUiIHgyPSIxMDAlIiB5Mj0iMCUiIGlkPSJsaW5lYXJHcmFkaWVudC0xIj4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iI0IwMDg0RCIgb2Zmc2V0PSIwJSI+PC9zdG9wPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjRkY0RjhCIiBvZmZzZXQ9IjEwMCUiPjwvc3RvcD4KICAgICAgICA8L2xpbmVhckdyYWRpZW50PgogICAgPC9kZWZzPgogICAgPGcgaWQ9Ikljb24tQXJjaGl0ZWN0dXJlLzY0L0FyY2hfQVdTLVNpbXBsZS1Ob3RpZmljYXRpb24tU2VydmljZV82NCIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9Ikljb24tQXJjaGl0ZWN0dXJlLUJHLzY0L0FwcGxpY2F0aW9uLUludGVncmF0aW9uIiBmaWxsPSJ1cmwoI2xpbmVhckdyYWRpZW50LTEpIj4KICAgICAgICAgICAgPHJlY3QgaWQ9IlJlY3RhbmdsZSIgeD0iMCIgeT0iMCIgd2lkdGg9IjgwIiBoZWlnaHQ9IjgwIj48L3JlY3Q+CiAgICAgICAgPC9nPgogICAgICAgIDxwYXRoIGQ9Ik0xNywzOCBDMTguMTAzLDM4IDE5LDM4Ljg5NyAxOSw0MCBDMTksNDEuMTAzIDE4LjEwMyw0MiAxNyw0MiBDMTUuODk3LDQyIDE1LDQxLjEwMyAxNSw0MCBDMTUsMzguODk3IDE1Ljg5NywzOCAxNywzOCBMMTcsMzggWiBNNDEsNjQgQzI5LjMxNCw2NCAxOS4yODksNTUuNDY2IDE3LjE5NCw0My45OCBDMTguOTY1LDQzLjg5NCAyMC40MjcsNDIuNjU5IDIwLjg1Nyw0MSBMMjcsNDEgTDI3LDM5IEwyMC44NTcsMzkgQzIwLjQyNywzNy4zNDIgMTguOTY2LDM2LjEwNyAxNy4xOTUsMzYuMDIgQzE5LjI4NSwyNC43MSAyOS41MTEsMTYgNDEsMTYgQzQ1LjMxMywxNiA0OS44MzIsMTcuNjIyIDU0LjQyOSwyMC44MjEgTDU1LjU3MSwxOS4xNzkgQzUwLjYzMywxNS43NDMgNDUuNzMsMTQgNDEsMTQgQzI4LjI3LDE0IDE2Ljk0OSwyMy44NjUgMTUuMDYzLDM2LjUyMSBDMTMuODM5LDM3LjIwNyAxMywzOC41IDEzLDQwIEMxMyw0MS41IDEzLjgzOSw0Mi43OTMgMTUuMDYzLDQzLjQ3OCBDMTYuOTcsNTYuMzQxIDI4LjA1Niw2NiA0MSw2NiBDNDYuNDA3LDY2IDUxLjk0Miw2NC4xNTcgNTYuNTg1LDYwLjgxMSBMNTUuNDE1LDU5LjE4OSBDNTEuMTEsNjIuMjkyIDQ1Ljk5MSw2NCA0MSw2NCBMNDEsNjQgWiBNMzAuMTAxLDM2LjQ0MiBDMzEuOTU1LDM2Ljg5NSAzNC4yNzUsMzcgMzYsMzcgQzM3LjY0MiwzNyAzOS44MjMsMzYuOTA1IDQxLjYyOSwzNi41MDYgTDM3LjEwNSw0NS41NTMgQzM3LjAzNiw0NS42OTEgMzcsNDUuODQ1IDM3LDQ2IEwzNyw1MC40NTMgQzM2LjE5OSw1MC45NjQgMzQuODMzLDUxLjgxMiAzNCw1MS45ODYgTDM0LDQ2IEMzNCw0NS44NjggMzMuOTc0LDQ1LjczNyAzMy45MjMsNDUuNjE1IEwzMC4xMDEsMzYuNDQyIFogTTM2LDMzIEM0MC4wMjUsMzMgNDIuMTc0LDMzLjYwNCA0Mi44NDEsMzQgQzQyLjE3NCwzNC4zOTYgNDAuMDI1LDM1IDM2LDM1IEMzMS45NzUsMzUgMjkuODI2LDM0LjM5NiAyOS4xNTksMzQgQzI5LjgyNiwzMy42MDQgMzEuOTc1LDMzIDM2LDMzIEwzNiwzMyBaIE0zMyw1NCBMMzQsNTQgQzM0LjA0Myw1NCAzNC4wODYsNTMuOTk3IDM0LjEyOCw1My45OTIgQzM1LjM1Miw1My44MzMgMzYuOTA5LDUyLjg4NyAzOC4yNzIsNTIuMDEzIEwzOC41MzUsNTEuODQ1IEMzOC44MjQsNTEuNjYxIDM5LDUxLjM0MiAzOSw1MSBMMzksNDYuMjM2IEw0NC41NTksMzUuMTIgQzQ0LjgzMywzNC44MDEgNDUsMzQuNDM0IDQ1LDM0IEM0NSwzMS4zOSAzOS4zNjEsMzEgMzYsMzEgQzMyLjYzOSwzMSAyNywzMS4zOSAyNywzNCBDMjcsMzQuMzY2IDI3LjEyLDM0LjY4NCAyNy4zMiwzNC45NjcgTDMyLDQ2LjIgTDMyLDUzIEMzMiw1My41NTIgMzIuNDQ3LDU0IDMzLDU0IEwzMyw1NCBaIE02Miw1MyBDNjMuMTAzLDUzIDY0LDUzLjg5NyA2NCw1NSBDNjQsNTYuMTAzIDYzLjEwMyw1NyA2Miw1NyBDNjAuODk3LDU3IDYwLDU2LjEwMyA2MCw1NSBDNjAsNTMuODk3IDYwLjg5Nyw1MyA2Miw1MyBMNjIsNTMgWiBNNjIsMjMgQzYzLjEwMywyMyA2NCwyMy44OTcgNjQsMjUgQzY0LDI2LjEwMyA2My4xMDMsMjcgNjIsMjcgQzYwLjg5NywyNyA2MCwyNi4xMDMgNjAsMjUgQzYwLDIzLjg5NyA2MC44OTcsMjMgNjIsMjMgTDYyLDIzIFogTTY0LDM4IEM2NS4xMDMsMzggNjYsMzguODk3IDY2LDQwIEM2Niw0MS4xMDMgNjUuMTAzLDQyIDY0LDQyIEM2Mi44OTcsNDIgNjIsNDEuMTAzIDYyLDQwIEM2MiwzOC44OTcgNjIuODk3LDM4IDY0LDM4IEw2NCwzOCBaIE01NCw0MSBMNjAuMTQzLDQxIEM2MC41ODksNDIuNzIgNjIuMTQyLDQ0IDY0LDQ0IEM2Ni4yMDYsNDQgNjgsNDIuMjA2IDY4LDQwIEM2OCwzNy43OTQgNjYuMjA2LDM2IDY0LDM2IEM2Mi4xNDIsMzYgNjAuNTg5LDM3LjI4IDYwLjE0MywzOSBMNTQsMzkgTDU0LDI2IEw1OC4xNDMsMjYgQzU4LjU4OSwyNy43MiA2MC4xNDIsMjkgNjIsMjkgQzY0LjIwNiwyOSA2NiwyNy4yMDYgNjYsMjUgQzY2LDIyLjc5NCA2NC4yMDYsMjEgNjIsMjEgQzYwLjE0MiwyMSA1OC41ODksMjIuMjggNTguMTQzLDI0IEw1MywyNCBDNTIuNDQ3LDI0IDUyLDI0LjQ0OCA1MiwyNSBMNTIsMzkgTDQ1LDM5IEw0NSw0MSBMNTIsNDEgTDUyLDU1IEM1Miw1NS41NTIgNTIuNDQ3LDU2IDUzLDU2IEw1OC4xNDMsNTYgQzU4LjU4OSw1Ny43MiA2MC4xNDIsNTkgNjIsNTkgQzY0LjIwNiw1OSA2Niw1Ny4yMDYgNjYsNTUgQzY2LDUyLjc5NCA2NC4yMDYsNTEgNjIsNTEgQzYwLjE0Miw1MSA1OC41ODksNTIuMjggNTguMTQzLDU0IEw1NCw1NCBMNTQsNDEgWiIgaWQ9IkFXUy1TaW1wbGUtTm90aWZpY2F0aW9uLVNlcnZpY2VfSWNvbl82NF9TcXVpZCIgZmlsbD0iI0ZGRkZGRiI+PC9wYXRoPgogICAgPC9nPgo8L3N2Zz4=",
"layout": [
{
"h": 6,
"i": "4eb87f89-0213-4773-9b06-6aecc6701898",
"moved": false,
"static": false,
"w": 6,
"x": 0,
"y": 0
},
{
"h": 6,
"i": "7a010b4e-ea7c-4a45-a9eb-93af650c45b4",
"moved": false,
"static": false,
"w": 6,
"x": 6,
"y": 0
},
{
"h": 6,
"i": "2299d4e3-6c40-4bf2-a550-c7bb8a7acd38",
"moved": false,
"static": false,
"w": 6,
"x": 0,
"y": 6
},
{
"h": 6,
"i": "16eec8b7-de1a-4039-b180-24c7a6704b6e",
"moved": false,
"static": false,
"w": 6,
"x": 6,
"y": 6
}
],
"panelMap": {},
"tags": [],
"title": "SNS 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": "b7a6b06b-fa1f-4fb8-b70e-6bd9b350f29e",
"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_SNS_PublishSize_count' 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": "8428a5de-bfd1-4a69-9601-63e3041cd556",
"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_SNS_PublishSize_count' 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": "SNS Topic Name",
"id": "bfbdbcbe-a168-4d81-b108-36339e249116",
"modificationUUID": "dfed7272-16dc-4eb6-99bf-7c82fc8e04f0",
"multiSelect": true,
"name": "Topic",
"order": 2,
"queryValue": "SELECT DISTINCT JSONExtractString(labels, 'TopicName') AS topic\nFROM signoz_metrics.distributed_time_series_v4_1day\nWHERE metric_name = 'aws_SNS_PublishSize_count' AND JSONExtractString(labels, 'cloud.account.id') IN {{.Account}} AND JSONExtractString(labels, 'cloud.region') IN {{.Region}}\nGROUP BY topic",
"showALLOption": true,
"sort": "ASC",
"textboxValue": "",
"type": "QUERY"
}
},
"version": "v5",
"widgets": [
{
"bucketCount": 30,
"bucketWidth": 0,
"columnUnits": {},
"description": "",
"fillSpans": false,
"id": "4eb87f89-0213-4773-9b06-6aecc6701898",
"isLogScale": false,
"isStacked": false,
"mergeAllActiveQueries": false,
"nullZeroValues": "zero",
"opacity": "1",
"panelTypes": "graph",
"query": {
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_SNS_NumberOfMessagesPublished_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(TopicName IN $Topic AND cloud.region = $Region AND cloud.account.id = $Account)"
},
"functions": [],
"groupBy": [
{
"dataType": "string",
"id": "TopicName--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "TopicName",
"type": "tag"
}
],
"having": {
"expression": ""
},
"legend": "{{TopicName}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
}
],
"queryFormulas": []
},
"clickhouse_sql": [
{
"disabled": false,
"legend": "",
"name": "A",
"query": ""
}
],
"id": "9c67615a-55f7-42da-835c-86922f2ff8bb",
"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": "Number of Messages Published",
"yAxisUnit": "none"
},
{
"bucketCount": 30,
"bucketWidth": 0,
"columnUnits": {},
"description": "",
"fillSpans": false,
"id": "7a010b4e-ea7c-4a45-a9eb-93af650c45b4",
"isLogScale": false,
"isStacked": false,
"mergeAllActiveQueries": false,
"nullZeroValues": "zero",
"opacity": "1",
"panelTypes": "graph",
"query": {
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_SNS_PublishSize_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(TopicName IN $Topic AND cloud.region = $Region AND cloud.account.id = $Account)"
},
"functions": [],
"groupBy": [
{
"dataType": "string",
"id": "TopicName--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "TopicName",
"type": "tag"
}
],
"having": {
"expression": ""
},
"legend": "{{TopicName}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
}
],
"queryFormulas": []
},
"clickhouse_sql": [
{
"disabled": false,
"legend": "",
"name": "A",
"query": ""
}
],
"id": "a635a15b-dfe6-4617-a82e-29d93e27deaf",
"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": "Published Message Size",
"yAxisUnit": "decbytes"
},
{
"bucketCount": 30,
"bucketWidth": 0,
"columnUnits": {},
"description": "",
"fillSpans": false,
"id": "2299d4e3-6c40-4bf2-a550-c7bb8a7acd38",
"isLogScale": false,
"isStacked": false,
"mergeAllActiveQueries": false,
"nullZeroValues": "zero",
"opacity": "1",
"panelTypes": "graph",
"query": {
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_SNS_NumberOfNotificationsDelivered_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(TopicName IN $Topic AND cloud.region = $Region AND cloud.account.id = $Account)"
},
"functions": [],
"groupBy": [
{
"dataType": "string",
"id": "TopicName--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "TopicName",
"type": "tag"
}
],
"having": {
"expression": ""
},
"legend": "{{TopicName}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
}
],
"queryFormulas": []
},
"clickhouse_sql": [
{
"disabled": false,
"legend": "",
"name": "A",
"query": ""
}
],
"id": "0d2fc26c-9b21-4dfc-b631-64b7c8d3bd71",
"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": "Number of Notifications Delivered",
"yAxisUnit": "none"
},
{
"bucketCount": 30,
"bucketWidth": 0,
"columnUnits": {},
"description": "",
"fillSpans": false,
"id": "16eec8b7-de1a-4039-b180-24c7a6704b6e",
"isLogScale": false,
"isStacked": false,
"mergeAllActiveQueries": false,
"nullZeroValues": "zero",
"opacity": "1",
"panelTypes": "graph",
"query": {
"builder": {
"queryData": [
{
"aggregations": [
{
"metricName": "aws_SNS_NumberOfNotificationsFailed_max",
"reduceTo": "avg",
"spaceAggregation": "max",
"timeAggregation": "max"
}
],
"dataSource": "metrics",
"disabled": false,
"expression": "A",
"filter": {
"expression": "(TopicName IN $Topic AND cloud.region = $Region AND cloud.account.id = $Account)"
},
"functions": [],
"groupBy": [
{
"dataType": "string",
"id": "TopicName--string--tag--false",
"isColumn": false,
"isJSON": false,
"key": "TopicName",
"type": "tag"
}
],
"having": {
"expression": ""
},
"legend": "{{TopicName}}",
"limit": null,
"orderBy": [],
"queryName": "A",
"stepInterval": 60
}
],
"queryFormulas": []
},
"clickhouse_sql": [
{
"disabled": false,
"legend": "",
"name": "A",
"query": ""
}
],
"id": "526247af-6ac9-42ff-83e9-cce0e32a9e63",
"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": "Number of Notifications Failed",
"yAxisUnit": "none"
}
]
}

File diff suppressed because one or more lines are too long

View File

@@ -1,44 +0,0 @@
package cloudintegrationtypes
import (
"fmt"
"time"
"github.com/SigNoz/signoz/pkg/valuer"
"github.com/uptrace/bun"
)
type IntegrationDashboardProviderType struct{ valuer.String }
var IntegrationDashboardProviderCloudIntegration = IntegrationDashboardProviderType{valuer.NewString("cloud_integration")}
type StorableIntegrationDashboard struct {
bun.BaseModel `bun:"table:integration_dashboard"`
ID string `bun:"id,pk,type:text"`
DashboardID string `bun:"dashboard_id,type:text"`
Provider IntegrationDashboardProviderType `bun:"provider,type:text"`
Slug string `bun:"slug,type:text"`
CreatedAt time.Time `bun:"created_at"`
UpdatedAt time.Time `bun:"updated_at"`
}
func NewStorableIntegrationDashboard(dashboardID string, provider IntegrationDashboardProviderType, slug string) *StorableIntegrationDashboard {
now := time.Now()
return &StorableIntegrationDashboard{
ID: valuer.GenerateUUID().StringValue(),
DashboardID: dashboardID,
Provider: provider,
Slug: slug,
CreatedAt: now,
UpdatedAt: now,
}
}
func IntegrationDashboardSlug(provider CloudProviderType, serviceID ServiceID, dashName string) string {
return fmt.Sprintf("%s-%s-%s", provider.StringValue(), serviceID.StringValue(), dashName)
}
func IntegrationDashboardSlugPrefix(provider CloudProviderType, serviceID ServiceID) string {
return fmt.Sprintf("%s-%s-", provider.StringValue(), serviceID.StringValue())
}

View File

@@ -2,6 +2,8 @@ package cloudintegrationtypes
import (
"encoding/json"
"fmt"
"strings"
"time"
"github.com/SigNoz/signoz/pkg/errors"
@@ -317,18 +319,56 @@ func (updatableService *UpdatableService) UnmarshalJSON(data []byte) error {
return nil
}
// IsServiceSharedWithMetricsEnabled returns true if any of the provided services has metrics enabled.
// It is used to determine whether dashboards for a service type should be deprovisioned when
// an account is disconnected or a service is updated.
func IsServiceSharedWithMetricsEnabled(provider CloudProviderType, services []*StorableCloudIntegrationService) bool {
for _, svc := range services {
cfg, err := NewServiceConfigFromJSON(provider, svc.Config)
if err != nil {
continue
}
if cfg.IsMetricsEnabled(provider) {
return true
}
}
return false
// UTILITIES
// GetCloudIntegrationDashboardID returns the dashboard id for a cloud integration, given the cloud provider, service id, and dashboard id.
// This is used to generate unique dashboard ids for cloud integration, and also to parse the dashboard id to get the cloud provider and service id when needed.
func GetCloudIntegrationDashboardID(cloudProvider CloudProviderType, svcID, dashboardID string) string {
return fmt.Sprintf("cloud-integration--%s--%s--%s", cloudProvider.StringValue(), svcID, dashboardID)
}
// ParseCloudIntegrationDashboardID parses a dashboard id generated by GetCloudIntegrationDashboardID
// into its constituent parts (cloudProvider, serviceID, dashboardID).
func ParseCloudIntegrationDashboardID(id string) (CloudProviderType, string, string, error) {
parts := strings.SplitN(id, "--", 4)
if len(parts) != 4 || parts[0] != "cloud-integration" {
return CloudProviderType{}, "", "", errors.New(errors.TypeNotFound, ErrCodeCloudIntegrationNotFound, "invalid cloud integration dashboard id")
}
provider, err := NewCloudProvider(parts[1])
if err != nil {
return CloudProviderType{}, "", "", err
}
return provider, parts[2], parts[3], nil
}
// GetDashboardsFromAssets returns the list of dashboards for the cloud provider service from definition.
func GetDashboardsFromAssets(
svcID string,
orgID valuer.UUID,
cloudProvider CloudProviderType,
createdAt time.Time,
assets Assets,
) []*dashboardtypes.Dashboard {
dashboards := make([]*dashboardtypes.Dashboard, 0)
for _, d := range assets.Dashboards {
author := fmt.Sprintf("%s-integration", cloudProvider.StringValue())
dashboards = append(dashboards, &dashboardtypes.Dashboard{
ID: d.ID,
Locked: true,
OrgID: orgID,
Data: d.Definition,
TimeAuditable: types.TimeAuditable{
CreatedAt: createdAt,
UpdatedAt: createdAt,
},
UserAuditable: types.UserAuditable{
CreatedBy: author,
UpdatedBy: author,
},
Source: dashboardtypes.SourceIntegration,
})
}
return dashboards
}

View File

@@ -39,30 +39,13 @@ type Store interface {
// ListServices returns all the cloud integration services for the given cloud integration id
ListServices(ctx context.Context, cloudIntegrationID valuer.UUID) ([]*StorableCloudIntegrationService, error)
// ListSharedServices returns a map of service type to services from other connected accounts
// that share that service type with the given cloudIntegrationID.
// Only service types present in the given account are included.
// The caller is responsible for any further filtering (e.g. metrics-enabled checks).
ListSharedServices(ctx context.Context, orgID valuer.UUID, provider CloudProviderType, cloudIntegrationID valuer.UUID) (map[ServiceID][]*StorableCloudIntegrationService, error)
// CreateService creates a new cloud integration service
CreateService(ctx context.Context, service *StorableCloudIntegrationService) error
// UpdateService updates an existing cloud integration service
UpdateService(ctx context.Context, service *StorableCloudIntegrationService) error
// DeleteServicesByCloudIntegrationID deletes all services for the given cloud integration id
DeleteServicesByCloudIntegrationID(ctx context.Context, orgID, cloudIntegrationID valuer.UUID) error
RunInTx(context.Context, func(ctx context.Context) error) error
CreateIntegrationDashboard(ctx context.Context, row *StorableIntegrationDashboard) error
GetIntegrationDashboardBySlug(ctx context.Context, orgID valuer.UUID, provider IntegrationDashboardProviderType, slug string) (*StorableIntegrationDashboard, error)
ListIntegrationDashboardsBySlugPrefix(ctx context.Context, orgID valuer.UUID, provider IntegrationDashboardProviderType, slugPrefix string) ([]*StorableIntegrationDashboard, error)
DeleteIntegrationDashboardBySlug(ctx context.Context, orgID valuer.UUID, provider IntegrationDashboardProviderType, slug string) error
}
type ServiceDefinitionStore interface {

View File

@@ -110,7 +110,7 @@ func NewDashboard(orgID valuer.UUID, createdBy string, source Source, storableDa
},
OrgID: orgID,
Data: storableDashboardData,
Locked: source == SourceIntegration,
Locked: false,
Source: source,
}, nil
}

View File

@@ -3,7 +3,6 @@ from collections.abc import Callable
from http import HTTPStatus
import requests
from sqlalchemy import bindparam, sql
from fixtures import types
from fixtures.auth import USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD, add_license
@@ -371,137 +370,3 @@ def test_update_service_account_removed(
)
assert response.status_code == HTTPStatus.NOT_FOUND, f"Expected 404, got {response.status_code}"
def test_enable_metrics_provisions_dashboards(
signoz: types.SigNoz,
create_user_admin: types.Operation, # pylint: disable=unused-argument
get_token: Callable[[str, str], str],
create_cloud_integration_account: Callable,
) -> None:
"""Enabling metrics provisions dashboards visible in GetService and present in the DB."""
admin_token = get_token(USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD)
account = create_cloud_integration_account(admin_token, CLOUD_PROVIDER)
account_id = account["id"]
checkin = simulate_agent_checkin(signoz, admin_token, CLOUD_PROVIDER, account_id, str(uuid.uuid4()))
assert checkin.status_code == HTTPStatus.OK, f"Check-in failed: {checkin.text}"
put_response = requests.put(
signoz.self.host_configs["8080"].get(f"/api/v1/cloud_integrations/{CLOUD_PROVIDER}/accounts/{account_id}/services/{SERVICE_ID}"),
headers={"Authorization": f"Bearer {admin_token}"},
json={"config": {"aws": {"metrics": {"enabled": True}, "logs": {"enabled": False}}}},
timeout=10,
)
assert put_response.status_code == HTTPStatus.NO_CONTENT, f"Expected 204, got {put_response.status_code}: {put_response.text}"
# Assertion 1: GetService returns provisioned dashboard UUIDs
get_svc_response = requests.get(
signoz.self.host_configs["8080"].get(f"/api/v1/cloud_integrations/{CLOUD_PROVIDER}/services/{SERVICE_ID}?cloud_integration_id={account_id}"),
headers={"Authorization": f"Bearer {admin_token}"},
timeout=10,
)
assert get_svc_response.status_code == HTTPStatus.OK, f"Expected 200, got {get_svc_response.status_code}: {get_svc_response.text}"
data = get_svc_response.json()["data"]
svc = data["cloudIntegrationService"]
assert svc is not None, "cloudIntegrationService should be non-null after enabling metrics"
assert svc["config"]["aws"]["metrics"]["enabled"] is True
dashboards_in_service = data["assets"]["dashboards"]
assert isinstance(dashboards_in_service, list) and len(dashboards_in_service) > 0, "assets.dashboards should be non-empty after enabling metrics"
provisioned_ids = set()
for dash in dashboards_in_service:
assert "id" in dash, f"Dashboard entry missing 'id': {dash}"
try:
uuid.UUID(dash["id"])
except ValueError as err:
raise AssertionError(f"Dashboard id '{dash['id']}' is not a UUID — dashboard was not provisioned") from err
provisioned_ids.add(dash["id"])
# Assertion 2: Provisioned dashboard IDs are present in the DB
with signoz.sqlstore.conn.connect() as conn:
rows = (
conn.execute(
sql.text("SELECT id FROM dashboard WHERE id IN :ids").bindparams(bindparam("ids", expanding=True)),
{"ids": list(provisioned_ids)},
)
.mappings()
.fetchall()
)
db_ids = {row["id"] for row in rows}
assert provisioned_ids == db_ids, f"Dashboards {provisioned_ids - db_ids} are missing from the DB"
def test_disable_metrics_deprovisions_dashboards(
signoz: types.SigNoz,
create_user_admin: types.Operation, # pylint: disable=unused-argument
get_token: Callable[[str, str], str],
create_cloud_integration_account: Callable,
) -> None:
"""Disabling metrics removes provisioned dashboards from both GetService and the dashboards list."""
admin_token = get_token(USER_ADMIN_EMAIL, USER_ADMIN_PASSWORD)
account = create_cloud_integration_account(admin_token, CLOUD_PROVIDER)
account_id = account["id"]
checkin = simulate_agent_checkin(signoz, admin_token, CLOUD_PROVIDER, account_id, str(uuid.uuid4()))
assert checkin.status_code == HTTPStatus.OK, f"Check-in failed: {checkin.text}"
endpoint = signoz.self.host_configs["8080"].get(f"/api/v1/cloud_integrations/{CLOUD_PROVIDER}/accounts/{account_id}/services/{SERVICE_ID}")
# Enable metrics to provision dashboards first
enable_response = requests.put(
endpoint,
headers={"Authorization": f"Bearer {admin_token}"},
json={"config": {"aws": {"metrics": {"enabled": True}, "logs": {"enabled": False}}}},
timeout=10,
)
assert enable_response.status_code == HTTPStatus.NO_CONTENT, f"Enable failed: {enable_response.status_code}: {enable_response.text}"
# Capture the provisioned dashboard IDs before disabling
get_svc_response = requests.get(
signoz.self.host_configs["8080"].get(f"/api/v1/cloud_integrations/{CLOUD_PROVIDER}/services/{SERVICE_ID}?cloud_integration_id={account_id}"),
headers={"Authorization": f"Bearer {admin_token}"},
timeout=10,
)
assert get_svc_response.status_code == HTTPStatus.OK
provisioned_ids = {d["id"] for d in get_svc_response.json()["data"]["assets"]["dashboards"]}
assert len(provisioned_ids) > 0, "Expected dashboards to be provisioned after enabling metrics"
# Disable metrics
disable_response = requests.put(
endpoint,
headers={"Authorization": f"Bearer {admin_token}"},
json={"config": {"aws": {"metrics": {"enabled": False}, "logs": {"enabled": False}}}},
timeout=10,
)
assert disable_response.status_code == HTTPStatus.NO_CONTENT, f"Disable failed: {disable_response.status_code}: {disable_response.text}"
# Assertion 1: GetService no longer returns UUID dashboard IDs
get_svc_after = requests.get(
signoz.self.host_configs["8080"].get(f"/api/v1/cloud_integrations/{CLOUD_PROVIDER}/services/{SERVICE_ID}?cloud_integration_id={account_id}"),
headers={"Authorization": f"Bearer {admin_token}"},
timeout=10,
)
assert get_svc_after.status_code == HTTPStatus.OK
dashboards_after = get_svc_after.json()["data"]["assets"]["dashboards"]
for dash in dashboards_after:
try:
uuid.UUID(dash.get("id", ""))
raise AssertionError(f"Dashboard '{dash['id']}' still has a provisioned UUID after disabling metrics")
except ValueError:
pass # expected — ID is not a UUID, meaning the dashboard was deprovisioned
# Assertion 2: Dashboards listing API no longer contains the provisioned dashboard IDs
list_response = requests.get(
signoz.self.host_configs["8080"].get("/api/v1/dashboards"),
headers={"Authorization": f"Bearer {admin_token}"},
timeout=10,
)
assert list_response.status_code == HTTPStatus.OK, f"Expected 200 from dashboards list, got {list_response.status_code}: {list_response.text}"
listed_ids = {d["id"] for d in list_response.json()["data"]}
assert not provisioned_ids & listed_ids, f"Provisioned dashboard IDs {provisioned_ids & listed_ids} still appear in dashboards list after disabling metrics"