We have a tool to monitor logs in our environment. The tool accepts log pattern match only using regex and I accept I am a n00b in that. I had been banging my head to make it work without much success and at last had to turn on to my last option to post it here. I had got great helps in the past and hoping I will get the same again
Here is the pattern
The requirement is
I need a regex pattern match which should only pick 5XX marked bold and discard any other pattern. 5XX is 500 - 599
Line - 1 Line - 2 and Line - 4 should be picked and rest should go unmatched
I thought of this
But this is missing out in first and second line where the line ends with 500
Hi, I have 2 files that I have modified to basically match each other, however I want to determine what (if any) line in file 1 does not exist in file 2. I need to match column $1 and $2 as a single string in file1 to $1 and $2 in file2 as these two columns create a match.
I'm stuck in an AWK... (9 Replies)
Hello Guyz
I have been following this forum for a while and the solutions provided are super useful. I currently have a scenario where i need to search for a pattern and start searching by keeping the first pattern as a baseline
ABC
DEF
LMN
EFG
HIJ
LMN
OPQ
In the above text i need to... (8 Replies)
Hi experts , im new to Unix,AWK ,and im just not able to get this right.
I need to match for some patterns if it matches I need to print the next few words to it.. I have only three such conditions to match… But I need to print only those words that comes after satisfying the first condition..... (2 Replies)
The sample file:
dept1: user1,user2,user3
dept2: user4,user5,user6
dept3: user7,user8,user9
I want to match by '/^dept2.*/' but don't want to have substring 'dept2:' in output. How to compose such regex? (8 Replies)
Hi experts,
I have a file with regexes which is used for automatic searches on several files (40+ GB).
To do some postprocessing with the grep result I need the matching line as well as the match itself.
I know that the latter could be achieved with grep's -o option. But I'm not aware of a... (2 Replies)
Im using the command below , but thats not the output that i want. it only prints the odd and even numbers.
awk '{if(NR%2){print $0 > "1"}else{print $0 > "2"}}'
Im hoping for something like this
file1:
Text hi this is just a test
text1 text2 text3 text4 text5 text6
Text hi... (2 Replies)
Hello Experts , require help . See below output:
File inputs
------------------------------------------
Server Host = mike
id rl images allocated last updated density
vimages expiration last read <------- STATUS ------->... (4 Replies)
I'm trying to get some exclusions into our sendmail regular expression for the K command. The following configuration & regex works:
LOCAL_CONFIG
#
Kcheckaddress regex -a@MATCH
+<@+?\.++?\.(us|info|to|br|bid|cn|ru)
LOCAL_RULESETS
SLocal_check_mail
# check address against various regex... (0 Replies)
Discussion started by: RobbieTheK
0 Replies
LEARN ABOUT DEBIAN
varnishsizes
VARNISHSIZES(1)VARNISHSIZES(1)NAME
varnishsizes - Varnish object size request histogram
SYNOPSIS
varnishsizes [-b] [-C] [-c] [-d] [-I regex] [-i tag] [-m tag:regex ...]
[-n varnish_name] [-r file] [-V] [-w delay] [-X regex] [-x tag]
DESCRIPTION
The varnishsizes utility reads varnishd(1) shared memory logs and presents a continuously updated histogram showing the distribution of the
last N requests by their processing. The value of N and the vertical scale are displayed in the top left corner. The horizontal scale is
a logarithmic representation of bytes. Hits are marked with a pipe character ("|"), and misses are marked with a hash character ("#").
The following options are available:
-b Include log entries which result from communication with a backend server. If neither -b nor -c is specified, varnishsizes acts as
if they both were.
-C Ignore case when matching regular expressions.
-c Include log entries which result from communication with a client. If neither -b nor -c is specified, varnishsizes acts as if they
both were.
-d Process old log entries on startup. Normally, varnishsizes will only process entries which are written to the log after it starts.
-I regex
Include log entries which match the specified regular expression. If neither -I nor -i is specified, all log entries are included.
-i tag Include log entries with the specified tag. If neither -I nor -i is specified, all log entries are included.
-m tag:regex only list record where tag matches regex. Multiple -m
options are AND-ed together.
-n Specifies the name of the varnishd instance to get logs from. If -n is not specified, the host name is used.
-r file
Read log entries from file instead of shared memory.
-V Display the version number and exit.
-w delay
Wait at least delay seconds between each update. The default is 1. file instead of displaying them. The file will be overwritten
unless the -a option was specified.
-X regex
Exclude log entries which match the specified regular expression.
-x tag Exclude log entries with the specified tag.
SEE ALSO
o varnishd(1)
o varnishlog(1)
o varnishncsa(1)
o varnishstat(1)
o varnishtop(1)HISTORY
The varnishsizes utility was developed by Kristian Lyngstol based on varnishhist. This manual page was written by Kristian Lyngstol,
Dag-Erling Smorgrav and Per Buer.
COPYRIGHT
This document is licensed under the same licence as Varnish itself. See LICENCE for details.
o Copyright (c) 2010 Varnish Software AS
AUTHOR
Dag Erling Smorgrav, Kristian Lyngstol, Per Buer
1.0 2010-05-31 VARNISHSIZES(1)