This week I’m having a MP Authoring Workshop from Brian Wren in the UK and one of the modules of this workshop is Discovery.
And to my surprise Kevin Holman published a blog post on Basic troubleshooting of discovery script yesterday. It’s a good start but I’ve some more help on troubleshooting a Discovery script.
Here are mine (with some help of Brian):
- Verify that MP has been committed on agent
- Check agent for eventlog errors
- Check management server for errors
- Verify that discovery is running
- Enable debug events in script
- Debug script on agent
Step 1. Verify that MP has been committed on agent.
There are several ways. One of them is looking in the OpsMgr eventlog for EventId 1201.
Step 2. Check for agent errors.
Check for OpsMgr EventId’s like 31876 or 21405 or other Health Service Module source errors.
Step 3. Check for management server errors
Check for OpsMgr EventId’s 10801
Step 4. Verify that discovery is running
You can look for your discovery script in the C:\Program Files\System Center Operations Manager 2007\Health Service State\ subdirectories with the next command:
dir /B /S mycooldiscovery.vbs
Did you found it? I hope so;-) More info here. Now you can use Process Monitor from SystInternals to monitor your cscript vb discovery script. For more info on how to use Process Monitor go to Jeevan Bish’s blog.
Step 5. Enable debug events in script.
You can add a debug function to you discovery script that writes info the eventlog using oAPI.LogScriptEvent in your discovery script. For more info on using oAPI.LogScriptEvent take a look at MSDN.
Message = VbCrLf & Message
More blogposts on MP Authoring after this week of MP Authoring training.