How to monitor a daily report pdf in email

Hi everyone,

We are sending daily reports to our colleagues daily .
Sometimes these reports don’t send .

What would be the best method to monitor these reports ?
I am open to any ideas.

Thanks !

Which mail infrastructure are you using?

Hi everyone,

We are sending daily reports to our colleagues daily.

Do you mean reports from Icinga, or from something else?

Sometimes these reports don’t send.

Please give more details - what does happen, what error messages occur, what
log entries show that there’s a problem, etc?

What would be the best method to monitor these reports?

Give us more detail about what needs monitoring.

Antony.

Hi @Pooh and @rivad ,

We are using SMTP.
I didn’t mean Icinga reports , I am talking about the reports we create automatically daily.

I just want to be sure about these questions .

All attachments are included,
Is there any data in the attached files ( Probably the best way is checking the file sizes )
Data refresh done
Data are presented in report (in data load)

You need more information to give proper reply I assume , I also don’t have much information about it . I will get more details tomorrow .

But , until tomorrow I want to have a structure on my mind beforehand :slight_smile: .
Any comment / opinion would help about it .

Best regards,

I guess, I would write a python script to connect to a mailbox, search for the daily report and record the metrics like number of attachments, size, … and in the end use the proper exit code to report status to Icinga, stdout for plugin message and perfdata.

In summary: write a custom check plugin

I just want to be sure about these questions .

All attachments are included,

Suppose you were asking me, as a human, to perform this check for you. How do
I know, or where do I find out, which attachments are supposed to be included?

Is there any data in the attached files (Probably the best way is checking
the file sizes)

If you literally mean any data, then yes, file size > 0 will check that.

Data refresh done

What does that mean?

Data are presented in report (in data load)

What does that mean?

You need more information to give proper reply I assume, I also don’t have
much information about it. I will get more details tomorrow.

I think the most useful information is going to be “what process / script /
application is creating these reports and then trying to send them?”

But, until tomorrow I want to have a structure on my mind beforehand :slight_smile:

You said in your first posting that “Sometimes these reports don’t send”, so is
the problem that a report gets generated, but fails to get sent correctly (or
at least, fails to arrive), or is the problem that the report is not generated
so there is nothing to send?

As Dominik says, this is almost certainly going to require a custom check
plugin, but those are very easy to write in almost any language, once you know
what it is you need to check.

Antony.

Hi @rivad and @Pooh ,

I was also confused about this issue but today I received feedback from my colleague.
Best option will be doing it like Dominik said .and monitoring the logfile as well.

I guess, I would write a python script to connect to a mailbox, search for the daily report and record the metrics like number of attachments, size, … and in the end use the proper exit code to report status to Icinga, stdout for plugin message and perfdata.

Is there any similar plugin you know for this ?
For example : Checking daily if email has been received or not .

I base my plugins on https://github.com/Linuxfabrik/monitoring-plugins/blob/main/CONTRIBUTING.rst and how to access the mail depend on the mail server you use or you forward the mail to something you find easier to work with.

1 Like