cancel
Showing results for 
Search instead for 
Did you mean: 

RegEx in Monitoring

former_member182655
Contributor
0 Kudos

Hello colleagues!

Using document "Template Maintenance – File System Monitoring Variants" I've made a regular expression for Disk I/O monitoring on Unix.

(?:(?!.*ssd133.*)|(?!.*ssd88.*).*)

I suppose that Monitoring gives me all disks except ssd133 or ssd88.

Is it correct? If yes, why monitoring gives me all disks including ssd88 (ssd133)?

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member182655
Contributor
0 Kudos

Reply from support:

To exclude the disk names ssd133 and ssd88, you should use the

following regular expression:

^(?!ssd133|ssd88).*

The reason why your regular expression on http://www.regexr.com/

worked may be that there are different engines (e.g. perl, ruby) for

regular expressions which have different features. The Diagnostic

Agent uses the standard Java library.

Artem

roland_hennessy
Contributor
0 Kudos

Hi Artem,

Is FILESYS_NAME=.* set as active? also make sure your expression is correct. Maybe you could try the exact expression below and test?

(?:(?!/ssd133(/.*)*) (?!/ssd88(/.*)*).*)

Kind regards,

Roland

former_member182655
Contributor
0 Kudos

Hi Roland,

thank you for reply. I use the document to get the idea of RegEx for SAP, in fact I don't use it to configure the file system. I try to customize monitoring for Average Wait Time per Disk and Average Service Time for Disk, so it's file system parameter.

So I don't need to use slashes (/) in the names of the disks.

Regards,

Artem

roland_hennessy
Contributor
0 Kudos

Hi Artem

Okay if you don't need to use the slashes please make sure you have the correct number of brackets etc as outlined previously and remove the slashes in the name of the disks to see if this helps.

Kind regards,

Roland

former_member182655
Contributor
0 Kudos

Hi Roland!

All the morning I was trying different combinations to approach my aim. Now I think that there is some problems with SolMan RegEx interpretation. Or maybe I don't understand how it works.

For example, to exclude disks ssd133 and ssd88 I give


(.*sd(?!((88)|(133))).*|.*md.*) |where md - disks on other servers

My saposcol shows


--------------------------------- Disks -------------------------------------

     sd0 util:   0% queue:    0 wait:    0 serv:    0 kbsec:    7 opsec:    0

  ssd133 util:   0% queue:    0 wait:    0 serv:    0 kbsec:    0 opsec:    0

     sd1 util:   0% queue:    0 wait:    0 serv:    0 kbsec:    0 opsec:    0

     sd8 util:   0% queue:    0 wait:    0 serv:    0 kbsec:    0 opsec:    0

     sd2 util:   0% queue:    0 wait:    0 serv:    0 kbsec:    0 opsec:    0

     sd7 util:   0% queue:    0 wait:    0 serv:    0 kbsec:    0 opsec:    0

    sd13 util:   0% queue:    0 wait:    0 serv:    0 kbsec:    0 opsec:    0

     sd5 util:   0% queue:    0 wait:    0 serv:    0 kbsec:    0 opsec:    0

    sd11 util:   0% queue:    0 wait:    0 serv:    0 kbsec:    0 opsec:    0

     sd9 util:   0% queue:    0 wait:    0 serv:    0 kbsec:    0 opsec:    0

     sd6 util:   0% queue:    0 wait:    0 serv:    0 kbsec:    0 opsec:    0

    sd10 util:   0% queue:    0 wait:    0 serv:    0 kbsec:    0 opsec:    0

     sd3 util:   0% queue:    0 wait:    0 serv:    0 kbsec:    0 opsec:    0

    sd12 util:   0% queue:    0 wait:    0 serv:    0 kbsec:    0 opsec:    0

    sd14 util:   0% queue:    0 wait:    0 serv:    0 kbsec:    0 opsec:    0

    sd15 util:   0% queue:    0 wait:    0 serv:    0 kbsec:    0 opsec:    0

  ssd176 util:  32% queue:    0 wait:    0 serv:    2 kbsec: 17231 opsec:  323

  ssd180 util:   1% queue:    0 wait:    0 serv:    2 kbsec:  508 opsec:   14

If I execute my regex for the array on site it works fine. Could it be that SolMan has its own regex analyzing rules?