Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in 中文论坛 only
Search
Advanced Search
Forums
New Topics
Today's Posts
Home
Forum
Zabbix in Your Language
中文论坛
If this is your first visit, be sure to check out the
FAQ
by clicking the link above. You may have to
REGISTER
before you can post. To start viewing messages, select the forum that you want to visit from the selection below.
Ad Widget
Collapse
监控目录下的所有日志文件。
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
abababab
Junior Member
Joined:
Sep 2018
Posts:
8
#1
监控目录下的所有日志文件。
25-10-2018, 04:18
logrt[“/opt/apache-tomcat-/logs/catalina*”]
这样写值,都提示错误
Cannot compile a regular expression describing filename pattern
zsj2002
Junior Member
Joined:
Dec 2018
Posts:
5
#2
19-12-2018, 07:31
正則表達中* 号代表字符可以不出现,也可以出现一次或者多次(0次、或1次、或多次)。你把*去掉估計就可以了
Comment
Post
Cancel
yanyi
Junior Member
Joined:
Aug 2019
Posts:
3
#3
25-08-2019, 08:47
这样写是不是只能精确到某个日志文件了,
Comment
Post
Cancel
lakeland
Junior Member
Joined:
Nov 2019
Posts:
12
#4
06-12-2019, 19:14
你这是混淆了通配符和正则式啊,你这个式子意思是匹配catalin catalina catalinaaaaaa 这样的
正确的写法应该是catalina.*,"."匹配任意字符,"*"匹配 0 个或多个前面指定类型的字符,建议深入了解一下zabbix支持的PCRE正则式
但是这样也不太好,catalina有log error之类的 最好指定后缀为catalina.*log避免监控没用的或者重复的日志,如果有cronolog,写法也 不一样
Comment
Post
Cancel
happytroyboy
Junior Member
Joined:
Jul 2017
Posts:
11
#5
23-12-2019, 05:30
楼上正解
推荐个在线调试的网站
regex101: build, test, and debug regex
https://regex101.com/
Regular expression tester with syntax highlighting, explanation, cheat sheet for PHP/PCRE, Python, GO, JavaScript, Java, C#/.NET, Rust.
使用的时候注意取消掉所有的REGEX FLAGS
Comment
Post
Cancel
abababab
Junior Member
Joined:
Sep 2018
Posts:
8
#6
09-07-2020, 16:05
Originally posted by
lakeland
你这是混淆了通配符和正则式啊,你这个式子意思是匹配catalin catalina catalinaaaaaa 这样的
正确的写法应该是catalina.*,"."匹配任意字符,"*"匹配 0 个或多个前面指定类型的字符,建议深入了解一下zabbix支持的PCRE正则式
但是这样也不太好,catalina有log error之类的 最好指定后缀为catalina.*log避免监控没用的或者重复的日志,如果有cronolog,写法也 不一样
确实有点搞不清楚,混淆了。。。
谢谢!
Comment
Post
Cancel
abababab
Junior Member
Joined:
Sep 2018
Posts:
8
#7
09-07-2020, 16:06
Originally posted by
happytroyboy
楼上正解
推荐个在线调试的网站
regex101: build, test, and debug regex
https://regex101.com/
Regular expression tester with syntax highlighting, explanation, cheat sheet for PHP/PCRE, Python, GO, JavaScript, Java, C#/.NET, Rust.
使用的时候注意取消掉所有的REGEX FLAGS
网站不错,收下了,谢谢!
Comment
Post
Cancel
kateliuyi
Junior Member
Joined:
Mar 2021
Posts:
2
#8
19-03-2021, 04:22
Originally posted by
happytroyboy
楼上正解
推荐个在线调试的网站
regex101: build, test, and debug regex
https://regex101.com/
Regular expression tester with syntax highlighting, explanation, cheat sheet for PHP/PCRE, Python, GO, JavaScript, Java, C#/.NET, Rust.
使用的时候注意取消掉所有的REGEX FLAGS
网站太好用了!谢谢!!
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
😀
😂
🥰
😘
🤢
😎
😞
😡
👍
👎
☕
Comment