PRTG - Factory Sensor

 

Transcript - Factory Sensor

In this video, we're going to look at the PRTG Sensor Factory sensor, and how to configure one.The factory sensor is used to combine the monitoring results from other, multiple sensors into one single, comprehensive sensor.  For example, you could create an email service sensor that combines the results from your exchange sensors and from some of your infrastructure sensors into one factory sensor that shows the total status of your entire email service.With a factory sensor, you can combine channels from other sensors, to see them in a single table or graph, and you can display the results in reports or maps.You can use the values as they are, or you can use arithmetic and Boolean operators to calculate new values.

Let's look at a factory sensor inside PRTG

You can create a new factory sensor in PRTG using the same method as any other sensor.  You need to add it to some device, but this doesn't need to be a real device.  You can create a dummy device if you'd like, because the factory sensor doesn't need to read any information from a specific real device.You can use channel values from any part of your device tree in the factory sensor:  they don't need to be in the same branch as your factory sensor.< add a sensor, go to settings >
When we create a new factory sensor, we see that we need to define the channels for the sensor.  If you hover your mouse over the input box, you'll see extra help about how to define the channels.  We see that we need to define the channel ID, a name, and then a formula.  In the formula, we need a sensorID and  a channel ID.  So, let's go looking for sensor IDs and channel IDs.For my example today, I'm going to look at two SNMP traffic ports on an ISILON NAS:https://demo1.prtgtestserver.net/device.htm?id=11502&tabid=1This NAS has two ports, em0 and em1Looking at port EM0: we need to take note of two things, the sensor ID number and the channel ID number.  The sensor ID is in the URL here, in this case 11522.  And now we need to decide which channel we want.  Let's take traffic IN, which has channel id zero.And we need to do the same thing for port EM1:  here the sensor ID is 11523 and the channel ID for traffic IN is zero again.So, now we can define channels in my new factory sensor:

#1:TrafficIn em0Channel(11522,0)#2:TrafficIn em1Channel(11523,0)
After defining the channels, you can chose how the factory sensor should behave when one of the channels is down.  I'm going to leave it as the default, which is that the sensor goes into down state when one of the channels is in down state.Now that the sensor is complete, I can see that both traffic values are shown as channels, and that I can use them to generate historic data.Let's take this a step further, and create a new channel that adds together the other two channels.  This will give us the total traffic coming into this NAS on both ports.  To do this, I define a third channel and call it TrafficInTotal   and I just add the two other channels together.#3:TrafficInTotalChannel(11522,0)+Channel(11523,0)You can also subtract, multiply, or divide values here.   In addition, you can compare values with greater than or less than, and you can use functions such as min, max, average and percent.Let's add a new channel, with an average:#4:Averageavg(channel(11522,0),channel(11523,1))
There's another helpful feature here:  the status function, which lets you define in more detail what channel states should put this factory sensor into error state.For example, I might want an error when one OR the other sensors are in error state:status(11522) OR status(11523)Please note that you can only use these custom formulas to set the factory sensor into a down state - you can't set it into warning .

Back in our sensor overview, we see our new channels.  I'm now going to set one of the original traffic sensors into error state, and go back to our factory sensor.  We see that the factory sensor has also gone into error state, and we can see which channel is the cause.
If you'd like more detailed information about the factory sensor, our online manual has lots of other information and configuration examples for the factory sensor.That brings me to the end of this video.  If you have any questions about factory sensors, or anything else in PRTG, please contact us at any time, under [email protected]

Copyright © 1998 - 2017 Paessler AG