What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

How to Monitor Unify Switches via Unify Webcontroller?

Votes:

0

Hi, i want to monitor our unify switches from 8 Port to 48 Port, with and without PoE.... So i take his article https://kb.paessler.com/en/topic/71263-can-i-monitor-ubiquiti-unifi-network-devices-with-prtg as an example for me an adjust it like discribed here https://www.frankysweb.de/prtg-und-ubiquiti-switches-ubnt/ but it doesn't work :( So first a short Brief how our PRTG is running: we have a central prtgserver who is monitoring 11 sites where all PRTG-RemoteProbes are running. For some simple Scans (Ping) it is working, but i want to monitor "all" , e.g the CPU, Ram, and so on. in that first URL, i don't understand which server it is meant. Is it the Windows PRTG Main Server, or our Unify Cloud Controller? i get an auth failure. But where to auth. the RemoteProbe, Prtg Mainserver, Unify Cloudcontroller?

Thanks for some hints...

exexml powershell prtg xml

Created on Oct 5, 2021 10:53:43 AM



11 Replies

Votes:

0

Hello,

It would be best to contact the person who created the script itself. The script is meant to monitor Unifi Wifi Access Points. I'm not sure how to modify this to monitor switches. Have you considered the SNMP Traffic sensor in PRTG? It's designed to monitor switch ports.

Benjamin Day
[Paessler Support]

Created on Oct 5, 2021 7:00:16 PM by  Benjamin Day [Paessler Support] (1,441) 2 1



Votes:

0

Hi, yes i have, but unfortunately the snmp data stream comes without i could imagine what could it be. does anybody else monitors unify with prtg?

Created on Oct 6, 2021 5:38:29 AM



Votes:

0

Sorry, that last comment didn't make any sense. Can you explain again?

Benjamin Day
[Paessler Support]

Created on Oct 6, 2021 9:07:55 PM by  Benjamin Day [Paessler Support] (1,441) 2 1



Votes:

0

Hi, a little bit later....

i get this from my unifiy switch, when i'm adding my powershell script:

XML: Das zurückgelieferte XML entspricht nicht dem erwarteten Schema. (Code: PE233) -- JSON: Das zurückgelieferte JSON entspricht nicht der erwarteten Struktur (No mapping for the Unicode character exists in the target multi-byte code page). (Code: PE231)

Which scheme should it be? Where could i see this?

Is there a Documentation at prtg?

Thanks Sebastian

Created on Jan 24, 2022 10:55:19 AM



Votes:

0

Sebastian,

Can you execute the script manually from the PRTG server, and post the output?

Benjamin Day
[Paessler Support]

Created on Jan 24, 2022 4:47:31 PM by  Benjamin Day [Paessler Support] (1,441) 2 1



Votes:

0

Hi, i get this here when i start this on console.

PS C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML> .\UBNT-Switche.ps1 <prtg> <result> <channel>Switches Connected</channel> <value>3</value> <customunit>Switch(es)</customunit> </result> <result> <channel>Switches Upgradeable</channel> <value>0</value> <customunit>Switch(es)</customunit> </result> <result> <channel>Clients (Total)</channel> <value>14</value> <customunit>Clients</customunit> </result> <result> <channel>Response Time</channel> <value>463</value> <customunit>msecs</customunit> </result> <result> <channel>2OG-SIT-SW16-01 (R222) RX Error</channel> <value></value> <customunit>Packets</customunit> </result> <result> <channel>2OG-SIT-SW16-01 (R222) RX Dropped</channel> <value></value> <customunit>Packets</customunit> </result> <result> <channel>2OG-SIT-SW16-01 (R222) TX Error</channel> <value></value> <customunit>Packets</customunit> </result> <result> <channel>2OG-SIT-SW16-01 (R222) TX Dropped</channel> <value></value> <customunit>Packets</customunit> </result> <result> <channel>2OG-SIT-SW8-01 (R222) RX Error</channel> <value></value> <customunit>Packets</customunit> </result> <result> <channel>2OG-SIT-SW8-01 (R222) RX Dropped</channel> <value></value> <customunit>Packets</customunit> </result> <result> <channel>2OG-SIT-SW8-01 (R222) TX Error</channel> <value></value> <customunit>Packets</customunit> </result> <result> <channel>2OG-SIT-SW8-01 (R222) TX Dropped</channel> <value></value> <customunit>Packets</customunit> </result> <result> <channel>2OG-SIT-SW24-01 (Serverraum R224) RX Error</channel> <value></value> <customunit>Packets</customunit> </result> <result> <channel>2OG-SIT-SW24-01 (Serverraum R224) RX Dropped</channel> <value></value> <customunit>Packets</customunit> </result> <result> <channel>2OG-SIT-SW24-01 (Serverraum R224) TX Error</channel> <value></value> <customunit>Packets</customunit> </result> <result> <channel>2OG-SIT-SW24-01 (Serverraum R224) TX Dropped</channel> <value></value> <customunit>Packets</customunit> </result> </prtg>

Created on Jan 25, 2022 7:00:14 AM

Last change on Jan 25, 2022 11:01:03 PM by  Benjamin Day [Paessler Support] (1,441) 2 1



Votes:

0

Sebastian,

In the Settings tab under Result Handling, please enable the option to Store Result. Let the sensor run for about an hour, and then go to the following folder on your PRTG Core Server. C:\ProgramData\Paessler\PRTG Network Monitor\Logs\sensors
There should be a file there for the sensor. Reply with the contents of that file.

Benjamin Day
[Paessler Support]

Created on Jan 25, 2022 11:08:03 PM by  Benjamin Day [Paessler Support] (1,441) 2 1



Votes:

0

Hi, is it possible that our answers could be moderated a bit faster? it takes time to solve this... Or should i open a support ticket from our installation?

Here are the results of ...data.sensor.txt

Data['ftppassword'].asString := '';
Data['fastcount'].asString := '0';
Data['esxpassword'].asString := '';
Data['resultfile'].asString := 'Result of Sensor 3513.txt';
Data['windowsloginusername'].asString := '';
Data['hostv6'].asString := '';
Data['blockedsens'].asString := '';
Data['secretaccesskeyid'].asString := '';
Data['tlsexplicit_default'].asString := '';
Data['channelnames'].asString := '';
Data['vmwareparams'].asString := '1';
Data['isexesensor'].asString := '1';
Data['windowsloginpassword'].asString := '';
Data['privatekey'].asString := '';
Data['secret'].asString := '';
Data['resttoken'].asString := '';
Data['reboot'].asString := '44584.5471422917';
Data['pop3password'].asString := '';
Data['exeparamshash'].asString := 'da39a3ee5e6b4b0dxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
Data['tlsexplicit_port'].asString := '';
Data['monitorchange'].asString := '';
Data['inerror'].asString := '1';
Data['smspassword'].asString := '';
Data['host'].asString := '192.168.1.241';
Data['mailpassword'].asString := '';
Data['tlsexplicit_ftp'].asString := '';
Data['timeout'].asString := '60';
Data['elevationpass'].asString := '';
Data['notonpod'].asString := '0';
Data['momopersistent'].asString := '';
Data['linuxloginpassword'].asString := '';
Data['smtppassword2'].asString := '';
Data['smtppassword'].asString := '';
Data['exefile'].asString := 'UBNT-Switche.ps1';
Data['lastuptime'].asString := '0';
Data['writeresult'].asString := '1';
Data['reqmsginterval'].asString := '30';
Data['windowslogindomain'].asString := '';
Data['socksproxypass'].asString := '';
Data['tlsexplicit_imap'].asString := '';
Data['sshelevationpass'].asString := '';
Data['uptimecount'].asString := '0';
Data['canlinux'].asString := '0';
Data['channelinfos'].asString := '{}';
Data['proxypassword'].asString := '';
Data['environment'].asString := '';
Data['mutexname'].asString := '';
Data['proxypass'].asString := '';
Data['snmpencpass'].asString := '';
Data['prtg_linuxpassword'].asString := '';
Data['authuserpwd'].asString := '';
Data['usednstime'].asString := '0';
Data['newpowershell'].asString := '0';
Data['restpassword'].asString := '';
Data['httppassword'].asString := '';
Data['linuxlogindomain'].asString := '';
Data['addomainpass'].asString := '';
Data['authtoken'].asString := '';
Data['oauthrefreshtoken'].asString := '';
Data['evapassword'].asString := '';
Data['oauthtoken'].asString := '';
Data['snmpcommv1'].asString := '';
Data['sensorid'].asString := '3513';
Data['ipversion'].asString := '0';
Data['accesskey'].asString := '';
Data['xmlhttppassword'].asString := '';
Data['tlsexplicit_smtp'].asString := '';
Data['password'].asString := '';
Data['snmpcommv2'].asString := '';
Data['snmpauthpass'].asString := '';
Data['awssk'].asString := '';
Data['dbpassword'].asString := '';
Data['pingdompassword'].asString := '';
Data['prtg_windowspassword'].asString := '';
Data['usewindowsauthentication'].asString := '0';
Data['simulate'].asString := '0';
Data['exeparams'].asString := '';
Data['lastmsg'].asString := '#Y2 @#O233 @#O231[No mapping for the Unicode character exists in the target multi-byte code page]';
Data['imappassword'].asString := '';
Data['tlsexplicit_pop3'].asString := '';

And here "result of sensorxxxx.txt"

& : Die Datei "C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXEXML\UBNT-Switche.ps1" kann nicht geladen 
werden, da die Ausfhrung von Skripts auf diesem System deaktiviert ist. Weitere Informationen finden Sie unter 
"about_Execution_Policies" (https:/go.microsoft.com/fwlink/?LinkID=135170).
In Zeile:1 Zeichen:138
+ ... l.Utility};&'C:\Program Files (x86)\PRTG Network Monitor\custom senso ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : Sicherheitsfehler: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess

But i changed the security policy to local maschine.....

Created on Jan 26, 2022 9:54:12 AM

Last change on Jan 26, 2022 3:49:41 PM by  Felix Wiesneth [Paessler Support]



Votes:

0

Sebastian,

You can do that if you wish, but the error message gives us the issue.
Cannot load because script execution is disabled on this system.
For more information, see "about_Execution_Policies"

The execution policy needs to allow for remote execution. You can check what the server is presently set to, and then adjust it to either RemoteSigned or Unrestricted.

Benjamin Day
[Paessler Support]

Created on Jan 26, 2022 9:25:20 PM by  Benjamin Day [Paessler Support] (1,441) 2 1



Votes:

0

Hmm, so i changed it to "remoteSigned" on the remote Probe. And scope on "local maschine" but this didn't work too. And "unrestricted also won't work. Am I here with a completly misunderstanding workflow of this??? In my considerations our main prtg fetches all data of our 11 remote probes. On one remote probe i want to try to check PS-Scripts to check Unifi-SW. Before i write here my thread i changed the execution policy as needed (unrestricted / local machine) and this won't work.

Is there anything i had to change on out main prtg?

Created on Jan 27, 2022 6:40:34 AM



Votes:

0

Sebastian,

At this point, I would recommend you open a support ticket for this case.

Benjamin Day
[Paessler Support]

Created on Jan 27, 2022 5:31:48 PM by  Benjamin Day [Paessler Support] (1,441) 2 1




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.