====== Vibemosphere Status ====== Watches other Vibecat Tomcats and services (Windows service, systemd, HTTP, TCP) and reports what is up to callers with the role monitoring. ^ Id | ''status'' | ^ Role | ''monitoring'' - needed for the page and the REST API (administrators always may) | ^ Page | **Plugins > Open** (overlay with an X at the top right) or ''/plugins/status/'' | ^ REST | ''/api/plugins/status/...'' and, for callers with the role, ''/plugins/status/...'' | ===== Open the configuration ===== In the administration open **Plugins**, select the row of this plug-in and press **Open**. The page opens in an overlay dialog: close it with the **X** at the top right, with Esc or by clicking outside; //Open in a new tab// next to the title shows it full size. {{vibecat:plugin-status.png?900|Vibemosphere Status: the plug-in page in its overlay dialog}} ===== Step by step ===== - Press **Add a target** and choose the kind: //vibecat// (any HTTP answer from the admin port), //http// (URL and expected status), //service// (a Windows service or systemd unit) or //tcp// (host and port). - Set the check interval, the time-out and **failed checks before down** in the settings block, and optionally a **webhook** that receives every change of state. - Use **Check now**; the table shows state, latency and since when; changes of state are listed below. ===== The page in detail ===== {{vibecat:plugin-status-full.png?900|status: first tab, Overview}} ===== Tabs ===== The page is divided into the tabs **Overview**, **Changes of state**, **Settings**. ==== Changes of state ==== {{vibecat:plugin-status-tab2.png?900|status: tab Changes of state}} ==== Settings ==== {{vibecat:plugin-status-tab3.png?900|status: tab Settings}} ==== Dialog: Add a target ==== {{vibecat:plugin-status-dialog.png?900|Vibemosphere Status: the dialog of "Add a target"}} ===== Fields and columns ===== ^ Label ^ Meaning ^ | Filter | | | Check every (seconds) | | | Time-out of a check (ms) | | | Failed checks before "down" | | | Events kept | | | Webhook (POST of every change of state; empty: none) | | | Id | | | Name | | | Kind | | | Group | | | Tags (comma) | | | URL | | | Accepted HTTP status | | | The answer contains | | | User (HTTP Basic; a Vibecat: lists its plug-ins) | | | Password (kept apart, never shown) | | | Host | | | Port | | | Service name | | | Computer (Windows, empty: this one) | | | State | Column of a table | | Address | Column of a table | | Latency | Column of a table | | Since | Column of a table | | Message | Column of a table | | Service | Column of a table | | Display name | Column of a table | | Time | Column of a table | | From | Column of a table | | To | Column of a table | ===== Actions ===== * **Check now** * **Add a target** * **Find services on this computer** * **Save** * **Test** * **Cancel** ===== Notes from the page ===== * Create a user with the role monitoring on the Users page; the user reads, an administrator changes. Replace host and port by a web port of this Vibecat. ===== Reference ===== Checks the other Vibecat Tomcats and the services a test or a product needs, and tells a remote caller **which of them are up**. A vibecoding agent asks before it runs tests ("is the ELO server up, is the test Vibecat up?") or waits until they are. ==== Targets ==== ^ kind ^ checks ^ | ''vibecat'' | the web or administration port of another Vibecat: any HTTP answer means the Tomcat is up (a Vibecat without web applications answers 404). With a user and password the plug-ins of that Vibecat are read from ''/plugins'', so the state shows how many of them run. | | ''http'' | a URL: accepted status codes (''200-399'', ''200,204'' ...), optional text in the answer, optional HTTP Basic login, optional "accept any TLS certificate" for test systems. | | ''service'' | a Windows service (''sc query'', also on another computer with the right to query it) or a systemd unit (''systemctl is-active''). //Find services on this computer// lists them (filter "vibecat"). | | ''tcp'' | a port that must accept a connection (a database, an ELO Indexserver ...). | This Vibecat is always listed as ''self''. A target has an **id**, a **group** and **tags** (to ask for a part of them), and is **required** (counts for "ready" and the overall state) or optional. A target is **down** after //failed checks before down// checks in a row (2); one lost answer does not flip it. Passwords are kept in ''secrets.json'' of the plug-in data folder and are never given back. ==== Remote use: the role monitoring ==== The plug-in has the role ''monitoring'' (new default role). Create a user with that role on the Users page and call the plug-in on a web port, with HTTP Basic: the user reads, only an administrator changes targets and settings. A call without login gets 401, a user with another role gets 403. ^ call ^ answers ^ | ''GET /plugins/status/summary[?group=&tag=&state=]'' | ''overall'' (''up'' all required are up, ''degraded'' an optional one is down, ''down'' a required one is down, ''unknown'' not checked yet), ''counts'', ''services[]'' (id, name, kind, address, group, tags, state, since, lastCheck, latencyMs, message, details) and ''text'' - one line per service for people and agents. | | ''GET /plugins/status/services[/id]'' | the list, or one service | | ''GET /plugins/status/ready?ids=a,b %%|%% tag= %%|%% group= [&wait=120] [&strict=true]'' | ''{"ready": true%%|%%false, "up": [...], "notUp": [...], "unknownIds": [...]}''. Without ids: all required targets. A target that is not up is checked at once; with ''wait'' (seconds, at most 300) the call waits until everything is up or the time is over. ''strict=true'': HTTP 503 instead of ''ready:false''. | | ''POST /plugins/status/check[?id=]'' | check now (one or all), answers like ''summary'' | | ''GET /plugins/status/events?limit='' | the last changes of state (time, id, from, to, message) | curl -u monitor:secret "http://host:8080/plugins/status/ready?ids=vibecat-test,elo-ix&wait=120" curl -u monitor:secret http://host:8080/plugins/status/summary ==== Notes ==== * The checks start from the computer that runs this Vibecat: a Windows service on another computer needs the right to query it, a port must be reachable from here. * **Webhook:** every change of state is POSTed as JSON (''time, id, name, from, to, message'') to the URL of the settings. * The changes of state are kept in ''events.json'' (the last 200) and shown on the status page of the administration. * The monitor can be switched off on its page; the plug-in then answers ''monitoring: false'' and checks nothing. [[vibecat:plugins:start|All plug-ins]]