Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 91845 invoked from network); 6 May 2010 10:04:07 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 6 May 2010 10:04:07 -0000 Received: (qmail 44005 invoked by uid 500); 6 May 2010 10:04:04 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 43945 invoked by uid 500); 6 May 2010 10:04:04 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 43937 invoked by uid 99); 6 May 2010 10:04:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 May 2010 10:04:03 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [212.242.43.251] (HELO smtp1.cybercity.dk) (212.242.43.251) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 May 2010 10:03:56 +0000 Received: from uf4.cybercity.dk (uf4.cybercity.dk [212.242.42.51]) by smtp1.cybercity.dk (Postfix) with ESMTP id 20A16586836 for ; Thu, 6 May 2010 12:06:30 +0200 (CEST) Received: from zeus.intra.softace.dk (0x4dd4d781.adsl.cybercity.dk [77.212.215.129]) by uf4.cybercity.dk (Postfix) with ESMTP id 644BA1328CC0 for ; Thu, 6 May 2010 12:03:36 +0200 (CEST) To: users@httpd.apache.org References: From: Jarl Friis Organization: =?iso-8859-1?q?Inseeto=B0?= Date: Thu, 06 May 2010 12:03:35 +0200 In-Reply-To: (Jarl Friis's message of "Thu, 06 May 2010 09:03:43 +0200") Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.5 (chestnut, linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] Send email upon HTTP response 500 Jarl Friis writes: > Nick Kew writes: > >> On 5 May 2010, at 10:09, Jarl Friis wrote: >> >>> Hi. >>> >>> I am looking for a module that can send me emails every time a HTTP >>> 500 Response is returned to the user. >> >> Why not hook that in to the logging? > > I think I got it... > > Use 'SetEnvIf' directive to detect response 500 > Use the pipe feature of CustomLog and log conditionally. Well, so I thought. Experimenting a bit and reading the documentation for SetEnvIf (http://httpd.apache.org/docs/2.2/mod/mod_setenvif.html#SetEnvIf) I see that I cannot set a variable based on any information from the response. Only request information is available. Too bad. I could of course make my own distiller script that recognises response 500 and send emails in that case, but that will drown the server I guess if every request shall go through a new instance of bash,sed,perl or something like that. Back to square one. Any help is appreciated. Jarl --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org