Closed zachary-trudo closed 8 years ago
@zachary-trudo, thanks for showing me how you ran into this error. I think the current plugin requires a global config and when it's not specified, it gave you this. I'll change it to use task manifest and let you know by the early next week.
@zachary-trudo your problem is indeed that there is no server defined in the config file
time="2016-09-10T08:21:36+02:00" level=debug msg="2016/09/10 08:21:36 Cannot find server in Global Config" _module=plugin-exec io=stderr plugin=snap-plugin-collector-elasticsearch time="2016-09-10T08:21:36+02:00" level=error msg="error in getting metric types" _block=load-plugin _module=control-plugin-mgr error="unexpected EOF" plugin-type=collector
the other problem is that this is not explicitly exposed as an error message from the plugin due to this issue in the snap framework but I have had the issue a few months back when I first tried the elasticsearch collector plugin and when plugins had their own log files
I think that it is wrong to require a plugin to be somehow "configured" at load time, meaning having to specify remote endpoint even though I understand this is a way to retrieve exposed metrics In order to solve your issue, please adapt the example file examples/cfg/snap-config-sample.json in this repository, the use it or merge it into your snapd configuration file and re-launch snapd using the --config es.cfg additional cmd line option. Plugin should load properly after this
HTH
@obourdon, thanks for the confirmation. The metric types are dynamically collected instead of statically hardcoded that's why it needs the config at the load time. As types most likely won't be changed for a giving version, I'll push an enhancement for it today. You all are welcome to review it. thanks.
Problem: Built snap-plugin-collector-elasticsearch from latest commit When attempting to load snap-plugin-collector-elasticsearch into snap with snapctl plugin load I receive the following error:
Environment: