How to see activity and job history in TFS 2012

[Update 4/24/15] Added information about filtering job history by result.

With TFS 2012, we introduced a new feature in the web UI that makes it easy to look at the activity and job history on your TFS 2012 server (this feature was first introduced in 2012 RTM). Before the 2012 release, you would have had to look at things like tbl_Command directly in the database to get this information.

To see this feature, just go to http://<yourserver>/tfs/_oi if you have admin privileges.

Grant Holliday has written a great blog post, TFS2012: New tools for TFS Administrators, that walks you through the feature. One thing that I’ll call attention to is for folks not used to looking at the info in tbl_Command, you’ll need to make sure you notice the Execution Count in the web UI, which we use to record a sequence of the same calls without writing a row per call. Grant explains it in his post, but it’s easy to over look.

One additional tip is when you are using the Job History page, if you want to be able to see successful jobs (not normally shown on the Job History) or want to be able to see only a certain job outcome, you can add &result=N to the URL where N is one of the following integers.

Succeeded = 0

PartiallySucceeded = 1

Failed = 2

Stopped = 3

Killed = 4

Blocked = 5

ExtensionNotFound = 6

Inactive = 7

Disabled = 8

JobInitializationError = 9

Here’s an example to see successful executions of one particular job on my server: http://buckh-dev:8080/tfs/_oi/_jobMonitoring#_a=history&id=95593a11-ecab-4446-b129-07cd21dac1e0&result=0

Dave, I do expect we will continue to improve it. This was done largely as a side activity to help with some testing and other work. I was very happy that we were able to get it into the product for 2012. You are quite right that there is a lot more that could be done here.

I've been trying to find a way to get the build number in the project msbuild script and wanted to try and see what TFS is actually doing. This seemed helpful, but the URL returns a 404 and I've scoured all the TFS docs, Googled, and crawled through the IIS directory and have not found how to enable this.

I gave it a try on our internal server running pre-release TFS 2013, and the URL still works. Are you missing the port? I should have added the :8080 after the host name in the example.

As for the build number, this web UI won't help you. You'd want to look at the build logs to understand what actually happened during a build, which you can get to from the build summary in VS or on the web.

I'm getting a 'Page Not Found' trying to hit that URL. I'm definitely an admin. Any way to verify that I actually have the /_oi deployed correctly? I am going over https as we've disabled non-https. Would that make a difference? And I'm specifically getting a 'Page Not Found' from "Microsoft Visual Studio Team Foundation Server" and not a typical 404 from IIS.

So – I figured it out. I was a TFS Collection Admin, Project Admin, etc, but I had to be part of the 'Server' admin group – which is only accessible via the TFS Admin Console. Once I was added to that – I stopped getting the 404 – and saw the screen. It was a happy coincidence as I was added to that group for another issue (with the warehouse) – and I just decided to retry the OI URL on a whim and it worked :)