What you should be monitoring or logging
We have seen a lot of ways in which we can log and monitor our systems. However, the question remains: what should you be logging and monitoring? The answer is simple: whatever you need to keep your systems healthy.
OK, that answer is probably the easy way out. Let’s be a bit more specific.
Basic health monitoring
You should monitor the overall health of your system. Your application does not live in a vacuum, so you should be mindful of the state of the complete system and how you interact with it. These are some of the items you might want to keep an eye on:
- CPU usage: Track CPU usage to determine whether your application is causing a high CPU load
- Memory usage: Monitor memory consumption to detect memory leaks or excessive memory usage, which is critical in a managed environment such as .NET, where garbage collection occurs
- Disk I/O: Monitor read/write operations and disk usage to ensure that disk I/O is not...