| URL | View | Examples | GET | PUT | POST | PATCH | DELETE |
|---|---|---|---|---|---|---|---|
| api/v2/cluster/<fsid>/cli | Cli | Yes | |||||
| api/v2/cluster | Cluster | Example | Yes | ||||
| api/v2/cluster/<pk> | Cluster | Example | Yes | Yes | |||
| api/v2/cluster/<fsid>/config | Config | Example | Yes | ||||
| api/v2/cluster/<fsid>/config/<key> | Config | Example | Yes | ||||
| api/v2/cluster/<fsid>/crush_rule_set | Crush Rule Set | Example | Yes | ||||
| api/v2/cluster/<fsid>/crush_rule | Crush Rule | Example | Yes | ||||
| api/v2/server/<fqdn>/debug_job | Debug Job | Yes | |||||
| api/v2/event | Event | Example | Yes | ||||
| api/v2/cluster/<fsid>/event | Event | Example | Yes | ||||
| api/v2/server/<fqdn>/event | Event | Example | Yes | ||||
| api/v2/info | Info | Example | Yes | ||||
| api/v2/cluster/<fsid>/log | Log Tail | Example | Yes | ||||
| api/v2/server/<fqdn>/log | Log Tail | Example | Yes | ||||
| api/v2/server/<fqdn>/log/<log_path> | Log Tail | Example | Yes | ||||
| api/v2/cluster/<fsid>/mon | Mon | Yes | |||||
| api/v2/cluster/<fsid>/mon/<mon_id> | Mon | Yes | |||||
| api/v2/cluster/<fsid>/mon/<mon_id>/status | Mon | Yes | |||||
| api/v2/cluster/<fsid>/osd_config | Osd Config | Yes | Yes | ||||
| api/v2/cluster/<fsid>/osd | Osd | Example | Yes | ||||
| api/v2/cluster/<fsid>/osd/<osd_id> | Osd | Example | Yes | Yes | |||
| api/v2/cluster/<fsid>/osd /command | Osd | Yes | |||||
| api/v2/cluster/<fsid>/osd/<osd_id>/command | Osd | Yes | |||||
| api/v2/cluster/<fsid>/osd/<osd_id>/command/<command> | Osd | Yes | Yes | ||||
| api/v2/cluster/<fsid>/pool | Pool | Example | Yes | Yes | |||
| api/v2/cluster/<fsid>/pool/<pool_id> | Pool | Example | Yes | Yes | Yes | ||
| api/v2/request/<request_id>/cancel | Request | Yes | |||||
| api/v2/request/<request_id> | Request | Yes | |||||
| api/v2/request | Request | Yes | |||||
| api/v2/cluster/<fsid>/request/<request_id> | Request | Example | Yes | ||||
| api/v2/cluster/<fsid>/request | Request | Example | Yes | ||||
| api/v2/key | Salt Key | Example | Yes | Yes | Yes | ||
| api/v2/key/<minion_id> | Salt Key | Example | Yes | Yes | Yes | ||
| api/v2/cluster/<fsid>/server | Server (within cluster) | Example | Yes | ||||
| api/v2/cluster/<fsid>/server/<fqdn> | Server (within cluster) | Example | Yes | ||||
| api/v2/server | Server | Example | Yes | ||||
| api/v2/server/<fqdn> | Server | Example | Yes | Yes | |||
| api/v2/server/<fqdn>/grains | Server | Example | Yes | ||||
| api/v2/cluster/<fsid>/sync_object | Sync Object | Example | Yes | ||||
| api/v2/cluster/<fsid>/sync_object/<sync_type> | Sync Object | Example | Yes | ||||
| api/v2/user | User | Example | Yes | Yes | |||
| api/v2/user/<pk> | User | Example | Yes | Yes | Yes | Yes | |
| api/v2/grains | Grains | Example | Yes | ||||
| api/v2/auth/login | Login | Example | Yes | Yes | |||
| api/v2/auth/logout | Logout | Yes | Yes |
Access the ceph CLI tool remotely.
To achieve the same result as running “ceph osd dump” at a shell, an API consumer may POST an object in either of the following formats:
{'command': ['osd', 'dump']}
{'command': 'osd dump'}
The response will be a 200 status code if the command executed, regardless of whether it was successful, to check the result of the command itself read the status attribute of the returned data.
The command will be executed on the first available mon server, retrying on subsequent mon servers if no response is received. Due to this retry behaviour, it is possible for the command to be run more than once in rare cases; since most ceph commands are idempotent this is usually not a problem.
| URL | GET | PUT | POST | PATCH | DELETE |
|---|---|---|---|---|---|
| api/v2/cluster/<fsid>/cli | Yes |
| Name | Type | Readonly | Create | Modify | Description |
|---|---|---|---|---|---|
| out | string | False | Standard out | ||
| err | string | False | Standard error | ||
| status | integer | False | Exit code |
A Ceph cluster, uniquely identified by its FSID. All Ceph services such as OSDs and mons are namespaced within a cluster. Servers may host services for more than one cluster, although usually they only hold one.
Note that the name attribute of a Ceph cluster has no uniqueness, code consuming this API should always use the FSID to identify clusters.
Using the DELETE verb on a Ceph cluster will cause the Calamari server to drop its records of the cluster and services within the cluster. However, if the cluster still exists on servers managed by Calamari, it will be immediately redetected: only use DELETE on clusters which really no longer exist.
| URL | GET | PUT | POST | PATCH | DELETE |
|---|---|---|---|---|---|
| api/v2/cluster | Yes | ||||
| api/v2/cluster/<pk> | Yes | Yes |
| Name | Type | Readonly | Create | Modify | Description |
|---|---|---|---|---|---|
| update_time | datetime | False | The time at which the last status update from this cluster was received | ||
| id | field | True | The FSID of the cluster, universally unique | ||
| name | field | True | Human readable cluster name, not a unique identifier |
Configuration settings from a Ceph Cluster.
| URL | GET | PUT | POST | PATCH | DELETE |
|---|---|---|---|---|---|
| api/v2/cluster/<fsid>/config | Yes | ||||
| api/v2/cluster/<fsid>/config/<key> | Yes |
| Name | Type | Readonly | Create | Modify | Description |
|---|---|---|---|---|---|
| key | string | False | Name of the configuration setting | ||
| value | string | False | Current value of the setting, as a string |
A CRUSH rule is used by Ceph to decide where to locate placement groups on OSDs.
| URL | GET | PUT | POST | PATCH | DELETE |
|---|---|---|---|---|---|
| api/v2/cluster/<fsid>/crush_rule_set | Yes |
| Name | Type | Readonly | Create | Modify | Description |
|---|---|---|---|---|---|
| id | integer | False | |||
| rules | field | False |
A CRUSH ruleset is a collection of CRUSH rules which are applied together to a pool.
| URL | GET | PUT | POST | PATCH | DELETE |
|---|---|---|---|---|---|
| api/v2/cluster/<fsid>/crush_rule | Yes |
| Name | Type | Readonly | Create | Modify | Description |
|---|---|---|---|---|---|
| id | integer | False | |||
| name | string | False | Human readable name | ||
| ruleset | integer | False | ID of the CRUSH ruleset of which this rule is a member | ||
| type | string | False | Data redundancy type (one of replicated, erasure) | ||
| min_size | integer | False | If a pool makes more replicas than this number, CRUSH will NOT select this rule | ||
| max_size | integer | False | If a pool makes fewer replicas than this number, CRUSH will NOT select this rule | ||
| steps | field | True | List of operations used to select OSDs | ||
| osd_count | integer | False | Number of OSDs which are used for data placement |
For debugging and automated testing only.
| URL | GET | PUT | POST | PATCH | DELETE |
|---|---|---|---|---|---|
| api/v2/server/<fqdn>/debug_job | Yes |
No field data available
Events generated by Calamari server in response to messages from servers and Ceph clusters. This resource is paginated.
Note that events are not visible synchronously with respect to all other API resources. For example, you might read the OSD map, see an OSD is down, then quickly read the events and find that the event about the OSD going down is not visible yet (though it would appear very soon after).
The severity attribute mainly follows a typical INFO, WARN, ERROR hierarchy. However, we have an additional level between INFO and WARN called RECOVERY. Where something going bad in the system is usually a WARN message, the opposite state transition is usually a RECOVERY message.
This resource supports “more severe than” filtering on the severity attribute. Pass the desired severity threshold as a URL parameter in a GET, such as ?severity=RECOVERY to show everything but INFO.
| URL | GET | PUT | POST | PATCH | DELETE |
|---|---|---|---|---|---|
| api/v2/event | Yes | ||||
| api/v2/cluster/<fsid>/event | Yes | ||||
| api/v2/server/<fqdn>/event | Yes |
| Name | Type | Readonly | Create | Modify | Description |
|---|---|---|---|---|---|
| when | datetime | False | Time at which event was generated | ||
| severity | field | True | One of CRITICAL,ERROR,WARNING,RECOVERY,INFO | ||
| message | string | False | One line human readable description |
Provides metadata about the installation of Calamari server in use
| URL | GET | PUT | POST | PATCH | DELETE |
|---|---|---|---|---|---|
| api/v2/info | Yes |
| Name | Type | Readonly | Create | Modify | Description |
|---|---|---|---|---|---|
| version | string | False | Calamari server version | ||
| license | string | False | Calamari license metadata | ||
| registered | string | False | Calamari registration metadata | ||
| hostname | string | False | Hostname of Calamari server | ||
| fqdn | string | False | Fully qualified domain name of Calamari server | ||
| ipaddr | string | False | IP address of Calamari server | ||
| bootstrap_url | string | False | URL to minion bootstrap script | ||
| bootstrap_rhel | string | False | Minion bootstrap command line for Red Hat systems | ||
| bootstrap_ubuntu | string | False | Minion bootstrap command line for Ubuntu systems |
A primitive remote log viewer.
Logs are retrieved on demand from the Ceph servers, so this resource will return a 503 error if no suitable server is available to get the logs.
GETs take an optional lines parameter for the number of lines to retrieve.
| URL | GET | PUT | POST | PATCH | DELETE |
|---|---|---|---|---|---|
| api/v2/cluster/<fsid>/log | Yes | ||||
| api/v2/server/<fqdn>/log | Yes | ||||
| api/v2/server/<fqdn>/log/<log_path> | Yes |
| Name | Type | Readonly | Create | Modify | Description |
|---|---|---|---|---|---|
| lines | string | False |
Ceph monitor services.
Note that the ID used to retrieve a specific mon using this API resource is the monitor name as opposed to the monitor rank.
The quorum status reported here is based on the last mon status reported by the Ceph cluster, and also the status of each mon daemon queried by Calamari.
For debugging mons which are failing to join the cluster, it may be useful to show users data from the /status sub-url, which returns the “mon_status” output from the daemon.
| URL | GET | PUT | POST | PATCH | DELETE |
|---|---|---|---|---|---|
| api/v2/cluster/<fsid>/mon | Yes | ||||
| api/v2/cluster/<fsid>/mon/<mon_id> | Yes | ||||
| api/v2/cluster/<fsid>/mon/<mon_id>/status | Yes |
| Name | Type | Readonly | Create | Modify | Description |
|---|---|---|---|---|---|
| name | string | False | Human readable name | ||
| rank | integer | False | Unique of the mon within the cluster | ||
| in_quorum | boolean | False | True if the mon is a member of current quorum | ||
| server | string | False | FQDN of server running the OSD | ||
| addr | string | False | IP address of monitor service |
Manage flags in the OsdMap
| URL | GET | PUT | POST | PATCH | DELETE |
|---|---|---|---|---|---|
| api/v2/cluster/<fsid>/osd_config | Yes | Yes |
| Name | Type | Readonly | Create | Modify | Description |
|---|---|---|---|---|---|
| pause | boolean | False | Allowed | Disable IO requests to all OSDs in cluster | |
| noup | boolean | False | Allowed | Prevent OSDs from automatically getting marked as Up by the monitors. This setting is useful for troubleshooting | |
| nodown | boolean | False | Allowed | Prevent OSDs from automatically getting marked as Down by the monitors. This setting is useful for troubleshooting | |
| noout | boolean | False | Allowed | Prevent Down OSDs from being marked as out | |
| noin | boolean | False | Allowed | Prevent OSDs from booting OSDs from being marked as IN. Will cause cluster health to be set to WARNING | |
| nobackfill | boolean | False | Allowed | Disable backfill operations on cluster | |
| norecover | boolean | False | Allowed | Disable replication of Placement Groups | |
| noscrub | boolean | False | Allowed | Disables automatic periodic scrub operations on OSDs. May still be initiated on demand | |
| nodeep-scrub | boolean | False | Allowed | Disables automatic periodic deep scrub operations on OSDs. May still be initiated on demand |
Manage Ceph OSDs.
Apply ceph commands to an OSD by doing a POST with no data to api/v2/cluster/<fsid>/osd/<osd_id>/command/<command> where <command> is one of (“scrub”, “deep-scrub”, “repair”)
e.g. Initiate a scrub on OSD 0 by POSTing {} to api/v2/cluster/<fsid>/osd/0/command/scrub
Filtering is available on this resource:
# Pass a ``pool`` URL parameter set to a pool ID to filter by pool, like this:
/api/v2/cluster/<fsid>/osd?pool=1
# Pass a series of ``id__in[]`` parameters to specify a list of OSD IDs
# that you wish to receive.
/api/v2/cluster/<fsid>/osd?id__in[]=2&id__in[]=3
| URL | GET | PUT | POST | PATCH | DELETE |
|---|---|---|---|---|---|
| api/v2/cluster/<fsid>/osd | Yes | ||||
| api/v2/cluster/<fsid>/osd/<osd_id> | Yes | Yes | |||
| api/v2/cluster/<fsid>/osd /command | Yes | ||||
| api/v2/cluster/<fsid>/osd/<osd_id>/command | Yes | ||||
| api/v2/cluster/<fsid>/osd/<osd_id>/command/<command> | Yes | Yes |
| Name | Type | Readonly | Create | Modify | Description |
|---|---|---|---|---|---|
| uuid | uuid string | True | Globally unique ID for this OSD | ||
| up | boolean | False | Allowed | Whether the OSD is running from the point of view of the rest of the cluster | |
| in | boolean | False | Allowed | Whether the OSD is ‘in’ the set of OSDs which will be used to store data | |
| id | integer | True | ID of this OSD within this cluster | ||
| reweight | float | False | Allowed | CRUSH weight factor | |
| server | string | True | FQDN of server this OSD was last running on | ||
| pools | field | True | List of pool IDs which use this OSD for storage | ||
| valid_commands | string | True | List of commands that can be applied to this OSD | ||
| public_addr | string | True | Public/frontend IP address | ||
| cluster_addr | string | True | Cluster/backend IP address |
Manage Ceph storage pools.
To get the default values which will be used for any fields omitted from a POST, do a GET with the ?defaults argument. The returned pool object will contain all attributes, but those without static defaults will be set to null.
| URL | GET | PUT | POST | PATCH | DELETE |
|---|---|---|---|---|---|
| api/v2/cluster/<fsid>/pool | Yes | Yes | |||
| api/v2/cluster/<fsid>/pool/<pool_id> | Yes | Yes | Yes |
| Name | Type | Readonly | Create | Modify | Description |
|---|---|---|---|---|---|
| name | string | False | Required | Allowed | Human readable name of the pool, maychange over the pools lifetime at user request. |
| id | string | False | Unique numeric ID | ||
| size | integer | False | Allowed | Allowed | Replication factor |
| pg_num | integer | False | Required | Allowed | Number of placement groups in this pool |
| crush_ruleset | integer | False | Allowed | Allowed | CRUSH ruleset in use |
| min_size | integer | False | Allowed | Allowed | Minimum number of replicas required for I/O |
| crash_replay_interval | integer | False | Allowed | Allowed | Number of seconds to allow clients to replay acknowledged, but uncommitted requests |
| pgp_num | integer | False | Allowed | Allowed | Effective number of placement groups to use when calculating data placement |
| hashpspool | boolean | False | Allowed | Allowed | Enable HASHPSPOOL flag |
| full | boolean | False | True if the pool is full | ||
| quota_max_objects | integer | False | Allowed | Allowed | Quota limit on object count (0 is unlimited) |
| quota_max_bytes | integer | False | Allowed | Allowed | Quota limit on usage in bytes (0 is unlimited) |
Calamari server requests, tracking long-running operations on the Calamari server. Some API resources return a 202 ACCEPTED response with a request ID, which you can use with this resource to learn about progress and completion of an operation. This resource is paginated.
May optionally filter by state by passing a ?state=<state> GET parameter, where state is one of ‘complete’, ‘submitted’.
The returned records are ordered by the ‘requested_at’ attribute, in descending order (i.e. the first page of results contains the most recent requests).
To cancel a request while it is running, send an empty POST to request/<request id>/cancel.
| URL | GET | PUT | POST | PATCH | DELETE |
|---|---|---|---|---|---|
| api/v2/request/<request_id>/cancel | Yes | ||||
| api/v2/request/<request_id> | Yes | ||||
| api/v2/request | Yes | ||||
| api/v2/cluster/<fsid>/request/<request_id> | Yes | ||||
| api/v2/cluster/<fsid>/request | Yes |
| Name | Type | Readonly | Create | Modify | Description |
|---|---|---|---|---|---|
| id | string | False | A globally unique ID for this request | ||
| state | string | False | One of ‘complete’, ‘submitted’ | ||
| error | boolean | False | True if the request completed unsuccessfully | ||
| error_message | string | False | Human readable string describing failure if error is True | ||
| headline | string | False | Single sentence human readable description of the request | ||
| status | string | False | Single sentence human readable description of the request’s current activity, if it has more than one stage. May be null. | ||
| requested_at | datetime | False | Time at which the request was received by calamari server | ||
| completed_at | datetime | False | Time at which the request completed, may be null. |
Ceph servers authentication with the Calamari using a key pair. Before Calamari accepts messages from a server, the server’s key must be accepted.
| URL | GET | PUT | POST | PATCH | DELETE |
|---|---|---|---|---|---|
| api/v2/key | Yes | Yes | Yes | ||
| api/v2/key/<minion_id> | Yes | Yes | Yes |
| Name | Type | Readonly | Create | Modify | Description |
|---|---|---|---|---|---|
| id | string | False | The minion ID, usually equal to a host’s FQDN | ||
| status | string | False | Allowed | One of ‘accepted’, ‘rejected’ or ‘pre’ |
View of servers within a particular cluster.
Use the global server view for DELETE operations (there is no concept of deleting a server from a cluster, only deleting all record of it from any/all clusters).
| URL | GET | PUT | POST | PATCH | DELETE |
|---|---|---|---|---|---|
| api/v2/cluster/<fsid>/server | Yes | ||||
| api/v2/cluster/<fsid>/server/<fqdn> | Yes |
| Name | Type | Readonly | Create | Modify | Description |
|---|---|---|---|---|---|
| fqdn | string | False | Fully qualified domain name | ||
| hostname | string | False | Unqualified hostname | ||
| services | field | False | List of Ceph services seenon this server | ||
| frontend_addr | string | False | |||
| backend_addr | string | False | |||
| frontend_iface | string | False | |||
| backend_iface | string | False | |||
| managed | boolean | False | True if this server is under Calamari server’s control, falseif the server’s existence was inferred via Ceph cluster maps. | ||
| last_contact | datetime | False | The time at which this server last communicated with the Calamariserver. This is always null for unmanaged servers | ||
| boot_time | datetime | False | The time at which this server booted. This is always null for unmanaged servers | ||
| ceph_version | string | False | The version of Ceph installed. This is always null for unmanaged servers. |
Servers which are in communication with Calamari server, or which have been inferred from the OSD map. If a server is in communication with the Calamari server then it is considered managed.
If a server is only known via the OSD map, then the FQDN attribute will be set to the hostname. This server is later added as a managed server then the FQDN will be modified to its correct value.
| URL | GET | PUT | POST | PATCH | DELETE |
|---|---|---|---|---|---|
| api/v2/server | Yes | ||||
| api/v2/server/<fqdn> | Yes | Yes | |||
| api/v2/server/<fqdn>/grains | Yes |
| Name | Type | Readonly | Create | Modify | Description |
|---|---|---|---|---|---|
| fqdn | string | False | Fully qualified domain name | ||
| hostname | string | False | Unqualified hostname | ||
| managed | boolean | False | True if this server is under Calamari server’s control, falseif the server’s existence was inferred via Ceph cluster maps. | ||
| last_contact | datetime | False | The time at which this server last communicated with the Calamariserver. This is always null for unmanaged servers | ||
| boot_time | datetime | False | The time at which this server booted. This is always null for unmanaged servers | ||
| ceph_version | string | False | The version of Ceph installed. This is always null for unmanaged servers. | ||
| services | field | False | List of Ceph services seenon this server |
These objects are the raw data received by the Calamari server from the Ceph cluster, such as the cluster maps
| URL | GET | PUT | POST | PATCH | DELETE |
|---|---|---|---|---|---|
| api/v2/cluster/<fsid>/sync_object | Yes | ||||
| api/v2/cluster/<fsid>/sync_object/<sync_type> | Yes |
No field data available
The Calamari UI/API user account information.
You may pass ‘me’ as the user ID to refer to the currently logged in user, otherwise the user ID is a numeric ID.
Because all users are superusers, everybody can see each others accounts using this resource. However, users can only modify their own account (i.e. the user being modified must be the user associated with the current login session).
| URL | GET | PUT | POST | PATCH | DELETE |
|---|---|---|---|---|---|
| api/v2/user | Yes | Yes | |||
| api/v2/user/<pk> | Yes | Yes | Yes | Yes |
| Name | Type | Readonly | Create | Modify | Description |
|---|---|---|---|---|---|
| id | integer | True | |||
| username | string | False | Required. 30 characters or fewer. Letters, numbers and @/./+/-/_ characters | ||
| password | string | False | |||
| False |
The salt grains for the host running Calamari server. These are variables from Saltstack that tell us useful properties of the host.
The fields in this resource are passed through verbatim from SaltStack, see the examples for which fields are available.
| URL | GET | PUT | POST | PATCH | DELETE |
|---|---|---|---|---|---|
| api/v2/grains | Yes |
No field data available
This resource is used to authenticate with the REST API by POSTing a message as follows:
{
"username": "<username>",
"password": "<password>"
}
If authentication is successful, 200 is returned, if it is unsuccessful then 401 is returend.
| URL | GET | PUT | POST | PATCH | DELETE |
|---|---|---|---|---|---|
| api/v2/auth/login | Yes | Yes |
No field data available