[squid-dev] RFC: Categorize level-0/1 messages

Amos Jeffries squid3 at treenet.co.nz
Wed Oct 20 19:14:46 UTC 2021


On 21/10/21 4:22 am, Alex Rousskov wrote:
> Hello,
> 
>      Nobody likes to be awaken at night by an urgent call from NOC about
> some boring Squid cache.log message the NOC folks have not seen before
> (or miss a critical message that was ignored by the monitoring system).
> To facilitate automatic monitoring of Squid cache.logs, I suggest to
> adjust Squid code to divide all level-0/1 messages into two major
> categories -- "problem messages" and "status messages"[0]:
> 

We already have a published categorization design which (when/if used) 
solves the problem(s) you are describing. Unfortunately that design has 
not been followed by all authors and conversion of old code to it has 
not been done.

Please focus your project on making Squid actually use the system of 
debugs line labels. The labels are documented at:
   <https://wiki.squid-cache.org/SquidFaq/SquidLogs#Squid_Error_Messages>


What we do not have in that design is clarity on which labels are shown 
at what level. IMO they should be:

  * DBG_CRITICAL(0) - admin *need* to know this even if they do not 
think they want to.
   - FATAL
   - SECURITY ALERT
   - ERROR which were mislabeled and should be FATAL

  * DBG_IMPORTANT(1) - some admin want to know these, not mandatory though.
   - ERROR
   - SECURITY ERROR
   - SECURITY WARNING

  * level-2 - status, troubleshooting etc.
   - WARNING admin cannot do anything about
   - SECURITY NOTICE (these are for troubleshooting advice)

  * level-3+ - other



> There are also "squid -k parse" messages
> that are easy to find automatically if somebody wants to classify them
> properly.

Those are level 1-2 messages that become mandatory to display on 
startup/reconfigure.



I have one worry about you taking this on right now. PR 574 has not been 
resolved and merged yet, but many of the debugs() messages you are going 
to be touching in here should be converted to thrown exceptions - which 
ones and what exception type is used has some dependency on how that PR 
turns out.


Amos


More information about the squid-dev mailing list