Hi all
I've recently tried to create my first customer plugin using a Powershell script. However, I just cannot get the plugin to register.
The PluginRegisterLog.log file shows the plugin being picked up and displays the JSON output from the script OK. The next statement in the log file is :
"04/11/2016 09:49:52 Script output for SyncVehicleData is {"message":"Connection could not be established","availability":"0","data":{}}"
A colleague has created 2 very similar plugins which have registered OK and work within Site24x7 without issue. My plugin is almost a carbon copy of the others - just different data returned.
I logged a support ticket last week (##258260##) but the only response I've had so far is "I have forwarded yo request to my developmenet team, will get back to you with an update shortly" on 25/10.
The JSON output is
04/11/2016 09:49:52 Script Output {"version" : "1" , "data" : {"CheckDescription":Intranet to Web - Vehicles,"BacklogInMinutes":0,"TotalBacklogItems":0}, "heartbeat" : "True", "displayname" :
"Sync Check (Vehicle Data)"}
Does any one have any idea what the error message means : "Connection could not be established". Connection to what? I'd be grateful for any tips.
Thanks
Sonja
Thanks so much for the reply, Muralikrishnan.
I added double quotes as suggested and the JSON is now valid (). However, I still get the same error message, even after restarting the Plugin Agent. Please find below the log file output from the point of restarting the agent.
As you can see, I still get the message 'Connection could not be established'. Any further tips would be appreciated - thanks!
08/11/2016 09:07:25 PLUGIN REGISTER LOGGING STOPED
08/11/2016 09:07:25 DataCollection RegisterPlugin ......System.Threading.ThreadAbortException: Thread was being aborted.
at System.Threading.Thread.SleepInternal(Int32 millisecondsTimeout)
at Site24x7PluginAgent.DataCollection.RegisterPlugin()
08/11/2016 09:07:27 PLUGIN REGISTER LOGGING STARTED
08/11/2016 09:07:27 GetPlugiDetailsElement Monitor Name:SyncVehicleData
08/11/2016 09:07:27 status:2
08/11/2016 09:07:27 GetPlugiDetailsElement Monitor Name:SyncVehicleData
08/11/2016 09:07:27 status:2
08/11/2016 09:07:27 Register Plugin SyncVehicleData
08/11/2016 09:07:27 Script Output {"version" : "1" , "data" : {"CheckDescription":"Intranet to Web - Vehicles","O
ldestEvent":2016-11-08T09:03:12.630,"BacklogInMinutes":4,"TotalBacklogItems":65
3}, "heartbeat" : "True", "displayname" : "Sync Check (Vehicle Data)"}
08/11/2016 09:07:27 Script output for SyncVehicleData is {"message":"Connection could not be established","availability":"0","data":{}}
08/11/2016 09:07:27 Util GetFileNameReg FileName is C:\Program Files (x86)\Site24x7\WinAgent\monitoring\bin\PluginRegister\SyncVehicleData.txt
08/11/2016 09:07:27 Util writeToFileReg Successfully written to C:\Program Files (x86)\Site24x7\WinAgent\monitoring\bin\PluginRegister\SyncVehicleData.txt
08/11/2016 09:07:27 Util writeToFileReg {"message":"Connection could not be established","availability":"0","data":{}}
Thanks again. I did validate the JSON several times but not the version I sent to you last time (with the date time string).
Depending on the output from my plugin script, that setting is occasionally null and is excluded from the output. That actually resulted in valid JSON, hence my confusion!
I have now put double quotes around pretty much everything and my plugin has now installed correctly.
Thank you so much for your time and help.