1. Trang chủ
  2. » Công Nghệ Thông Tin

Thủ thuật Sharepoint 2010 part 60 doc

13 222 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 13
Dung lượng 1,7 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

The Health Analyzer utilizes Timer Jobs to run rules periodically and check on system metrics that are based on SharePoint best practices.. They have links to essentially the same two it

Trang 1

This shows both the query that is used and the results of that query You can use this view and the resulting query as a template for any queries you want to design Remember that if you do happen to

do any damage to the logging database, you can simply delete it and SharePoint will re-create it

health Analyzer

By now you’ve seen there are a lot of ways for you to keep an eye on SharePoint What if there were some magical way for SharePoint to watch over itself? What if it could use all that fancy monitoring

to see when something bad was going to happen to it and just fix it itself? Welcome to the future SharePoint 2010 introduces a feature called the Health Analyzer that does just that The Health Analyzer utilizes Timer Jobs to run rules periodically and check on system metrics that are based

on SharePoint best practices When a rule fails, SharePoint can alert an administrator in Central Administration, or, in some cases, just fix the problem itself To access all this magic, just select Monitoring ➪ Health Analyzer

reviewing Problems

How do you know when the Health Analyzer has detected a problem? You’re probably familiar with the window shown in Figure 15-21 You fire up Central Admin and there’s a red bar running across the top That’s the Health Analyzer alerting you that there’s a problem in the farm To review any prob-lems, click the View these issues link on the right

FIguRE 15-21

When you click the link you’re taken to the Review problems and solutions page (Even if there are no problems, you can get there by clicking Monitoring ➪ Review problems and solutions in Central Admin.) This page shows you all the problems that the Health Analyzer found in the farm Figure 15-22 shows some problems common with a single-server farm

Trang 2

FIguRE 15-22

Clicking any of the issues will bring up the definition of the rule and offer remedies for it

Figure 15-23 shows details about the first problem

SharePoint provides a summary of the rule This particular error indicates that one of the app pool accounts is also a local administrator In most situations this is a security issue, so SharePoint dis-courages it SharePoint categorizes this as having a severity level of 1, and therefore an Error It also tells you this problem is in the Security category The next section, Explanation, describes what the problem is and to which application pools and services it pertains The following section, Remedy, points you to the Central Admin page, where you can fix the problem, and an external link to a page with more information about this rule This is a great addition and gives SharePoint the ability

to update the information dynamically The next two sections indicate which server is affected by the issue, and which service logged the failure The final section provides a link to view the settings for this rule You’ll learn more about the rule definitions later in this chapter

That’s a rather in-depth property page, and it’s packed with even more features Across the top is a small ribbon that gives you some management options Starting on the left is the Edit Item button This lets you alter the values shown on the property page You could use this to change the error level or category of the rule It isn’t recommended that you alter these values, but if you do you can keep track of the versions with the next button, Version History The following button enables you

to set an alert if the item changes You have these options because these rules are simply items in a list, so you have many of the same options you have with regular list items

Trang 3

FIguRE 15-23

You may notice one more button: for each rule you have the option to Reanalyze Now This lets you fire off any rule without waiting for its scheduled appearance, which is great for ensuring that a problem is fixed once you have addressed it You won’t have to wait for the next time the rule runs

to verify that it has been taken care of

Some problems are not only reported, but can be fixed in the property page as well Figure 15-22 showed another problem under the Configuration category It noted that one or more categories were configured with Verbose trace logging This configuration issue can contribute to unnecessary disk I/O and drive space usage The Health Analyzer alerts you when this value is set This prob-lem is pretty easy to fix; simply set the trace logging level back to its default For probprob-lems like this, SharePoint offers another option, Repair Automatically Figure 15-24 shows this functionality in action

Clicking the Repair Automatically button allows SharePoint to fix the problem Then click the Reanalyze Now button, click Close on the property page, and reload the problem report page

The trace logging problem should no longer be listed This is almost bliss for the lazy SharePoint administrator

Trang 4

FIguRE 15-24

rule Definitions

The real power of the Health Analyzer lies in its impressive set of rules Out of the box, SharePoint

2010 comes with 52 rules You can see the entire list and details about each rule by clicking Monitoring ➪ Health Analyzer ➪ Review rule definitions You will see a screen like the one shown

in Figure 15-25

As you can see, the rules are broken down by category Figure 15-25 shows three of the categories: Security, Performance, and Configuration There is a fourth and final category on the second page

of rules: Availability The default view shows several pieces of information about each rule, including the Title, the Schedule of how often it runs, whether it’s Enabled to run, and whether it will Repair Automatically Wait, Repair Automatically? You read that right; some rules can be configured to automatically repair problems when they find them

Figure 15-25 shows several rules that by default are set to repair automatically One example is

“Databases used by SharePoint have fragmented indices.” Once a day, SharePoint checks the indices

Trang 5

of its databases, and if their fragmentation exceeds a hardcoded threshold, SharePoint will automat-ically defrag the indices If the indices are not heavily fragmented, it does nothing This is a great use of Repair Automatically It’s an easy task to automate, and there’s no reason it should need to be done manually by an administrator Some rules, like “Drives are running out of free space,” don’t seem like quite as good candidates for SharePoint to fix by itself You don’t want it deleting all those copies of your resume, or your Grandma’s secret chocolate-chip cookie recipe

FIguRE 15-25

If you want to change the settings of any of the rules, including whether it Repairs Automatically or not, simply click the rule title, or click the rule’s line and select Edit Item in the ribbon Here you can enable or disable whether a rule will run or not In the single-server environment shown, it would make sense to disable the rule that reported databases on the SharePoint server It’s nothing that can be fixed, so getting alerts about it does you no good You could also choose to change how often

a rule is run, but it is not a best practice to change the details of a rule other than enabling the rule and Repair Automatically

Finally, because the rules are simply items in a list, the rules list is extensible More rules can be added later by Microsoft or third parties

Trang 6

timer jobs

Timer jobs are one of the great unsung heroes of SharePoint They have been around for several versions of SharePoint, and they get better with each version Timer jobs are the workhorses of SharePoint Most configuration changes are pushed out to the farm members with timer jobs Recurring tasks like Incoming E-Mail also leverage timer jobs In SharePoint 2010, timer jobs have been given another round of improvements A lot of the functionality covered in this chapter relies

on timer jobs, so you have seen some of those improvements already This section drills down a little deeper into how timer jobs have improved

Timer Job Management

When you enter Central Admin it is not immediately obvious that timer jobs have gotten such a shiny new coat of paint They have links to essentially the same two items in SharePoint 2010 that they do in SharePoint 2007: job status and job definition In SharePoint 2010 the timer job links are under the Monitoring section, as there no longer is an Operations tab Figure 15-26 shows their new home

FIguRE 15-26

Trang 7

Let’s start our tour of the new timer job features by looking at the timer job definitions Again, this page is largely unchanged from its SharePoint 2007 counterpart You get a list of the timer jobs, the web application they will run on, and their schedule You can also change the jobs that are shown

by filtering the list with the View drop-down in the upper right-hand corner Figure 15-27 shows the Job Definitions screen

FIguRE 15-27

Again, not a huge improvement over the timer job definition management provided in SharePoint

2007 To really see what’s new, click one of the timer job definitions Hopefully you’re sitting down, because otherwise the new timer definition page, shown in Figure 15-28, might knock you over

It includes all of the same information provided in SharePoint 2007, including the general informa-tion on the job definiinforma-tions screen and the buttons to disable the timer job However, there are two new, very exciting features First, you can change the timer job schedule in this screen In SharePoint

2007 you need to use code to do this This gives you a lot of flexibility to move timer jobs around if your farm load requires it That’s a great feature, but it’s not the best addition

Trang 8

The best addition to this page, and arguably to timer jobs in SharePoint 2010, is the button on the lower right, Run Now You now have the capability to run almost any timer job at will This means

no more waiting for the timer job’s scheduled interval to elapse before knowing if something you fixed is working This is the same feature that enables the Health Monitoring discussed earlier in the chapter to fix issues and reanalyze problems You are no longer bound by the chains of timer job schedules You are free to run timer jobs whenever you want That alone is worth the cost of admission

FIguRE 15-28

Timer Job status

The other link related to timer jobs in Central Admin is Check job status This serves the same purpose

as its SharePoint 2007 counterpart However, like the timer job definitions, it has gotten a new coat of paint Figure 15-29 shows the new Timer Job Status page Like the SharePoint 2007 version, it shows you the timer jobs that have completed, when they ran, and whether they were successful or not

Trang 9

SharePoint 2010 takes it a step further Notice that the Succeeded status is now a hyperlink Simply click this link to get more information Figure 15-30 shows the full Job History page, with a job highlighted You can also get to this page by clicking Job History in the left navigation pane

FIguRE 15-29

Figure 15-30 also shows another great addition, the capability to filter and view only the failed jobs That helps with troubleshooting, as you can see all the failures on one page, without all those pesky successes getting in the way To take it a step further, you can click on a failure and get information about why that particular timer job failed, as shown in Figure 15-31

In this case, the Health Statistics timer job failed because of a timeout issue Now you have some real information to use to get to the bottom of the problem

Trang 10

FIguRE 15-30

FIguRE 15-31

Trang 11

The Timer Job Status page serves as a dashboard You’ve already seen how it shows the timer job history, but it also shows the timer jobs that are scheduled to run, as well as the timer jobs that are currently running Refer back to Figures 15-29 and 15-30; Figure 15-29 shows all three sections with scheduled jobs on the top followed by running jobs and finally the timer job history If you want more complete information on any of these sections you can click the appropriate link on the left under Timer Links This gives you a page dedicated to each section Figure 15-30 is an example

of the history page Figure 15-32 shows the running timer jobs in the Timer Job Status page Along with showing the timer jobs that are running, you can also see the progress of each job, complete with

a progress bar If you have many jobs running at once, you can click Running Jobs in the left navi-gation pane to access a page dedicated to reporting the timer jobs that are currently running

FIguRE 15-32

Here’s one final timer job improvement: SharePoint 2010 introduces the capability to assign a pre-ferred server for the timer jobs running against a specific content database Figure 15-33 shows how

it is configured in Central Admin

This setting is set per content database, so it is set on the Manage Content Database Settings page (go

to Central Administration ➪ Application Management ➪ Manage Content Databases) Being able to set a particular server to run the database’s timer jobs serves two purposes From a troubleshooting standpoint, you can use this to isolate failures to a single box, if you’re having trouble with a specific timer job or content database You can also use this to move the burden of timer jobs to a specific server This server could be one that is not used to service end user requests, so having it be respon-sible for timer jobs will allow another scaling option

Trang 12

FIguRE 15-33

Trang 13

Again, you can take your administrative experience to the next level with Windows PowerShell There are five cmdlets that ship with SharePoint that deal with timer jobs To discover them use Get-Command:

PS C:\> Get-Command -noun SPTimerJob

You can use PowerShell to list all of your timer jobs using Get-SPTimerJob, and then choose to run one with Start-SPTimerJob

SummARY

The monitoring capabilities in SharePoint got a serious shot in the arm with SharePoint 2010 The trace logs now take up less space, but somehow also hold more helpful information The interface for configuring them has also been drastically improved You also now have a database that is dedicated

to logging and reports, and you can access it with Microsoft’s blessing The software has also become more self-sufficient Not only can it monitor itself and let you know when there are problems, it can also fix some problems on its own A wide variety of reports keep an eye on various aspects of the server, enabling you to proactively monitor it Finally, even timer jobs have been improved You can now run them at will, and you have much better diagnostic tools to watch over them In short, the monitoring experience in SharePoint 2010 is much improved over earlier versions

Ngày đăng: 02/07/2014, 12:20

TỪ KHÓA LIÊN QUAN