I cannot find the group return from the regex function.  Where am I going 
wrong?

rule "function add_latlong"
when
  has_field("Remote_IP_geolocation")
then
  // extract the latitude and longitude
  let location = regex("(-?\\d+\\.\\d+),(-?\\d+\\.\\d+)",to_string($message.
Remote_IP_geolocation),["lat","long"]);
  let lat = location.groups.lat;
  let long = location.groups.long;  
  set_field("Remote_IP_lat", lat);
  set_field("Remote_IP_long", long);
end

I have tried location.lat and a number of other combinations without 
success.

Thanks for any help you can give.

-- 
You received this message because you are subscribed to the Google Groups 
"Graylog Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/graylog2/66a08a73-54f6-4fd8-9b82-9afad785f36c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to