Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Include Metrics "Prometheus" on OSD Visualize "Create" dialog #1333

Open
pjfitzgibbons opened this issue Jan 3, 2024 · 7 comments
Assignees
Labels
backport 2.x enhancement New feature or request

Comments

@pjfitzgibbons
Copy link
Contributor

Is your feature request related to a problem?
Metrics Prometheus needs to be presented on OSD Visualize Create dialog.

What solution would you like?
Position in similar way as "PPL" visualization option
image

Use Icon similar to Line (until UX provides guidance for an alternate.)
image

What alternatives have you considered?
This is the singular way to add aliases to OSD Visualize Create Dialog

Do you have any additional context?

Existing Observability Plugin Start registration for "PPL" visualization (in dashboards-observability/plugin.ts )

    setupDeps.visualizations.registerAlias({
      name: OBSERVABILITY_EMBEDDABLE_ID,
      title: OBSERVABILITY_EMBEDDABLE_DISPLAY_NAME,
      description: OBSERVABILITY_EMBEDDABLE_DESCRIPTION,
      icon: OBSERVABILITY_EMBEDDABLE_ICON,
      aliasApp: observabilityLogsID,
      aliasPath: `#/explorer/?${CREATE_TAB_PARAM_KEY}=${CREATE_TAB_PARAM[TAB_CHART_ID]}`,
      stage: 'production',
      appExtensions: {
        visualizations: {
          docTypes: [VISUALIZATION_SAVED_OBJECT],
          toListItem: ({ id, attributes, updated_at: updatedAt }) => ({
            description: attributes?.description,
            editApp: observabilityLogsID,
            editUrl: `#/explorer/${VISUALIZATION_SAVED_OBJECT}:${id}`,
            icon: OBSERVABILITY_EMBEDDABLE_ICON,
            id,
            savedObjectType: VISUALIZATION_SAVED_OBJECT,
            title: attributes?.title,
            typeTitle: OBSERVABILITY_EMBEDDABLE_DISPLAY_NAME,
            stage: 'production',
            updated_at: updatedAt,
          }),
        },
      },
    });

Expected registration for Prometheus visualization :
(new constants are inlined here for convenience... they will be in separate file on implementation)

   const OBSERVABILITY_PROMQL_EMBEDDABLE_ID="observability-promql"
   const OBSERVABILITY_PROMQL_EMBEDDABLE_DISPLAY_NAME="Prometheus"
   const OBSERVABILITY_PROMQL_EMBEDDABLE_DESCRIPTION="Select and save Prometheus Metrics from Prometheus datasources.  Optionally add those Metrics to Dashboards automatically"
   const OBSERVABILITY_PROMQL_EMBEDDABLE_ICON="line". // Or other by UX guidance
  
    setupDeps.visualizations.registerAlias({
      name: OBSERVABILITY_PROMQL_EMBEDDABLE_ID,
      title: OBSERVABILITY_PROMQL_EMBEDDABLE_DISPLAY_NAME,
      description: OBSERVABILITY_PROMQL_EMBEDDABLE_DESCRIPTION,
      icon: OBSERVABILITY_PROMQL_EMBEDDABLE_ICON,
      aliasApp: observabilityMetricsID,
      aliasPath: `#/`,
      stage: 'production',
      appExtensions: {
        visualizations: {
          docTypes: [VISUALIZATION_SAVED_OBJECT],
          toListItem: ({ id, attributes, updated_at: updatedAt }) => ({
            description: attributes?.description,
            editApp: observabilityMetricsID,
            editUrl: `#/${VISUALIZATION_SAVED_OBJECT}:${id}`,
            icon: OBSERVABILITY_PROMQL_EMBEDDABLE_ICON,
            id,
            savedObjectType: VISUALIZATION_SAVED_OBJECT,
            title: attributes?.title,
            typeTitle: OBSERVABILITY_PROMQL_EMBEDDABLE_DISPLAY_NAME,
            stage: 'production',
            updated_at: updatedAt,
          }),
        },
      },
    });
@pjfitzgibbons pjfitzgibbons added enhancement New feature or request backport 2.x labels Jan 3, 2024
@pjfitzgibbons
Copy link
Contributor Author

@kgcreative Who could give UX guidance on an icon for "Prometheus" metric?

@kgcreative
Copy link
Member

Work with @canascar for all icon requests

@pjfitzgibbons
Copy link
Contributor Author

Thanks @kgcreative

@pjfitzgibbons pjfitzgibbons self-assigned this Jan 4, 2024
@canascar
Copy link
Member

canascar commented Jan 5, 2024

@pjfitzgibbons - Looking into this -we currently don't have an icon representing Prometheus at the appropriate sizing required so a new icon will need to be created.

@pjfitzgibbons
Copy link
Contributor Author

pjfitzgibbons commented Jan 5, 2024 via email

@canascar
Copy link
Member

canascar commented Jan 5, 2024

We do have an icon visQueryPromQL - would this fit the icon required?

https://oui.opensearch.org/1.3/#/display/icons

We can also possibly use the Prometheus 3rd party logo

@pjfitzgibbons
Copy link
Contributor Author

pjfitzgibbons commented Jan 5, 2024 via email

RyanL1997 pushed a commit to RyanL1997/dashboards-observability that referenced this issue Apr 18, 2024
…t#1333) (opensearch-project#1341)

We've noticed there are some permissions in OpenSearch that are not included in the UX dropdown of the security-dashboards-plugin

Signed-off-by: Peter Nied <[email protected]>
Co-authored-by: Craig Perkins <[email protected]>
(cherry picked from commit e5c058804b5983ea273299fffec638c590e02624)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants