Skip to content

Commit

Permalink
Add DNS lookup and TODO comments for ASNS lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
ivukotic committed Mar 26, 2024
1 parent 0b89c42 commit dca3c5c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion configs/ps-trace.conf
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ filter {
}
}


ruby { path => "/usr/share/logstash/filters/trace.rb" }


if ![tags] { # for problematic things don't remove fields
mutate{
remove_field => ["type", "test", "result", "@timestamp"]
Expand All @@ -38,4 +39,5 @@ filter {

output {
pipeline { send_to => ["es-output"] }
pipeline { send_to => ["nebraska"] }
}
3 changes: 3 additions & 0 deletions filters/trace.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ def filter(event)
hs = event.get('[result][paths]').first()
dest = event.get('[dest]')

# TODO add lookups for dns names from memcached.

c = 1
path_complete = true
destination_reached = false
Expand All @@ -20,6 +22,7 @@ def filter(event)
asns.push(h["as"]["number"])
else
asns.push(0)
# TODO here do an asns lookup
end
else
path_complete = false
Expand Down

0 comments on commit dca3c5c

Please sign in to comment.