January 2019
Intermediate to advanced
798 pages
20h 33m
English
Value maps couldn't be controlled via the API before Zabbix 3.0. They were needed for many templates, though, and people resorted to SQL scripts or even manually created value maps with hundreds of entries. That's dedication. Since Zabbix 3.0, things are much easier, and now, value maps are supported both in the API and XML import/export. Let's create a small value map:
$ json='{"jsonrpc":"2.0","method":"valuemap.create","params":{"name":"Mapping things","mappings":[{"value":"this","newvalue":"that"},{"value":"foo","newvalue":"bar"}]},"auth":"df83119ab78bbeb2065049412309f9b4","id":1}'
Run the curl command:
{"jsonrpc":"2.0","result":{"valuemapids":["16"]},"id":1}
If you check the new value map in the frontend, it's a ...
Read now
Unlock full access