Metadata
List of all available metadata keys in Smart.
Smart Metadata Keys
Smart uses metadata keys to store and retrieve various types of information related to families. Here is a list of commonly used metadata keys in Smart:
smart.memory: How much memory a server in x family uses.
Working with Metadata
The default ruty metadata string looks like this:
"metadata": "{\"softCap\": 30, \"hardCap\": 40}"{
"softCap": 30,
"hardCap": 40,
}To set a metadata key for a family, you can write it in json and then add it to the metadata string. For example, to set the smart.memory key to 2048 for a family, you would do the following:
"metadata": "{\"softCap\": 30, \"hardCap\": 40, \"smart\": {\"memory\": 2048}}"{
"softCap": 30,
"hardCap": 40,
"smart": {
"memory": 2048
}
}Providers Metadata Keys
Providers may also use metadata keys to store and retrieve information related to their own configuration.
These keys are specific to each provider and are documented in the provider's documentation.
They are usually store in an object with the provider id as key inside the smart field.
Here is an example with the pterodactyl provider:
"metadata": "{\"softCap\": 30, \"hardCap\": 40, \"smart\": {\"memory\": 2048, \"pterodactyl\": {\"disk\": 10240, \"cpu\": 100, \"swap\": 512, \"io\": 500, \"databases\": 2, \"allocations\": 1, \"backups\": 1, \"egg\": 123, \"user\": 456, \"allocation_default\": 789}}}"{
"softCap": 30,
"hardCap": 40,
"smart": {
"memory": 2048,
"pterodactyl": {
"disk": 10240,
"cpu": 100,
"swap": 512,
"io": 500,
"databases": 2,
"allocations": 1,
"backups": 1,
"egg": 123,
"user": 456,
"allocation_default": 789
}
}
}