Skip to content

Commit

Permalink
Merge pull request #9 from JoeBmc/master
Browse files Browse the repository at this point in the history
Update to make the plugin only work on meter version 4.5 and above.
  • Loading branch information
gokumar authored Nov 29, 2016
2 parents d878add + 18e752e commit 0ef1eb0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Tracks Apache Storm metrics by polling the Storm UI Rest API.

* This plugin is compatible with Apache Storm 0.9.3 or later.

#### Boundary Meter versions v4.2 or later
#### Boundary Meter versions v4.5 or later

- To install new meter go to Settings->Installation or [see instructions](https://help.boundary.com/hc/en-us/sections/200634331-Installation).
- To upgrade the meter to the latest version - [see instructions](https://help.boundary.com/hc/en-us/articles/201573102-Upgrading-the-Boundary-Meter).
Expand Down
2 changes: 1 addition & 1 deletion init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ local function createOptions(config)
options.port = config.port
options.auth = auth(config.username, config.password)
options.path = '/api/v1'
options.wait_for_end = false
options.wait_for_end = true
return options
end

Expand Down
8 changes: 4 additions & 4 deletions modules/framework.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1054,7 +1054,7 @@ function NetDataSource:connect(callback)
assert(notEmpty(self.port), 'You must specify a port to connect to.')
assert(notEmpty(self.host), 'You must specify a host to connect to.')
self.socket = net.createConnection(self.port, self.host, callback)
self.socket:on('error', function (err) self:emit('error', 'Socket error: ' .. err.message) end)
self.socket:on('error', function (err) self:emit('error', 'Socket error: ' .. err) end)
end

framework.NetDataSource = NetDataSource
Expand Down Expand Up @@ -1198,7 +1198,7 @@ function Plugin:error(err)
else
msg = tostring(err)
end
local source = err.source or self.source
local source = self.source
self:printError(self.source .. ' Error', self.source, source, msg)
end

Expand Down Expand Up @@ -1464,8 +1464,8 @@ function WebRequestDataSource:fetch(context, callback, params)
end

req:propagate('error', self, function (err)
err.context = self
err.params = params
--err.context = self
--err.params = params
return err
end)
req:done()
Expand Down
7 changes: 3 additions & 4 deletions plugin.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{
"name" : "TrueSight Pulse Storm",
"version" : "0.9.2",
"meterVersionRequired" : "4.2.0-611",
"meterVersionRequired" : "4.5.0-778",
"unsupportedPlatforms" : [ ],
"tags" : "storm",
"description": "Displays metrics from a Storm cluster",
"command_lua" : "boundary-meter init.lua",
"description": "Displays metrics from a Storm cluster",
"postExtract_lua" : "",
"command": "boundary-meter init.lua",
"command": "truesight-luvit init.lua",
"postExtract": "",
"ignore": "",
"icon": "icon.png",
Expand Down

0 comments on commit 0ef1eb0

Please sign in to comment.