If I edit several "SNMP Traffic" type sensors on the same channel at the same time, only the first sensor adopts these settings. So I have to adjust the channel individually for each sensor.

For me it's explicitly about the "Data" setting in the "Traffic Total" channel. I have to set this manually to "Display in percent of maximum" - that takes a long time if I have to do this for every sensor.


Article Comments

Hello,

Thank you for your message.

We indeed noticed this issue and forwarded it to our development team for investigation. Unfortunately, there is no further information about it yet.

In the meantime, you could use the PowerShell module PRTGAPI (from third party) to automate that task by using the code below (might need to be adapted to your needs): ?

param(
    [string] $hostname = "", # PRTG DNS or IP
    [string] $username = "", # User account
    [string] $passhash = ""  # User passhash
)

try {
    if(!(Get-PrtgClient)){
        Connect-PrtgServer $hostname (New-Credential $username $passhash) -PassHash -IgnoreSSL 
    }

$sensors = Get-Sensor -Tag "SensorTAG" # You might need to change/improve this line to only get the sensors you want to modify.
foreach($sens in $sensors){
    $sens | Get-Channel -Id "-1" | Set-ChannelProperty -PercentMode 1 -PercentValue ?MAXIMUMVALUE
}

Please, note that the requests executed by the module can consume memory on the Core server which won't be released as the session established is not closed properly (due to the endpoint used by this module). Therefore, its usage should stay limited until the developer behind it implements the solution we provided to him.

Regards.


Apr, 2022 - Permalink