Sunday, June 25, 2017

ESP01 with multiple DS18B20 Temperature sensors POSTing to ElasticSearch

I posted some code to github for getting two (or more) temperature sensors working with an esp01 and sending that data to Elasticsearch. I use this in my house to monitor the intake and output of my Air Conditioning unit. This lets me see how well it is performing. There are limitless other use cases where you may want to monitor temps over time though. So this is an extremely easy and cheap way to do so.

All you need is listed below:

  1. ESP01 module
  2. DS18B20 temperature sensors
  3. 4700 Ohm resistor
  4. Basic computer and electronics skills


https://github.com/jf7979/ESP8266-Dual-Temp-Sensors-Elasticsearch-API




This would be the simple way to hookup one (or more) sensors.


Splunk: Lookup PTR record for an IP address field

Here is a quick way to lookup an IP address PTR record in Splunk using a simple 'lookup' command. I use this with a dashboard panel for a pfsense index (my pfsense machine syslog's to Splunk). The downside is that this does lookups on a per search basis so the searches take a longer time to load. I find it best to limit the amount of IP's prior to doing a PTR lookup to save time.



lookup dnslookup clientip as source_ip OUTPUT clienthost as PTR


Just replace the "source_ip" with whatever the IP field is you want looked up, and PTR is just the new cosmetic name of the column it adds.

Here's an example: