Hi There,
I want to use a regular expression with proc.num to get the number of child-processes of FPM-Pools. Because we have several pools that have the same string in them i need a regular expression that matches the exact string.
For example we have:
- PHP Pool: prod
- PHP Pool: prod_sitename1
- PHP Pool: prod_sitename2
When I use proc.num[] on "prod" i'll also get the processes of prod_sitename1 and prod_sitename2, i only need the count of the "prod" pool.
As of these documentation it should be possible to use a regex in the cmdline field of proc.num[]:
I tried several things but i cannot get this to work. What i tried:
All give "0" as result.
For the time being i resolved this issue with a system.run[] check which executes the following command which works perfectly:
I would live to have this fixed with the proc.num[] check because this is more "native" and less "dirty".
Please let me know what i can do to get this fixed.
Thanks!
I want to use a regular expression with proc.num to get the number of child-processes of FPM-Pools. Because we have several pools that have the same string in them i need a regular expression that matches the exact string.
For example we have:
- PHP Pool: prod
- PHP Pool: prod_sitename1
- PHP Pool: prod_sitename2
When I use proc.num[] on "prod" i'll also get the processes of prod_sitename1 and prod_sitename2, i only need the count of the "prod" pool.
As of these documentation it should be possible to use a regex in the cmdline field of proc.num[]:
I tried several things but i cannot get this to work. What i tried:
Code:
proc.num["php-fpm",,,"^(myPoolName$)"] proc.num["php-fpm",,,"^myPoolName$"] proc.num["php-fpm",,,"myPoolName$"]
For the time being i resolved this issue with a system.run[] check which executes the following command which works perfectly:
Code:
system.run[ps -ef | grep php-fpm | grep myPoolName$ | wc -l]
Please let me know what i can do to get this fixed.
Thanks!
Comment