title: how to caculate the ip address life time?
body: <p>Now I mod the crontab's shell,it run every 10minutes, only ip changed,it write into influxdb,database looks like:</p>
  
  <p>Can I caculate the none NULL data's ELAPSED time ?</p>
  
  <pre><code>&gt; select * from "exec_wanip"
  name: exec_wanip
  time                host    value
  ----                ----    -----
  1542951090000000000 monitor
  1542951140000000000 monitor
  1542951150000000000 monitor 118.114.187.199
  1542951160000000000 monitor
  1542951170000000000 monitor
  1542951180000000000 monitor
  1542951190000000000 monitor
  1542951200000000000 monitor
  1542951210000000000 monitor
  1542951810000000000 monitor
  1542952410000000000 monitor
  1542953010000000000 monitor
  </code></pre>
  
  <hr>
  
  <p>I record WAN ip via crontab,here is the data in influxdb,and ip address is variable.</p>
  
  <p>how could I caculate the life time of each ip address ?</p>
  
  <pre><code>&gt; select * from exec_wanip
  name: exec_wanip
  time                host    value
  ----                ----    -----
  1542856250000000000 monitor 118.114.187.208
  1542856850000000000 monitor 118.114.187.208
  1542857450000000000 monitor 118.114.187.208
  1542858050000000000 monitor 118.114.187.208
  1542858650000000000 monitor 118.114.187.208
  1542859250000000000 monitor 118.114.187.208
  1542859850000000000 monitor 118.114.187.208
  1542860450000000000 monitor 118.114.187.208
  1542861050000000000 monitor 118.114.187.208
  1542861650000000000 monitor 118.114.187.208
  1542862250000000000 monitor 118.114.187.208
  1542862850000000000 monitor 118.114.187.208
  1542863450000000000 monitor 118.114.187.208
  1542864050000000000 monitor 118.114.187.208
  1542864650000000000 monitor 118.114.187.208
  1542865250000000000 monitor 118.114.187.208
  </code></pre>