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

Redshift security dashboard bugfix and enhancements #192

Merged
merged 2 commits into from
Nov 15, 2022

Conversation

yota-p
Copy link
Contributor

@yota-p yota-p commented Nov 8, 2022

Hello team, I would like to update the built-in dashboards. There are two points:

  1. Bugfix: Boolean query error
    I found out that Query data error occurs when BOOL type is returned in the dashboard (e.g. select boolean_col;).
    I modified the SQL to convert BOOL into VARCHAR using following syntax: select decode(boolean_col, true, 'true', false, 'false').
    Left: before, right: after (usecreatedb, usesuper, usecatupd are BOOL)
    ScreenShot 2022-11-08 at 12 11 45

  2. Minor enhancement:
    Added links to the AWS document in the panel description. Users can use this link to jump to the document of each Redshift system table to inspect column definitions quickly.
    ScreenShot 2022-11-08 at 11 58 38

@yota-p yota-p requested a review from a team as a code owner November 8, 2022 03:19
Copy link
Contributor

@kevinwcyu kevinwcyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for these fixes and improved documentation @yota-p.

In the Amazon Redshift Identities and Objects dashboard. The Group assigned to User panel has the following error for me.

Screen Shot 2022-11-08 at 8 50 55 AM

Is this something that you see as well?

@yota-p
Copy link
Contributor Author

yota-p commented Nov 9, 2022

Hi @kevinwcyu , thanks for taking a look.
I did some experiment and noticed that Node Graph panel shows this error when dataframe nodes returned no record.
For this case, it seems you don't have any GROUP assigned to a USER in Redshift.
If there's any GROUP assigned to a USER then this error will not occur.

In order to avoid this error, dataframe needs to return at least 1 record.
I modified the SQL to query a dummy record from Redshift, and then to filter out the dummy record from dataframe by using Transform feature in Grafana.

ScreenShot 2022-11-09 at 20 43 46
ScreenShot 2022-11-09 at 20 43 52

It's not an elegant workaround, but now the panel will show "No data" instead of the error above.

Copy link
Contributor

@kevinwcyu kevinwcyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for these enhancements @yota-p.

@yota-p
Copy link
Contributor Author

yota-p commented Nov 15, 2022

@kevinwcyu Thanks for the approval! Can we merge the branch or are we waiting for something?

@iwysiu iwysiu merged commit df39f73 into grafana:main Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants