These don't work however, because they pull up everything that is 8.xx
8x.xx 9.xx 9x.xx 1.xx 1x.xx and 1xx.xx
I'm not sure what data you're feeding it, but I tried with this setup in
hobbit-clients.cfg:
HOST=localhost
PROC %(8\d\.\d{2})|(9[0-4]\.\d{2}) 0 0
PROC %(9[5-9]\.\d{2})|(1\d{2}\.\d{2}) 0 0
This will give a red if any of the commands in the "ps" listing has the
percentages 80-94 or 95-100. Now let's test it:
$ bbcmd hobbitd_client --test
Hostname (.=end, ?=dump, !=reload) [localhost]: localhost
Test (cpu, mem, disk, proc): proc
ps command string: 82.31 ls
ps command string:
Process %(8\d\.\d{2})|(9[0-4]\.\d{2}) color red: Count=1, min=0, max=0
Process %(9[5-9]\.\d{2})|(1\d{2}\.\d{2}) color green: Count=0, min=0, max=0
Good, the ps commandline string "82.31 ls" is matched as it should be.
Hostname (.=end, ?=dump, !=reload) [localhost]:
Test (cpu, mem, disk, proc): proc
ps command string: 8.29 ls
ps command string:
Process %(8\d\.\d{2})|(9[0-4]\.\d{2}) color green: Count=0, min=0, max=0
Process %(9[5-9]\.\d{2})|(1\d{2}\.\d{2}) color green: Count=0, min=0, max=0
And the string "8.29 ls" is not matched.
Hostname (.=end, ?=dump, !=reload) [localhost]:
Test (cpu, mem, disk, proc): proc
ps command string: 100.00 muncher
ps command string:
Process %(8\d\.\d{2})|(9[0-4]\.\d{2}) color green: Count=0, min=0, max=0
Process %(9[5-9]\.\d{2})|(1\d{2}\.\d{2}) color red: Count=1, min=0, max=0
"100.00 muncher" is also matched
Hostname (.=end, ?=dump, !=reload) [localhost]:
Test (cpu, mem, disk, proc): proc
ps command string: 1.00 low
ps command string:
Process %(8\d\.\d{2})|(9[0-4]\.\d{2}) color green: Count=0, min=0, max=0
Process %(9[5-9]\.\d{2})|(1\d{2}\.\d{2}) color green: Count=0, min=0, max=0
But "1.00 low" is now matched.
So either your rules are different from what I've used, or your ps
output is unlike that which I used. I think you'll need to post some
more details for us to figure out what the problem is.
Regards,
Henrik
To unsubscribe from the hobbit list, send an e-mail to
hobbit-unsubscribe (at) hswn.dk