Use related projects regular expressions to extract the data, for example snmptrap

Operation and maintenance monitoring / Zabbix / Ansible automated operation and maintenance / cloud dial test
Prerequisites:
1. Install the zabbix
2. Configure the snmptrap monitored item, and have to return to classify information snmptrap! ! !
3. There are certain basic regular expressions

Add monitored item:
storing information of a device 1. snmptrap returned as follows:
Use related projects regular expressions to extract the data, for example snmptrap

2. Create a new monitor items on the template, the configuration as shown below:
Use related projects regular expressions to extract the data, for example snmptrap

Name: memory usage (can easily write)

Type: related items

Key: storagerate.trap (can easily write)

The main items: the first step must be selected monitor item to see

Information Type: float (FIG. As can be seen from the first type of data is stored occupancy float)

unit:%

(Other important) (ಡ ω ಡ)

After writing these points do not save content! Do not point to save! Do not point to save!

Point process, results in the following figure:
Use related projects regular expressions to extract the data, for example snmptrap

Name: Regular Expressions

Parameters: "(. \ D + \ d +) (\ (\)")

Output: \ 2

Resolution:

The first parenthesis (\ "), retrieves the latest monitoring data items in the first double quotes, double quotes are special characters, so the front is also an escape \

The second bracket (\ d +. \ D +), there is a \ is the escape character, represents an arbitrary character string of numbers are front and rear

Even up to three brackets represent the content of taking two "arbitrary character and a front and rear which are a string of numbers

Output \ 2 outputs data indicating the completion of data taken after the second brackets to take regular

You modify these, you can click a button to save or update.

3. Add the monitoring host and links on this template

4. Wait for the results of the latest data, the results are as follows:
Use related projects regular expressions to extract the data, for example snmptrap

QQ online Zabbix Q group 177,428,068

Guess you like

Origin blog.51cto.com/14010230/2416476