Thủ thuật Sharepoint 2010 part 60 doc

13 219 0
Thủ thuật Sharepoint 2010 part 60 doc

Đ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

Unified Logging Service ❘ 431 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. 432 ❘ CHAPTER 15 moNitoriNg sharePoiNt 2010 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. Unified Logging Service ❘ 433 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 problems 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. 434 ❘ CHAPTER 15 moNitoriNg sharePoiNt 2010 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 Unified Logging Service ❘ 435 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. 436 ❘ CHAPTER 15 moNitoriNg sharePoiNt 2010 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 Unified Logging Service ❘ 437 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 definitions 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. 438 ❘ CHAPTER 15 moNitoriNg sharePoiNt 2010 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. Unified Logging Service ❘ 439 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. 440 ❘ CHAPTER 15 moNitoriNg sharePoiNt 2010 FIGURE 1530 FIGURE 1531 [...]... improvement: SharePoint 2010 introduces the capability to assign a preferred 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... requests, so having it be responsible for timer jobs will allow another scaling option 442  ❘  Chapter 15   Monitoring SharePoint 2010 Figure 15-33 Summary  ❘  443 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... 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... 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 . or third parties. 436 ❘ CHAPTER 15 moNitoriNg sharePoiNt 2010 Timer Jobs Timer jobs are one of the great unsung heroes of SharePoint. They have been around for several versions of SharePoint, . 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. not the best addition. 438 ❘ CHAPTER 15 moNitoriNg sharePoiNt 2010 The best addition to this page, and arguably to timer jobs in SharePoint 2010, is the button on the lower right, Run Now. You

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

Tài liệu cùng người dùng

Tài liệu liên quan