At EO Data Center, the operations team already had two solid tools: Zabbix for monitoring and GLPI for tickets and inventory. The tools weren’t the problem. Everything around them was. Each tool had its own accounts and permissions, and a client reporting an outage on a VM had to describe what Zabbix already knew.
With EO Orbit, the goal was easy to state: one sign-in, and data from both tools in one place. This is how we did it.
Zabbix: an API token, not a password
Since version 5.4, Zabbix lets you create API tokens tied to a user, with an expiry date. You no longer call user.login; you send the token with every request. In version 7 it goes in the Authorization: Bearer header.
We created a service user in Zabbix with a read-only role on the cloud’s host groups. Its token is an environment variable of the service and never reaches the browser.
Only one service talks to Zabbix: EO Watch, written in NestJS. It exposes a few HTTP routes for debugging and, more importantly, RabbitMQ message patterns that the gateway consumes (watch.get.hosts, watch.get.problems…). It is read-only by construction: the JSON-RPC client rejects any method that doesn’t end in .get.
const ALLOWED = /^[a-z]+\.get$/;
async call<T>(method: string, params: object): Promise<T> {
if (!ALLOWED.test(method)) throw new ForbiddenException(`${method} is not allowed`);
const res = await this.http.post('/api_jsonrpc.php',
{ jsonrpc: '2.0', method, params, id: Date.now() },
{ headers: { Authorization: `Bearer ${this.token}` } });
if (res.data.error) throw mapZabbixError(res.data.error);
return res.data.result;
}
Zabbix answers with HTTP 200 even when a request fails; the error is in the body. We turn it into a real error (401, 404, 502) before it travels further, otherwise the gateway shows an empty screen and thinks everything is fine.
Each client has a host group in Zabbix. The user never picks the group: the gateway derives it from their session and adds groupids to the request. A client can’t ask for another client’s hosts, even by editing the call.
GLPI: App-Token, user token and session
The GLPI REST API works in two steps. You send an App-Token (one per client application) and a user token to initSession, which returns a Session-Token to attach to every following call.
Opening a session per request is slow and fills the server with useless sessions. So we keep the session in memory, renew it when GLPI answers 401, and call killSession when the service shuts down.
The real gain is in tickets. When a client opens a ticket from a VM in Orbit, the service attaches the machine’s inventory and the last problem Zabbix knows about. The technician no longer has to ask “which machine?” or “since when?”.
One user for three systems
Orbit is the source of truth for identity. Users have no Zabbix account and never sign in to GLPI.
- Zabbix is only read by the service account. Permissions come from the user’s tenant, not from a personal Zabbix account.
- GLPI needs a requester for every ticket. We keep a mapping table between the Orbit user and their GLPI id. On the first ticket, if the user doesn’t exist in GLPI yet, the service creates them through the API with the same e-mail and stores the link. Later tickets are created with
_users_id_requesterset, in the right person’s name.
In practice, disabling an account in Orbit cuts access to everything, since neither tool is ever reached directly. Technicians still use the GLPI interface when they need it.
What I’d keep for the next project
- One dedicated service per external tool. When Zabbix changes a detail of its API, only one service moves.
- Tokens with an expiry date, and a calendar reminder to renew them.
- An allowlist of permitted methods rather than a blocklist.
- Logs that record every call without ever writing a token value.
- Tests that fake JSON-RPC responses, including errors returned with a 200.