When using Elastic Agent, one can't use the GeoIP processor, presumably because it's built-in. It does the location lookup well, but the ASN details are missing and I've not found a way yet to toggle a setting for this.
So, what are my options? The returned JSON includes an IP field and the basic geoip fields are generated at root level, which is fine for logs with only one IP address (source).
I've tried copying the ip field to source.ip, this breaks geoip output entirely.
I guess it might be possible to add a scripted field in the data view, but I have no idea how to write the script for this, plus I guess that doing it at ingestion would be more efficient?
All I want to do is add the source.as.number and source.as.organization.name fields.
The Custom logs and Nginx integrations. In both, one can add processors, but using the geoip processor results in an error on the agent when the config is applied to a host. It states that geoip is not a valid processor.
I do get geoip fields added by both processors, it's just that I'd like to also have the as.number and as.organisation.name fields.
If you look at the logs-nginx.access-1.20.0 ingest pipeline this is all the processing for the integration.
so you could add any one of the following
{
"pipeline": {
"name": "global@custom",
"ignore_missing_pipeline": true,
"description": "[Fleet] Global pipeline for all data streams"
}
},
{
"pipeline": {
"name": "logs@custom",
"ignore_missing_pipeline": true,
"description": "[Fleet] Pipeline for all data streams of type `logs`"
}
},
{
"pipeline": {
"name": "logs-nginx.integration@custom",
"ignore_missing_pipeline": true,
"description": "[Fleet] Pipeline for all data streams of type `logs` defined by the `nginx` integration"
}
},
{
"pipeline": {
"name": "logs-nginx.access@custom",
"ignore_missing_pipeline": true,
"description": "[Fleet] Pipeline for the `nginx.access` dataset"
}
}
]
So if you want to add the ASN geoip for the the whole integration adding this custom pipeline will get called... and thus add the pipeline / ingest pipeline / ingest processors you want
Kibana -> Dev Tools (you can do via UI too but this is quicker)
I found that the Nginx integration has the GeoIP information I was after, I had simply missed the field. But for the custom logs integration modifying the custom pipeline does what I needed it to do.
This has opened a whole new world of possibilities to me.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.