Skip to content

Monitoring source dialog

A monitoring source is one external system the Monitoring window reads: a Zabbix server, a GitLab instance, a Sentry organization, a YouTrack instance, an UptimeRobot account or a Kubernetes cluster. Sources are listed in Settings › Integrations › Monitoring Sources.

Open the dialog from the Monitoring window: + (Add monitoring source) adds a source, the pencil (Edit source) edits the one shown. Settings › Monitoring Sources opens the same dialog.

Where the data goes:

What Where
Source settings (provider, name, URL, sign-in method, login, timeout, TLS, notifications, kubeconfig path and context, CA certificate, Git SSH hosts) monitoring.json in ~/Library/Application Support/pl.kryodesk/
Token, API key or password the encrypted vault, key monitoring:<source id>
A secret chosen with Use Saved Secret… not copied: the source stores the vault key it points at

The provider tiles of a new source

A new source starts with one tile per provider. Arrow keys move between the tiles, Enter picks one. Prometheus is shown as planned and cannot be picked.

Picking a tile sets the sign-in method: Kubernetes starts with kubeconfig context, all others with a token. For UptimeRobot the URL is set to https://api.uptimerobot.com.

The form of a new Zabbix source

Provider row

New source: the chosen provider and Change…, which goes back to the tiles (the typed secret and the test log are cleared). Existing source: a list of providers.

Changing the provider of a saved source does not carry its secret over: the saved secret is bound to the provider, URL, TLS settings, CA, sign-in method and login (see Secret binding).

Name field

Shown in the window title (Monitoring: <name>), the source picker and notifications. Empty: the host name of the URL; for a kubeconfig source the context name; for UptimeRobot UptimeRobot.

URL field and From session

Address of the frontend or API, http:// or https://. Without a scheme, https:// is added. Stored without query and fragment. Refused:

  • another scheme (URL must start with http:// or https://);
  • a login or password in the URL (user:pass@host): use the sign-in fields instead.

What the app appends per provider:

Provider API address built from the URL
Zabbix <URL>/api_jsonrpc.php (JSON-RPC, POST)
GitLab <URL>/api/v4/
Sentry <URL>/api/0/ (kept when the URL already ends with /api/0)
YouTrack <URL>/api/ (kept when the URL already ends with /api)
UptimeRobot https://api.uptimerobot.com/v3/, the field is read-only
Kubernetes (token) <URL>/ (the API server, e.g. https://10.0.0.1:6443)

With http:// the dialog shows Plain HTTP: the token or password and all data travel unencrypted, and the test log repeats it.

From session… fills the URL (and the login, when signing in with a password) from a saved session: https://<host> (IPv6 in brackets; for an S3 session http/https by its TLS setting and the session’s port). An empty Name takes the session’s name. Not offered for GitLab and UptimeRobot.

Sign in with

  • API token: Zabbix 5.4 or newer (Users › API tokens). From Zabbix 7.2 the token goes in the Authorization: Bearer header, before 7.2 in the auth field of each JSON-RPC request. Against Zabbix older than 5.4 the connection stops with Zabbix <version> has no API tokens (added in 5.4): use login and password.
  • Login and password: user.login (field username from 5.4, user before). The session ID from user.login is kept in memory and reused between refreshes; it is dropped when the app locks and when the source changes. A session that has expired is opened again once.

GitLab, Sentry, YouTrack and UptimeRobot sign in with a token only; Kubernetes with a kubeconfig context or a token (below).

Login and password

Zabbix with Login and password only. Required.

Secret field (API token, Password, Access token, Auth token, Permanent token, API key, Bearer token)

Section titled “Secret field (API token, Password, Access token, Auth token, Permanent token, API key, Bearer token)”

API token field

The label follows the provider and sign-in method. The value goes to the vault, never to monitoring.json, logs or the UI. A saved source shows Saved in the Keychain; type to replace: leave it empty to keep the saved secret, type to replace it.

A secret is required for a new source (except a kubeconfig source and a source that uses a saved secret): <name> is required.

Requests that echo the secret back (a proxy, an error page) are masked as *** in the log.

The saved secret is sent only with the settings it was saved with: provider, URL, TLS verification, CA certificate, sign-in method and login (for kubeconfig: file and context). When any of them changes, the dialog shows URL, sign-in method or login changed: enter the <secret> again; the saved one is sent only to the address it was saved for, and Save and Test refuse to use the saved one. This keeps a saved token from going to another server, or to the same one with verification turned off.

Use Saved Secret

Uses a secret that is already in the vault instead of typing one. The list (Saved secret) shows only entries saved for the same host as the URL, by label, never the value:

  • session passwords: SSH (password:user@host:port), RDP, SMB, MySQL, FTP, FTPS;
  • the secret of another monitoring source.

Not offered: key passphrases, CA keys, the app lock, the assistant’s API key, S3 secret keys (they only sign requests). With no entry for the host: No saved secret for this host.

The source keeps the vault key, not a copy; the row then shows the entry’s label and Type Instead. The check is repeated on save and on every read:

  • a session password goes only as a password (Zabbix Login and password), only over HTTPS with certificate verification on, never to a loopback address (localhost, 127.0.0.1, ::1: any local process could listen on a tunnel’s port);
  • another source’s secret: that source has a secret of its own (it does not point at another one and is not a kubeconfig source), signs in the same way, sends to the same host, and both use verified HTTPS with the same CA, or the same scheme, port and TLS settings.

A source whose secret other sources use cannot be moved to another host, connection or sign-in method: other sources use the secret of <name>: …; point them at another secret first. Before Delete, the dialog lists those sources (Sources using this source’s secret stop signing in: …).

Timeout

Seconds for one HTTP request, 3–300 (values outside are clamped on save), default 20. The TCP connect step has its own limit: the timeout, at most 10 s. An exec plugin of a kubeconfig has 120 s (it may open a browser to sign in).

Verify the TLS certificate

On by default. Off: any certificate and host name is accepted.

Warning with verification off

The dialog then shows Without verification anyone on the path can pose as this server (MITM) and read the token or password, and the test log says TLS verification: OFF. Turning it off makes the saved secret unusable until it is entered again (Secret binding).

Zabbix, GitLab, Sentry, YouTrack and UptimeRobot use the macOS certificate store (native TLS); Kubernetes uses rustls with the CA described below.

Redirects are not followed: a 3xx answer is reported as an error with the address it points to (HTTP <status>: the server redirects to <address>, with what to put in the URL).

Zabbix notifications

Mr. Paperclip tells me about news (checked in the background) turns background checks on for this source. For Sentry and Kubernetes the option is Checked in the background for the status bar: the check only counts for the status bar. Not available for YouTrack. What is checked and announced: Notifications.

Field Providers Values Default
Check every all with notifications 30 s, 1 min, 2 min, 5 min, 15 min 1 min
New problems of … and above Zabbix Disaster, High, Average, Warning, Information, Not classified Warning
Also problems suppressed by a maintenance Zabbix on/off off
Also when a branch’s pipeline passes again after a failure GitLab on/off on
Also when a monitor that was down is up again UptimeRobot on/off on

GitLab watches the projects pinned in the GitLab view’s project bar; the dialog lists them (Watched: projects pinned in the GitLab view (…)). They are changed in the view, not here.

Last check of a saved source

A saved source with notifications shows the last background check, refreshed every 5 s while the dialog is open: Last check <time> (<ms> ms): <summary or error> · <n> message(s) since start. Orange when the check failed.

Edit dialog

  • Delete (saved source only): asks Really delete? first. Removes the source from monitoring.json and its own secret from the vault.
  • Copy log: the test log as text, with times.
  • Test: runs the steps below with a live log. Uses the typed secret, or the saved one when the binding still holds. Nothing is saved. A Zabbix session opened only for the test with a typed password is closed with user.logout.
  • Cancel: closes without saving.
  • Save: checks and saves; the secret goes to the vault, the settings to monitoring.json.

Every test log starts with one line of the settings in use (name, API address, sign-in method, TLS verification: on|OFF, timeout) and the DNS step (DNS <host> → <addresses> (<ms> ms), or Host <ip> is an IP address, no DNS lookup). A failed request names the step: DNS, TCP connect, TLS, timeout, reading response or HTTP request, with the whole error chain.

Zabbix test log

Requests of Test, in order:

  1. apiinfo.version (no sign-in): the version decides how the token is sent.
  2. Sign-in: the token, or user.login (password shown as *** in the log).
  3. In parallel: host.get and problem.get with countOutput, item.get and event.get with limit: 1: the reads the dashboard needs.

Result: Test passed in <ms> ms: Zabbix <version>, <n> hosts, <n> open problems visible. When the API user sees no host: The API user sees no hosts: check its user group permissions (host groups).

The API user needs read access to the host groups it should show. The Zabbix dashboard and the assistant’s Zabbix tools only read (*.get).

GitLab source

Git SSH hosts

Hosts of git@<host>:group/project.git remotes that belong to this instance when they differ from the URL’s host (e.g. ssh.gitlab.example.com). Comma- or space-separated, at most 10, letters, digits, . and -, not starting with - or .; stored in lower case. Empty: the URL’s host. Used only to match a project folder’s git remote to this source; the token is never sent there.

Access token and Create Token in GitLab

A personal access token with the read_api scope (role Reporter or higher in the projects). Sent in the PRIVATE-TOKEN header.

Create Token in GitLab… opens <URL>/-/user_settings/personal_access_tokens?name=KryoDesk&scopes=read_api in the browser: the instance’s new personal access token page with the name and scope filled in. Disabled until the URL starts with http:// or https:// and a host.

GitLab test log

  1. GET /api/v4/version: version and revision.
  2. GET /api/v4/user: who the token signs in as; an administrator sees every project of the instance.
  3. GET /api/v4/personal_access_tokens/self: token name, scopes, expiry, last use. Warnings: no read_api or api scope (projects, pipelines and issues would be refused with 403), expired, or expiring within 14 days. On GitLab before 15.5, or for a token that is not a personal/project/group token, the details are skipped with a warning.
  4. GET /api/v4/projects?membership=true&simple=true&per_page=1: number of projects from the X-Total header (Project count unknown when GitLab or a proxy leaves it out).

GitLab notifications

Sentry test log

Auth token: a User Auth Token with org:read, project:read and event:read, sent as Authorization: Bearer. URL: https://sentry.io or a self-hosted instance.

Test: GET /api/0/ (who signs in, token scopes), GET /api/0/organizations/, GET /api/0/organizations/<org>/projects/, then one issue of the last 24 h (…/issues/?limit=1&project=-1&statsPeriod=24h&query=is:unresolved) to prove the issues are readable; the X-Hits header gives the number of unresolved issues.

YouTrack test log

Permanent token: Profile › Account Security › Tokens, scope YouTrack; sent as Authorization: Bearer. Only GET requests are sent.

Test: GET /api/users/me?fields=login,fullName, GET /api/config?fields=version,build, GET /api/admin/projects?…&$top=200&$skip=0 (projects, archived ones counted apart).

UptimeRobot test log

URL is fixed to https://api.uptimerobot.com and read-only: the key is sent only to UptimeRobot’s own API (any other stored address is replaced on save). API key: a read-only key from Integrations › API; sent as Authorization: Bearer. Only GET requests are sent; the app cannot tell a main key from a read-only one, so a read-only key is enough.

Test: GET /v3/user/me (account, plan, monitor limit, SMS credits), GET /v3/monitors?limit=1. A 429 answer is reported as rate limited, with the wait from Retry-After (or X-RateLimit-Reset).

kubeconfig context

  • kubeconfig: path of the kubeconfig file, ~ allowed; empty = ~/.kube/config. Load reads it again; the list also reloads 0.4 s after the path stops changing. Files larger than 16 MiB are refused.
  • Context: the contexts of the file; the file’s current-context is marked (current) and chosen by default. Below it: server, cluster, user, namespace and how the user signs in. Required on save (Choose a kubeconfig context).

Nothing goes to the vault: the credentials are those the context names, read from the file again on every refresh (so tokens refreshed by other tools are picked up):

  • bearer token, inline or tokenFile;
  • client certificate and key, inline data or files;
  • exec plugin (aws eks get-token, gke-gcloud-auth-plugin, kubelogin, …), run as kubectl runs it. A bare command name is looked for in /opt/homebrew/bin, /usr/local/bin, ~/.local/bin, ~/bin, ~/.krew/bin, ~/google-cloud-sdk/bin, ~/.rd/bin, ~/.docker/bin, the Homebrew Google Cloud SDK directories, /usr/bin, /bin, /usr/sbin, /sbin (an app started from Finder has no shell PATH). The returned credential is kept in memory until 60 s before it expires and is wiped when the app locks. A plugin with interactiveMode: Always is refused: sign in once in a terminal. Arguments that look like secrets are masked in the log.

Unsupported context

auth-provider (gcp, azure, oidc), removed from kubectl in 1.26, is not supported; the context is marked unsupported with the exec plugin to switch to.

The URL is not editable here: it shows the context’s server, which is read from the kubeconfig on every request.

URL, CA certificate and token

  • URL: the API server, e.g. https://10.0.0.1:6443.
  • CA certificate: the cluster’s CA in PEM. Only CERTIFICATE blocks are kept; a pasted private key never reaches the file. With a CA, only that CA is trusted (Trusting only the cluster CA: n certificate(s)); empty: the system’s trusted roots.
  • Read-only ServiceAccount (ClusterRole, binding, token): YAML of a kryodesk-readonly ClusterRole (get, list on nodes, namespaces, pods, events, persistentvolumeclaims, deployments, statefulsets, daemonsets, jobs, and metrics.k8s.io nodes and pods), a kryodesk ServiceAccount in kube-system and the binding. Copy YAML copies it. The token: kubectl -n kube-system create token kryodesk --duration=720h (30 days).
  • Bearer token: sent as Authorization: Bearer, kept in the vault.

Kubernetes test log

  1. GET /version: Kubernetes version, platform, build date.
  2. GET /readyz?verbose: API server health and the number of checks passed.
  3. POST /apis/authentication.k8s.io/v1/selfsubjectreviews: the user and groups the credentials sign in as.
  4. One SelfSubjectAccessReview (POST /apis/authorization.k8s.io/v1/selfsubjectaccessreviews) per read the dashboard needs, so nothing is listed yet: list nodes, namespaces, pods and events (all namespaces), deployments, statefulsets, daemonsets, jobs, persistentvolumeclaims, and nodes.metrics.k8s.io / pods.metrics.k8s.io (metrics-server).

Result: Test passed in <ms> ms: every read the dashboard needs is allowed; a refused read is a warning with the reason from the cluster. The dashboard itself only sends GET requests.

Scroll or pinch to zoom · drag to move · double-click to zoom · Esc or click outside to close