Skip to content

Enhancement: Improve logging when de-queuing spooled alert messages #1

@sjvudp

Description

@sjvudp

While changing the configuration of the mailserver (the old server retired) thing weren't running as expected, so alert messages got queued like this (somewhat older Monit 5.29.0):

[2024-04-16T08:46:20+0200] error    : Cannot connect to [localhost]:25 -- Connection refused
[2024-04-16T08:46:20+0200] error    : Cannot open a connection to the mailserver localhost:25 -- Operation now in progress
[2024-04-16T08:46:20+0200] error    : Mail: SSL server certificate verification error: unable to get local issuer certificate
[2024-04-16T08:46:20+0200] error    : SSL: write error -- error:140840FF:SSL routines:ssl3_connect:unknown state
[2024-04-16T08:46:20+0200] error    : SMTP: Error sending data to the mailserver -- Success
[2024-04-16T08:46:20+0200] info     : Adding event to the queue file /var/lib/monit/1713249980_1c12cf0 for later delivery

At some later time those queued messages were actually sent, but no message was lopgged. I suspect it happened here:

[2024-04-16T10:01:42+0200] info     : Reinitializing monit daemon
[2024-04-16T10:01:42+0200] info     : Reinitializing Monit -- control file '/etc/monitrc'
[2024-04-16T10:01:43+0200] info     : 'REDACTED' Monit reloaded
[2024-04-16T10:01:43+0200] error    : Cannot connect to [localhost]:25 -- Connection refused
[2024-04-16T10:01:43+0200] error    : Cannot open a connection to the mailserver localhost:25 -- Operation now in progress

I think a corresponding message when removing an alert from the queue would be useful.

I should explain that the messages "sent" got lost on the way, and now we are investigating when they had been sent actually.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions