Fast way to cleanup health state for fragmentation alerts
I have a lot of servers that are in a Warning health state, most of the ones I check in Health Explorer only show one problem, the weekly fragmentation alert for one or more drives. The ones I checked are no longer fragmented, they either have diskkeeper, or a scheduled task for defrag.exe. If I run "Reset Health" it goes green, and stays green even after the Saturday 3AM fragmentation check. 1. Does everyone have to reset the health for fragmentation, or are these supposed to reset themselves and go green on Saturday after being defragged? 2. Does anyone have a script or some automated way to reset health on several servers? (preferrably just for a specific monitor like fragmentation and not everything). I tried to get this working with thigns like this but couldn't get it: get-agent | where {$_.HostComputer.HealthState -ne "Success"} get-state | select-object @{Name="Object Name";Expression={ foreach-object {(get-monitoringobject -id $_.monitoringobjectid).DisplayName}}}, monitordisplayname,healthstate Thanks!
June 25th, 2010 4:31pm

You could turn off the rule that is setting them to warning ...Microsoft Corporation
Free Windows Admin Tool Kit Click here and download it now
June 25th, 2010 6:27pm

Hi Steve This is a good explanation of what is happening: http://blogs.technet.com/b/kevinholman/archive/2009/09/28/new-base-os-mp-6-0-6667-0-adds-file-fragmentation-monitor-to-all-logical-disks.aspx The link shows you which monitors are causing this - Logical Disk Fragmentation Level - there are 2, one each targeted at windows 2003 and windows 2008 logical disk respectively. Set an override, enable = false, and save the override to a custom management pack where you store your windows overrides (not to default management pack) - apologies if you are already aware of that. Cheers GrahamView OpsMgr tips and tricks at http://systemcentersolutions.wordpress.com/
June 25th, 2010 11:00pm

Thanks for the reply, but that doesn't answer either of my questions. That's like someone asking how to silence a smoke alarm now that the smoke is gone, and you tell them to unplug it!?!? I didn't ask how to disable a monitor or the alerts, not sure how both of you got that from what I typed. I'm trying to figure out if these are supposed to reset themselves after being defragged, or where I look to check that. I would also like to know if there's an automated way to reset health on several servers (ideally for one monitor but all would be OK). Not just for this situation, but if an environnment has been ignored and no one has an idea what is still valid.
Free Windows Admin Tool Kit Click here and download it now
June 26th, 2010 3:43am

Hi Steve The monitor is firing as a result of a defrag check. If you have a look at the monitor it will tell you that it checks every saturday @3 am, I think. The monitor will not fire for another week and as such will not reset its alert for a week. If this disk is SAN disk then most SAN vendors will tell you to ignore it. If its DAS on windows servers then maybe you need to look at it I end up overrriding this because it doesnt seem to be very helpfull When I go on site and a load of servers have come back with this alert I either just put all the disks in maintaince mode for 5 min and the monitor will be forced out of its warning state Paul Keely
June 28th, 2010 1:51pm

That's a good tip about maintenance mode, thanks. I've found some useful scripts for putting the entire machine in maintenance mode, but does anyone know if its possible to just put a specific object/monitor (i.e. logical disk) into maintenance mode but not miss alerts from other monitors? Thanks!
Free Windows Admin Tool Kit Click here and download it now
June 30th, 2010 4:23pm

Yes. You can put any instance into MM. Remember, the computer is just an instance - nothing special there. When you put an instance into MM, any instances that are hosted by that instance go into MM as well.Microsoft Corporation
June 30th, 2010 7:17pm

Thanks for the reply. So how do I put an instance of logical disk into MM from a script, without putting the computer or health service / HS watcher in MM? I don't need the entire script written, I can modify others I've found, just point me at the syntax for targeting a specific object? We have R2 in the lab, but not in production, so we're still on 2007 "R1" SP1, I think that makes a difference in how MM is handled.
Free Windows Admin Tool Kit Click here and download it now
June 30th, 2010 9:49pm

2. Does anyone have a script or some automated way to reset health on several servers? (preferrably just for a specific monitor like fragmentation and not everything). I tried to get this working with thigns like this but couldn't get it: Take a look at GreenMachine from Tim Helton. Works great to reset health on one, or more agents.Layne
July 1st, 2010 11:10pm

That's a great tool, thank you. That will be very useful. I still don't understand why some machines reset this on their own, right away, while others reset after the next Saturday run (makes sense), while others never reset even though defrag.exe -a shows they are under the threshhold.
Free Windows Admin Tool Kit Click here and download it now
July 2nd, 2010 3:34pm

GreenMachine is a great tool but I've had difficulties using it to reset monitors in Warning only state. Although you can filter by class you cannot filter by monitor. If your requirements were similar to mine where I needed to only reset the Logical Disk Fragementation monitors then you might find my solution more fitting. I have created a test PS script for accomplishing this but I haven't tested the PS script yet. waiting to test it out next week when the fragementation monitors flip back to warning state. My plan is to run the script on schedule ever Monday at 2:00 AM since the defrags run over the weekend. Check it out and let me know! http://www.blogmynog.com/2010/12/08/resetting-logical-disk-fragementation-monitor-via-powershell/
December 9th, 2010 1:10pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics