We appreciate the contributions many of you have been able to make towards repairing the storm damage and keeping a roof over our heads. With your help we’ve been able to complete much of the critical work. There is still work to be done to secure the house and your continued support will be a huge help.
Guests have read-only access to our forums. If you wish to participate you will need to register. Be sure to activate your account from the email sent to you when you register.
Found another quirk in 3.14, and that is an issue when WMI returns nothing, it doesn't hide the result. In the code block below, if IPv6 isn't returning info, I still have the "WAN IPv6 Latency" in the left column, even though the right column has no data and is blank.
WMI=interval:5,color:22ccee,text:WAN IPv6 Latency,namespace:root\cimv2,query:Win32_PingStatus where Address='ipv6.google.com', \
chart:line2 scale:linear series1:%ResponseTime% color1:00ff00 threshold1:1 80 0000ff,hide-no-result:1,display:{{{Host: %Address% [%ProtocolAddress%] Response Time: %ResponseTime%ms |%chart%}}}
Found another quirk in 3.14, and that is an issue when WMI returns nothing, it doesn't hide the result. In the code block below, if IPv6 isn't returning info, I still have the "WAN IPv6 Latency" in the left column, even though the right column has no data and is blank.
WMI=interval:5,color:22ccee,text:WAN IPv6 Latency,namespace:root\cimv2,query:Win32_PingStatus where Address='ipv6.google.com', \ chart:line2 scale:linear series1:%ResponseTime% color1:00ff00 threshold1:1 80 0000ff,hide-no-result:1,display:{{{Host: %Address% [%ProtocolAddress%] Response Time: %ResponseTime%ms |%chart%}}}
The query is returning a row of data even when the ping fails so the hide-no-result option won't work. The triple curly braces are doing their job of suppressing the enclosed output if any of the enclosed return values are null, in this case probably %ResponseTime%. Other return values contain data.
@glenn - Ok, that makes sense. So how do I hide the whole thing if IPv6 isn't returning data? Like if the ProtocolAddress is blank due to not being able to be resolved? Or do I need to put the whole thing into a SET variable with HIDDEN:1, and then display all that with a follow up TEXT= section? Something like the following:
WMI=interval:5,color:22ccee,set:ipv6_latency,namespace:root\cimv2,query:Win32_PingStatus where Address='ipv6.google.com', \
chart:line2 scale:linear series1:%ResponseTime% color1:00ff00 threshold1:1 80 0000ff,display:{{{Host: %Address% [%ProtocolAddress%] Response Time: %ResponseTime%ms |%chart%}}},hidden:1
TEXT=interval:2,color:22ccee,text:WAN IPv6 Latency,display:%ipv6_latency%
Here's what I came up with
WMI=interval:5, set:ipv6Address=%Address% ipv6ProtocolAddress=%ProtocolAddress% ipv6ResponseTime=%ResponseTime%,\
namespace:root\cimv2,query:Win32_PingStatus where Address='ipv6.google.com',hidden:1
IF=value1:%ipv6ResponseTime%, comp:ne, value2:<null>
TEXT=interval:5,color:22ccee,text:WAN IPv6 Latency,\
display:Host: %ipv6Address% [%ipv6ProtocolAddress%] |Response Time: %ipv6ResponseTime%ms |%chart%,\
chart:line2 scale:linear series1:%ipv6ResponseTime% color1:00ff00 threshold1:1 80 0000ff
@glenn - I'll give that a try. I always forget about the IF feature. That should help.