Ad Widget

Collapse

Selecting processes in proc.num

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ben Hawntown
    Junior Member
    • Nov 2022
    • 2

    #1

    Selecting processes in proc.num

    Hello,


    I have a problem with regular expression in zabbix. I want to get number of processes but the keyword "foobar" has in two processes. One is just "foobar" another is "- -foobar". I used the below regex but they don't work

    the processes are like this :

    /xxx/xx/xxx foobar xxx xxx xxx
    /xxx/xx/xxx - -foobar xxx xxx xxx

    proc.num[,root,,\bfoobar\b] when I use this it picks both processes

    proc.num[,root,,(\b)(?<!--)foobar+] when I use this in regex calculator it works but in zabbix it returns 0 https://regex101.com/r/rqPB0w/1 https://regex101.com/r/NJ7jOZ/1

    Is that zabbix bug ?
  • Answer selected by Ben Hawntown at 17-11-2022, 11:38.
    Ben Hawntown
    Junior Member
    • Nov 2022
    • 2

    I found out the solution. used /\sfoobar in regex section and it got fixed.

    Comment

    • Ben Hawntown
      Junior Member
      • Nov 2022
      • 2

      #2
      I found out the solution. used /\sfoobar in regex section and it got fixed.

      Comment

      Working...