dbretty / EUCMonitoring

End User Compute Monitoring Platform that is FREE and based on PowerShell. Will cover Citrix, VMware and Microsoft technologies. Driven and written by the community for the community
http://bretty.me.uk
Apache License 2.0
37 stars 19 forks source link

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

Open vcissgroup55 opened 5 years ago

vcissgroup55 commented 5 years ago

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

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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