Script to detect PPPoE Status change

Can someone assist me with a script to detect when a PPPoE interface status becomes “Connected” ?
(or I can even check when it’s route becomes active…)
This is all part of a greater failover system, and this is the last little bit I’m stuck with. :confused:

Regards!

You can get pppoe status

/interface pppoe-client monitor do={ 
  :put "status is $status";
}

Soory for my english…
its ok..

but if i want to execute a script when the pppoe fail??
please help me an example type:

if $status<>connected  system script run pppoe_failed

tanks!!!

if it still needed, here’s how I did it:

:local adslstatus [:pick [:tostr [:pick [/interface pppoe-client monitor UkrTel as-value] 0] ] 7 10]

adslstatus returned “con” if status is " connected"

Just for future reference:

/ interface pppoe-client {
	:global ExternalIP
	:local clientip
	:local clientstatus
	monitor External once do={:set clientip $"local-address"; :set clientstatus $status}
	:if ($clientstatus="connected" and $ExternalIP!=$clientip) do={
		:log info "External IP changed from $ExternalIP to $clientip"
		/ tool fetch url="http://freedns.afraid.org/dynamic/update.php\?<key>" dst-path=ExternalIP.txt
		:set ExternalIP $clientip
	}
}

HEllo All,

I need to have a script that will e-mail me when a certain PPPoE account connect on my Server, I don’t need it for disconnect only connect, as it is my installer account, it will let me know when an installer installs a new client, and will e-mail me

Let me know if such script is possible,

THank you