Configure the MySQL App
For the MySQL app, you'll need to create a lookup file by running one of the included search queries and set up a Scheduled Search.
Create the Lookup File
This Lookup file is required for the Slow Queries - Hourly in a Week Panel in the Dashboard MySQL Overview.
To create the Lookup file, run the included search query Slow Query Seven Day Average Count.
Run the query:
- Go to Library > Personal.
- In the MySQL folder, click the query Slow Query Seven Day Average Count to run it.
- The Search page opens.
- If you see the Save File Query dialog, click Run.
Once the query is run successfully, it creates the Lookup file at /Shared/MySQL/LastSevenDaysAverage.
To verify that the file was created, open a Search tab and execute the following query:
cat /Shared/MySQL/LastSevenDaysAverage
Create a Scheduled Search
Now you'll need to edit this same search to create a Scheduled Search so that the Slow Query Seven Day Average Count gets refreshed and computed daily.
Edit the Search:
- Go to Library > Personal.
- In the MySQL folder, find the query Slow Query Seven Day Average Count.
- Click the double arrow to the right of the name, and from the menu, select Edit.
- On the Save Search AS dialog, click Schedule this search.
- Make the following changes:
- For Run Frequency, select Daily.
- For At:, select 0:00 (Midnight).
- For Timerange, enter -14d -8d.
- For Alert condition, select Send notification only if the condition below is satisfied.
- For Number of results, select Fewer than < and enter 0.
- Send email on failure to search owner is activated by default. If you do not want an email if the schedule search fails, deactivate this check box.
- For Alert Type, select Email.
- Enter the Recipients email address for this notification.
- Click Save.
Once the app is installed and configured, you can publish it to share it with your organization.