graylog-labs / cli-dashboard Goto Github PK
View Code? Open in Web Editor NEWA Graylog stream dashboard that runs in your shell.
Home Page: http://www.graylog.org
License: GNU General Public License v3.0
A Graylog stream dashboard that runs in your shell.
Home Page: http://www.graylog.org
License: GNU General Public License v3.0
The errors (such as 404) are displayed over the dashboard; there should be separate window to display them and still being able to use the dashboard.
I don't want to display Alerts and total throughput dashboard. is there a way I can suppress that from dashboard ? or change arrangements of dashboard
Starting graylog-dashboard results in 404's to http://:API_PATH/streams/:stream_id/throughput, which is 404. This needs to be updated to the current stream throughput path, which I cannot find the Graylog API Docs (nor can I find the entry in the Graylog REST API codebase to update it myself). It looks like it should be here: https://github.com/Graylog2/graylog2-server/blob/master/graylog2-server/src/main/java/org/graylog2/rest/resources/streams/StreamResource.java , around line 264, but it is not listed.
14:41:23.879477 IP a.b.c.d.48310 > graylog-api-server.9601: Flags [P.], seq 1:136, ack 1, win 229, options [nop,nop,TS val 351730439 ecr 68026481], length 135
E.....@.@..(.......<..%...'....x...........
.......qGET /api/streams/580524244345491d9a3508cc/throughput HTTP/1.1
host: graylog-api-server:9601
accept: application/json
Connection: close
14:41:23.880730 IP graylog-api-server.9601 > a.b.c.d.48310: Flags [P.], seq 1:265, ack 136, win 235, options [nop,nop,TS val 68026481 ecr 351730439], length 264
E..<.
@.@......<....%......x..(q...."......
...q....HTTP/1.1 404 Not Found
X-Graylog-Node-ID: 4da9e014-b444-4a33-8b03-d797eeadfa4b
Vary: Accept-Encoding
Content-Type: application/json
Date: Mon, 17 Oct 2016 19:41:53 GMT
Connection: close
Content-Length: 50
With Graylog server version 1.3.3, the CLI dashboard reports:
Could not get messages of stream. Error: HTTP 404
Could not get stream throughput. Error: HTTP 404
Could not get alerts of stream. Error: HTTP 404
Could not get total throughput. Error: HTTP 404
Not sure how much the API has changed, maybe just an URL needs to be updated?
When opening a valid stream (I get another error when using an invalid title), I get the following error. The dashboard is not even displayed.
Error: Could not get stream throughput. Bad status code: 404 Not Found [object Object]
at makeRequest.then.catch (/home/xhardy/Programs/node/lib/node_modules/graylog-cli-dashboard/lib/graylog-api.js:77:13)
at tryCatcher (/home/xhardy/Programs/node/lib/node_modules/graylog-cli-dashboard/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/home/xhardy/Programs/node/lib/node_modules/graylog-cli-dashboard/node_modules/bluebird/js/release/promise.js:510:31)
at Promise._settlePromise (/home/xhardy/Programs/node/lib/node_modules/graylog-cli-dashboard/node_modules/bluebird/js/release/promise.js:567:18)
at Promise._settlePromise0 (/home/xhardy/Programs/node/lib/node_modules/graylog-cli-dashboard/node_modules/bluebird/js/release/promise.js:612:10)
at Promise._settlePromises (/home/xhardy/Programs/node/lib/node_modules/graylog-cli-dashboard/node_modules/bluebird/js/release/promise.js:687:18)
at Async._drainQueue (/home/xhardy/Programs/node/lib/node_modules/graylog-cli-dashboard/node_modules/bluebird/js/release/async.js:138:16)
at Async._drainQueues (/home/xhardy/Programs/node/lib/node_modules/graylog-cli-dashboard/node_modules/bluebird/js/release/async.js:148:10)
at Immediate.Async.drainQueues (/home/xhardy/Programs/node/lib/node_modules/graylog-cli-dashboard/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:637:20)
at tryOnImmediate (timers.js:610:5)
at processImmediate [as _immediateCallback] (timers.js:582:5)
There is no guide or reference that I can find for how to setup the output stream for graylog-cli. The example in README.md shows http://serveraddress:port but then in the output configuration on the graylog server it shows the selectable protocols as TCP/TCP+TLS/UDP.
Does anyone know how to configure the outputs?
I've tried running the latest version of cli-dashboard in a Docker container using various versions of node, currently current-buster-slim, which is node 12.10. (I've tried other node in Docker versions back to 6.17 with the same results.)
The dashboard displays just fine, and the graphs seem to update in realtime. However, the message list seems to be stuck on the first few events in the stream, and never updates. For example, it is now 21:25 UTC, but the last message displayed in the widget is from 15:58 UTC. If I check the stream in Graylog, the last message I see is 21:23.
Does anyone have any ideas? My working hypothesis is that this is something to do with changes to the Graylog API.
When running against a stream with not much throughput it randomly stops responding and must be killed hard from another shell.
The latest release 1.1.1 is not installable via npm yet (still on 1.0.0):
https://www.npmjs.com/package/graylog-cli-dashboard
Thanks!
$ graylog-dashboard --server-url http://my.graylogserver.com:1234 --username ***** --password ******
/usr/local/lib/node_modules/graylog-cli-dashboard/graylog-dashboard.js:46
const {argv} = yargs;
Get the above error on run no matter the arguments passed. Installed via NPM on Linux Mint 18.1 using Node v4.2.6
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
FROM node:6
RUN npm install graylog-cli-dashboard -g
ENTRYPOINT ["graylog-dashboard"]
docker run \
--rm \
-it \
myprivatedockerrepository:graylog-cli \
--server-url http://myprivatedevbox:12900 \
--stream-title "si-w2" \
--username user \
--password password
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)
"GET /streams HTTP/1.1" 200 8182 "-" "-"
"GET /system/metrics/org.graylog2.plugin.streams.Stream.5891bf7595186c0001612671.incomingMessages.1-sec-rate HTTP/1.1" 404 152 "-" "-"
"GET /streams/5891bf7595186c0001612671/alerts/check HTTP/1.1" 200 77 "-" "-"
"GET /search/universal/relative?query=%2A&range=86400&fields=timestamp%2Cmessage&filter=streams%3A5891bf7595186c0001612671&limit=50 HTTP/1.1" 499 0 "-" "-"
"GET /system/throughput HTTP/1.1" 499 0 "-" "-"
Note:
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]."
}
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.
It works for me but screen is trashed by 'Could not get stream throughput. Error: HTTP 404' messages coming down from top left corner ?
Does this support Graylog 3.2+?
I'm trying to run this from the CLI on a Ubuntu 18.04.
But i keep getting an error when launching it.
I'm on graylog version 3.0.2+1686930, codename Space Moose
My startup is:
graylog-dashboard -g --api-host 127.0.0.1:9000 --api-protocol http --stream-title "All messages" --username ***** --password *****
And the error message i keep getting is:
Error: Could not get Graylog version. Bad status code: 404 Not Found {"type":"ApiError","message":"HTTP 404 Not Found"}
at makeRequest.then.catch (/usr/local/lib/node_modules/graylog-cli-dashboard/lib/graylog-api.js:111: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:517:31)
at Promise._settlePromise (/usr/local/lib/node_modules/graylog-cli-dashboard/node_modules/bluebird/js/release/promise.js:574:18)
at Promise._settlePromise0 (/usr/local/lib/node_modules/graylog-cli-dashboard/node_modules/bluebird/js/release/promise.js:619:10)
at Promise._settlePromises (/usr/local/lib/node_modules/graylog-cli-dashboard/node_modules/bluebird/js/release/promise.js:695:18)
at _drainQueueStep (/usr/local/lib/node_modules/graylog-cli-dashboard/node_modules/bluebird/js/release/async.js:138:12)
at _drainQueue (/usr/local/lib/node_modules/graylog-cli-dashboard/node_modules/bluebird/js/release/async.js:131:9)
at Async._drainQueues (/usr/local/lib/node_modules/graylog-cli-dashboard/node_modules/bluebird/js/release/async.js:147:5)
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:794:20)
at tryOnImmediate (timers.js:752:5)
at processImmediate [as _immediateCallback] (timers.js:729:5)
Any ideas? :)
Right now the dashboard is just showing no data and you cannot immediately see that you used a not existing stream ID.
Are you having any plan to bring this client to windows ?
att.
https://github.com/Yomguithereal/react-blessed
Project is a bit out of date but if we decide to add more functionality to this project it would be very nice to have some overlap between this & Graylog's components as well as a sane top-down structure.
Storing the password in a file is not secure at all. It would be better to have a prompt on startup (add an option for that) or to use Linux keyring.
On the other hand, the host and the default stream values could also be stored in the configuration file.
Right now we are only showing timestamp
and message
.
any chance this will be fixed so it works with latest graylog, was nice having it running in a terminal window on part of a second screen...
Node version: v7.4.0
Npm version: 4.0.5
When I try to pull our graylog server, I get an error.
The web interface is available at this url: https://server.example.com/streams/#streamID#/
When I try to use the graylog-dashboard, I get this error:
graylog-dashboard --server-url https://server.example.com --stream-title #streamID#
TypeError: Cannot read property 'id' of undefined at storeStreams (/PathToNodeLibrary/lib/node_modules/graylog-cli-dashboard/graylog-dashboard.js:106:31) at PassThroughHandlerContext.finallyHandler (/PathToNodeLibrary/lib/node_modules/graylog-cli-dashboard/node_modules/bluebird/js/release/finally.js:56:23) at PassThroughHandlerContext.tryCatcher (/PathToNodeLibrary/lib/node_modules/graylog-cli-dashboard/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/PathToNodeLibrary/lib/node_modules/graylog-cli-dashboard/node_modules/bluebird/js/release/promise.js:510:31) at Promise._settlePromise (/PathToNodeLibrary/lib/node_modules/graylog-cli-dashboard/node_modules/bluebird/js/release/promise.js:567:18) at Promise._settlePromise0 (/PathToNodeLibrary/lib/node_modules/graylog-cli-dashboard/node_modules/bluebird/js/release/promise.js:612:10) at Promise._settlePromises (/PathToNodeLibrary/lib/node_modules/graylog-cli-dashboard/node_modules/bluebird/js/release/promise.js:691:18) at Promise._fulfill (/PathToNodeLibrary/lib/node_modules/graylog-cli-dashboard/node_modules/bluebird/js/release/promise.js:636:18) at Promise._settlePromise (/PathToNodeLibrary/lib/node_modules/graylog-cli-dashboard/node_modules/bluebird/js/release/promise.js:580:21) at Promise._settlePromise0 (/PathToNodeLibrary/lib/node_modules/graylog-cli-dashboard/node_modules/bluebird/js/release/promise.js:612:10) at Promise._settlePromises (/PathToNodeLibrary/lib/node_modules/graylog-cli-dashboard/node_modules/bluebird/js/release/promise.js:691:18) at Promise._fulfill (/PathToNodeLibrary/lib/node_modules/graylog-cli-dashboard/node_modules/bluebird/js/release/promise.js:636:18) at Promise._resolveCallback (/PathToNodeLibrary/lib/node_modules/graylog-cli-dashboard/node_modules/bluebird/js/release/promise.js:431:57) at Promise._settlePromiseFromHandler (/PathToNodeLibrary/lib/node_modules/graylog-cli-dashboard/node_modules/bluebird/js/release/promise.js:522:17) at Promise._settlePromise (/PathToNodeLibrary/lib/node_modules/graylog-cli-dashboard/node_modules/bluebird/js/release/promise.js:567:18) ar Promise._settlePromise0 (/PathToNodeLibrary/lib/node_modules/graylog-cli-dashboard/node_modules/bluebird/js/release/promise.js:612:10)
Any idea what I am doing wrong?
I can now see the logs coming through, but I get a repeating message saying "Could not get stream throughput. Error: HTTP 404". Given enough time, this will start to overrun the log window portion.
Hi,
I was trying to run the dashboard as I have seen most of the tickets I've opened are closed/going to be closed. I have installed node v5.9.1 (requirement is > v4.0.0), and I can't start the dashboard (not even --help
).
./node/bin/graylog-dashboard --help
/home/xhardy/Programs/node/lib/node_modules/graylog-cli-dashboard/graylog-dashboard.js:46
const {argv} = yargs;
^
SyntaxError: Unexpected token {
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:387:25)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Function.Module.runMain (module.js:447:10)
at startup (node.js:142:18)
at node.js:939:3
NPM is still on version 0.13.0
can we get it updated to 0.14.0 ?
https://www.npmjs.com/package/graylog-cli-dashboard
Is it possible to use https , seems like it doesnt work
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.