Ad Widget

Collapse

Exclude Filesystem being added during low-level discovery

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • winstonsmith
    Junior Member
    • Jul 2012
    • 6

    #1

    Exclude Filesystem being added during low-level discovery

    Hi,

    how can I prevent Zabbix to add certain found Filesystems for a system?
    I mean we have some Linux-systems where mountpoints are located at /sys/fs/cgroup/cpu or /sys/kernel/security.
    These are Linux internal mounts and I don't want these mountpoints to be added.
    I know I can use the filter when I create a new Discovery Role.
    But I don't know what I have to add to the field 'Regexp'.

    Do you have any idea?

    Kind regards
    Winstonsmith
  • ke_sheng_jie
    Member
    • Aug 2011
    • 40

    #2
    Use a Regular Expression

    Create a regular expression in the Zabbix GUI (Administration->General->Regular expressions).

    I made one to exclude certain automatic services after create a powershell script to discover them.
    Name: WinServices
    Expression:
    Zabbix Agent [Character string not included]

    Then in the macro field, I reference the regular expression @WinServices.

    (I excluded the Zabbix Agent because if it's down, it obviously won't report it, because the agent is down.)
    Last edited by ke_sheng_jie; 27-07-2012, 17:54. Reason: Clarity

    Comment

    • squarejester
      Junior Member
      • May 2017
      • 2

      #3
      Exclude Windows Services Zabbix Agent

      EXCLUDE Windows Services from Low Level Discovery (LLD)

      I spent hours trying to get an answer as to how to exclude certain services from the discovery service of the Zabbix agent. I scoured the Internet and it seems no one has answered this for years… WOW.

      I love how everyone developer out there expressed their opinions but never provided an answer. All I read was some kind of dissertation on expression types or other things that regular IT guys and gals are not into. Of course it was all crap and provided absolutely no help and of course no examples. It seems they never even bothered to make sure their “advice” was even tested.

      I, however, am not a developer. I'm an IT Engineer and I like common sense and YOU need just the answer with examples and knowing it actually works. Nuff said…

      SO.....here it is. Tested and proven working.

      Look at the attached jpeg for more details but the answer is actually quite simple.

      Go to the default Regular Expression in the Zabbix Console (Administration -->General--->(Select Regular Expression from the upper right-hand drop down menu) and then click on the expression labeled "Windows service names for discovery".

      By default, it will have one entry with Expression type Result is FALSE and Expression ^(MMCSS|gupdate|SysmonLog|clr_optimization_v2.0.50 727_32|clr_optimization_v4.0.30319_32)$

      Now, this is where the explanation comes in so pay attention...

      The Low Level Discovery for Windows services that comes with Zabbix will find and add ALL services it finds, EXCEPT anything that matches that one expression. It’s basically saying "Add any service you find EXCEPT ones that match this".

      In case you're wondering what "that" exactly is, its services that Zabbix knows not to monitor on Windows boxes. In other words, IT’S THE EXCLUSION LIST. FYI, don’t try adding to this line, it won’t work. Just leave it alone.

      The easy fix is to simply add a new line in the regular expression "Windows service names for discovery" and add the service you want to exclude inside of a carrot + parenthesis + dollar sign.
      For example, to exclude the annoying "TrustedInstaller" service add a new line, select "Result is FALSE" in the expression type and then enter ^(TrustedInstaller)$ in the Expression area.
      Make a new entry for each service as needed. If you want to exclude sppsvc for example then you need to add a new line with ^(sppsvc)$ making sure you select Result in FALSE.

      After a while (give it a couple of hours for all the syncing to complete) all those errors go away on their own giving you a nice green dashboard!

      You’re welcome.
      Attached Files

      Comment

      • ori006
        Junior Member
        • Mar 2014
        • 2

        #4
        I totally agree with you!!!

        [QUOTE=squarejester;199164]EXCLUDE Windows Services from Low Level Discovery (LLD)

        I love how everyone developer out there expressed their opinions but never provided an answer. All I read was some kind of dissertation on expression types or other things that regular IT guys and gals are not into. Of course it was all crap and provided absolutely no help and of course no examples. It seems they never even bothered to make sure their “advice” was even tested.

        Thanks for the great explanation!

        Comment

        • squarejester
          Junior Member
          • May 2017
          • 2

          #5
          You're welcome

          Your welcome dude

          Comment

          Working...