- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Regex Question...
Operating System - HP-UX
1755751
Members
4688
Online
108837
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-23-2010 04:53 PM
тАО09-23-2010 04:53 PM
Regex Question...
Attaching a perl script, which is failing with the following text in the log -
2010-09-23 17:44:32 REGEX: No blocks for 'ReviewService running on 8541' found.
Regex that the script is using is
time=\s*([0-9\.,]+)
The text on which its failing is the following which clearly has "time=". Can someone suggest a solution?
box3.zap.com ReviewService running on 8541 HTTP OK: HTTP/1.0 200 JBOSS - 9180 bytes in 0.283 second response time time=0.282611s;;;0.000000 size=9180B;;;0 1285289027
Thanks,
Allan.
2010-09-23 17:44:32 REGEX: No blocks for 'ReviewService running on 8541' found.
Regex that the script is using is
time=\s*([0-9\.,]+)
The text on which its failing is the following which clearly has "time=". Can someone suggest a solution?
box3.zap.com ReviewService running on 8541 HTTP OK: HTTP/1.0 200 JBOSS - 9180 bytes in 0.283 second response time time=0.282611s;;;0.000000 size=9180B;;;0 1285289027
Thanks,
Allan.
- Tags:
- regex
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-24-2010 03:42 AM
тАО09-24-2010 03:42 AM
Re: Regex Question...
Hi Allanm:
I don't see the regex you cite in your attachment.
I fail to see what the data line beginning with "2010-0923" has to do with a match to the regex either.
As for the line beginning with "box3.zap", the regex cited *will* match and will return the time value in $1:
# X="box3.zap.com ReviewService running on 8541 HTTP OK: HTTP/1.0 200 JBOSS - 9180 bytes in 0.283 second response time time=0.282611s;;;0.000000 size=9180B;;;0 1285289027"
# echo ${X}|perl -nle 'perl -nle 'm{time=\s*([0-9\.,]+)} and print $1'
0.282611
Regards!
...JRF...
I don't see the regex you cite in your attachment.
I fail to see what the data line beginning with "2010-0923" has to do with a match to the regex either.
As for the line beginning with "box3.zap", the regex cited *will* match and will return the time value in $1:
# X="box3.zap.com ReviewService running on 8541 HTTP OK: HTTP/1.0 200 JBOSS - 9180 bytes in 0.283 second response time time=0.282611s;;;0.000000 size=9180B;;;0 1285289027"
# echo ${X}|perl -nle 'perl -nle 'm{time=\s*([0-9\.,]+)} and print $1'
0.282611
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-24-2010 10:40 AM
тАО09-24-2010 10:40 AM
Re: Regex Question...
Thanks for replying JRF!
Here is the config that the script refers to -
##
define ngraph{
service_name HTTP
graph_perf_regex time=\s*([0-9\.,]+)
graph_value http_res
graph_units seconds
graph_legend HTTP response time
rrd_plottype AREA
rrd_color c0c0ff
}
define ngraph{
service_name HTTP
type CDEF
graph_value http_cdef
graph_units
graph_legend
graph_calc http_res
rrd_plottype LINE1
rrd_color 000000
}
# [EOF]
I am not sure why its logging -
REGEX: No blocks for ...
even though the regex is found.
Thats my question...
Thanks,
Allan
Here is the config that the script refers to -
##
define ngraph{
service_name HTTP
graph_perf_regex time=\s*([0-9\.,]+)
graph_value http_res
graph_units seconds
graph_legend HTTP response time
rrd_plottype AREA
rrd_color c0c0ff
}
define ngraph{
service_name HTTP
type CDEF
graph_value http_cdef
graph_units
graph_legend
graph_calc http_res
rrd_plottype LINE1
rrd_color 000000
}
# [EOF]
I am not sure why its logging -
REGEX: No blocks for ...
even though the regex is found.
Thats my question...
Thanks,
Allan
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP