Connect Graylog to CloudThinker for read-only log search, cluster and stream inspection, and message count analysis
Connect your Graylog cluster to let Alex (Cloud Infrastructure) and Kai (Kubernetes) check cluster health, list your streams and index sets, search recent messages over a limited time window, and count messages grouped by a field.Graylog authenticates with a REST API access token belonging to a Graylog user. The connection is read-only: the Graylog API can change things, but CloudThinker gives agents no way to reach those endpoints, so they can read your logs and never change anything in Graylog.
A Graylog cluster reachable from CloudThinker over HTTPS.
A least-privilege Graylog user for CloudThinker with the Reader role.
Read access shared on the streams and index sets you want agents to read. The Reader role alone is not enough — see Required permissions.
A REST API access token for that user.
Create a dedicated Graylog user for CloudThinker rather than reusing a person’s account. The token inherits that user’s access, so a dedicated reader keeps the scope visible and revocable in one place.
In Graylog, go to System → Users and Teams and create a user for CloudThinker with the Reader role. Every Graylog user holds either Reader or Admin, and Reader is the read-only baseline.
2
Share the streams and index sets with that user
The Reader role by itself grants no access to your entities — Graylog controls those by sharing. Share each stream and index set CloudThinker should read with the new user at the Viewer access level.Skip this and Graylog returns an empty list of streams instead of an error, which looks like a Graylog with no streams rather than a missing permission.
3
Create a REST API access token
Still in System → Users and Teams, find the user, open the More drop-down, and select Edit tokens. Enter a token name, set the TTL using ISO 8601 duration format, and click Create Token.Copy the token immediately — Graylog does not show it again.
4
Add the connection in CloudThinker
Navigate to Connections → Graylog and enter:
Graylog base URL: your Graylog web/API root, such as https://graylog.example.com:9000
API token: the token you just created
TLS certificate: leave on Verify TLS certificate
Click Connect. CloudThinker reads your cluster status to verify the token and shows a Connected status with the node count it found.
Graylog access tokens expire. The default TTL is 30 days, after which the connection starts failing with a rejected-token error. Set a TTL that matches your rotation schedule, and update the connection with a new token before the old one expires. An administrator can change the default under System → Configurations → Users.
Enter the Graylog web/API root only. Do not append /api, a path, a query string, or credentials — CloudThinker adds /api itself, and rejects a URL that carries anything else.
Graylog web/API base URL, with no /api, path, query, or credentials
https://graylog.example.com:9000
GRAYLOG_API_TOKEN
REST API access token for the read-only Graylog user
—
GRAYLOG_VERIFY_SSL
Whether to verify the Graylog TLS certificate
true
GRAYLOG_URL must use https. The token is sent with every request, so plain http is accepted only when Graylog runs on the same machine as CloudThinker.
The token needs read access, and Graylog splits that across two layers:
Layer
What to grant
Why
Role
The Reader role on the CloudThinker user
Graylog’s read-only baseline. Every user holds either Reader or Admin, and new users get Reader by default
Entity sharing
Each stream and index set shared at Viewer
Graylog controls individual entities by sharing. With no entities shared, a Reader has no access to Graylog resources
The Reader role on its own is the most common misconfiguration. Graylog returns an empty list of streams and a success code rather than a 403, so the connection tests as Connected while agents report that no streams exist. If discovery shows no streams on a cluster that has them, share the streams and index sets with the token’s user.
No Graylog permission beyond read is ever needed. CloudThinker exposes no Graylog write action, so nothing here is approval-gated — granting write access only widens what a leaked token could do.
@alex search Graylog for 5xx errors from the api-gateway over the last 6 hours@alex count Graylog messages by source over the last 24 hours and #report anything that stopped sending@kai check Graylog for errors from the payments pods in the last hour and #recommend a next step
Searches and counts are bounded so a broad question cannot pull your whole cluster: the time window reaches back at most 30 days, and results return at most 100 rows or groups. Agents tell you which time window and limit they used, and say when a result was cut short instead of presenting it as a total. Narrow the query or the time window when you need an exact count.
The token expired, was revoked, or was copied incompletely. Graylog tokens expire at their TTL, which defaults to 30 days. Create a new token under System → Users and Teams → More → Edit tokens and update the connection.
The token cannot read the cluster status
The token is valid but its Graylog user lacks the read role. Give the user the Reader role, then test the connection again.
Discovery reports no streams on a cluster that has streams
The user has the Reader role but no streams shared with it, so Graylog returns an empty page instead of denying the request. Share each stream and index set with that user at Viewer access. An empty list here means the token cannot see those streams, not that Graylog has none.
The Graylog endpoint did not expose /api/cluster
The base URL points at the wrong root or already contains /api. Reconnect with the web/API root only, such as https://graylog.example.com:9000.
Graylog URL must use HTTPS
The base URL is plain http for a host that is not on the CloudThinker machine, which would send the token in clear text. Serve Graylog over HTTPS and reconnect.
TLS verification can be disabled only for a server on this machine
Skip TLS verification is rejected for a remote Graylog. Without verification, the token is sent to whichever server answers, so the connection could report success while talking to the wrong one. Install the issuer of your Graylog certificate as trusted and keep Verify TLS certificate on.
Could not reach the Graylog API
Nothing answered at the base URL. Check the host, the port, and that your firewall or network policy allows CloudThinker to reach the Graylog API.
Graylog rate-limited the request
Graylog, or a proxy or load balancer in front of it, returned HTTP 429. Wait, then run one scoped request again rather than several broad ones.
Results look truncated
The query hit the result limit, or the search timed out before it finished. A search that times out does not tell you how many messages matched — narrow the query, shorten the time window, or group by a more specific field, then ask again.