Hello,
I am trying to monitor a group of hosts on a hotspot network.
I have created netwatch rules successfully to monitor the hosts.
such as this:
0 ;;; workstation 1
192.168.120.1 5m 1m up
I am trying to figure out how to create a single up_action and a single down_action script that will run if any monitored machine goes down. I dont understand how to pass the ip address to the script. I am monitoring like 100 machines and dont want to create a unique up action and down action for each machine.
my current script is:
0 name="workstation_down" owner="admin"
policy=ftp,reboot,read,write,policy,test,winbox,password run-count=0
source=/tool e-mail send from="mikrotik@xyzcustomer.com"
server="67.55.143.33" body="TEST BY DON - workstation is Down"
subject="TEST BY DON - workstaiton is down at xyzcustomer"
to="xyztest@rdi1.com"
I need to change this script so that I can feed the IPaddress of the up or down machine to the up_action or down_action script.
I read a ton of stuff and cant figure out how to do this.
Can anyone tell me how to pipe the IP address of the netwatch machine that called this script into the body of the email message?
Thanks in advance!
-d