Can't make DNS resolver work

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
ljorg
Posts: 18
Joined: Wed Jan 14, 2015 6:24 am

Can't make DNS resolver work

Post by ljorg »

Hi,

I'm working on a filter for pfSense and would like to put the reverse resolved DNS name for the destination IP in a separate field. I've got it working partly, but not the way I want it to.

This works, but appends the resolved name to the dest_ip field which is not pretty:

Code: Select all

# dest_ip comes from a grok filter of the %{IP:dest_ip} type
dns {
  reverse => [ "dest_ip" ]
}
This doesn't work:

Code: Select all

dns {
  add_field => [ "dest_fqdn", "%{dest_ip}" ]
  reverse => [ "dest_fqdn" ]
  action => [ "replace" ]
}
In the last example, the dest_fqdn field always contains an IP adress and never gets resolved.

The "action" parameter is mentioned in different syntax around the web. I've tried the following:

Code: Select all

action => "replace"
action => [ "replace" ]
I've also tried omitting it. Doesn't change anything.

Am I missing something?


Lars
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Can't make DNS resolver work

Post by scottwilkerson »

I believe you need to do the add field in your grok filter, then do the dns

Code: Select all

dns {
  reverse => [ "dest_fqdn" ]
  action => [ "replace" ]
}
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
ljorg
Posts: 18
Joined: Wed Jan 14, 2015 6:24 am

Re: Can't make DNS resolver work

Post by ljorg »

scottwilkerson wrote:I believe you need to do the add field in your grok filter, then do the dns
Oh, sorry, I tried that too (out of desperation, I guess). Same result. It seems the type of the field changes when I do the add_field.


Lars
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Can't make DNS resolver work

Post by scottwilkerson »

We are going to have to setup some test, on this as the type of the field shouldn't be configured before it hits elasticsearch, however if your index has that already determined to be an IP, you may need to wait until the next day or change to use a different field name
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked