Netwatch not sending e-mail alerts

Hi guys,
I have set this up some years ago, but it doesn’t seem to be working for me now. I am basically trying to get Netwatch to monitor my Nagios Core server and have it e-mail me when/if it goes down. I can send an e-mail manually from the Mikrotik router, but when I disconnect the Nagios server, netwatch says it down but there is not attempts in the logs to indicate that it is trying to e-mail me. nothing…zilch!!

Here is what I have in the “down” portion of netwatch

[codetool e-mail send from=info@mydomain.com server=87.xxx.xxx.252 to=alerts@mydomain.com subject=NAGIOS MONITORING SERVER is DOWN.][/code]

I am using ROS 6.10

Any ideas?

I see some errors in your script:

  1. no quotes “” on subject;
  2. no quotes “” on emails;
  3. no body;
  4. no date / time on message (informations are useful).

This is the correct syntax for 6.7+:

/tool e-mail send server=87.xxx.xxx.252 port=25 start-tls=no from="info@mydomain.com" to="alerts@mydomain.com" subject="NAGIOS MONITORING SERVER IS DOWN" body=("NAGIOS MONITORING SERVER IS DOWN FROM ".[/system clock get date]." ".[/system clock get time])

If I helped you, remember to give Karma.