20c/vaping

unknown plugin 'zeromq_probe'

hognik opened this issue · 6 comments

Using examples/distributed_shared_graph/vodka/config.yml

Reports that it cannot find zeromq_probe

$ ~/vaping/pyt3_2/bin/vaping --debug start --home ~/vaping_vodka/
pluginmgr hook.compile(vaping.plugins) init.py:23
pluginmgr hook.namespace vaping.plugins init.py:42
pluginmgr hook.find(vaping.plugins.zeromq_probe, ['/home/username/vaping/pyt3_2/lib/python3.7/site-packages/vaping/plugins']) loader=False init.py:43
pluginmgr match <re.Match object; span=(0, 27), match='vaping.plugins.zeromq_probe'> init.py:52
pluginmgr hook match zeromq_probe init.py:58
pluginmgr checking /home/username/vaping_vodka/plugins/zeromq_probe.py init.py:65
pluginmgr ImportError No module named 'vaping.plugins.zeromq_probe' init.py:200
pluginmgr hook.namespace vaping.plugins init.py:42
pluginmgr hook.find(vaping.plugins.zeromq_probe, ['/home/username/vaping/pyt3_2/lib/python3.7/site-packages/vaping/plugins']) loader=False init.py:43
pluginmgr match <re.Match object; span=(0, 27), match='vaping.plugins.zeromq_probe'> init.py:52
pluginmgr hook match zeromq_probe init.py:58
pluginmgr checking /home/username/vaping_vodka/plugins/zeromq_probe.py init.py:65
pluginmgr ImportError No module named 'vaping.plugins.zeromq_probe' init.py:200
Traceback (most recent call last):
File "/home/username/vaping/pyt3_2/bin/vaping", line 10, in
sys.exit(cli())
File "/home/username/vaping/pyt3_2/lib/python3.7/site-packages/click/core.py", line 1128, in call
return self.main(*args, **kwargs)
File "/home/username/vaping/pyt3_2/lib/python3.7/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/home/username/vaping/pyt3_2/lib/python3.7/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/username/vaping/pyt3_2/lib/python3.7/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/username/vaping/pyt3_2/lib/python3.7/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/home/username/vaping/pyt3_2/lib/python3.7/site-packages/click/decorators.py", line 84, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/home/username/vaping/pyt3_2/lib/python3.7/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/home/username/vaping/pyt3_2/lib/python3.7/site-packages/vaping/cli.py", line 74, in start
daemon = mk_daemon(ctx)
File "/home/username/vaping/pyt3_2/lib/python3.7/site-packages/vaping/cli.py", line 47, in mk_daemon
return vaping.daemon.Vaping(config_dir=ctx.home)
File "/home/username/vaping/pyt3_2/lib/python3.7/site-packages/vaping/daemon.py", line 49, in init
self.validate_config_data(self.config.data)
File "/home/username/vaping/pyt3_2/lib/python3.7/site-packages/confu/config.py", line 58, in data
self.schema, data
File "/home/username/vaping/pyt3_2/lib/python3.7/site-packages/confu/schema/core.py", line 693, in validate
schema.validate(config, errors=errors, warnings=warnings, **kwargs)
File "/home/username/vaping/pyt3_2/lib/python3.7/site-packages/confu/schema/core.py", line 614, in validate
value, path + [key], errors=errors, warnings=warnings
File "/home/username/vaping/pyt3_2/lib/python3.7/site-packages/confu/schema/core.py", line 435, in validate
item, path + [idx], errors=errors, warnings=warnings
File "/home/username/vaping/pyt3_2/lib/python3.7/site-packages/vaping/config/schema.py", line 62, in validate
return self.schema(config).validate(
File "/home/username/vaping/pyt3_2/lib/python3.7/site-packages/vaping/config/schema.py", line 52, in schema
return vaping.plugin.get_plugin_class(config["type"]).ConfigSchema()
File "/home/username/vaping/pyt3_2/lib/python3.7/site-packages/pluginmgr/init.py", line 202, in get_plugin_class
raise ValueError(f"unknown plugin '{typ}'")
ValueError: unknown plugin 'zeromq_probe'

vegu commented

Hi @hognik

Distributed example requires two separate processes and two separate configs. Vaping to collect the data and vodka to render the data.

The vaping process needs to load the vaping config and the vodka process needs to load the vodka config.

In the log you posted it looks like you are starting vaping and targeting the vodka config.

Does that make sense?

vegu commented

Also - if that doesnt help resolve it - can you post what the file structure of ~/vaping_vodka looks like

ok,
the plan was to have two vaping's remotly sending to this central instance.
This central instance config file looks like:
$ cat ~/vaping_vodka/config.yml
idata:

  • type: fping
    handlers:
    • type: index
      index: host
    • type: store
      container: list
      limit: 500

apps:
graphsrv:
enabled: true

# here is where we define host config
groups:
  latency:
    public_dns:
      8.8.8.8:
        name: Google
        color: red
      1.1.1.1:
        name: Cloudflare
        color: blue

graphs:
  multitarget:
    id_field: host
    type: multitarget
    plot_y: avg
    format_y: ms

  smokestack:
    id_field: host
    type: smokestack
    plot_y: avg

plugins:

zero mq probe plugin to vaping-1 instance

(latency name is important, so it can be routed properly to

the similarly named group)

  • name: latency
    type: zeromq_probe
    data: fping
    interval: 1.0
    bind: tcp://127.0.0.1:6021
    async: thread

  • name: http
    type: flask
    bind: 0.0.0.0:6000
    debug: true
    static_url_path: /static
    server: self
    async: thread
    routes:
    /targets : graphsrv->targets
    /graph_data :
    methods:
    - POST
    - GET
    target: graphsrv->graph_data
    /graph : graphsrv->graph_view
    /overview_read_file : graphsrv->overview_read_file
    /: graphsrv->overview_view

logging:
version: 1
formatters:
simple:
format: '%(asctime)s - %(name)s - %(levelname)s: %(message)s'
handlers:
console:
class: logging.StreamHandler
level: DEBUG
formatter: simple
stream: ext://sys.stdout
loggers:
vodka:
level: DEBUG
handlers:
- console

vegu commented

The "central" instance needs to be a vodka process, not vaping.

vodka being the web-server side of vaping. People mostly commonly use gunicorn or uwsgi to run vodka

gunicorn example

export VODKA_HOME=~/vaping_vodka/
gunicorn -b 0.0.0.0:8080 vodka.runners.wsgi:application

more information at https://vaping.readthedocs.io/en/latest/quickstart/ towards the bottom.

vegu commented

@hognik any luck with this?

vegu commented

Closing issue, please re-open if the issue still persists after trying the above suggestion