Microsoft Office Sharepoint

All my posts are provided "AS IS" with no warranties, and confer no rights.

Search Based Alerts

Search Based Alerts

  • Comments 4
  • Likes

Purpose : To get notified whenever something new gets indexed, based on a search term you specify. Say for instance that you would like to get notified whenever a new “TOP SECRET DOCUMENT” :) gets indexed.

Go to the search page, issue a query and when the results page is displayed, click on the “Alert me“ link, configure the Search: TOP SECRET DOCUMENTS alert to inform you when there are

New items in search result or,

Existing items are changed or,

All changes

and choose the notification type to Daily or Weekly based on your needs,

Now , if your outgoing mail configuration is properly set, you should receive a subscription and you should be all set, but … what if you do not receive the daily summaries ?

Troubleshooting step 1:

Check if the search based alerts are enabled in Central Administration , SSP Settings, .. /ssp/admin/_layouts/enablealerts.aspx

You should have the following message Currently active.

Troublehooting step 2:

Check the alerts timer job status:

Enabled?

stsadm.exe -o getproperty -url http://SiteUrRL -pn alerts-enabled
The expected output is <Property Exist="Yes" Value="yes" > if not, set it with:

stsadm.exe -o setproperty -url http://SiteUrRL -pn alerts-enabled -pv “Yes”

________________

Immediate alerts frequency:

stsadm -o getproperty -pn job-immediate-alerts -url http://SiteURL

Expected Output <Property Exist="Yes" Value="<valid date and time interval>" > if not, set it with:

stsadm -o setproperty -pn job-immediate-alerts -pv "every 1 minutes between 0 and 59" -url http://SiteURL

________________

Daily alerts setup:

stsadm -o getproperty -pn job-daily-alerts -url http://SiteURL

Expected Output <Property Exist="Yes" Value="<valid date and time interval>" > if not, set it with:

stsadm -o setproperty -pn job-daily-alerts -pv "daily between 22:00:00 and 24:00:00" -url http://SiteURL

________________

Weekly alerts setup:

stsadm -o getproperty -pn job-weekly-alerts -url http://SiteURL

Expected Output <Property Exist="Yes" Value="<valid date and time interval>" > if not, set it with:

stsadm -o setproperty -pn job-weekly-alerts -pv "weekly between Fri 22:00:00 and Sat 24:00:00" -url http://SiteURL

where <valid date and time interval>can be any of the following values:

A valid Windows SharePoint Services Timer service (SPTimer) schedule in the form of any one of the following schedules:

  • "Every 5 minutes between 0 and 59"

  • "Hourly between 0 and 59"

  • "Daily at 15:00:00"

  • "Weekly between Fri 22:00:00 and Sun 06:00:00"

  • "Monthly at 15 15:00:00"

http://technet.microsoft.com/en-us/library/cc262629.aspx

Everything is properly configured but the weekly summary do not appear where to look next ?

Troubleshooting step 3:

Sharepoint logs, usually located at C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\LOGS.

Increase the level to verbose for the following categories:

Timer

MS Search Query   

MS Search Query Processor    

Open the log when you know your alert should be sent and look for the following message :

AlertsJob processed X daily notifications in X digests, sent X emails, failed to send X emails

if the message is present that means the alert job is running.

You may wonder however why don’t you receive the mails although you can clearly see the message…

Here’s the interesting part, the message will never be sent if :

  1. There are NO new items to be informed about (now new TOP SECRET DOCUMENTS indexed since the last alert)
  2. You do not have permissions on the TOP SECRET DOCUMENTS (dough! ;) )

Both cases should generate a message from the Query Processor Search alert: '0' results

However the processing of the alert WILL generate the message as above.

A short “how-it-works” explanation: when generating search based alerts, the SharePoint Services Timer process will generate a query in your stead to retrieve the most recent resultset based on the Query you defined when you created the alert. After the result set is generated it will be security trimmed based on your permission level and if the resultset itemcount is >0 will send an e-mail.

If for whatever reason  the query will return no results,( no results, no permissions, even a possible error in generating the resultset) you will not receive any notification.

To summarize : configuring the search based alerts involves three things:

SSP configuration

Timer job timings

Resultset generation.

IMPORTANT : While generating the mail , the timer service will try to access the DC for the domain where the Server resides via MSRPC. If the user account for the Windows Sharepoint Services Timer Service does not have permissions to access the DC via RPC , the whole operation will fail.

Solution : use a domain account with enough permissions or add the user to a domain group with the respective permissions (test with Domain Admins, to see if it works)

Helpful tools to check the alerts definitions (alert time, definition, etc):

SharePoint Diagnostics, part of the Administration Toolkit v3.0

Download details: Microsoft SharePoint Administration Toolkit v3.0 x86 ...

Download details- Microsoft SharePoint Administration Toolkit v3.0 x64

SharePoint Manager

SharePoint Manager 2007 - Home

Good troubleshooting blogs on the topic:

http://weblogs.asp.net/mellota/archive/2007/10/11/sharepoint-2007-task-notification-alert-emails-not-working.aspx ( where you can find also information on the databases used by the alerts  – “look but don’t touch”  :) )

http://glorix.blogspot.com/2007/10/alerts-not-working-all-time.html

V

Comments
  • Hi,

    i'm having the problem with 'search alerts' ....

    actually, i've set an alert on a particular search keyword. and after that i've added or modified the search results by adding any new item or modifying the content which comes under the search results. and after that i've also crawled the indexing server... but i've not received any mail alert regarding the change, however i got an email informing me that i've successfully been subscribed to the search alert. there's no such error in event viewer.

    Do you have any idea about the problem?

    Thanks

  • I would start checking the parameters as described above, timer jobs, alert frequency, etc.

    Cheers

  • Victor,

    Is there a way to receive search based alerts on an hourly basis instead of the daily/weekly options we are currently given?  Having intra-day notifications of new or updated content is important for my work environment.

    Thanks

  • Hi Jim, sorry about the delay in replying, to answer your question, having hourly updates would make sense when the index corpus can be indexed within an hour ( and I have the experience of big corpuses that may take 2 hrs to crawl incrementally).

    The second point is , when the server processes an alert it undergoes through the same procedure as in a query, so , for example if a user sets-up 10 alerts for 10 different words it would be like every hour that user would press F5 on 10 IE pages to search for that word.Multiply this by the number of users in your organization and you can imagine the potential performance impact ....

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment