You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Intermittent error "Could not get stream throughput" 404; api response "I do not have a metric called [org.graylog2.plugin.streams.Stream.5891ca6995186c0001613209.incomingMessages]." #28
Issue: The API call to graylog which gets a stream throughput is sometimes failing, being given a 404 response with the message that there is no such metric. This is unpredictable, sometimes failing for a given stream but sometimes succeeding
Details of setup
running both graylog and cli-dashboard in docker containers, on different hosts
there is an nginx reverse proxy in front of it, listening on port 12900 (this is for the convenience of seeing the api requests, for debugging)
graylog-cli-dashboard is version 1.0.0 (npm install as of 2017-02-02)
graylog-cli-dashboard is running on node v6.9.5 (most recent node v6 build available in docker as of 2017-02-02)
graylog-cli-dashboard is running in a docker container, with the image built using an npm install as of 2017-02-02 with the following Dockerfile:
FROM node:6
RUN npm install graylog-cli-dashboard -g
ENTRYPOINT ["graylog-dashboard"]
graylog-cli-dashboard is invoked with the following docker command:
docker run \
--rm \
-it \
myprivatedockerrepository:graylog-cli \
--server-url http://myprivatedevbox:12900 \
--stream-title "si-w2" \
--username user \
--password password
the name of the repository and the ip address of the dev box have been changed, otherwise this is verbatim; the stream title is correct, and accessible by the configured user account
note that I have deliberately configured graylog so it can be accessed on port 12900, to avoid confusion with the advice given in issue Could not get stream throughput #25.
Expected Results
graylog-cli runs when started
all api requests connect and get a 200 response
the stream's messages are shown
I can switch streams in the UI, with the same successful results
Actual results
(sometimes) graylog-cli runs, and makes a number of successful api calls, before getting a 404 on the call which is trying to get the stream throughput (GET /system/metrics/...) and crashes out.
(sometimes) graylog-cli runs successfully. When I pick a different stream from the UI by double-clicking, it gets a 404 on the call which is trying to get the stream throughput (GET /system/metrics/...) and crashes out.
Error and callstack shown at the command-line:
Error: Could not get stream throughput. Bad status code: 404 Not Found [object Object]
at makeRequest.then.catch (/usr/local/lib/node_modules/graylog-cli-dashboard/lib/graylog-api.js:77:13)
at tryCatcher (/usr/local/lib/node_modules/graylog-cli-dashboard/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/graylog-cli-dashboard/node_modules/bluebird/js/release/promise.js:510:31)
at Promise._settlePromise (/usr/local/lib/node_modules/graylog-cli-dashboard/node_modules/bluebird/js/release/promise.js:567:18)
at Promise._settlePromise0 (/usr/local/lib/node_modules/graylog-cli-dashboard/node_modules/bluebird/js/release/promise.js:612:10)
at Promise._settlePromises (/usr/local/lib/node_modules/graylog-cli-dashboard/node_modules/bluebird/js/release/promise.js:687:18)
at Async._drainQueue (/usr/local/lib/node_modules/graylog-cli-dashboard/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/usr/local/lib/node_modules/graylog-cli-dashboard/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/usr/local/lib/node_modules/graylog-cli-dashboard/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:649:20)
at tryOnImmediate (timers.js:622:5)
at processImmediate [as _immediateCallback] (timers.js:594:5)
nginx log showing the api calls made by cli-dashboard:
The first call (GET /streams) gets a 200 response; this confirms that the server-url configuration is correct and that graylog-cli-dashboard can connect to the graylog api
The second call (GET /system/metrics/... ) fails with a 404
The third call (GET /streams/.../alerts/check) succeeds with a 200
The fourth call (GET search/...) receives a 499 response
The fifth call (GET /system/throughput) also receives a 499 response
Double-checking in the API browser
On the graylog server (http://myprivatedevbox:12900), it is possible to load the api-browser page to examine and try out api calls. The metrics call can be retried here, again getting a 404 response:
{
"type": "ApiError",
"message": "I do not have a metric called [org.graylog2.plugin.streams.Stream.5891bf7595186c0001612671.incomingMessages.1-sec-rate]."
}
Further notes
The problem is semi-intermittent. Most often, if I run graylog-cli-dashboard for the same stream as before, it will fail as before (or succeed as before). No obvious pattern about when and why it changes.
see further screenshots (031694-031696) showing an example of when it starts successfully, but then fails on switching to a different stream, getting the same 404 response and crashing out.
Issue: The API call to graylog which gets a stream throughput is sometimes failing, being given a 404 response with the message that there is no such metric. This is unpredictable, sometimes failing for a given stream but sometimes succeeding
Details of setup
Expected Results
Actual results
Error and callstack shown at the command-line:
nginx log showing the api calls made by cli-dashboard:
Note:
Double-checking in the API browser
On the graylog server (http://myprivatedevbox:12900), it is possible to load the api-browser page to examine and try out api calls. The metrics call can be retried here, again getting a 404 response:

Further notes
The problem is semi-intermittent. Most often, if I run graylog-cli-dashboard for the same stream as before, it will fail as before (or succeed as before). No obvious pattern about when and why it changes.
see further screenshots (031694-031696) showing an example of when it starts successfully, but then fails on switching to a different stream, getting the same 404 response and crashing out.
031694_screenshot
031695_screenshot
031696_screenshot