service_status()#
relationalai.app
#service_status()
A procedure that returns the current status of the containers running the RelationalAI (RAI) Native App on Snowpark Container Services (SPCS).
This procedure provides information about whether the RAI Native App is activated or deactivated.
Requires the app_user
application role.
Parameters#
None.
Returns#
Array of JSON objects with the following fields:
Field | Type | Description |
---|---|---|
name | STRING | The name of the service. (Default: 'main' ) |
status | STRING | The status of the service. May be one of:
|
message | STRING | Details about the specific status. |
startTime | STRING | The time when the container started. |
restartCount | NUMBER | The number of times the container has restarted. |
Example#
Use the app.service_status()
procedure to check the status of the RAI service.
If each container’s status is READY
, the service is activated and ready to use:
#CALL relationalai.app.service_status();
/*+----------------------------------------------+
| [ |
| { |
| "message": "Running", |
| "name": "main", |
| "restartCount": 0, |
| "startTime": "2024-10-27T22:10:05Z", |
| "status": "READY" |
| }, |
| { |
| "message": "Running", |
| "name": "registry", |
| "restartCount": 0, |
| "startTime": "2024-10-27T22:10:06Z", |
| "status": "READY" |
| }, |
| { |
| "message": "Running", |
| "name": "otel-collector", |
| "restartCount": 0, |
| "startTime": "2024-10-27T22:10:07Z", |
| "status": "READY" |
| } |
| ] |
+----------------------------------------------+ */