In Dynamic Sensor Basics, creating a dynamic sensor using a single metric was explained. In this article, dynamic sensor with multiple metrics will be created.
Subscription
Instead of selecting a single metric, we repeat the process to subscribe to other metrics. For example, using the same sample data, I could select the temperature and weather conditions. This means to join these matching instances of these metrics together into sets when doing the evaluation. It is also possible to join metrics from other experts as long as the hierarchy is consistent.
NOTE: This is creating a set, a common misunderstanding is that it is a logical OR of the metrics. As it is set based, you can join different metrics for the cities, but joining the temperature of cities in Germany with temperatures of US cities creates a superset representing all of the combinations of all of the temperatures of all of the cities. To get the expected result, the location of the generics in the list of metrics should overlap.
Selection
The remainder of the process is similar except there are multiple metrics to consider at each level. Continuing our fire watch scenario, we are now going to include the temperature and the condition to look for a specific weather condition, Wind.
Evaluation
Also similar to the previous example, the evaluation can look at the metrics and further clarify the conditions. The examples below are just a sample of possible states for this sensor.
Execution
Finally when we deploy this updated sensor, the result as expected now highlights hot and windy locations.