SharePoint 2010 has a built-in health analyzer that
acts as a best practice analyzer. The health analyzer will report
whether or not the farm is compliant with each predefined health rule.
The health analyzer builds upon the best practice analyzer from
Microsoft Office SharePoint Server 2007.
There are roughly 65 rules that are categorized as follows:
Security
Performance
Configuration
Availability
Each rule is run by a timer job, and each rule has a
specific purpose such as checking application pool memory, checking how
security is configured on the farm, or checking drive space.
In Central Administration, it is possible to edit
existing rules in order to meet the needs of your organization. Changes
can be made to the scheduled execution of the job. On the ribbon, there
is an option named Run Now that will execute the rule immediately. The rules are available out of the box and are meant to allow you to be proactive.
In this recipe, we will modify one of the existing health analyzer rules.
Getting ready
You must have farm-level administrative permissions to the Central Administration site.
How to do it...
Open the SharePoint 2010 Central Administration website.
Under the Health Analyzer section, click Review rule definitions.
Under the category Security, click The server farm account should not be used for other services.
A form pops up, which contains the parameter of the rule. The left-most ribbon button is Edit Item; click the button. The following screenshot appears:
Change the Schedule to Daily, from the default value of Weekly.
You must also manually change the value of the parameter Version. Change it to 2.0, from present 1.0.
How it works...
The health analyzer rule definitions are run via the timer jobs. There are several parameters that the administrator can modify:
Title: This is the text description of the rule.
Scope: This is where the rule will run.
Schedule: This is how often the rules are employed.
Enabled: This designates the rule as active.
Repair Automatically: When the timer
job kicks off, it will check the rules. If the rule can be checked and
then corrected via SharePoint best practices, it will be.
Version: This is a manually edited text box that tracks versioning of the rules.
The page also notes who created the rule, and when the rule was last edited and by who.
There's more...
In addition to being able to edit the rule, there are several other parameters as shown by the following screenshot:
Version History: Shows all the versions
Alert Me: This notifies you when changes are made
Run Now: This executes the rule
More info — adding a new health rule
Every rule that a farm installation may need cannot
be covered by the out of the box health rules. For instance, consider
monitoring the number of tenants in the user profile social database.
There may be a need for a governance rule that monitors this and flags
the administrator when certain levels are reached; however, there is no
out of the box rule available today that can help govern this.
In order to implement a new health rule, code must be written to utilize the Microsoft.SharePoint.Administration.Health namespace&;. Once the assembly is written, it must be placed in the Global Assembly Cache (GAC)&;
on every machine. The new health rule must then be registered with the
SharePoint Health Analyzer. The best way to do this is to create a
SharePoint feature that can be activated and deactivated.