storm-http

http client for the storm rest-api

Usage no npm install needed!

<script type="module">
  import stormHttp from 'https://cdn.skypack.dev/storm-http';
</script>

README

Storm UI Client Build Status

Http client for the apache storm ui rest api.

installing

npm i storm-http

using

var storm = require('storm-http');

var client = storm.createClient({
  host: 'https://my.storm.cluster',
  username: 'admin',
  password: 'password'
});

client.topologies(function(err, res){
  if(err){
    throw err;
  }

  console.log(res);
});

methods

  • topologies(cb): get the summary of all running topologies
  • topology(id, [timespan], cb): get topology info by id (default timespan all-time)
  • workers(id, cb): get the list of workers for a topology
  • cluster(cb): get the cluster summary
  • clusterConfig(cb): get the cluster configuration
  • component(topologyId, componentId, timespan, cb): get component info from the specified topology (default timespan all-time)
  • supervisor(cb): get the supervisor summary
  • kill(id, [waitTime], cb): kill a topology (default wait-time 30 seconds)
  • rebalance(id, [waitTime], cb): rebalance a topology (default wait-time 30 seconds)
  • activate(id, cb): activate a topology
  • deactivate(id, cb): deactivate a topology