[ZBX-9168] item key helper & manual differences Created: 2014 Dec 24  Updated: 2017 May 30  Resolved: 2015 Jan 16

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Documentation (D), Frontend (F)
Affects Version/s: None
Fix Version/s: 2.0.15rc1, 2.2.9rc1, 2.4.4rc1, 2.5.0

Type: Incident report Priority: Trivial
Reporter: richlv Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: itemkeyhelper
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

there are some differences between the item key helper and list of the keys in the manual

Manual PHP helper
log[file,<regexp>,<encoding>,<maxlines>,<mode>,<output>] log[file,<pattern>,<encoding>,<maxlines>,<mode>,<output>]
logrt[file_pattern,<regexp>,<encoding>,<maxlines>,<mode>,<output>] logrt[file_format,<pattern>,<encoding>,<maxlines>,<mode>,<output>]
service_state[*] service_state[service]
system.cpu.num[<type>] system.cpu.num
system.localtime[<type>] system.localtime
system.swap.in[<device>,<type>] system.swap.in[<swap>,<type>]
system.swap.out[<device>,<type>] system.swap.out[<swap>,<type>]
system.swap.size[<device>,<type>] system.swap.size[<swap>,<mode>]
vfs.dev.read[<device>,<type>,<mode>] vfs.dev.read[device,<type>,<mode>]
vfs.dev.write[<device>,<type>,<mode>] vfs.dev.write[device,<type>,<mode>]
web.page.regexp[host,<path>,<port>,<regexp>,<length>,<output>] web.page.regexp[host,<path>,<port>,<regexp>,<length>] (passive items only)
  • ordering of net.dns.record and net.dns
  • ordering of net.tcp.service.perf and net.tcp.service


 Comments   
Comment by richlv [ 2014 Dec 25 ]

note that description texts SHOULD NOT BE CHANGED at this time, even when they miss some detail - all of them should be reviewed and updated at once to reduce the amount of work translators have to do

Comment by richlv [ 2014 Dec 25 ]

decisions to be made (updated after discussing with maartinjsh) :

  • log/logrt items - regexp or pattern ? -> regexp
  • logrt - probably file_pattern instead of file_format. maybe even file_regexp ? -> file_regexp
  • ordering - shorter or longer key first ? (probably shortest) -> shortest
  • swap items - device or swap ? swap could be on a file... -> but even swap file sometimes is said to be swap device -> device
  • system.swap.size is the only swap item to use "mode" instead of "type", and that is also different from the manual. seems to be a simple mistake -> should be changed to "type"
  • eventlog - name or logtype ? -> name
Comment by richlv [ 2014 Dec 31 ]

zabbix 1.8 is not supported anymore, so this should be fixed in 2.0 and up (primarily because system.localtime is missing the param completely)

Comment by richlv [ 2014 Dec 31 ]
  • fixed for 2.0 in svn://svn.zabbix.com/branches/dev/ZBX-9168; to minimise changes in this branch, only incorrect item keys were changed
  • fixed for 2.2 in svn://svn.zabbix.com/branches/dev/ZBX-9168-2.2
Comment by Aleksandrs Saveljevs [ 2015 Jan 09 ]

(1) In 2.0 branch, some agent keys are missing in the item helper:

  • agent.hostname
  • net.udp.listen[port]
  • sensor[device,sensor,<mode>]
  • services[<type>,<state>,<exclude>]

asaveljevs Not sure what "incorrect item keys" means. Therefore, listing differences that are still present between 2.0 manual at https://www.zabbix.com/documentation/2.0/manual/config/items/itemtypes/zabbix_agent and https://www.zabbix.com/documentation/2.0/manual/config/items/itemtypes/zabbix_agent/win_keys, and item helper:

Manual PHP helper
log[file,<regexp>,<encoding>,<maxlines>,<mode>] log[file,<pattern>,<encoding>,<maxlines>,<mode>]
logrt[file_regexp,<regexp>,<encoding>,<maxlines>,<mode>] logrt[file_format,<pattern>,<encoding>,<maxlines>,<mode>]
system.swap.in[<device>,<type>] system.swap.in[<swap>,<type>]
system.swap.out[<device>,<type>] system.swap.out[<swap>,<type>]
system.swap.size[<device>,<type>] system.swap.size[<swap>,<mode>]
eventlog[name,<regexp>,<severity>,<source>,<eventid>,<maxlines>,<mode>] eventlog[logtype,<pattern>,<severity>,<source>,<eventid>,<maxlines>,<mode>]
service_state[*] service_state[service]

<richlv> missing item keys added in r51550; only "description" column from the manual was used to keep things simpler for 2.0.

"incorrect item keys" was meant to be keys that don't just use a different word to refer to a specific parameter (like "regexp" vs "pattern"), but keys that omitted the fact that item key had any parameters at all, for example.

from the above list, all of the differences seem to be in how item key parameters are denoted/named - to keep the number of changes to 2.0 low, it is proposed not to modify key parameters for this branch.

RESOLVED

asaveljevs CLOSED

Comment by Aleksandrs Saveljevs [ 2015 Jan 09 ]

(2) Some lines in the 2.0 diff go like this:

-ROW   |7       |system.cpu.num ...
+ROW   |7       |system.cpu.num[<type>] ...

HTML entities should probably be used instead of raw angle brackets:

+ROW   |7       |system.cpu.num[&lt;type&gt;] ...

<richlv> ouch, sorry about that. should be fixed in r51549.
RESOLVED

asaveljevs CLOSED

Comment by richlv [ 2015 Jan 13 ]

(3) in 2.2 branch, the following keys are missing :

  • sensor[device,sensor,<mode>]
  • services[<type>,<state>,<exclude>]

adding these would also add translatable strings, thus it is proposed to postpone this until all item descriptions are unified in item pages (ZBX-8811)

asaveljevs Fixing description for items like "system.swap.size[device,type]", where description still refers to the old "swap" and "mode", will have to be postponed until ZBX-8811, too, it seems. CLOSED.

Comment by richlv [ 2015 Jan 13 ]

(4) asterisk (*) was changed to "service" in service_state key parameters in :

RESOLVED

asaveljevs CLOSED

Comment by richlv [ 2015 Jan 14 ]

merged to 2.0 in r51594, 2.2 in r51599, 2.4 in r51600, trunk in r51604.

Comment by richlv [ 2015 Jan 14 ]

(5) no translation changes

asaveljevs Until r51604, everything is good, but see (7). CLOSED.

<richlv> it was decided not to change anything in (7), still no changed strings, remains CLOSED

Comment by richlv [ 2015 Jan 14 ]

(6) conflicts were resolved when merging to 2.4 (net.tcp.service and net.tcp.service.perf keys) and trunk (net.dns and net.dns.record keys) - a quick check on that would be appreciated

asaveljevs CLOSED

Comment by Aleksandrs Saveljevs [ 2015 Jan 14 ]

(7) In 2.2 and above, descriptions of passive and active versions of net.tcp.service[] differ. Unifying them would remove one translatable string.

<richlv> it was discovered that actually the difference is between agent & simple check descriptions, and those indeed are slightly different -> nothing to change, CLOSED

Generated at Fri Apr 26 17:59:33 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.