openbaton / autoscaling-engine

Respository containing the source code of the autoscaling system
Apache License 2.0
5 stars 5 forks source link

Not getting the correct data format required by the autoscaling-engine #27

Closed ChrispyTea closed 5 years ago

ChrispyTea commented 5 years ago

Hi, we are trying to autoscale the SIPp network service. The NSD used to deply the network is attached. We are using Open Baton version 5.2.1 and Zabbix version 3.0.22. The autoscaling engine seems to be expecting a Json array but is getting Json object. The logs for the autoscaling engine in ase.log give the following error:

2018-12-11 14:29:43.915 INFO 8755 --- [TaskScheduler-4] o.o.a.core.detection.DetectionEngine : Get monitoring plugin with following parameters: 2018-12-11 14:29:43.923 ERROR 8755 --- [TaskScheduler-4] o.o.a.core.detection.task.DetectionTask : Exception occured while getting measurements -> Expected a com.google.gson.JsonArray but was com.google.gson.JsonObject, Trying again next time...

Your help would be much appreciated. Thanks

SIPpNSD.txt

mpauls commented 5 years ago

It might be that the exception is not caught properly. As the message say: it expects an Array (of measurements) but it get an object (that is an exception). 1st) it might be a problem of credentials or Zabbix itself and 2nd) If you try the latest bootstrap and the latest version of components it shall be fixed and error handling improved. You may give it a try and reopen if necessary.

ChrispyTea commented 5 years ago

I am still getting the same error but the credentials don't seem to be the problem. Inside Zabbix, my instances are automatically getting registered and are being monitored. Initially, I thought that the ASE uses the createThreshold method so I had configured the send_notification script and was trying to add an Action but I was informed that it doesn't use that. I later realised it uses the monitoringPluginCaller and the plugin SDK has already been imported.

Do I need to manually use the methods create PM Job and query PM Job in order to get metrics from the Zabbix plugin? I see examples of how to do this but I am not sure which file to do it in.

Thank you in advance. Tapiwa