We are new to traffic script and just planning out our deployment of some Stingray devices. I'm looking to see if I can easily create and attach a unique ID in roughly the same way as mod_unique_id works on apache (see http://httpd.apache.org/docs/2.2/mod/mod_unique_id.html). In apache they use the time, local I, pid and a counter local to the thread. I don't mind how this is achieved, except that it must contain some uniqueness for the individual Stingray (a management IP address?) and some uniqueness for the request (pid, epoch and counter seem to make sense). As such I imagine I'd be doing something like this: $pid=sys.getpid(); $epoch=sys.time(); $counter=counter.increment(1) $ip=request.getLocalIP(); $id= string.base64encode($epoch) . string.base64encode($ip) . string.base64encode($pid) . string.base64encode($counter); http.removeHeader("UniqueId"); http.addHeader( "UniqueId", $id ); Except I don't think I can extract the counter like this. Is there already a built in way of generating a unique id that I'm missing, or is there some other way of better doing this?
... View more