New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


Change primary channel on multiple sensors at once

Votes:

0

Your Vote:

Up

Down

Example. - The Netapp sensor adds Snapshot free space as the primary channel rather than something sensible like "Free space %" I know about multi edit but changing the primary channel is not something which can be done in multi edit.

What would be the best way to multi edit 100 sensors primary channels?

multi-edit primary-channel sensor

Created on Apr 24, 2019 4:13:57 PM by  matt631 (50) 1 1



Best Answer

Accepted Answer

Votes:

0

Your Vote:

Up

Down

Thanks for the tip. As per the other thread i used the powershell script at the bottom of the thread to reset the primary channel to channel 15

$username = "username" $password = "password" $prtgServer = "prtg.local" $response = Invoke-RestMethod "https://$prtgServer/api/table.json?content=sensors&columns=objid,device,sensor&[email protected](wmiphysicaldisksensor)&username=$username&password=$password" foreach($sensor in $response.sensors) { $result = Invoke-RestMethod "https://$prtgServer/editsettings" -Method "POST" -Headers @{ "Content-Type" = "application/x-www-form-urlencoded" } -Body "primarychannel_=15&id=$($sensor.objid)&username=$username&password=$password" Write-Host "Modified sensor $($sensor.objid) ($($sensor.device))" }

One line change in the code allowed to me then do the same for sensor types instead of sensor tags

$response = Invoke-RestMethod "https://$prtgServer/api/table.json?content=sensors&columns=objid,device,sensor&filter_type=netappcdotvolume&username=$username&password=$password"

Created on Apr 25, 2019 11:52:22 AM by  matt631 (50) 1 1



6 Replies

Votes:

0

Your Vote:

Up

Down

Matt,

Unfortunately, we do not have the ability to change the Primary Channel via Multi-Edit at this time.

If you would like to suggest this for a feature request, please follow the link below.

How Can I Propose New Features or Sensors for PRTG?

Benjamin Day
Paessler Support

Created on Apr 25, 2019 7:10:45 AM by  Benjamin Day [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Thanks for the reply. Would there be a way to do this in the back end? If i have 100+ sensor that I need to swap from one primary sensor to another this would be an easy job with find and replace in an XML file ect. Not sure where to look for something should it exist... Any tips on how to change other then with alot of hard work?

Happy to edit beyond the "supported" means if necessary and would try on Dev environment before doing anything in production.

Created on Apr 25, 2019 8:19:16 AM by  matt631 (50) 1 1



Votes:

0

Your Vote:

Up

Down

Matt,

There is a post in the KB where someone has posted what looks like a Python script.

KB9933

Let me know if you're able to accomplish this with the script.

Benjamin Day
Paessler Support

Created on Apr 25, 2019 8:48:11 AM by  Benjamin Day [Paessler Support]



Accepted Answer

Votes:

0

Your Vote:

Up

Down

Thanks for the tip. As per the other thread i used the powershell script at the bottom of the thread to reset the primary channel to channel 15

$username = "username" $password = "password" $prtgServer = "prtg.local" $response = Invoke-RestMethod "https://$prtgServer/api/table.json?content=sensors&columns=objid,device,sensor&[email protected](wmiphysicaldisksensor)&username=$username&password=$password" foreach($sensor in $response.sensors) { $result = Invoke-RestMethod "https://$prtgServer/editsettings" -Method "POST" -Headers @{ "Content-Type" = "application/x-www-form-urlencoded" } -Body "primarychannel_=15&id=$($sensor.objid)&username=$username&password=$password" Write-Host "Modified sensor $($sensor.objid) ($($sensor.device))" }

One line change in the code allowed to me then do the same for sensor types instead of sensor tags

$response = Invoke-RestMethod "https://$prtgServer/api/table.json?content=sensors&columns=objid,device,sensor&filter_type=netappcdotvolume&username=$username&password=$password"

Created on Apr 25, 2019 11:52:22 AM by  matt631 (50) 1 1



Votes:

0

Your Vote:

Up

Down

Matt,

Understood, were you able to get everything changed?

Benjamin Day
Paessler Support

Created on Apr 25, 2019 1:32:25 PM by  Benjamin Day [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Yes thanks.

Created on Apr 25, 2019 1:34:16 PM by  matt631 (50) 1 1



Please log in or register to enter your reply.


Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.