Scenario: Item that returns the exit status of some program
Exit status 0 is fine, that much is certain.
But what about all other possible values? It's often not possible to know all of them – especially with closed source software. Even if they are known, they might still be inefficient to map in Zabbix.
If such an unexpected value appears, spotting it in "Latest data" is not always easy.
Mapping all unmapped values with a distinct value can compensate for that:
0 -> OK
1 -> Some error
2 -> Yet another error
Rest -> Unspecified problem
Mappings are limited to only map numbers by 2 means: While database and PHP functions would allow for it, JS validation and PHP validation hinder it.
The included patch removes these limitations. Theoretically, you could map strings to strings by that. I don't know what the background is to not allow that now.
To implement the desired mapping, "Rest" is used as hard-coded keyword. The value for "Rest" is used in all cases where a mapping exists for an item, but no match is found.