vsoch / watchme

Reproducible watchers for research
https://vsoch.github.io/watchme/
Mozilla Public License 2.0
878 stars 32 forks source link

explore idea of a prometheus watcher #38

Open vsoch opened 5 years ago

vsoch commented 5 years ago

We are discussing the addition of exporters in #32, but it seems redundant (a watcher is very similar to an exporter) and like it might be adding a lot of bloat to the code base. But instead, couldn't we achieve the same thing by having a pushgateway watcher? For example, to create the watcher, the user might specify another watcher / one or more tasks to push to the gateway:

$ watchme create pusher
$ watchme add-task pusher task-pushgateway --type pushgateway watcher@results-watcher tasks@task-hpc-job --func `push_all_func`

The above would say "use the pushgateway watcher, task function push_all_func to find any result files in watcher "results-watcher" and task "task-hpc-job" and push them to the gateway. The customization of watcher / tasks / data files would allow the user to select what data to push, and in what format.

Then for using, it would be a matter of running the tasks in serial:

$ watchme run task-hpc-job
$ watchme run pusher

Or something along those lines :)