Skip to content

Instantly share code, notes, and snippets.

@wrossmann
Created January 29, 2020 01:01
Show Gist options
  • Select an option

  • Save wrossmann/875c4018a81f084fa90497dd67f945c8 to your computer and use it in GitHub Desktop.

Select an option

Save wrossmann/875c4018a81f084fa90497dd67f945c8 to your computer and use it in GitHub Desktop.

Revisions

  1. wrossmann created this gist Jan 29, 2020.
    19 changes: 19 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    There doesn't seem to be a UI function for this, so if you're stuck up a creek like I am.

    ```
    curl -s \
    -H "Authorization: Basic $(echo -n 'username:password' | base64)" \
    http://graylog-server:9000/api/streams \
    | jq '
    .streams[] |
    select(.outputs | length > 0) |
    {
    id: .id,
    title: .title,
    outputs: [(
    .outputs[] | {id: .id, title: .title}
    )]
    }'
    ```

    You'll end up with a minimal JSON doc with the names and IDs of all the streams, and all the outputs mapped to them.