Thanks for the reply. However as a newbie for both elasticsearch and kibana, I'm not quite following your proposal, I indexed the following events:
POST /dhcp/lease/_bulk
{ "index" : { "_index" : "dhcp", "_type" : "lease", "_id" : "1" } }
{ "time" : "2015-06-28T00:00:00", "ip" : "10.0.0.1", "mac" : "01", "lease_duration" : 10}
{ "index" : { "_index" : "dhcp", "_type" : "lease", "_id" : "2" } }
{ "time" : "2015-06-28T00:02:00", "ip" : "10.0.0.1", "mac" : "01", "lease_duration" : 20}
{ "index" : { "_index" : "dhcp", "_type" : "lease", "_id" : "3" } }
{ "time" : "2015-06-28T00:03:00", "ip" : "10.0.0.1", "mac" : "02", "lease_duration" : 30}
{ "index" : { "_index" : "dhcp", "_type" : "lease", "_id" : "4" } }
{ "time" : "2015-06-28T00:04:00", "ip" : "10.0.0.2", "mac" : "02", "lease_duration" : 20}
{ "index" : { "_index" : "dhcp", "_type" : "lease", "_id" : "5" } }
{ "time" : "2015-06-28T00:05:00", "ip" : "10.0.0.2", "mac" : "02", "lease_duration" : 50}
{ "index" : { "_index" : "dhcp", "_type" : "lease", "_id" : "6" } }
{ "time" : "2015-06-28T00:06:00", "ip" : "10.0.0.1", "mac" : "01", "lease_duration" : 60}
And creating visualization with Kibana gave me the following results:
Top 5 ip Top 5 mac Count
10.0.0.1 a1 4
10.0.0.1 a2 2
10.0.0.2 a1 2
10.0.0.2 a2 2
With splunk steamstats command I could transform:
| time | ip | mac |
| 2015-06-28T00:00:00 | 10.0.0.1 | 01 |
| 2015-06-28T00:01:00 | 10.0.0.1 | 01 |
| 2015-06-28T00:02:00 | 10.0.0.1 | 02 |
| 2015-06-28T00:03:00 | 10.0.0.2 | 02 |
| 2015-06-28T00:04:00 | 10.0.0.2 | 02 |
| 2015-06-28T00:05:00 | 10.0.0.1 | 01 |
Into:
| time | ip | mac | previous_mac |
| 2015-06-28T00:00:00 | 10.0.0.1 | 01 | null |
| 2015-06-28T00:01:00 | 10.0.0.1 | 01 | 01 |
| 2015-06-28T00:02:00 | 10.0.0.1 | 02 | 01 |
| 2015-06-28T00:03:00 | 10.0.0.2 | 02 | null |
| 2015-06-28T00:04:00 | 10.0.0.2 | 02 | 02 |
| 2015-06-28T00:05:00 | 10.0.0.1 | 01 | 02 |
Then I can filter is by "mac != previous_mac" and find out when an IP address's MAC address changed:
| time | ip | mac | previous_mac |
| 2015-06-28T00:02:00 | 10.0.0.1 | 02 | 01 |
| 2015-06-28T00:05:00 | 10.0.0.1 | 01 | 02 |
Could you please more details for me to understand if this is possible with elasticsearch/kibana?
Thanks,
Frank