Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue on PRTG with Custom Sensor #7

Closed
jonnyj192 opened this issue Feb 9, 2017 · 10 comments
Closed

Issue on PRTG with Custom Sensor #7

jonnyj192 opened this issue Feb 9, 2017 · 10 comments

Comments

@jonnyj192
Copy link

When trying to use this for PRTG reporting i get the following issue? could you help me please:

XML: The returned XML does not match the expected schema. (code: PE233) -- JSON: The returned JSON does not match the expected structure (Invalid JSON.). (code: PE231)

@vMarkusK
Copy link
Owner

vMarkusK commented Feb 9, 2017

Sure,
Might you please execute the Script in cmd shell and share the result?
Sensor log will also be awsome.

@jonnyj192
Copy link
Author

Report of Sensor: File "C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXEXML\PRTG.ps1" not found.

Report of Sensor.Data:
Data['blockedsens'].asString := '';
Data['canlinux'].asString := '0';
Data['channelinfos'].asString := '{}';
Data['channelnames'].asString := '';
Data['exefile'].asString := 'PSx64.exe';
Data['exeparams'].asString := '-f=PRTG.ps1 -raw';
Data['fastcount'].asString := '0';
Data['host'].asString := '172.16.3.2';
Data['hostv6'].asString := '';
Data['inerror'].asString := '1';
Data['interfacenumber'].asString := '';
Data['inum'].asString := '';
Data['ipversion'].asString := '0';
Data['isexesensor'].asString := '1';
Data['lastmsg'].asString := '#Y2 @#O233 @#O231[Invalid JSON.]';
Data['lastuptime'].asString := '0';
Data['linuxlogindomain'].asString := '';
Data['linuxloginpassword'].asString := '***';
Data['monitorchange'].asString := '';
Data['mutexname'].asString := '';
Data['reboot'].asString := '42774.6879382407';
Data['reqmsginterval'].asString := '60';
Data['resultfile'].asString := 'Result of Sensor 4534.txt';
Data['sensorid'].asString := '4534';
Data['simulate'].asString := '0';
Data['timeout'].asString := '60';
Data['tlsexplicit_default'].asString := '';
Data['tlsexplicit_ftp'].asString := '';
Data['tlsexplicit_imap'].asString := '';
Data['tlsexplicit_pop3'].asString := '';
Data['tlsexplicit_port'].asString := '';
Data['tlsexplicit_smtp'].asString := '';
Data['uptimecount'].asString := '0';
Data['usednstime'].asString := '0';
Data['usewindowsauthentication'].asString := '1';
Data['windowslogindomain'].asString := '
Data['windowsloginpassword'].asString := '
Data['windowsloginusername'].asString := '
Data['writeresult'].asString := '1';

@jonnyj192
Copy link
Author

That is the powershell command ran through CMD, I have xxx out the point which are private.

Thanks for your help with this.

X:>powershell "& 'C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EX
EXML\PRTG.ps1'"
Starting to Process Connection to XXXXXXXXXX
Connecting BRHost...


Successful-Backups
1
1
1


Warning-Backups
0
1
1
0
1


Failes-Backups
0
1
1
0
1


Failed-Backups
0
1
1
0
1


Running-Backups
0
1
1


Successful-BackupCopys
0
1
1


Warning-BackupCopys
0
1
1
0
1


Failes-BackupCopys
0
1
1
0
1


Failed-BackupCopys
0
1
1
0
1


Running-BackupCopys
0
1
1


Idle-BackupCopys
0
1
1


Successful-Replications
0
1
1


Warning-Replications
0
1
1
0
1


Failes-Replications
0
1
1
0
1


Failed-Replications
0
1
1
0
1


Running-Replications
0
1
1


TotalBackupRead
299
Custom
GB
1
1


TotalBackupTransfer
42
Custom
GB
1
1


REPO - xxxxx
48
Percent
1
1
20
10
1


REPO – xxxxx2
17
Percent
1
1
20
10
1

@vMarkusK
Copy link
Owner

Hi,
might you please verify that the PS1 Script is on all Probes and the Core available.

The PRTG Sensor Log reports that PSx64.exe can not find it:

Report of Sensor: File "C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXEXML\PRTG.ps1" not found.

@jonnyj192
Copy link
Author

HI,

When i change the name of the script and ran it again i got the below error.
"The system cannot find the file specified" which is when it had a false name.

Just to confirm, the server which has the probe on is where i place the PSx64.exe and the PS1 script? all the data from the probe goes back to our central server offsite.

Thanks

@vMarkusK
Copy link
Owner

Hi,

The manual execution is not the Problem. I think the execution vie PRTG is the Problem.
Is on all Probes where the PSx64.exe also the PS1 script located?

Yes, you are right the Probe for the Device where the Sensor is created executes the Script.

@jonnyj192
Copy link
Author

image

This is how its set up on PTRG, please could you advise on this situation?

Thanks

@jonnyj192
Copy link
Author

I have now resolved this issue thanks.

@vMarkusK
Copy link
Owner

Might you please share the Solution?

@jonnyj192
Copy link
Author

On this instance i recreated the PS1 file and edited DNS in the code to the IP address. This is now running however i'm still getting the Odd timeout which is frustrating...

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants