[ZBX-10920] regexp included '\t' does not work properly Created: 2016 Jun 20 Updated: 2017 May 30 Resolved: 2016 Jun 20 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Agent (G) |
Affects Version/s: | 3.0.1 |
Fix Version/s: | None |
Type: | Incident report | Priority: | Minor |
Reporter: | Hideto Tange | Assignee: | Unassigned |
Resolution: | Won't fix | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
RHEL 6 |
Issue Links: |
|
Description |
logrt with regexp parameter include '\t' dose not work. logrt["/path/to/logfile", "^[0-9- :]\tERROR"] I expect that Error log only recorded to history_log table. But no log is recorded. |
Comments |
Comment by richlv [ 2016 Jun 20 ] |
zabbix daemons only support posix extended. |
Comment by Aleksandrs Saveljevs [ 2016 Jun 20 ] |
In addition to the above, you are probably missing a quantifier like * or + after [], so closing as "Won't fix". You are welcome to discuss issues like these at https://www.zabbix.org/wiki/Getting_help . |
Comment by Hideto Tange [ 2016 Jun 20 ] |
This "^[0-9- :]\tERROR" is my mistake. When regexp is "^[0-9- :]+.ERROR" (. instead of \t), the log "2016-06-20 10:00:00\tERROR\tError message" |
Comment by Aleksandrs Saveljevs [ 2016 Jun 20 ] |
In your regular expression, there is another mistake: "-" should be either the first or the last symbol in a [] group. You can try the following as a workaround for \t: ^[0-9: -]+\sERROR |
Comment by Hideto Tange [ 2016 Jun 20 ] |
Yes. "-" should be the first or the last. And I try to user \s, it work well as a workaround. |