[ZBXNEXT-1592] "vfs.file.contents" and "vfs.file.regexp" should return an empty value instead of EOF if monitored file is empty etc Created: 2013 Jan 23  Updated: 2013 Nov 21  Resolved: 2013 May 08

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: Agent (G), Documentation (D), Server (S)
Affects Version/s: 2.0.4
Fix Version/s: 2.1.0

Type: Change Request Priority: Major
Reporter: Oleksii Zagorskyi Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: regexps
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates ZBXNEXT-1653 Add an agent item to extract matching... Closed

 Description   

This is follow up from ZBX-6161

Some history:
The "vfs.file.regexp" key was existing in 1.8 and maybe even early.
In that time zabbix server considered a received empty value as something wrong and switched its Item to ZBXNOTSUPPORTED.
Returning text "EOF" as a value in some specific cases was a reasonable approach to prevent item (-> its triggers) became not supported.
I guess it was the most important reason to implement EOF as a possible value.

But starting from server 2.0 we are less restricted.
See chapter "5.3.2.3 Ability to send empty strings"
https://www.zabbix.com/documentation/2.0/manual/introduction/whatsnew200#improved_items

Here is an opinion from several people (experienced, btw) that would be much logically to return an empty value "" instead of "EOF" in those specific cases.
In this way we will be able to distinguish for example text "EOF" as a string in a monitored file.
And this will be more clear and intuitively understandable.

Backward compatibility?
Yes, this is a question.
I personally believe that very-very small count of people could use EOF as value for triggers to process those specific cases.
Maybe even no one in the world uses it
So I think just described change on "whatsnew2[2,4]0" and "upgrade_notes_2[2,4]0" pages will be enough.

This can be addressed for major release only.



 Comments   
Comment by Oleksii Zagorskyi [ 2013 Jan 23 ]

ohh, there are also:

web.page.get[host,<path>,<port>]
web.page.regexp[host,<path>,<port>,<regexp>,<length>]

keys, which can return EOF in the specific cases.

Comment by richlv [ 2013 Jan 24 ]

we return "EOF" for empty files for vfs.file.contents. i'd say that is clearly a bug, not a feature request

Comment by dimir [ 2013 Apr 02 ]

Related issue: ZBXNEXT-1653

Comment by Andris Zeila [ 2013 May 07 ]

The EOF return values were replaced with empty strings while fixing ZBXNEXT-1653

Comment by Oleksii Zagorskyi [ 2013 Nov 21 ]

We forgot to document it -> got an issue ZBX-7418 !

Generated at Fri Apr 19 13:07:20 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.