Prerequisites
- A Graylog cluster that CloudThinker can reach over HTTPS from the internet, with a certificate from a trusted issuer. If a firewall guards it, or it must stay private, see Reaching private services.
- A Graylog admin who can create users and share streams.
- The streams you want agents to read. Agents see only what you share with the CloudThinker user.
- The Admin role in your CloudThinker workspace, which can add and edit connections. See Roles.
Setup
1
Create a read-only user
In Graylog, go to System → Users and Teams and create a user for CloudThinker, such as
cloudthinker, with the Reader role. A dedicated user keeps CloudThinker’s access visible and easy to revoke.2
Give the user read access to streams and index sets
The Reader role alone grants no access to your logs. For each stream agents should read, go to Streams, click Share on the stream’s row, add the
cloudthinker user with Viewer access, and click Save. Make sure the user can also read the index sets behind those streams.Skip this and the connection still tests as Connected, but agents find no streams. See Required permissions.3
Create an API access token
Still in System → Users and Teams, find the user, open More, and select Edit tokens. Enter a token name, set the TTL as an ISO 8601 duration (for example
P90D for 90 days), and click Create Token. Copy the token now. Graylog doesn’t show it again.4
Add the connection in CloudThinker
Open More → Workspace settings → Connections, select Graylog, and fill in:
- Graylog base URL: your Graylog web/API root, such as
https://graylog.example.com:9000. Don’t add/api. - API token: the token you copied.
- TLS certificate: leave it on Verify TLS certificate.
Graylog read-only connection verified (3 node(s)), counting the nodes it found.Then run the prompt in Verify the connection in a new chat. That’s what proves stream access.Connection details
CloudThinker adds
/api itself and rejects a URL that carries anything beyond the root. The token travels with every request, so:
- The URL must use
https. Plainhttpis refused. - Skip TLS verification is refused. Install a certificate from a trusted issuer instead. There’s no option to upload your own CA certificate.
localhost address, which never applies to a Graylog reached from CloudThinker Cloud.
Required permissions
Graylog splits read access across two layers. You need both.
No write permission is ever needed. The connection’s Allow writes switch ships off, and there’s no reason to turn it on: CloudThinker has no Graylog write action, so extra access only widens what a leaked token could do.
Agent capabilities
Searches and counts default to the last 24 hours and reach back at most 30 days. Results return at most 100 rows or groups, and each request times out after 300 seconds at most. Agents tell you the window and limit they used, and say when a result was cut short.
Verify the connection
Ask CloudThinker in a new chat:Example prompts
Troubleshooting
Graylog rejected the API token (401)
Graylog rejected the API token (401)
The token expired, was revoked, or was copied incompletely. Create a new one under System → Users and Teams → More → Edit tokens and update API token.
The token can't read the cluster status (403)
The token can't read the cluster status (403)
The user is missing the Reader role. Add it, then test the connection again.
Agents find no streams
Agents find no streams
The user has the Reader role but no shared streams, so Graylog returns an empty list. Share each stream with the user at Viewer access and make sure it can read the index sets.
Could not reach the Graylog API, or the endpoint is not Graylog
Could not reach the Graylog API, or the endpoint is not Graylog
The base URL points at the wrong root or already contains It should return JSON with one entry per node. That’s the same call CloudThinker makes.
/api, a proxy answered instead of Graylog, or nothing answered at all. Reconnect with the web/API root only, such as https://graylog.example.com:9000, and check that the host and port are reachable from CloudThinker. To test the URL and token yourself, run:HTTPS required, or TLS verification can't be disabled
HTTPS required, or TLS verification can't be disabled
CloudThinker refuses plain
http and Skip TLS verification for a remote Graylog, because either would expose the token. Serve Graylog over HTTPS with a trusted certificate and keep Verify TLS certificate on.Results look cut short, or Graylog returned 429
Results look cut short, or Graylog returned 429
The query hit the 100-row limit, timed out, or Graylog (or a proxy) rate-limited it. A timed-out search has an unknown match count. Narrow the query, shorten the window, or group by a more specific field.
Security
- Least privilege — grant only the permissions the agents need for your use case; start read-only and widen later.
- Read-only by default — use read-only credentials unless you want agents to make changes through this connection.
- Rotate credentials — rotate keys and tokens on your normal schedule; CloudThinker picks up the new value when you update the connection.
- Revoke on offboarding — remove the credential at the provider when you delete a connection or a teammate leaves.
- Writes don’t apply: CloudThinker has no Graylog write action, so the connection is read-only whatever the token allows. Use the least-privileged user you can, as in Required permissions.
- Share only the streams you want read: stream access, not the role, decides which logs agents see.
- Track the token TTL: an expired token puts the connection in Error until you paste a new one. Rotate it on schedule and update the connection.
Related
Elasticsearch
Connect Elasticsearch indices and clusters.
Resolve overview
Use Graylog logs when CloudThinker investigates an incident.