charmander
charmander

Reputation: 1085

Redshift not logging to STL_WLM_RULE_ACTION

I have a Redshift cluster associated with a parameter group that monitors queries via workload management (WLM). I have rules that perform the "log" action whenever the number of rows scanned crosses a threshold (e.g. 100).

However, when I execute the SQL queries that satisfy the rule and then check the STL_WLM_RULE_ACTION table, where the query is supposed to be logged, the table comes up empty. Why is this happening? Am I missing something?

Upvotes: 3

Views: 731

Answers (2)

Joe Harris
Joe Harris

Reputation: 14035

Nathan's answer (about data visibility in STL_WLM_RULE_ACTION) is a good one.

You should also double check that your Parameter Group has been applied:

  • In the AWS Redshift Console, select the your cluster on Clusters page
  • On the Configuration tab, under Cluster Properties, is Cluster Parameter Group set to the correct group?
    • You can click on parameter group name to go to it and confirm.

If the parameter group you wanted has not been applied then:

  • On the Configuration tab, click the Cluster drop down and choose Modify.
  • Use the Cluster Parameter Group to select the correct group.
  • Carefully review the other options to avoid unintended changes.
  • Click Modify to apply the new parameter group.
  • If Parameter Group Apply Status says "Reboot required" then click the Cluster drop down and choose Reboot.

Upvotes: 1

Nathan Griffiths
Nathan Griffiths

Reputation: 12756

Are you connecting as a Superuser? Only superusers can see all the data in STL_WLM_RULE_ACTION, other users will only see rows for their own queries. If you are executing a query as one user then checking STL_WLM_RULE_ACTION while connected as another (non super-) user you will potentially not see any rows.

Upvotes: 2

Related Questions