Last time I realized that there are too many Analysis modules to cover in one article, so I split the Modules into three posts. This is the second of those posts.
I mentioned it in part 1, but it's worth reiterating here that the context KInspector was developed in seems to have been one of wanting to analyze sites that you couldn't necessarily successfully start up. As well, a lot of these modules were developed a long time ago, for use on earlier versions of Kentico that were missing these key analytical features. Because of this, there are lots of things here that have been moved into Kentico proper, and even more that while you can *do* them in Kentico, you have to do them one page / template / etc at a time, whereas KInspector lets you do them globally at a glance.
- Consistency issues
-
- Database consistency check
-
- Most useful for:
- Health Check
- First Version Present:
- 6
- What it does:
- Runs DBCC CHECKDB without you having to open SQL. Simple and handy.
- Documents consistency issues
-
- Most useful for:
- Health Check
- First Version Present:
- 6
- What it does:
- Checks various consistency issues with Trees and Documents: Nodes missing Sites, orphaned nodes, Documents without nodes, Nodes with improper NodeLevel, Nodes missing documents, and page types not assigned to a site (see "Page type is assigned to a site")
- Form Attachments and Media Library Consistency Check
-
- Most useful for:
- Health Check
- First Version Present:
- 8
- What it does:
- Sometimes when you're moving files around between environments, or deleting media library / attachments documents, you can accidentally leave files laying around you've deleted from the database, or have files in the database that don't have physical files associated with them. This sniffs those out.
- Content
-
- Attachments by size
-
- Most useful for:
- Cleanup, Performance Tuning
- First Version Present:
- 6
- What it does:
- Shows you your site's attachments, ordered by size. I prefer the System -> Files -> Attachments version within Kentico itself, since it also tells you where it's stored (FS or DB), but it's a good baseline.
- Duplicate Page Aliases
-
- Most useful for:
- Performance Tuning
- First Version Present:
- 6
- What it does:
- Using this along with "Number of Document Aliases" is a great way to eke out some redirect performance, especially if you forgot to turn off 'Add a page alias whenever you move a document' during pre-production development.
- Number of children of TreeNode
-
- Most useful for:
- Cleanup, Performance Tuning
- First Version Present:
- 6
- What it does:
- Finds any pages that have more than 1000 direct children, which is Kentico's recommended limit -more than that is hard to use in the CMS Tree and also affects performance.
- Page type is assigned to a site
-
- Most useful for:
- Health Check
- First Version Present:
- 6
- What it does:
- Checks exactly what it says in the title. It's a basic check for the sake of import/export, but it is still best practice to make sure that if you're using a page type on a site, that you've actually assigned the page type to the site.
- Performance demanding web parts in transformations
-
- Most useful for:
- Performance Tuning
- First Version Present:
- 6
- What it does:
- This just detects nested listing controls - instead of nesting controls, you should use hierarchical transformations instead when possible.
- Templates with identical layouts
-
- Most useful for:
- Cleanup
- First Version Present:
- 10
- What it does:
- Scans for templates with matching layouts, so you can decide which ones to make shared layouts with.
- Database
-
- Class table validation
-
- Most useful for:
- Health Check
- First Version Present:
- 6
- What it does:
- Compares the database listing of tables to the list of Kentico objects - good for letting you know if a site had become corrupted, but also good when you get hold of a new site, to see whether they've implemented things outside of the Kentico context. Warning: This one will occasionally show system tables - for example, in Kentico 11 it shows CI_Migration.
- Task Processing Issues
-
- Most useful for:
- Health Check
- First Version Present:
- 9
- What it does:
- Searches for Scheduled Tasks that were one-time events and have already run, and Web Farms, Integrations, Staging, and SmartSearch index tasks that are more than a day old.
- Top 25 tables by size (MB)
-
- Most useful for:
- Health Check, Onboarding
- First Version Present:
- 6
- What it does:
- This is a simple SQL query but it's so useful. "What features of Kentico are being used in this install?" "Are there any tables that are so full they're obvious issues, like Online Marketing or Analytics?", "Why is there a custom table with that many gigs of data in it?" (True story, they were uploading videos as BLOBs to their database)
- Event log
-
- Application restarts
-
- Most useful for:
- Health Check
- First Version Present:
- 6
- What it does:
- Filters your event log to show when the app was started and stopped. Not the most insightful thing, but it's a good baseline thing to check when doing a health checkup.
- Event log errors
-
- Most useful for:
- Health Check
- First Version Present:
- 6
- What it does:
- Displays errors from the Event log (duh). One nice thing it does over the website's version, is groups events to show First/Last date the error was seen, and a count of how many times.
- Event Log size
-
- Most useful for:
- Pre-Production
- First Version Present:
- 6
- What it does:
- Just checks whether the event log (at each of the site / global levels) is capped between 5000 and 10000 entries.
- Not found errors (404)
-
- Most useful for:
- Health Check
- First Version Present:
- 6
- What it does:
- This just lists out the 404s from the event log, grouping them by URL and referrer. While useful, I personally prefer using something like Screaming Frog to find these. But having the "First date" field can be useful.
- General
-
- Debug Check
-
- Most useful for:
- Pre-Production
- First Version Present:
- 7
- What it does:
- Ensures that you've set the Debug keys and the debug web.config to false, since those should be disabled before you push to production.
- Disabled web parts and web part zones
-
- Most useful for:
- Cleanup
- First Version Present:
- 7
- What it does:
- Very useful, this scans page templates for disabled web parts and zones - if you don't need them, it's best to delete these web parts and zones instead, so the page-load code doesn't have to consider them.
- Important scheduled tasks
-
- Most useful for:
- Performance Tuning
- First Version Present:
- 6
- What it does:
- This one's handy. Kentico ships their scheduled tasks as if you're using and running every feature. This recommends turning off about half of them, unless you're using those modules. The problem can be with the ones that say 'not able to determine', since there's no guidance outside of the scheduled task name, to decide if it's actually an important thing or not.
- Important settings
-
- Most useful for:
- Investigating a related error
- First Version Present:
- 6
- What it does:
- Cherry-picks some settings Kentico considers important - a mix of Password / security settings, staging, cache, and URL filter settings. Not all of these are ones I'd have picked, and in any case it requires considering each row to decide if it's a good setting or not.
- Number of document aliases
-
- Most useful for:
- Performance Tuning
- First Version Present:
- 7
- What it does:
- Counts the aliases of each page. Using this along with "Duplicate Page Aliases" is a great way to eke out some redirect performance, especially if you forgot to turn off 'Add a page alias whenever you move a document' during pre-production development.
- Page template overview
-
- Most useful for:
- Cleanup, Onboarding
- First Version Present:
- 7
- What it does:
- Half of this one is showing the properties of all of your web parts, which is really only useful in specific diagnostic scenarios, but the other part lists what documents apply to each template - sort of the reverse of the Unused Templates module. In earlier versions of Kentico (7 and 8) this was extremely useful for finding out what templates were used by what pages. Now we can do that within Kentico itself.
- Page type fields data type mismatch
-
- Most useful for:
- Investigating a related error
- First Version Present:
- 6
- What it does:
- When Kentico does joins in repeaters on data of multiple types, or does import/export of a site, it assumes that if two page types have properties of the same name, that they're of the same datatype too. This warns you of errors about that.
- Screenshotter
-
- Most useful for:
- Never
- First Version Present:
- 5.5
- What it does:
- I've never gotten it to actually work, but supposedly this takes a screenshot of every page on your site and uploads it to your desktop. I guess if you need to take a picture of every page, it could be useful? It's never come up for me, and when I've tried it it reports success but then the images aren't on the desktop like it says. And I have Firefox installed. So it's probably a file permissions thing.
- Unspecified 'columns' setting in web parts
-
- Most useful for:
- Performance Tuning
- First Version Present:
- 6
- What it does:
- This searches all your templates for repeater-style controls, that aren't using the Columns property. Actually very useful - Repeaters without Columns specified just do a 'select *' on the whole joined-table set of whatever thing you're selecting, which is probably hundreds more fields than you actually need in your query.
- Unused page types
-
- Most useful for:
- Cleanup
- First Version Present:
- 8
- What it does:
- Shows page types that aren't associated with any pages. Very useful for at-a-glance site analysis of 'are there page types that we don't need'
- Unused templates
-
- Most useful for:
- Cleanup
- First Version Present:
- 8
- What it does:
- Shows page templates that aren't associated with any pages. Very useful for at-a-glance site analysis of 'are there templates that we don't need'
- Workflow consistency
-
- Most useful for:
- Health Check
- First Version Present:
- 7
- What it does:
- Kentico stores the last-published version of documents in a separate place from the in-progress edits - this module compares the published and editing versions of documents to verify any consistency issues. Generally when these happen you can archive/re-save/publish the document to overwrite the published version with the editing version, solving this issue. Of course if you need the edited version instead, you'll have to manually redo those edits. So try not to let this happen.
- Online marketing
-
- Contact groups with manual macro
-
- Most useful for:
- Performance Tuning
- First Version Present:
- 8.1
- What it does:
- Just a helper that checks whether your macros are built using the MacroRuleDesigner, which can leverage SQL to decreate calculation time. I've not working on a project with Contact Groups so I've not tried it myself.
- Inactive contact deletion settings
-
- Most useful for:
- Pre-Production, Health Check, Performance Tuning
- First Version Present:
- 6
- What it does:
- This one's easy to check and very important. Kentico's contact management isn't supposed to be a permanent history of all users' activities - if you don't delete out contacts who you don't care about (ones who haven't visited in years, or who completed your process and won't be back, etc) then your database will quickly overfill with contacts. So if you use Contact Management make sure to set up some rules for deletion.
- Size of the online marketing tables
-
- Most useful for:
- Pre-Production, Health Check, Performance Tuning
- First Version Present:
- 8.1
- What it does:
- Best used along with the Inactive Contact deletion module, this module checks whether you've already exceeded Kentico's limits.
- Performance
-
- Maximum 100 files per folder in Azure Blob storage
-
- Most useful for:
- Health Check
- First Version Present:
- 6
- What it does:
- Azure Blob storage and Kentico don't get along well with too many items in the storage. This warns you of that.
- Social marketing
-
- Expired tokens
-
- Most useful for:
- Health Check
- First Version Present:
- 8
- What it does:
- Checks for whether the tokens you're using for your Facebook/LinkedIn accounts have expired. (If they do, you won't be able to post to those)
And there you have it. Long and a bit dry, but you can see that if you have to do a health check on a site, are trying to debug issues, or are doing performance tuning, there's a lot here that can help you out.
KInspector's something we use a lot in our client sites, and something I recommend making a regular part of your Kentico website toolkit.