An extra check to see if there are reported php errors. These could be fetched from watchdog table, and grouped by message ( or partial message ).

Also possible to add a treshold to the number of identical php errors before reporting.

Might be a good idea too to only get the log entries of severity type error or higher..

Comments

malc0mn’s picture

Assigned: Unassigned » malc0mn
Status: Active » Needs work

Implemented this one for D6 & D7...

Will show the number of PHP errors in watchdog on the prod_check statuspage if dblog is on with a link to admin/reports/dblog so you can check for details.

On the prod_check settings page you can set the minimum watchdog severity level from which to start reporting PHP errors.

Thinking about the threshold, that's why the status is 'needs work' ;-)

malc0mn’s picture

Maybe the threshold can be done by changing the current count query to something like:

SELECT COUNT(wid) FROM {watchdog} WHERE type = 'php' GROUP BY variables HAVING COUNT(wid) >= 3;

Where the threshold is 3 in this case.

Resulting in something like:

+------------+
| COUNT(wid) |
+------------+
|        102 |
|        120 |
|          4 |
|          3 |
+------------+

Each line holds the number of identical PHP errors occured, where we can see that we need to report '4 PHP errors occured multiple times!' So in the end:

SELECT COUNT(*) FROM (SELECT COUNT(wid) FROM {watchdog} WHERE type = 'php' GROUP BY variables HAVING COUNT(wid) >= 3) errors;
malc0mn’s picture

Threshold implemented as well...

Still thinking about a third setting: we now throw a *_WARNING when PHP errors occur. Maybe this should be user definable as well, or should we throw an *_ERROR?

Leaving at 'needs work' for this reason.

  • malc0mn committed 4205330 on 8.x-1.x
    Continued implementation of [#1743732]: Add check on php errors....
  • malc0mn committed 7f31f90 on 8.x-1.x
    Implemented [#1743732]: Add check on php errors
    Fixed nagios key in core...
Anybody’s picture

Version: 7.x-1.4 » 8.x-1.x-dev
Issue summary: View changes

Nice idea, still for 8.x!

@malc0mn what's the real status here?

malc0mn’s picture

Same here: no clue what the status is after 11 years ;-)

Anybody’s picture

Status: Needs work » Closed (outdated)