banshee/storage-collection/storage/truenas/https/api-v2.0/
services
Whether each service of a TrueNAS set to start at boot runs, by its REST API v2.0.
par banshee1 installation1 version
v1Dernière
Publiée le 27 octobre 2026. First version.
Services of a TrueNAS, by its REST API
Returns, for each service of a TrueNAS (SMB, NFS, iSCSI, SSH, UPS, SNMP…), whether it runs, read from the REST API behind an API key. Two watches are offered, each one set on the probe.
Versions
Written for the REST API v2.0, which answers on TrueNAS CORE 12 and 13 and on TrueNAS SCALE up to 25.10, and was removed in TrueNAS 26. Hence the folder api-v2.0.
How it works
One GET https://<host:address>/api/v2.0/service, the key in the header Authorization: Bearer. The API answers a list of services:
[{"service": "cifs", "enable": true, "state": "RUNNING", "pids": [1234]}, {"service": "nfs", "enable": false, "state": "STOPPED", "pids": []}] Each service is named as TrueNAS names it (cifs for SMB, nfs, iscsitarget, ssh, ups, snmp…), and its state is said in one word:
running: it runs;stopped: it is set to start at boot (enable), and does not run;disabled: it is not set to start, and does not run.
The key comes from protocol:http:token, a secret variable: it only goes in the header. The answer is not secret.
Prerequisites
- The web interface of TrueNAS reachable from the poller in HTTPS, on port 443 of the host's address, its certificate trusted by the TLS profile of the probe (a pinned fingerprint in
protocol:http:fingerprint, or the certificate underprotocol:tls:authorities). - An API key in
protocol:http:token, of a user of the read-only administrator role where SCALE has roles.
Outputs
| Name | Label | Unit | Per instance |
|---|---|---|---|
state | State | — | yes, per service |
Watches
| Name | Title | Kind | Defaults | Checked by default |
|---|---|---|---|---|
stopped | Service stopped | state to avoid, on state | critical on stopped | yes |
not-running | Service not running | expected value, on state | warning when the state is anything but running | no: check it with a selection of the services that must run, set to start or not |
Limits
- A service started by hand and not set to start at boot reads
running; one that stops then readsdisabled, and raises only throughnot-running. - Not checked against a TrueNAS: the fields are those of
service.queryin the API documentation of TrueNAS 25.10, which givesRUNNINGandSTOPPEDas its states.