Hi, i want to monitor our unify switches from 8 Port to 48 Port, with and without PoE.... So i take his article https://https://helpdesk.paessler.com/en/support/solutions/articles/76000045482 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...
Article Comments
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?
Oct, 2021 - Permalink
Sorry, that last comment didn't make any sense. Can you explain again?
Benjamin Day
[Paessler Support]
Oct, 2021 - Permalink
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
Jan, 2022 - Permalink
Sebastian,
Can you execute the script manually from the PRTG server, and post the output?
Benjamin Day
[Paessler Support]
Jan, 2022 - Permalink
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>
Jan, 2022 - Permalink
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]
Jan, 2022 - Permalink
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 Ausfhrung 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.....
Jan, 2022 - Permalink
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]
Jan, 2022 - Permalink
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?
Jan, 2022 - Permalink
Sebastian,
At this point, I would recommend you open a support ticket for this case.
Benjamin Day
[Paessler Support]
Jan, 2022 - Permalink
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]
Oct, 2021 - Permalink