8 Mértékegység szimbólumok
Áttekintés
Néhány nagy számot kell használni, például a '86400'-t a másodpercek számát egy napon belül, nehéz és hibás. Ez miért használhatunk néhány megfelelő egységszimbólumot (vagy utótagot) az egyszerűsítés érdekében Zabbix trigger kifejezések és elemkulcsok.
A másodpercek számát jelző „86400” helyett egyszerűen beírhatja az „1d” értéket. Az utótagok szorzóként funkcionálnak.
Time suffixes
For time you can use:
- s - seconds (when used, works the same as the raw value)
- m - minutes
- h - hours
- d - days
- w - weeks
- M - months (trend functions only)
- y - years (trend functions only)
Time suffixes support only integer numbers (so '1h' is supported, '1,5h' or '1.5h' are not; use '90m' instead).
Time suffixes are supported in:
- trigger expression constants and function parameters
- constants of calculated item formulas
- parameters of the zabbix[queue,<from>,<to>] internal item
- time period parameter of aggregate calculations
- item configuration ('Update interval', 'Custom intervals', 'History storage period' and 'Trend storage period' fields)
- item prototype configuration ('Update interval', 'Custom intervals', 'History storage period' and 'Trend storage period' fields)
- low-level discovery rule configuration ('Update interval', 'Custom intervals', 'Keep lost resources' fields)
- network discovery configuration ('Update interval' field)
- web scenario configuration ('Update interval', 'Timeout' fields)
- action operation configuration ('Default operation step duration', 'Step duration' fields)
- user profile settings ('Auto-logout', 'Refresh', 'Message timeout' fields)
- graph widget of Monitoring → Dashboard ('Time shift' field)
- Administration → General → Housekeeping (storage period fields)
- Administration → General → Trigger displaying options ('Display OK triggers for', 'On status change triggers blink for' fields)
- Administration → General → Other ('Login blocking interval' field and fields related to communication with Zabbix server)
- Zabbix server
ha_set_failover_delay=delayruntime control option
Memória utótagok
A memóriaméret-utótagok támogatottak:
- trigger kifejezés állandók és a funkció paraméterei
- állandói számított item képleteket
A memória méretéhez használhatja:
- K - kilobájt
- M - megabájt
- G - gigabájt
- T - terabájt
Egyéb felhasználás
Az egység szimbólumokat az adatok ember által olvasható ábrázolására is használják a frontendben.
A Zabbix szerveren és a frontenden is ezek a szimbólumok támogatottak:
- K - kiló
- M - mega
- G - giga
- T - tera
Ha a B, Bps elemértékek megjelennek a frontendben, a 2. alap az alkalmazva (1K = 1024). Ellenkező esetben 10-es alapot használunk (1K = 1000).
Ezenkívül a frontend a következők megjelenítését is támogatja:
- P - peta
- E - pl
- Z - zetta
- Y - yotta
Használati példák
Néhány megfelelő utótag használatával trigger kifejezéseket írhat amelyek könnyebben érthetők és karbantarthatók, például ezek kifejezések:
last(/host/system.uptime[])<86400s
avg(/host/system.cpu.load,600s)<10
last(/host/vm.memory.size[elérhető])<20971520
módosítható erre:
last(/host/system.uptime[])<1d
avg(/host/system.cpu.load,10m)<10
last(/host/vm.memory.size[elérhető])<20M
Preventing unit conversion
By default, specifying a unit for an item results in a multiplier prefix being added - for example, an incoming value '2048' with unit 'B' would be displayed as '2KB' by the frontend (for more details, see Units in item configuration).
To prevent a unit from conversion, use the ! prefix, for example,
!B. To better understand how the conversion works with and without the
exclamation mark, see the following examples of values and units:
1024 !B → 1024 B
1024 B → 1 KB
61 !s → 61 s
61 s → 1m 1s
0 !uptime → 0 uptime
0 uptime → 00:00:00
0 !! → 0 !
0 ! → 0
Before Zabbix 4.0, there was a hardcoded unit stoplist
consisting of ms, rpm, RPM, %. This stoplist has been
deprecated, thus the correct way to prevent converting such units is
!ms, !rpm, !RPM, !%.