- changed status to closed
Alert for Filesystem check does not work on CentOS 7
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)
-
repo owner -
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.
-
reporter - changed status to open
-
repo owner Please run monit in debug mode and attach full output:
1.) stop Monit
2.) start it in debug mode: monit -vI
-
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
, CONSTRAINTgroupedservices_servicegroupid_fk
FOREIGN KEY (servicegroupid
) REFERENCESservicegroup
(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
, CONSTRAINTstatistics_serviceid_fk
FOREIGN KEY (serviceid
) REFERENCESservice
(id
) ON DELETE CASCADE) when storing hostid 14 statisticsAfter starting it in debug mode, the error has gone, so now it works.
-
repo owner If the problem will occur again, please attach the debug log (the statistics error and the alert delivery are not related)
-
repo owner - changed status to closed
- Log in to comment
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