I'm trying to create a single graph that shows the aggregate of all of our internet feeds on one chart. I've set up a standard sensor factory sensor with the following definition:
#1:Traffic in [mb]
((Channel(2693,0) + Channel(2799,1)))
#2:Traffic Out [mb]
((Channel(2693,1) + Channel(2799,1)))
However, the numbers produced by the summs do not match the numbers I get when I manually add the individual channels. The problem seems to be that the standard sensor works both in bytes (total traffic) and bits (traffic per second) but only reports bytes total to the factory sensor. This means that no matter what kind of arithmetic gymnastics I perform, on of the summed numbers (either total or bps) will be incorrect by a factor of 8.
Is there a way to add traffic sensors properly so both numbers are accurate?
Article Comments
Sorry, there was a typo in my definition above but not in my actual configs. For each sensor I'm trying to add, there are indeed two channels: channel 0 for in and channel 1 for out. In my factory sensor, channel 1 is in and channel 2 is out.
The problem arises on the bottom of the overview page (as well as a few other places). There, each channel reports a "Last Value (volume)" and a "Last Value (speed)". The volume is in bytes while the speed is in bits. However, I cannot manipulate each value individually so one of them will always be off by a factor of 8. For instance, if I apply no divisor or multiplier to my formula (as above) then my Volume count is correct but my bps count is 8 times too small. If I multiply the formula by 8 to get the bps correct, the volume is 8 times too great. This is true even if I only put one source channel in the factory channel definition (ie, no math). Ostensibly if I only have on channel as part of a factory channel definition then both sensors (the original and the factory on) should report nearly identical #'s for both values. Unfortunately the factory channel does not match the source channel and one of the two values is always off by */ 8.
Is there a way to make it so that both the volume and speed values are correct?
Jun, 2010 - Permalink
Could you provide us with a screenshot, please?
Jun, 2010 - Permalink
Remove the [mb] from your definition then the settings from the source sensors will be used with Byte for volume and bits for speed.
Jul, 2010 - Permalink
That works, thanks. I think the documentation should highlight the differences in placing a unit in the channel definition versus not using one. The docs make it seem like the units are mandatory whereas the difference is having or not having it is quite significant.
Jul, 2010 - Permalink
Sorry, there was a typo in my definition above but not in my actual configs. For each sensor I'm trying to add, there are indeed two channels: channel 0 for in and channel 1 for out. In my factory sensor, channel 1 is in and channel 2 is out.
The problem arises on the bottom of the overview page (as well as a few other places). There, each channel reports a "Last Value (volume)" and a "Last Value (speed)". The volume is in bytes while the speed is in bits. However, I cannot manipulate each value individually so one of them will always be off by a factor of 8. For instance, if I apply no divisor or multiplier to my formula (as above) then my Volume count is correct but my bps count is 8 times too small. If I multiply the formula by 8 to get the bps correct, the volume is 8 times too great. This is true even if I only put one source channel in the factory channel definition (ie, no math). Ostensibly if I only have on channel as part of a factory channel definition then both sensors (the original and the factory on) should report nearly identical #'s for both values. Unfortunately the factory channel does not match the source channel and one of the two values is always off by */ 8.
Is there a way to make it so that both the volume and speed values are correct?
Jun, 2010 - Permalink