Often in Star Trek (almost all variations of it) they talk about "level N" diagnostics. Is there an actual description of what the diagnostic levels mean?
According to the tech manuals diagnostic levels indicate how much of a disruption on the system the diagnostic will take, where level 5 is run a self check usually taking a few minutes, all the way to level 1 shut it down, physically check, and carefully reinitialize. The details of each diagnostic level and time taken change depending on the system being diagnosed. Level 4 diagnostic on a navigational thruster probably takes less time and involves different measures than a Level 4 diagnostic on the warp core. Here are some generalizations of the measures at different diagnostic levels.
I have not come across one in Star Trek but I run a software consultancy and have a similar protocal for software that my company produces.
Warning - SPECULATION (although it is supported by good engineering princples):
The higher (or lower depending on how you do it) number means that you get more detailed information. Some people ask why you would not put it on the highest level at all times, the reason you do not and you try to pick your level carefully is that you risk too much information being spewed out and causing you to miss something important or to have to spend a lot of time sifting through information to find what you need.
Also, more output means more time spent producing output - not much of a consideration normally but on a real time machine (like a nuclear power plant monitor) a couple of microseconds writing output and not monitoring the systems can be serious. There is also the fact that more diagnostics means bigger log files which can cause an issue on some systems where users do not delete them and you end up with, literally, years of log files eating disk space up!