Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Zabbix value mapping

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

8-value mapping

Overview

In order to receive a more "human" representation of the value, you can use a value mapping that contains the mapping between the numeric and string representations.

Value mapping can also be used in the front end of the ZABBIX and in alerts sent via email / SMS/jabber, etc.

For example, a monitor item has values'0' and'1' that can be represented in the form of approved reads through value mapping:

'0' ⇒ 'not available'

'1' ⇒ 'available'

Alternatively, the value mapping for a set of backup relationships can be:

'F'→ 'full backup

'D'→ 'differential backup

'I'→ 'incremental backup'

When configuring monitoring items, you can use a set of value mappings to "humanize" the values of monitoring items. To do this, select the name of the pre-defined value mapping scheme in the View values drop-down menu.

Value mapping can be used to replace monitor item information for numeric (unsigned), numeric (floating point) and character types

Value mappings can be exported / imported independently or with the corresponding template or host starting with the ZABBIX3.0 version.

Configuration configuration

To define a value mapping:

Go to: manage → General

Select a value mapping from the drop-down list

Click to create a value map (or click on the name of an existing value map)

Parameters for value mapping:

Parameter description

The name of a set of value mappings that should be unique at that time.

Map a single mapping-a pair of values and string representations.

All asterisk fields need to be filled in.

To add a new mapping pair, press add.

How value mapping works

For example, a predefined Agent monitor item 'Ping to the server (TCP)' uses an existing value map called 'Service state'' to display its value.

On the configuration page of the monitoring item, you can see a reference to this value mapping from the display value field.

After this configuration, the latest → data in the monitoring is displayed with the mapped value "Up" (the original value shown in parentheses).

In the latest data section, the displayed value is as short as 20 symbols, and if value mapping is used, this shortening rule is not applied to the mapped value, but only to the original value (shown in parentheses).

When a notification is received, it is easier to understand by displaying the value in a human-readable form.

If there is no predefined value mapping, you can only see:

In this case, either guess what "1" means, or search the document to find the answer.

The role of value mapping: when we write a script, there are often some return values, such as 0Magne1, Magazine 2, Magazine 3, and so on. We do not know what they mean. We write the meaning of these numbers into the value mapping. When the returned value is 1, the meaning of 1 will be displayed instead of the value "1".

Application of value mapping: define the value mapping first, and then select the corresponding value mapping at the "View value" option when configuring the monitoring item. Just ok.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report