Debugging Issues With Insights Alerts And Emails

How to investigate issues generating and receiving Insights alerts and emails?

Issue Description: Sometimes challenges may be encountered when generating/receiving email alerts due to different reasons such as:

  • Incorrect alert configuration
  • SMTP server issues
  • In very few cases, inherent issues with the specific product version.

Issue Diagnosis: There are two flavors of issues. Alerts not firing at all, or emails not being sent (for scheduled delivery and for alert notifications). All alerts addressed if not firing and then move on to emails not being sent.


Alerts:

  1. When an alert fires, there should be a notification icon at the location of the bell icon for the widget. Take a screenshot of this page. If there is an alert icon, it means that the alert is firing and this may be an email issue. If the issue is that no emails are sent, go on to the email section. If the issue is that the alert fires inconsistently or not at all, continue.
image.png
  1. Verify what the conditions are for the alert to fire are. To verify this, click the bell icon.



The page of interest should look like:
image.png

Take a screenshot of this. Verify the conditions are being met. For more information on alerts, see: How to create an alert? .

  1. Verify that the condition has been met. To do this, take a screenshot of the data points that prove the condition has been met. In the example above, the alert is set to fire when Time Saved is above zero. Verify that by simply looking at the Time Saved widgets value (This is the first screenshot in step one). For more complex alerts, there might be more involved then simply taking a screenshot of the widget
    • Hint: A simple test might be to make a simpler alert and check to see if it fires. If it fires, the issue maybe in how the alert was constructed
  2. For versions 23.4+ or cloud, export the Insights dashboard
  3. The following steps do not apply to cloud
    1. Get the looker backend credentials and login: Accessing The Backend UI Of Insights
    2. Once logged in, click on the Admin icon on the left of the screen
image.png
  1. Search for Alerts
  2. Right click the Alerts page and open it in a new window
  3. Next select Alert History
  4. There should be two pages open to the Looker portal. One on the Alerts page and one on the Alerts History page
  5. On the Alerts page, click the alert in question and in the pop window, select "Test Now"
  6. Wait about 1-2 minutes. Refresh both the Alert page and the Alert History Page
  7. Take a screenshot of both pages
  8. Alert Page example:
image.png
  1. Alert History Page example:
image.png
  1. Pay attention to the Columns 'Condition Met'. If these are not showing the correct and expected values, then the issue is most likely the condition is defined wrong. If the correct values are shown, then the issue maybe that the email alerts are not being sent.
  1. If the issue seems to be that the alert condition is not being met, then open a ticket with the UiPath Support team with the information gathered. If the alert condition is being met, the continue on to debugging emails.


Emails:

  1. Verify to follow these steps: Scheduling Reports. If debugging emails tied to alerts, try sending a Scheduled Report. So open up the menu for this
  2. In order to make sure the setup is sending emails as expected, try sending a test email using the "Test Now" option. Its best to take a screenshot of the settings on this page. Additionally, include the filters as well
  1. If an email is not received and this is UiPath cloud environment, open a ticket with UiPath. Mention the time when the test email was sent. The following steps do not apply to the cloud environments
  2. If the test failed, validate email settings by logging into the backend:
    1. Accessing The Backend UI Of Insights
    2. Next, create a user to 'Sudo' to. The email used to login to the backend is admin@uipath.com. This email is not real and cannot reliably be used to validate SMTP settings
    3. On the left hand side is an Admin menu option. Click it and then search for Users and then select that option
    4. Create a new user with the email that is to be tested. Make sure to give them the Admin role. For more detail on these steps see: https://cloud.google.com/looker/docs/admin-panel-users-users
    5. After the user has been created, go back to the users page. For the new user created, select 'Sudo' under actions. For more details see: Impersonating (sudoing) users
    6. There will be a prompt to enter some information. Anything can be entered as this user will be deleted.
    7. Once re-logged in, go to the SMTP setting,
      1. On the top left side select Admin. Then search for SMTP and click the option.
      2. Take a screenshot of this page.
      3. Select "Send Test Email". Take a screenshot of any errors. Note: Do not click the test email repeatedly. Looker has an annoying setting that it cannot be pressed multiple times over a certain period of time. See the blog: Failed to save options: You are saving SMTP settings too often
      4. If there is an an error, the error may explain the problem. The SMTP settings can be adjusted and evaluated from this page. (However, if too many attempts are made, we will have to wait five minutes for Looker to unlock us. As mentioned above, they allow five test per five minutes.).
        1. Note: It is a common mistake for end users to misconfigure SMTP settings (on any platform) when port 25 is in use. Port 25 is typically reserved for none authenticated email. If the email server is using port 25, most likely its unencrypted and unauthenticated (No Auth SMTP). In such a setting the SMTP settings should look something like this:
          • User Name - Blank
          • Password - Blank
          • Port - 25
          • TLS/SSL - Un-checked
          • Here is a screenshot
image.png
  1. Additionally, when updating the smtp settings, if the hostname, or port is changed then the password has to be re-provided. This is an issue when trying to remove the password and change the port number. In this scenario, first change the port or hostname, then enter a dummy password (it can be p@ssword) and then save the settings. After this is done, the password field will be blank. Click save again and the password will be saved as blank.
  1. If the email settings were adjusted and worked, make sure to persist the change by using the MSI installer. See Modifying Insights Configurations .
    1. For versions 21.10.X and 22.4.X the setting will persist on its own. (They only would be changed on updates or if someone re-ran the linux installer, which is not typical)
    2. There is a bug in all 21.10.X versions, in 22.4.8 and below and 22.10.3 and below that prevented the installer from setting SMTP with No Auth. If on 22.10+ make sure to update to the latest version if on an affected version. (insights compatibility has been improved so that Orchestrator does not need to be upgraded with Insights).
  1. If the email configuration seems valid (or in the initial email test, the test worked) the issue maybe due to dashboard performance. If the test failed, the issue might still be dashboard performance.
    1. Login to the backend of Insights: Accessing The Backend UI Of Insights
    2. On the top left side select Admin. Then search for 'Queries'. Select Queries under Database
    3. Check to see if there were any query errors around the time when the emails were scheduled. The source column for these queries should say "Renderer".
    4. Take a screenshot of what queries ran around the scheduled time. If there are errors, click on the 'Details' button on the left to see if it displays any more details.image.png
  2. If the configuration is set as expected and the issue persists, collect the following details and share them with UiPath Support for further analysis:
    1. Confirm if emails are working. If not, include screenshots of the email settings that is gathered
    2. If email is working but reports are not sending, include screenshots of the queries
    3. Finally, run the following tool on the Linux machine: Collect All Looker Logs For Insights. For automation suite, just generate a support bundle .