right so I tried that in several different ways:
in monitrc:
set daemon 30 # Poll at 60 second intervals for testing purposes.
set httpd port 2812 and use address localhost
allow localhost
set mailserver 127.0.0.1
set mail-format {
subject: $SERVICE $EVENT
message: $HOST $DATE
...
...
... is as i had before.
and that gives me:
Monit started
Monit instance changed notification is sent to [email protected]
Cannot open a connection to the mailserver '127.0.0.1:25' -- Transport endpoint
is not connected
Trying the next mail server '127.0.0.1:25'
Cannot open a connection to the mailserver '127.0.0.1:25' -- Transport endpoint
is not connected
No mail servers are available
Aborting event
okay,
so then I tried in monitrc:
set mailserver smtp.jpl.nasa.gov
And that gives me:
Monit started
Monit instance changed notification is sent to [email protected]
Cannot open a connection to the mailserver 'smtp.jpl.nasa.gov:25' -- Bad file
number
Trying the next mail server '127.0.0.1:25'
Cannot open a connection to the mailserver '127.0.0.1:25' -- Transport endpoint
is not connected
No mail servers are available
Ideas?
Thank you!
From: "Martin Pala [via nongnu]"
<[email protected]<mailto:[email protected]>>
Date: Thursday, July 10, 2014 at 1:02 PM
To: Benjamin Mellman
<[email protected]<mailto:[email protected]>>
Subject: Re: Cannot open a connection to the mailserve 'localhost:25' --
Transport endpoint is not connected
Hello,
you need to set the mailserver to be used for alert delivery using the "set
mailserver" statement - see manual for more details:
http://www.mmonit.com/monit/documentation/monit.html#setting_a_mail_server_for_alert_delivery
Regards,
Martin
On 10 Jul 2014, at 18:58, GreenLantern <[hidden
email]</user/SendEmail.jtp?type=node&node=186877&i=0>> wrote:
> hello everyone, new monit user here.
>
> I am trying to run a simple test program to monitor a simple test process
> and send me an email alert.
>
> here is my monitrc file:
>
> *set daemon 30 # Poll at 60 second intervals for testing purposes.
> set httpd port 2812 and use address localhost
> allow localhost
>
> set mail-format {
> subject: $SERVICE $EVENT
> message: $HOST $DATE
> }
>
> set alert [hidden email]</user/SendEmail.jtp?type=node&node=186877&i=1>
> #receive all alerts to email
>
> check process sleeper with pidfile "/monit/bin/sleeper.pid"
> start program = "/monit/bin/sleepercontrol start &"
> stop program = "/monit/bin/sleepercontrol stop"
> alert [hidden email]</user/SendEmail.jtp?type=node&node=186877&i=2> on {
> nonexist }
> *
>
> the process it is running is called sleeper. monit does a fine job of
> restarting the sleeper process when I terminal $ kill -9 <sleeper pid>
>
> but when i run: $ monit -vId 20 -c monitrc
>
> i get this:
>
> *Starting monit daemon with http interface at [localhost:2812]
> Starting monit HTTP server at [localhost:2812]
> monit HTTP server started
> Monit started
> Monit instance changed notification is sent to [hidden
> email]</user/SendEmail.jtp?type=node&node=186877&i=3>
> Cannot open a connection to the mailserver 'localhost:25' -- Transport
> endpoint is not connected
> No mail servers are available
> Aborting event
> *
>
> any ideas? I can seem to figure this one out.
>
> Thanks folks!
>
>
>
>
> --
> View this message in context:
> http://nongnu.13855.n7.nabble.com/Cannot-open-a-connection-to-the-mailserve-localhost-25-Transport-endpoint-is-not-connected-tp186867.html
> Sent from the monit-general mailing list archive at Nabble.com.
>
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
________________________________
If you reply to this email, your message will be added to the discussion below:
http://nongnu.13855.n7.nabble.com/Cannot-open-a-connection-to-the-mailserve-localhost-25-Transport-endpoint-is-not-connected-tp186867p186877.html
To unsubscribe from Cannot open a connection to the mailserve 'localhost:25' --
Transport endpoint is not connected, click
here<http://nongnu.13855.n7.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=186867&code=YmVuamFtaW4ucy5tZWxsbWFuQGpwbC5uYXNhLmdvdnwxODY4Njd8MTUxOTc2OTY5Mg==>.
NAML<http://nongnu.13855.n7.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context:
http://nongnu.13855.n7.nabble.com/Cannot-open-a-connection-to-the-mailserve-localhost-25-Transport-endpoint-is-not-connected-tp186867p186879.html
Sent from the monit-general mailing list archive at Nabble.com.--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general