Repository navigation
v1.46 - 2026-12-05
Tool calls can run in Zabbix under the caller's own API token (#74 by @metehan25; off by default; two forks arrived at the same idea independently: @SorianoTech and @rutgers-lcsr), the audit log records MCP tool calls and is no longer empty (first part of #49), the MCP port has a request body limit (reported by Yann Abadie), and the admin portal and the PDF reports went through a complete review: every page and control in a real browser at desktop and phone width, every template against the Vercel Web Interface Guidelines, every report as a rendered PDF. That review found a number of real defects, several of them old; they are listed under Security and Fixed. Every change has tests, and the caller's token was verified against real Zabbix 5.4 to 8.0.
Upgrading
- Nothing to change in
config.toml. A config of v1.45 loads as it is. Three options are new:[server].allow_user_token(false) and[zabbix.<name>].user_token("off"), both off, and[server].audit_tool_calls("writes"). - The audit log gets a row for every MCP tool call that changes something (who, which tool, which server, the outcome; never the arguments). Set
audit_tool_calls = "off"to keep it as it was. The Audit Log page also shows what older installations had rotated away, so entries from months ago may appear. - A request to the MCP port with a body over 4 MiB is refused with 413 (the OAuth sign-in form: 64 KB). With MCP SDK 2.2 or newer
/mcp,/tokenand/registeralready had that limit from the SDK; with SDK 2.0 and 2.1 it is new. Aconfiguration_importof a larger file goes throughsource_file, as before. - The network capacity report prints interface speeds eight times lower than before: they were eight times too high (see Fixed).
report_generatealso reports the real page count, honourscompany, and refuses a host group given by name early. - The portal refuses a few things it used to store because the server could not use them: an upload whose content is not what its name says (a certificate file that holds a private key, an encrypted key, an SVG that declares XML entities or carries scripts), a log file in a directory that does not exist, a mail sender or recipient that is not an address, a token with no Zabbix server selected, an empty report template or one with the name of another. A new portal user is a Viewer unless another role is chosen. Dynamic client registration refuses
javascript:,data:andfile:redirect URIs. - A plain Save of the "MCP Server" or "TLS & Network Security" settings writes the new options with their defaults (
audit_tool_calls = "writes",allow_user_token = false). - Where
/var/log/zabbix-mcpcannot be written, the audit log is nowaudit.lognext to[server].log_file(it could not be written at all before). - If you edited a Zabbix server in the portal whose section had no
read_only/verify_ssllines, look at that section: the save wrote both asfalse(see Fixed).
Security
- The MCP port caps the request body. The portal has done so since v1.42, the MCP port had not: the OAuth sign-in form is served there and was parsed before the credentials were looked at and before the throttle counted the attempt, so one unauthenticated POST of a few hundred megabytes was held in memory. The body is now read up to the limit before the app sees the request, with or without a
Content-Length. Reported by Yann Abadie. - Editing a Zabbix server in the portal could switch writes on and the certificate check off.
read_onlyandverify_sslare on unlessconfig.tomlsays otherwise, but the edit form took them from the file as written: a section without the two lines came up with both boxes empty, and saving any other field then wroteread_only = falseandverify_ssl = false. The form now shows what the server runs with. Sections created in the portal always had both lines and were not affected. - Dynamic client registration accepted a redirect URI with the scheme
javascript:(alsodata:,vbscript:,file:,blob:,about:). Such a registration is refused withinvalid_redirect_uri. Custom application schemes and loopback addresses register as before. - A logo upload was accepted by its file name alone: a text file named
.pngwas stored as the report logo. The content has to be what the name says (PNG, JPEG, GIF, WebP by signature; an SVG has to be an SVG without scripts, event attributes or declared entities). A certificate upload has to be a certificate and not a private key, a key upload a private key that is not encrypted.
Added
-
Tool calls under the caller's own Zabbix user (
[zabbix.<name>].user_token,[server].allow_user_token). An MCP client may send its own Zabbix API token in the headerX-Zabbix-Token; the call then runs in Zabbix as that user, so Zabbix permissions and the Zabbix audit log apply per person instead of to one shared account.- Off twice by default. An administrator first allows it for the installation (Settings - TLS & Network Security - "Caller's Zabbix token"), then chooses a mode per Zabbix server (Zabbix Servers - Edit): Off, Allowed (the caller's token when sent, the shared one otherwise) or Required (calls without it are refused). Until the first step is taken the portal refuses the second and says where it is allowed.
- It only narrows. The MCP token is checked first, as before: scopes, read-only, allowed servers, disabled tools and the rate limit decide whether a call is made at all. The Zabbix token then decides what Zabbix answers.
- A token belongs to the request that brought it: not stored, not logged, not kept for the session. A token Zabbix refuses is an error; the shared token is never tried in its place. With several servers taking one, the header names the server (
production=<token>), so a token is never shown to a Zabbix that did not issue it. - Switching it off for the installation stops it everywhere at once: a server left on Allowed behaves as Off, a server left on Required refuses its tool calls rather than serving them under the shared token.
- HTTP transport only; not with
legacy_auth.graph_renderstill fetches the image with the server's frontend credentials, after asking Zabbix under the caller's token whether the caller may see that graph. Both settings apply without a restart. See README, "Calls under the caller's own Zabbix user".
-
MCP tool calls in the audit log (
[server].audit_tool_calls, first part of #49). The audit log knew only what was done in the portal, so on a server used through MCP all day it stayed nearly empty. A call now leaves a row (actiontool_call): who called, which tool, which Zabbix server, under whose Zabbix identity (shared token or the caller's own), the outcome with the reason of a failure, the duration and the client address. Never the arguments or the answer; the reason of a failure has every argument value that it quoted replaced by[argument]. By default every call of a tool that changes something;"all"adds the reads,"off"switches it off (Settings - MCP Server). Not written over stdio. Applied without a restart.
Fixed
- The Audit Log page was empty on most installations. Three reasons, all addressed: installers before v1.45 had logrotate empty
audit.logevery night, and the page read only that file, so the history sat inaudit.log.1andaudit.log.N.gzwhere nobody saw it (the page and the dashboard's Recent Activity now read the rotated files too); the path was fixed to/var/log/zabbix-mcp, so a user-mode install or a server started by hand could never write it (it now falls back toaudit.lognext to[server].log_file, orZABBIX_MCP_AUDIT_LOG); and tool calls were not recorded at all (see Added). - Duplicating an MCP token, or any error on the create form, reset it to the widest possible token: all scopes, every server, any address, no expiry. The form now comes back with what the token had or what was typed; restoring a saved draft restores the toggles and the scopes too.
- A new portal user became an admin after any error on the form (two roles were selected at once and the browser took the last), and a new user defaulted to Admin. The default is now Viewer.
- "Load more" in the audit log loaded the same first 50 rows again; older entries could not be reached. Its Target and Details were cut off with no way to read them from a keyboard or a touch screen (each row now opens).
- Actions a role may not perform failed silently. Save, Add, Edit and Delete were offered to operators and viewers on pages where only an admin (or an operator) may use them, and the answer was the same page again with the input gone. Those controls are now hidden or disabled for the role, and a request that is refused says which role it needs.
- A report template that could not be saved was reported as saved (the file write failed, the page redirected as usual). A save refused for its content came back as an empty "New Template" whose next save would have created a second template. Both now return to the same template with what was typed and the reason; a successful save is confirmed.
- Test Connection on a server's edit page tested the saved server, so a changed URL still answered "Connected". It now tests what is in the form, or says that it cannot without the credential.
- Reports (looked at as rendered PDFs):
- The backup report printed no period when no label was passed (the title ended in " / ") and, for a month, ran its last day columns off the page. It is landscape now, with columns of equal width, the period, and a legend for its marks; a period over a month gets two-line day labels, and one over two months is cut into several tables.
- A custom copy of the "showcase" template used for any report type but availability failed to render. Each section now appears when its data is there.
- 99.996 % was printed as "100.00%".
- Interface speeds in the network capacity report were eight times too high: the interface items of the Zabbix templates are bits per second already, and the report multiplied them by 8 as if they were bytes. Only an item whose units say bytes is multiplied now. Interface names no longer carry the quotes of the item key.
- A report over a large host group could not be generated with the default rate limit: every Zabbix call it made was counted against the caller (a group of about 50 hosts makes more than 300), and the caller got "Report generation failed". A report is one call for the limit now; hitting the limit, a host group given by name instead of id, or a server that takes only the caller's own Zabbix token are each said as such.
- The answer of
report_generategave a page count estimated from the file size (7 to 10 for a two-page report); it is the real number. - A host or group without data printed a 100 % gauge, an empty table or "0.0%" as if measured; the reports now say that there is no data, and how many hosts are not listed.
- Numbers are right-aligned with equal-width digits, the table header repeats on every page, headings stay with their table, a bar over 100 % stays in its track, long names wrap. The documents have a language and a title, and the footer says "Generated".
- The Page Break block of the editor printed its dashed line and "new page" text into the PDF; the Graph Placeholder block, which nothing ever filled in, is gone from the block list.
- Sorting a table by a date or an address column did nothing or sorted wrongly (dashboard, tokens).
- An operator was offered what an operator may not do with a token: the create form started from every scope, and Duplicate, Revoke, Regenerate and Save were shown on tokens above the role; each ended in a refusal. The form now starts from what the role may hand out and the actions appear only where they work. The same cap applies when an operator edits the scopes of an OAuth client.
- A message with a character outside Latin-1 (a file name, an address) ended in an error page instead of the message.
- The client wizard printed the OAuth addresses under
/mcp(.../mcp/authorize,.../mcp/oauth/login), where nothing answers; they are at the root. Choosing OAuth before choosing a client led to a Bearer result. report_generateignored itscompanyargument: the document kept the configured name.- The CSV export of the audit log ignored the filters on the page and always exported the whole log.
- A page that does not exist sent a signed-in user to the dashboard without a word; it now says which address was not found.
- Signing in to an OAuth client with no scope ticked ended on a page that said to pick a scope but had no form. Allow is disabled until one is ticked, and the message says to go back.
- Saving the AI Template Generation settings failed with "'OutOfOrderTableProxy' object has no attribute 'add'" when the
[admin.users.*]sections did not directly follow[admin]inconfig.toml. - Enabling OAuth with a Public URL that has a path or a query wrote a configuration that no longer loaded. The address is checked first, and no save from that page writes a file the server would not start from.
- A token saved with no Zabbix server selected was stored as "all servers". An empty selection is now refused.
- Uploading a TLS certificate without its key, or the key without the certificate, wrote a configuration the server refuses. The first of the two is stored and both are written when the second arrives.
- An uploaded SVG logo with
&or<in it was stored as broken XML. - An empty report template could be saved, and two templates could carry the same name.
- Revoking an OAuth client reported "0 access tokens and 0 refresh tokens invalidated" although its tokens were invalidated.
- Settings accepted values the server cannot use: a log file in a directory that does not exist, a sender or recipient that is not an address.
- A form submitted after its page had expired answered with raw JSON. It is a page now that says so and links back.
- A Zabbix server that is down stayed on "Checking..." on the Zabbix Servers page. The connection test answered HTTP 500 for a server it could not reach, which the page does not display. It now shows the reason ("Connection refused. Is Zabbix running on this URL?").
- "Apply now", "Restart now" and "Configure" had no button style, and error messages had no background: the classes
btn-warningandtoast-dangerwere used but never defined. - The capacity bar of Active Tasks was invisible (it used colours that do not exist).
- A refused restart lost its reason. When the server would not start from the current
config.toml, or the user was not an administrator, the dialog showed "Failed to send restart signal." and was left without a button. It now shows the reason and a Close button. The "Restart needed" and "Apply config.toml" marks in the header are real buttons and are offered to administrators only; "Apply now" cannot be sent twice. - A
config.tomlthat could not be read logged every administrator out. A syntax error in the file, or a request arriving while an editor was writing it, ended all portal sessions, and after the file was fixed everybody had to sign in again. While the file cannot be read nobody is let in, as before, but the sessions are kept and work again once it loads. - The audit log forgot its sort order when a filter changed or "Load more" was pressed, while the header still showed it. A filtered or sorted view can now be reloaded and linked, and Back and Forward step through the views (the address follows the filters).
- The template editor logged "Plugin gjs-preset-webpage not found" on every load. The bundled
grapesjs-preset-webpage1.0.3 was referred to by the name it had before 1.0, so it was downloaded and never used. The reference and the file are gone; the editor works as it always did, on its own blocks. - A call made with a caller's own session (
user_logout,user_checkAuthentication,userdirectory_testwithauth_sessionid) went out without the browser-like headers every other call carries, so a Zabbix behind a web application firewall refused most of them. - Phone width. OAuth Clients, Settings, the wizard, Zabbix Servers and a server's edit form no longer scroll sideways (hidden help texts counted as page width); the header fits on one line; help texts stay on the screen; the copy buttons of the wizard are visible on a touch screen; Escape closes the menu.
- A click on a help icon inside a checkbox label toggled the checkbox ("Verify the server certificate", "Allow dynamic client registration", the read-only and SSL boxes of a server and the token options).
- Two links to
Settingspointed at an anchor that does not exist, and a link to a setting landed under the page header. - An expired Zabbix API token on the dashboard is marked "Expired" instead of looking like one that expires soon.
- Usage filters no longer reload the page on every change (choosing "From" submitted before "To" was set): there is an Apply button. A long range no longer pushes the chart out of its card.
Changed
- The client wizard shows the
X-Zabbix-Tokenheader to add when a Zabbix server takes the caller's own Zabbix API token, and says so when one requires it. - The template editor no longer loads its font from Google Fonts; the bundled Rubik (SIL Open Font License) is used. Nothing in the portal or in a report is fetched from another host any more.
- Links, success and error text have their own colours per theme, so they meet the contrast minimum on both; the brand colours stay as backgrounds.
Accessibility
- Every form control in the portal has a label a screen reader announces and a click on the label reaches (Settings alone had 41 without one).
- Help texts (the "i" icons) are announced, not only shown on hover; Escape closes one.
- The confirmation dialog and the five other dialogs (delete a token, preview and AI generation of a report template, ...) are dialogs: focus moves in, stays in and returns, Escape closes them; the status is announced.
- The tool chips are one tab stop per group, moved through with the arrow keys (Settings had 93 stops before the Save button).
- Hint text and warning badges meet the contrast minimum in both themes.
- Sortable table headers, the tool and server chips of a token, the template variables panel and the restart marks work from the keyboard; a "Skip to content" link leads past the menu; the current page is marked in the menu.
- Animations stop for
prefers-reduced-motion; warning text is readable in the light theme; error messages stay until dismissed; the light theme no longer flashes dark on load. - The usage chart has a text summary and can be shown as a table.