I'm not sure if this is an ES question or a Kibana question, or both, or Timelion.
We track the reputation of all our IP addresses by performing various blacklist lookups every day, and storing that data in ES.
In the most simplistic case, I just record this every day:
{
"timestamp": "2017-03-20T04:23:15.0772879+00:00"
"ip": "1.1.1.1",
"score": 100
}
That means I can create pretty graphs for reputation trends per IP or range, and show all IPs that are in a danger zone. What I cannot seem to do however, is detect changes. For example, some of these IPs are used by our customers, and some of those will cheefully keep tarnishing the reputation of the IPs, so it's normal to see a bunch always low. That would mean I have a big list of "danger" IPs, but many of those would be "normal".
Can I easily create a visualisation showing "all IPs that are bad now, that weren't bad yesterday"? Or over different time periods?
At the moment I am experimenting with this: when I store the new reputation I lookup the previous reputation from ES, and store that again
{
"timestamp": "2017-03-21T04:23:15.0772879+00:00"
"ip": "1.1.1.1",
"score": 10,
"previous_score": 100
}
But this bakes in the time element, so if I wanted to do "two days ago" or "a week ago" I'd have to know in advance, and lookup those additional documents on each update to update the previous1
, previous2
and previous7
fields. Seems messy, is there a better way?
Ideally this would end up resulting in something I can use with Watcher to send an email out when an IP "goes bad".