Layer dot found result

I have not seen a geo_point mapping but in any case coordinates need to be in latitude/longitude and the pairs of coordinates shown on screen shots are way out of the +90/-90 +180/-180 domain.

Since this is coming from Postgres query I'd transform the geom field into WGS84 coordinate reference system.

https://postgis.net/docs/ST_Transform.html

2 Likes

here is the result after the changes

 Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"LogStash::ConfigurationError", :message=>"Expected one of [ \\t\\r\\n], \"#\", \"input\", \"filter\", \"output\" at line 19, column 3 (byte 1099) after ", :backtrace=>["C:/logstash-8.1.0/logstash-core/lib/logstash/compiler.rb:32:in `compile_imperative'", "org/logstash/execution/AbstractPipelineExt.java:189:in `initialize'", "org/logstash/execution/JavaBasePipelineExt.java:72:in `initialize'", "C:/logstash-8.1.0/logstash-core/lib/logstash/java_pipeline.rb:47:in `initialize'", "C:/logstash-8.1.0/logstash-core/lib/logstash/pipeline_action/create.rb:50:in `execute'", "C:/Users/Lenovo/Desktop/ELK/logstash-8.1.0/logstash-core/lib/logstash/agent.rb:376:in `block in converge_state'"]}

I modified my statement as follows in my logstash file


input {
    jdbc {
jdbc_driver_library => "C:\Users\Lenovo\Desktop\ELK\logstash-8.1.0\logstash-core\lib\jars\postgresql-42.4.0.jar"
jdbc_driver_class => "org.postgresql.Driver"
jdbc_connection_string => "jdbc:postgresql://localhost/NDB"
        jdbc_user => ""
        jdbc_password => ""
        statement => 'SELECT id, ST_X (ST_Transform (geom, 4326)) AS long,
       ST_Y (ST_Transform (geom, 4326)) AS lat, cause,  FROM "TABLENAME"'
  
    }
}

#filter {
 # mutate { rename => { "data" => "additionalData" }
#}
  
  #parse geom field as json,
  #geom => {"type":"Point","crs":{"type":"name","properties":{"name":"EPSG:3857"}},"coordinates":[10,11]}
  #json { source => "geom" }
  
  #remove unwanted fields
  #mutate { remove_field => ["crs", "path", "@version", "host", "message", "geom"] }
  
  #prepare geo_point field
 # mutate { rename => {"coordinates" => "[location][coordinates]"}}
    #mutate { rename => {"type" => "[location][type]"}}
#mutate {
   # rename => { "LAT" => "[location][lat]" }
   # rename => { "LON" => "[location][lon]" }
#}
# mutate { replace => {"location" => "POINT(%{lon} %{lat})" }
#}


output {
stdout { codec => rubydebug }
elasticsearch {
hosts => ["http://localhost:9200"]
index => "jeudi"
user => "*****"
password => "***"
document_id =>"%{id}"
}
}

and I got this result

           "lat" => 36.840258211253904,
         "cause" => "AUTRE",
    "@timestamp" => 2022-08-14T06:04:28.688441600Z,
            "id" => "1673",
          "long" => 10.311382057358088,
       
}

I can now create a new index mapping then upload my log file so that I can see the coordinates or how to proceed ?
@stephenb @jsanz

@jsanz Good catch on the WGS84

@5k_pwc Think this should do it for you ... you were close all along just a few items...

I just took your sample made a couple copies and feed into logstash

{ "lat":36.840258211253904, "cause":"AUTRE1", "@timestamp":"2022-08-14T06:04:28.688441600Z","id":"1673", "long":10.311382057358088 }
{ "lat":37.840258211253904, "cause":"AUTRE2", "@timestamp":"2022-08-14T06:04:28.688441600Z","id":"1674", "long":11.311382057358088 }
{ "lat":38.840258211253904, "cause":"AUTRE3", "@timestamp":"2022-08-14T06:04:28.688441600Z","id":"1675", "long":12.311382057358088 }

Create Mapping...

PUT discuss-location-index
{
  "mappings": {
    "properties": {
      "location": {
        "type": "geo_point"
      }
    }
  }
}

Simple Logstash...

input {
  file {
    path => "/Users/sbrown/workspace/sample-data/lat-lon/lat-lon.json"
    start_position => "beginning"
    sincedb_path => "/dev/null"
    codec => "json"
  }
}

filter
{
  mutate {
    # You were close all along
    rename => { "lat" => "[location][lat]" }
    # TODO change long to lon
    rename => { "long" => "[location][lon]" }
  }
}


output {
  elasticsearch {
    hosts => ["http://localhost:9200"]
    index => "discuss-location-index"
  }
  stdout { codec => rubydebug }
}

logstash output

{
    "@timestamp" => 2022-08-14T06:04:28.688441600Z,
      "@version" => "1",
         "event" => {
        "original" => "{ \"lat\":36.840258211253904, \"cause\":\"AUTRE1\", \"@timestamp\":\"2022-08-14T06:04:28.688441600Z\",\"id\":\"1673\", \"long\":10.311382057358088 }"
    },
          "host" => {
        "name" => "hyperion"
    },
      "location" => {
        "lon" => 10.311382057358088,
        "lat" => 36.840258211253904
    },
         "cause" => "AUTRE1",
            "id" => "1673",
           "log" => {
        "file" => {
            "path" => "/Users/sbrown/workspace/sample-data/lat-lon/lat-lon.json"
        }
    }
}

Quick search to verify

GET discuss-location-index/_search
....
{
  "took" : 848,
  "timed_out" : false,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 3,
      "relation" : "eq"
    },
    "max_score" : 1.0,
    "hits" : [
      {
        "_index" : "discuss-location-index",
        "_id" : "fQnWnIIBuOffChQ42wQ4",
        "_score" : 1.0,
        "_source" : {
          "@timestamp" : "2022-08-14T06:04:28.688441600Z",
          "@version" : "1",
          "event" : {
            "original" : """{ "lat":38.840258211253904, "cause":"AUTRE3", "@timestamp":"2022-08-14T06:04:28.688441600Z","id":"1675", "long":12.311382057358088 }"""
          },
          "host" : {
            "name" : "hyperion"
          },
          "location" : {
            "lon" : 12.311382057358088,
            "lat" : 38.840258211253904
          },
          "cause" : "AUTRE3",
          "id" : "1675",
          "log" : {
            "file" : {
              "path" : "/Users/sbrown/workspace/sample-data/lat-lon/lat-lon.json"
            }
          }
        }
      }
....

Created a data view... and added it to the map..

super minor nit... probably should be lat and lon not long from SELECT statement (of course change logstash conf as well.

statement => 'SELECT id, ST_X (ST_Transform (geom, 4326)) AS lon, ST_Y (ST_Transform (geom, 4326)) AS lat, cause,  FROM "TABLENAME"'
2 Likes

super
i have tried this but i get the lon and lat float format

  "lat" => 36.840258211253904
    },
  
           "lon" => 10.311382057358088,
      

Hi @5k_pwc
This is the problem with only showing parts of the output....

You showed me this above? This is what I worked from and it worked

statement => 'SELECT id, ST_X (ST_Transform (geom, 4326)) AS lon, ST_Y (ST_Transform (geom, 4326)) AS lat, cause, FROM "TABLENAME"'


           "lat" => 36.840258211253904,
         "cause" => "AUTRE",
    "@timestamp" => 2022-08-14T06:04:28.688441600Z,
            "id" => "1673",
          "long" => 10.311382057358088,
       

now it looks like You changed your select statement .. why? now you are trying to put the whole geometry in the location field that will not work. .. I can not help if you keep changing things and not trying what I suggest...

So please.... I am trying to help sooo... Can you please NOW simply .. just run the logstash with just the input with 1 version of the select statement (pick the first or the 2nd) and the the stdout { codec => rubydebug }

and show me the ENTIRE logstash conf with NO filter section... and the ENTIRE output of a whole structure... of a document..... not just a piece...

To be clear I can not help any more if you just show me snippets..

Example it is clear you either did not create the location mapping as a geo_point ahead of time.. and / or you did not

filter
{
  mutate {
    # You were close all along
    rename => { "lat" => "[location][lat]" }
    # TODO change long to lon
    rename => { "long" => "[location][lon]" }
  }
}

sorry @stephenb
at the beginning I created my mapping as follows:

PUT jeudi
{
  "mappings": {
    "properties": {
      "id": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "location": {
        "type": "geo_point"
      },
      "nom": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "typeano": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "etat": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "adresse": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "adressecod": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "adressenum": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "adressevil": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "adressevoi": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "element": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "datecons": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "daterepa": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "duree_coup": {
        "type": "integer"
      },
      "detectio": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "priorite": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "detail": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "typedefa": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "cause": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "techrepa": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "commcons": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "doccons": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "docrepa": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "numext": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "agent": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "n_invent": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "intervenan": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "nombre_ab": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "district": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "direction_": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "division": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "directio_1": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "arrond": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "cadran": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "commune": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "delegat": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "gouvern": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "secteur_ad": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "secteur_e": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "secteur_p": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "arrond_ar": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "commune_ar": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "delegat_ar": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "gouvern_ar": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "secteur__1": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "volume_per": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "xgps": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "ygps": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "zgps": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "auteur": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "createur": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      }
    }
  }
}

and this is the output logstash:

{
    "direction_" => "30",
      "datecons" => "2011/10/08 00:00:00.000",
      "daterepa" => "2011/10/11 00:00:00.000",
     "secteur_e" => "332",
    "delegat_ar" => "10",
    "adressecod" => "13",
          "xgps" => 0.0,
    "volume_per" => 0.0,
       "typeano" => "CARO",
    "duree_coup" => "3",
       "doccons" => nil,
      "location" => {
        "lat" => 36.840258211253904
    },
        "numext" => nil,
         "agent" => nil,
        "detail" => "CAT",
    "@timestamp" => 2022-08-14T16:11:43.155777Z,
        "auteur" => nil,
      "detectio" => "VISUEL",
    "directio_1" => "600",
     "arrond_ar" => "12",
    "commune_ar" => "13",
    "intervenan" => "1",
          "ygps" => 0.0,
    "adressevoi" => nil,
       "gouvern" => "1",
            "id" => "1673",
      "n_invent" => "D1",
      "createur" => nil,
           "nom" => nil,
        "arrond" => "111312",
     "nombre_ab" => "5",
       "commune" => "13",
       "element" => "E",
    "adressenum" => nil,
          "etat" => "RE",
         "cause" => "AUTRE",
      "district" => "30",
      "commcons" => nil,
      "typedefa" => "CE",
       "adresse" => "REST",
    "gouvern_ar" => "G",
       "delegat" => "116666",
    "secteur_ad" => "165765",
          "zgps" => nil,
           "lon" => 10.311382057358088,
    "secteur__1" => "117052",
     "secteur_p" => nil,
        "cadran" => "A",
       "docrepa" => nil,
      "techrepa" => "RE",
      "priorite" => "VE",
      "division" => nil,
    "adressevil" => "GT"
}
[2022-08-14T18:12:59,575][WARN ][logstash.outputs.elasticsearch][main][807c1db9cdfce77cba9e977bb6f6dd65e25ed3265336cb3e4f69de6170b516d7] Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>"2000", :_index=>"mardi", :routing=>nil}, {"direction_"=>"30500000", "datecons"=>"2015/10/12 00:00:00.000", "daterepa"=>"2015/10/12 00:00:00.000", "secteur_e"=>"30515035", "delegat_ar"=>"1170", "adressecod"=>"1113", "xgps"=>0.0, "volume_per"=>0.0, "typeano"=>"CASSECONDPROV", "duree_coup"=>nil, "doccons"=>nil, "location"=>{"lat"=>36.860932229572846}, "numext"=>nil, "agent"=>nil, "detail"=>"CASSECONDPROV_AVGRILLAGEAVERT", "@timestamp"=>2022-08-14T16:11:42.524770400Z, "auteur"=>"D15_CSE", "detectio"=>"APPEL", "directio_1"=>"60100000", "arrond_ar"=>"111313", "commune_ar"=>"1", "intervenan"=>nil, "ygps"=>0.0, "adressevoi"=>nil, "gouvern"=>"161", "id"=>"2000", "n_invent"=>nil, "createur"=>"D15_CSE", "nom"=>nil, "arrond"=>"111313", "nombre_ab"=>nil, "commune"=>"1113", "element"=>"E-TRONCO-E", "adressenum"=>nil, "etat"=>"REPAREE", "cause"=>"INTERVHUM", "district"=>"30515000", "commcons"=>nil, "typedefa"=>"PERCE", "adresse"=>nil, "gouvern_ar"=>"11", "delegat"=>"1170", "secteur_ad"=>"117054", "zgps"=>nil, "lon"=>10.268764542975003, "secteur__1"=>"117054", "secteur_p"=>nil, "cadran"=>nil, "docrepa"=>nil, "techrepa"=>"REMPLACE", "priorite"=>"IMMEDIAT", "division"=>nil, "adressevil"=>"Le "}], :response=>{"index"=>{"_index"=>"JEUDI", "_id"=>"2000", "status"=>400, "error"=>{"type"=>"mapper_parsing_exception", "reason"=>"failed to parse field [location.lat] of type [geo_point]", "caused_by"=>{"type"=>"parse_exception", "reason"=>"geo_point expected"}}}}}

Conf logstash:

input {
    jdbc {
jdbc_driver_library => "C:\Users\Lenovo\Desktop\ELK\logstash-8.1.0\logstash-core\lib\jars\postgresql-42.4.0.jar"
jdbc_driver_class => "org.postgresql.Driver"
jdbc_connection_string => "jdbc:postgresql://localhost/er"
        jdbc_user => "**"
        jdbc_password => "**"
        statement => 'SELECT id, ST_X (ST_Transform (geom, 4326)) AS lon, ST_Y (ST_Transform (geom, 4326)) AS lat,nom, typeano, etat, adresse, adressecod, adressenum, adressevil, adressevoi, element, datecons, daterepa, duree_coup, detectio, priorite, detail, typedefa, cause, techrepa, commcons, doccons, docrepa, numext, agent, n_invent, intervenan, nombre_ab, district, direction_, division, directio_1, arrond, cadran, commune, delegat, gouvern, secteur_ad, secteur_e, secteur_p, arrond_ar, commune_ar, delegat_ar, gouvern_ar, secteur__1, volume_per, xgps, ygps, zgps, auteur, createur FROM "E-ANOMAL"'
  
    }
}

filter {
  mutate { rename => { "data" => "additionalData" }
}
  
  #parse geom field as json,
 # geom => {"type":"Point","crs":{"type":"name","properties":{"name":"EPSG:3857"}},"coordinates":[10,11]}
  #json { source => "geom" }
  
  #remove unwanted fields
  mutate { remove_field => ["crs", "path", "@version", "host", "message"] }
  
  #prepare geo_point field
# mutate {
          #convert => {"long" => "float"}
          #convert => {"lat" => "float"}
#}
#mutate {
          #rename => { "long" => "[ST_X][long]" }
          #rename => { "lat" => "[ST_Y][lat]" }
          

 mutate {
    # You were close all along
    rename => { "lat" => "[location][lat]" }
    # TODO change long to lon
    rename => { "long" => "[location][lon]" }
  }

}





output {
stdout { codec => rubydebug }
elasticsearch {
hosts => ["http://localhost:9200"]
index => "jeudi"
user => "pi"
password => "u"
document_id =>"%{id}"
}
}

the output log:

{
    "direction_" => "30500000",
      "datecons" => "2011/10/08 00:00:00.000",
      "daterepa" => "2011/10/11 00:00:00.000",
     "secteur_e" => "30515032",
    "delegat_ar" => "1170",
    "adressecod" => "1113",
          "xgps" => 0.0,
    "volume_per" => 0.0,
       "typeano" => "CASSECONDPROV",
    "duree_coup" => "3",
       "doccons" => nil,
      "location" => {
        "lat" => 36.840258211253904
    },
        "numext" => nil,
         "agent" => nil,
        "detail" => "CASSECONDPROV_AVGRILLAGEAVERT",
    "@timestamp" => 2022-08-14T16:11:43.155777Z,
        "auteur" => nil,
      "detectio" => "VISUEL",
    "directio_1" => "60100000",
     "arrond_ar" => "111312",
    "commune_ar" => "1113",
    "intervenan" => "1",
          "ygps" => 0.0,
    "adressevoi" => nil,
       "gouvern" => "11",
            "id" => "1673",
      "n_invent" => "D15E55Ca268",
      "createur" => nil,
           "nom" => nil,
        "arrond" => "111312",
     "nombre_ab" => "55",
       "commune" => "1113",
       "element" => "E-TRONCO-E",
    "adressenum" => nil,
          "etat" => "REPAREE",
         "cause" => "AUTRE",
      "district" => "30515000",
      "commcons" => nil,
      "typedefa" => "PERCE",
       "adresse" => "RUE KAIES KRAM OUEST",
    "gouvern_ar" => "11",
       "delegat" => "1170",
    "secteur_ad" => "117052",
          "zgps" => nil,
           "lon" => 10.311382057358088,
    "secteur__1" => "117052",
     "secteur_p" => nil,
        "cadran" => "8.A",
       "docrepa" => nil,
      "techrepa" => "REPARE",
      "priorite" => "ELEVE",
      "division" => nil,
    "adressevil" => "Le Kram"
}
[2022-08-14T18:12:59,575][WARN ][logstash.outputs.elasticsearch][main][807c1db9cdfce77cba9e977bb6f6dd65e25ed3265336cb3e4f69de6170b516d7] Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>"2000", :_index=>"mardi", :routing=>nil}, {"direction_"=>"30500000", "datecons"=>"2015/10/12 00:00:00.000", "daterepa"=>"2015/10/12 00:00:00.000", "secteur_e"=>"30515035", "delegat_ar"=>"1170", "adressecod"=>"1113", "xgps"=>0.0, "volume_per"=>0.0, "typeano"=>"CASSECONDPROV", "duree_coup"=>nil, "doccons"=>nil, "location"=>{"lat"=>36.860932229572846}, "numext"=>nil, "agent"=>nil, "detail"=>"CASSECONDPROV_AVGRILLAGEAVERT", "@timestamp"=>2022-08-14T16:11:42.524770400Z, "auteur"=>"D15_CSE", "detectio"=>"APPEL", "directio_1"=>"60100000", "arrond_ar"=>"111313", "commune_ar"=>"1113", "intervenan"=>nil, "ygps"=>0.0, "adressevoi"=>nil, "gouvern"=>"11", "id"=>"2000", "n_invent"=>nil, "createur"=>"D15_CSE", "nom"=>nil, "arrond"=>"111313", "nombre_ab"=>nil, "commune"=>"1113", "element"=>"E-TRONCO-E", "adressenum"=>nil, "etat"=>"REPAREE", "cause"=>"INTERVHUM", "district"=>"30515000", "commcons"=>nil, "typedefa"=>"PERCE", "adresse"=>nil, "gouvern_ar"=>"11", "delegat"=>"1170", "secteur_ad"=>"117054", "zgps"=>nil, "lon"=>10.268764542975003, "secteur__1"=>"117054", "secteur_p"=>nil, "cadran"=>nil, "docrepa"=>nil, "techrepa"=>"REMPLACE", "priorite"=>"IMMEDIAT", "division"=>nil, "adressevil"=>"Le Kram"}], :response=>{"index"=>{"_index"=>"mardi", "_id"=>"2000", "status"=>400, "error"=>{"type"=>"mapper_parsing_exception", "reason"=>"failed to parse field [location.lat] of type [geo_point]", "caused_by"=>{"type"=>"parse_exception", "reason"=>"geo_point expected"}}}}}
[2022-08-14T18:12:59,608][WARN ][logstash.outputs.elasticsearch][main][807c1db9cdfce77cba9e977bb6f6dd65e25ed3265336cb3e4f69de6170b516d7] Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>"1899", :_index=>"mardi", :routing=>nil}, {"direction_"=>"30500000", "datecons"=>"2014/10/07 00:00:00.000", "daterepa"=>"2014/10/07 00:00:00.000", "secteur_e"=>"30515035", "delegat_ar"=>"1170", "adressecod"=>"1113", "xgps"=>0.0, "volume_per"=>0.0, "typeano"=>"CASSECONDSPON", "duree_coup"=>nil, "doccons"=>nil, "location"=>{"lat"=>36.85899988190831}, "numext"=>nil, "agent"=>nil, "detail"=>"CASSECONDSPON_AVGRILLAGEAVERT", "@timestamp"=>2022-08-14T16:11:42.525770Z, "auteur"=>nil, "detectio"=>"APPEL", "directio_1"=>"60100000", "arrond_ar"=>"111313", "commune_ar"=>"1113", "intervenan"=>nil, "ygps"=>0.0, "adressevoi"=>nil, "gouvern"=>"11", "id"=>"1899", "n_invent"=>nil, "createur"=>nil, "nom"=>nil, "arrond"=>"111313", "nombre_ab"=>nil, "commune"=>"1113", "element"=>"E-TRONCO-E", "adressenum"=>nil, "etat"=>"REPAREE", "cause"=>"ANCFRAG", "district"=>"30515000", "commcons"=>nil, "typedefa"=>"FISLEG", "adresse"=>nil, "gouvern_ar"=>"11", "delegat"=>"1170", "secteur_ad"=>"117054", "zgps"=>nil, "lon"=>10.269388782265937, "secteur__1"=>"117054", "secteur_p"=>nil, "cadran"=>nil, "docrepa"=>nil, "techrepa"=>"REPARE", "priorite"=>"ELEVE", "division"=>nil, "adressevil"=>"Le Kram"}], :response=>{"index"=>{"_index"=>"mardi", "_id"=>"1899", "status"=>400, "error"=>{"type"=>"mapper_parsing_exception", "reason"=>"failed to parse field [location.lat] of type [geo_point]", "caused_by"=>{"type"=>"parse_exception", "reason"=>"geo_point expected"}}}}}
[2022-08-14T18:12:59,619][WARN ][logstash.outputs.elasticsearch][main][807c1db9cdfce77cba9e977bb6f6dd65e25ed3265336cb3e4f69de6170b516d7] Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>"1633", :_index=>"mardi", :routing=>nil}, {"direction_"=>"30500000", "datecons"=>"2010/02/12 00:00:00.000", "daterepa"=>"2010/02/15 00:00:00.000", "secteur_e"=>"30515035", "delegat_ar"=>"1169", "adressecod"=>"1114", "xgps"=>0.0, "volume_per"=>0.0, "typeano"=>"CASSECONDPROV", "duree_coup"=>"3", "doccons"=>nil, "location"=>{"lat"=>36.85487454967173}, "numext"=>nil, "agent"=>nil, "detail"=>"CASSECONDPROV_AVGRILLAGEAVERT", "@timestamp"=>2022-08-14T16:11:42.526771Z, "auteur"=>nil, "detectio"=>"VISUEL", "directio_1"=>"60100000", "arrond_ar"=>"111412", "commune_ar"=>"1114", "intervenan"=>"1", "ygps"=>0.0, "adressevoi"=>nil, "gouvern"=>"11", "id"=>"1633", "n_invent"=>"D15E55Ca057", "createur"=>nil, "nom"=>nil, "arrond"=>"111412", "nombre_ab"=>"50", "commune"=>"1114", "element"=>"E-TRONCO-E", "adressenum"=>nil, "etat"=>"REPAREE", "cause"=>"AUTRE", "district"=>"30515000", "commcons"=>nil, "typedefa"=>"PERCE", "adresse"=>"LOTISSEMENT AFH AOUINA NORD", "gouvern_ar"=>"11", "delegat"=>"1169", "secteur_ad"=>"116955", "zgps"=>nil, "lon"=>10.269594496466002, "secteur__1"=>"116955", "secteur_p"=>nil, "cadran"=>"5.D", "docrepa"=>nil, "techrepa"=>"REPARE", "priorite"=>"ELEVE", "division"=>nil, "adressevil"=>"La Goulette"}], :response=>{"index"=>{"_index"=>"mardi", "_id"=>"1633", "status"=>400, "error"=>{"type"=>"mapper_parsing_exception", "reason"=>"failed to parse field [location.lat] of type [geo_point]", "caused_by"=>{"type"=>"parse_exception", "reason"=>"geo_point expected"}}}}}
[2022-08-14T18:12:59,644][WARN ][logstash.outputs.elasticsearch][main][807c1db9cdfce77cba9e977bb6f6dd65e25ed3265336cb3e4f69de6170b516d7] Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>"1635", :_index=>"mardi", :routing=>nil}, {"direction_"=>"30500000", "datecons"=>"2009/07/13 00:00:00.000", "daterepa"=>"2009/07/13 00:00:00.000", "secteur_e"=>"30515035", "delegat_ar"=>"1169", "adressecod"=>"1114", "xgps"=>0.0, "volume_per"=>0.0, "typeano"=>"FUITESCHAUSSEE", "duree_coup"=>"0", "doccons"=>nil, "location"=>{"lat"=>36.854342065572276}, "numext"=>nil, "agent"=>nil, "detail"=>nil, "@timestamp"=>2022-08-14T16:11:42.527768100Z, "auteur"=>nil, "detectio"=>"VISUEL", "directio_1"=>"60100000", "arrond_ar"=>"111412", "commune_ar"=>"1114", "intervenan"=>"1", "ygps"=>0.0, "adressevoi"=>nil, "gouvern"=>"11", "id"=>"1635", "n_invent"=>"D15E55Fu03", "createur"=>nil, "nom"=>nil, "arrond"=>"111412", "nombre_ab"=>nil, "commune"=>"1114", "element"=>"E-TRONCO-E", "adressenum"=>nil, "etat"=>"REPAREE", "cause"=>"AUTRE", "district"=>"30515000", "commcons"=>nil, "typedefa"=>"PERCE", "adresse"=>"RUE ALI BELHOUANE L'AOUINA", "gouvern_ar"=>"11", "delegat"=>"1169", "secteur_ad"=>"116955", "zgps"=>nil, "lon"=>10.269591891351677, "secteur__1"=>"116955", "secteur_p"=>nil, "cadran"=>"5.D", "docrepa"=>nil, "techrepa"=>"REPARE", "priorite"=>"ELEVE", "division"=>nil, "adressevil"=>"La Goulette"}], :response=>{"index"=>{"_index"=>"mardi", "_id"=>"1635", "status"=>400, "error"=>{"type"=>"mapper_parsing_exception", "reason"=>"failed to parse field [location.lat] of type [geo_point]", "caused_by"=>{"type"=>"parse_exception", "reason"=>"geo_point expected"}}}}}
[2022-08-14T18:12:59,649][WARN ][logstash.outputs.elasticsearch][main][807c1db9cdfce77cba9e977bb6f6dd65e25ed3265336cb3e4f69de6170b516d7] Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>"1514", :_index=>"mardi", :routing=>nil}, {"direction_"=>"30500000", "datecons"=>nil, "daterepa"=>nil, "secteur_e"=>"30515035", "delegat_ar"=>"1252", "adressecod"=>nil, "xgps"=>0.0, "volume_per"=>0.0, "typeano"=>"FUITESCHAUSSEE", "duree_coup"=>nil, "doccons"=>nil, "location"=>{"lat"=>36.86245061733905}, "numext"=>nil, "agent"=>nil, "detail"=>nil, "@timestamp"=>2022-08-14T16:11:42.530765500Z, "auteur"=>nil, "detectio"=>"VISUEL", "directio_1"=>"60100000", "arrond_ar"=>"1212", "commune_ar"=>"1212", "intervenan"=>"ENREGIE", "ygps"=>0.0, "adressevoi"=>nil, "gouvern"=>"11", "id"=>"1514", "n_invent"=>nil, "createur"=>nil, "nom"=>"DRRA98NFu06", "arrond"=>"111313", "nombre_ab"=>nil, "commune"=>"1212", "element"=>"CONDUITE ADDUCTION", "adressenum"=>nil, "etat"=>"REPAREE", "cause"=>nil, "district"=>"30525000", "commcons"=>nil, "typedefa"=>nil, "adresse"=>nil, "gouvern_ar"=>"12", "delegat"=>"1170", "secteur_ad"=>"117054", "zgps"=>"0", "lon"=>10.269867584312372, "secteur__1"=>nil, "secteur_p"=>nil, "cadran"=>"C5", "docrepa"=>nil, "techrepa"=>nil, "priorite"=>nil, "division"=>nil, "adressevil"=>"Le Kram"}], :response=>{"index"=>{"_index"=>"mardi", "_id"=>"1514", "status"=>400, "error"=>{"type"=>"mapper_parsing_exception", "reason"=>"failed to parse field [location.lat] of type [geo_point]", "caused_by"=>{"type"=>"parse_exception", "reason"=>"geo_point expected"}}}}}

i hope I didn't forget anything

Thanks... this would have helped from the very beginning.

Typos... typos... You changed the select statement but not the mutate!

statement => 'SELECT id, ST_X (ST_Transform (geom, 4326)) AS lon...."'

should be

Clean up and try again... everything needs to line up / be correct :slight_smile:

2 Likes

thank you for your feedback and your help thank you that's work yes

2 Likes

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.