Ad Widget

Collapse

Regular Expression not working!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • oguzhansarikaya
    Junior Member
    • Jul 2020
    • 9

    #1

    Regular Expression not working!

    Hi everyone,

    Windows machine watching the zabbix agent. Windows services are about to drive me crazy!!!!!

    screenshot_1 red underlined visible windows service is still coming.

    screenshot_2 windows service discovery...

    not working!!!
    Attached Files
    Last edited by vitalijs.m; 22-10-2020, 19:33.
  • oguzhansarikaya
    Junior Member
    • Jul 2020
    • 9

    #2
    Hi,

    everything is as you said but the result is still the same ...

    Can you look at the screenshots in order? screenshot 1-2-3

    i deleted all the values, did LLD in 1 minute and came back.
    Attached Files

    Comment

    • oguzhansarikaya
      Junior Member
      • Jul 2020
      • 9

      #3
      Hi,

      I have added services that I don't want to be discovered, but it didn't work.

      Screenshot 1: Configuration > Templates > Template Module Windows Services > Tags = It works when I add services that I don't want to be discovered in this section. example i added "edgeupdate" and "edgeupdatem" services and when it discovery it did not discover these services.
      Whatever I added to the regular expression section didn't work. That's why I think the authorities should intervene here.

      If you noticed, all the services in the screenshot are also in the regular expression section. It finds the service I removed from the regular expression section again itself. so the regular expression doesn't really work. It works when I add it to the tag part instead of the regular expression part. However, there is a problem like this: After adding 2 more services, the text limit is activated and I cannot add more services.

      I hope I was able to explain my problem.
      Attached Files

      Comment

      • oguzhansarikaya
        Junior Member
        • Jul 2020
        • 9

        #4
        There is no confusing situation.

        It finds even though I add services that I don't want it to find in the Regular expression.

        When I add the services I don't want to find in the LLD parameter settings written for Windows services, it doesn't.

        I'm saying that regular expression doesn't really work.

        Comment

        • cyber
          Senior Member
          Zabbix Certified SpecialistZabbix Certified Professional
          • Dec 2006
          • 4807

          #5
          Set "Result is TRUE" for "Power". There is "test" option for expression, try it out. your sample data must pass all lines with TRUE for this regex to work.
          If you have both as "Result is False", only one line is returning "true" and whole expression is still false.
          EDIT: My posts here are out of sequence due to human error and restoring of posts, try to fit them between other posts in thread, you should get a bit more clear picture.

          Comment

          • cyber
            Senior Member
            Zabbix Certified SpecialistZabbix Certified Professional
            • Dec 2006
            • 4807

            #6
            Sorry, I think I misinterpreted your initial question... So you want "Power" service also "not discovered"? Why don't you just put it on the same regex line as others? Why add another condition to it at all?

            Comment

            • cyber
              Senior Member
              Zabbix Certified SpecialistZabbix Certified Professional
              • Dec 2006
              • 4807

              #7
              I'm getting confused here... First screenshots were from global regex config, but last one is from template module config, which does not even use that global regex.
              I do not see any tags anywhere... just macros and their values...
              255 character limit in macro value may be pain... You can use javascript preprocessing, which takes care of all the matchings, instead

              Comment

              Working...