Value mapping is a neat, little feature in Zabbix that allows to see what a numeric code actually means. Well, what did that mean? For example, a UPS device might return “2”, which means “all is OK”, and “3”, which means “battery low”. There will be many different devices with different numeric codes, so remembering what they all mean is nearly impossible. Value mapping will show a human readable description, but the raw value will still follow in the parentheses – for example, Normal (2).
Until Zabbix 2.2, this was only supported for integers. Zabbix 2.2 will allow to configure value mapping also for decimal and string values.
Articles in 2.2 feature series:
- Part 1 – Automatic database upgrading
- Part 2 – Templated web monitoring
- Part 3 – Web scenario retries
- Part 4 – HTTP proxy for web monitoring
- Part 5 – Better value mapping
- Part 6 – Returning values from webpages
- Part 7 – Value extracting from logfiles and more
- Part 8 – Reusing content in web monitoring
- Part 9 – No more full page reload in latest data
- Part 10 – Support of loadable modules
- Part 11 – SNMP monitoring improvements
If we would take a look at the list of value maps, shipped with a recent Zabbix version, we would see that there are quite a lot of them – UPS status, interface status, Windows service state… Zabbix already provides many frequently used value maps.
But it was not possible to create value maps that would map anything but integers – for example, if you had backup job status reported as a single letter, but wanted to expand it to full words like this:
- F → Full
- D → Differential
- I → Incremental
That wouldn’t work:
In 2.2 this will be allowed – value mappings will be possible for decimal and character values. Note that value mapping for text or log data types will not be available.
A minor detail – the numeric codes usually were quite short, but mapping from character values could potentially result in mapped and original string exceeding length limit in Monitoring → Latest data page, where the displayed values are shortened to 20 symbols. If value mapping is used, this shortening is not applied to the mapped value, but only to the raw value separately (displayed in parenthesis).
Of course, for further information on value mapping see the Zabbix manual.