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

PS D:\Apps\Monitor> Start-EUCMonitor -JSONFile ".\mysettings.json" -verbose Error reading JSON. Please Check File and try again #64

Open
vcissgroup55 opened this issue Jul 16, 2019 · 4 comments

Comments

@vcissgroup55
Copy link

Expected Behavior

Expecting it to work without generating an error after following all instructions but perhaps something was missed?

Current Behavior

PS D:\Apps\Monitor> Start-EUCMonitor -JSONFile ".\mysettings.json" -verbose
Error reading JSON. Please Check File and try again.
At C:\Program Files\WindowsPowerShell\Modules\EUCMonitoring\2.0.1\Public\Start-EUCMonitor.ps1:48 char:9

  •     throw "Error reading JSON.  Please Check File and try again."
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : OperationStopped: (Error reading J... and try again.:String) [], RuntimeException
    • FullyQualifiedErrorId : Error reading JSON. Please Check File and try again.

Possible Solution

I'm not a developer and this is all the information I have at this time.

Steps to Reproduce (for bugs)

Stopped the services and ran the install again. Tried the uninstall and reinstall. Performed all instructions listed @ https://github.com/dbretty/EUCMonitoring

And

https://www.rorymon.com/blog/euc-monitoring-platform/

Keep getting same error.

Modified the json template using Visual Code and saved as json. Tried Notepad++. Syntax is correct. The original of the error, however, is:
C:\Program Files\WindowsPowerShell\Modules\EUCMonitoring\2.0.1\Public\Start-EUCMonitor.ps1:48 char:9

Which is this line
throw "Error reading JSON. Please Check File and try again."

Context

Would like to use the tool for monitoring a Citrix solution.

Your Environment

This is a dedicated server running 2012R2 fully patched.
It has all the POSH modules from the XA XD ISO which is version 7.15 LTSR
On-prem use only. No cloud at this time.
WMF 5.1

No issues with the install. Services were created and set to automatic and running. No errors during installation only post installation.

@littletoyrobots
Copy link
Collaborator

So, that error is thrown by Powershell's ConvertFrom-Json. What happens when you run this command in console against your file?

Get-Content -Raw -Path $JSONFile | ConvertFrom-Json -ErrorAction Stop

@vcissgroup55
Copy link
Author

Thanks for the response. Actually, it had nothing to do with line 48 or character whatever.....

Further down in the json and while using Visual Code I noticed a extra comma. I don't recall which line but I removed the extra comma and it worked fine.

I'm very interested in this initiative although I must admit I do not have much of a development background. My focus the last 20 years has been Citrix and holistic infrastructure.

Current state is I have two sites that are active/active and separate Citrix sites/farm and split between two physical data centers. I now have both sites represented and showing in Grafana. At least, it was.

Although the services are set to automatic and running it stops collecting data when I logoff the server?

What am I missing?

Do you have to Start the Monitor process manually in POSH to keep this data collection going?

All the data I had yesterday is gone now when I access the dashboard.

Just trying to understand all the moving parts here.

I would like to read up on this more if you have any good book recommendations. I have subscriptions to Safari Books Online (OReilly) and CBT Nuggets.

I realize you have to invoke the POSH command to get the index.html refreshed but seems archaic that you would have to run the POSH script any time you logout of the server or that server reboots.

@vcissgroup55
Copy link
Author

This was populated with data prior. Logged off, server rebooted last night. Now I have this....
image1

I did not see anything stating to schedule a process or command line in the documentation.

@vcissgroup55
Copy link
Author

I had to login to the server and manually run POSH then invoke the Start-EUCMonitor ?

Should this not run as a service or be automated or am I just missing something?

image2

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