manifoldcf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bisonti Mario <Mario.Biso...@vimar.com>
Subject R: How to notify mail by SMTP
Date Tue, 15 Jan 2019 16:13:06 GMT
Hallo.
I share a small script, if it could be useful for anyone,  to notify by mail if, some jobs
are not in “Done” status.
I schedule it in the morning, one time a day.

checkjob.sh

#!/bin/bash

# Put on file jobstatuses
curl -u admin:admin http://localhost:8080/mcf-api-service/json/jobstatuses > /tmp/curljobstatuses.txt


# Count the number of jobs
numberjobs=$(grep -o -i '"job_id"' /tmp/curljobstatuses.txt | wc -l)

# Count the number of jobs in status “done”
numberdone=$(grep -o -i '{"_type_":"status","_value_":"done"}' /tmp/curljobstatuses.txt |
wc -l)

# If number of job in “Done” status are not equal to the number of job, I send an email
if [ $numberdone -ne $numberjobs ]
then
echo "There are Manifold Job non completed" | mail -s "Job MCF non completed" mailreceiver@domain.net
fi

exit 0




Da: Bisonti Mario
Inviato: giovedì 6 dicembre 2018 14:14
A: user@manifoldcf.apache.org
Oggetto: R: How to notify mail by SMTP

Hi Karl.
Yes, I created a “notification connection” but I haven’t the protocol SMTP available.
I see only “Host name” “Port” …
[cid:image001.jpg@01D4ACF5.938021C0]


Da: Karl Wright <daddywri@gmail.com<mailto:daddywri@gmail.com>>
Inviato: giovedì 6 dicembre 2018 13:49
A: user@manifoldcf.apache.org<mailto:user@manifoldcf.apache.org>
Oggetto: Re: How to notify mail by SMTP

Hi Mario, there is an email notification connector.  Have you tried to configure that?

On Thu, Dec 6, 2018, 3:50 AM Bisonti Mario <Mario.Bisonti@vimar.com<mailto:Mario.Bisonti@vimar.com>
wrote:
Hallo.
I would like to notify by mail the end of a job.
I use an smtp server but I am not able how to configure this.


I read https://lists.apache.org/list.html?user@manifoldcf.apache.org:dfr=2016-4-1|dto=2019-4-30:smtp<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.apache.org%2Flist.html%3Fuser%40manifoldcf.apache.org%3Adfr%3D2016-4-1%257Cdto%3D2019-4-30%3Asmtp&data=01%7C01%7CMario.Bisonti%40vimar.com%7C79a3838783f14b2fbdb008d65b795c31%7Ca1f008bcd59b4c668f8760fd9af15c7f%7C1&sdata=fiJxEztTRvxtyE63sjX9tkIU3X1j4Mh2SUQT2lP%2Fd%2Fk%3D&reserved=0>
but I understand that there is no way to configure with smtp now, isn’t it’

Thanks a lot Mario
Mime
View raw message