Alert for Filesystem check does not work on CentOS 7

Issue #770 closed
Gergely Dudas created an issue

Hi,

We would like to use monit's filesystem check on CentOS 7, but unfortunately it does not send any alert email.

Here is an example from monitrc what works on Ubuntu:

check filesystem root_fs with path / if space usage > 80% for 1 times within 3 cycles then alert

What's wrong on CentOS 7?

monit-5.25.1-1.el7.x86_64 CentOS 7.5.1804

Thanks!

Comments (7)

  1. Tildeslash repo owner

    If alerts works on Ubuntu, but not on CentOS the problem should logically be related to your mail-server configuration. Investigate your set mailserver statement in .monitrc and that your mail server works

  2. Gergely Dudas reporter

    It is integrated with M/Monit and there is no mailserver setting. Alert works for all of the other checks, only for filesystem check it does not.

  3. Tildeslash repo owner

    Please run monit in debug mode and attach full output:

    1.) stop Monit

    2.) start it in debug mode: monit -vI

  4. Gergely Dudas reporter

    There were some errors in M/Monit error.log: 2018-09-17 15:34:54 Operation: execute failed -- SQLException: Cannot add or update a child row: a foreign key constraint fails (mmonit.groupedservices, CONSTRAINT groupedservices_servicegroupid_fk FOREIGN KEY (servicegroupid) REFERENCES servicegroup (id) ON DELETE CASCADE) 2018-09-17 15:35:00 SQLException: Cannot add or update a child row: a foreign key constraint fails (mmonit.statistics, CONSTRAINT statistics_serviceid_fk FOREIGN KEY (serviceid) REFERENCES service (id) ON DELETE CASCADE) when storing hostid 14 statistics

    After starting it in debug mode, the error has gone, so now it works.

  5. Tildeslash repo owner

    If the problem will occur again, please attach the debug log (the statistics error and the alert delivery are not related)

  6. Log in to comment