lordmilko / PrtgAPI

C#/PowerShell interface for PRTG Network Monitor
MIT License
301 stars 37 forks source link

Can connect to PRTG server, but none of the get commands give an output. #397

Closed jonasvtr closed 2 months ago

jonasvtr commented 2 months ago

What's going on?

I'm trying to setup and use your module in PowerShell. I've been able to connect to my PRTG server, but sadly none of the GET commands I've tried have given me any information. They don't give errors either, which has made it hard to troubleshoot this myself, which is why I've come here for help. I was able to change the retry count and loglevel, but nothing more. The PRTG user I'm using only has read privileges at the moment, I hope this isn't what is causing this issue.

image

To my knowledge, I've followed the guide completely up to this point. If you require any further information, feel free to ask for it.

All the commands I've tried so far in PowerShell.

image

I also wasn't able to do the compilation step and build, as I got errors I wasn't able to solve. See error below (was trying to build it using comandline)

image

My excuses in advance if I'm making a very stupid mistake, as I'm not used to working with PowerShell modules and such.

Due Dilligance

lordmilko commented 2 months ago

Can you provide the output of Get-PrtgClient -Diagnostic

jonasvtr commented 2 months ago

the output of "Get-PrtgClient -Diagnostic"

image
lordmilko commented 2 months ago

What version of PRTG are you running?

jonasvtr commented 2 months ago

We recently updated to version "24.2.96.1375"

jonasvtr commented 2 months ago

Correction "24.2.96.1375+"

lordmilko commented 2 months ago

Are you able to test with an admin user? Read-only users should work, but this will be an important troubleshooting step. My test server seems to have the same version as yours so it should work

jonasvtr commented 2 months ago

I just made the user read/write user with admin privileges and tested it again and it worked. The diagnostic now looks like this:

image

I also tried another "get-sensor ping" command and it worked flawlessly. Thanks for the help, I only feel a bit stupid at the moment.