How does the average temperature change over time?

Here, we are just looking for an aggregate statistic. We want to know the average temperature across all temperature sensors regardless of their location or any other criteria. As we saw in Chapter 7, Visualizing Data with Kibana, we should go to the Visualize tab to create new visualizations and click on the button with a + Create a Visualization button.

Choose Line Chart, and then choose the sensor_data* index pattern as the source for the new visualization. On the next screen, to configure the line chart, follow steps 1 to 5, as shown in the following screenshot:

Figure 10.5: Creating the visualization for average temperature over time
  1. Click on the time range selection fields near the top-right corner, choose Absolute, and select the date range as December 1, 2017 to December 2, 2017. We have to do this because our simulated sensor data is from December 1, 2017.
  1. Click on Add a filter as shown in Figure-10.5 and choose the Filter as follows: sensorType:Temperature. Click on the Save button. We have two types of sensors, Temperature and Humidity. In the current visualization that we are building, we are only interested in the temperature readings. This is why we've added this filter.
  2. From the Metrics section, choose the values shown in Figure 10.5. We are interested in the average value of the readings. We have also modified the label to be Average Temperature.
  3. From the Buckets section, choose the Date Histogram aggregation and the time field, with the other options left as they are.
  4. Click on the triangular Apply changes button.

The result is the average temperature across all temperature sensors over the selected time period. This is what we were looking for when we started building this visualization. From the preceding graph, we can quickly see that on December 1, 2017 at 15:00 IST, the temperature became unusually high. The time may be different on your machine. We may want to find out which underlying sensors reported the higher-than-normal temperatures that caused this peak.

We can click on the Save link at the top bar and give this visualization a name. Let's call it Average temperature over time. Later, we will use this visualization in a dashboard.

Let's proceed to the next question.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.21.229