Skip to content

Instantly share code, notes, and snippets.

Created January 29, 2020 01:01
What would you like to do?
Find all Graylog output mappings

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment