Example: Alert current IP address of Logic Machine 2

Resident or Scheduled script

Source code    
  1. require('json')
  2. res = io.readproc('if-json')
  3. res = json.decode(res)
  4. ip = res.eth0.inetaddr
  5. alert('Current LM IP is: %s', ip)