Ad Widget

Collapse

How to filter discovery rule

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gergely.szocs
    Junior Member
    • Jun 2021
    • 4

    #1

    How to filter discovery rule

    Dear All,

    I am longing for some help with the below issue. I am stuck here for weeks by now. Could you please help me?

    I would like to smart monitor only sda and sdb with the official 'SMART by Zabbix agent 2 Template'. I set things as per below but it did not solve the issue. It keeps monitor sd[c-z]. Can you please help me? Thank you in advance.


    - I created filters in both Discovery rule as per below.

    Disk discovery > Filters

    {#NAME} matches {$SMART.DISK.NAME.MATCHES}
    Attribute discovery > Filters

    {#NAME} matches {$SMART.ATTRIBUTE.ID.MATCHES}

    - After that I modified the existing macros on template level as per below.

    SMART by Zabbix agent 2 > Macros

    {$SMART.ATTRIBUTE.ID.MATCHES} (sd[a-b]).sat
    {$SMART.DISK.NAME.MATCHES} (sd[a-b]).sat

    Thank you in advance,

    Regards,
    Gregory
  • Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1781

    #2
    Hi, if I understand correctly your problem is that you have modified the LLD filter but Zabbix still keeps monitoring the excluded disks. (There is a possibility for misunderstanding here because I don't do SMART monitoring myself.) This is dependent on the discovery rule setting "Keep lost resources period". It is very common to be set to 14 days or so, and it means that even though LLD is not discovering the items anymore, they will be kept in monitoring that long before being deleted automatically.

    You have two options:
    1. Delete the extra items manually from the host. There should also be an icon on the right saying that the item is not discovered anymore and it will be deleted in X time.
    2. Modify the "keep lost resources period" configuration as you wish.
    With option 2, do think about a situation where you misconfigure the LLD filter (or there is some malfunction in LLD) and your correct items are not discovered anymore. If you set the period too low, the items (and their history data) will be deleted maybe right away.

    I usually keep the period in 14 or 30 or even 90 days (case by case), and delete the old items manually if need arises.

    Markku

    Comment

    • gergely.szocs
      Junior Member
      • Jun 2021
      • 4

      #3
      Originally posted by Markku
      Hi, if I understand correctly your problem is that you have modified the LLD filter but Zabbix still keeps monitoring the excluded disks. (There is a possibility for misunderstanding here because I don't do SMART monitoring myself.) This is dependent on the discovery rule setting "Keep lost resources period". It is very common to be set to 14 days or so, and it means that even though LLD is not discovering the items anymore, they will be kept in monitoring that long before being deleted automatically.

      You have two options:
      1. Delete the extra items manually from the host. There should also be an icon on the right saying that the item is not discovered anymore and it will be deleted in X time.
      2. Modify the "keep lost resources period" configuration as you wish.
      With option 2, do think about a situation where you misconfigure the LLD filter (or there is some malfunction in LLD) and your correct items are not discovered anymore. If you set the period too low, the items (and their history data) will be deleted maybe right away.

      I usually keep the period in 14 or 30 or even 90 days (case by case), and delete the old items manually if need arises.

      Markku
      Dear Markku,

      Thank you for your help and for your response. Unfortunately this doesn't solved the problem.
      I think maybe this new template has some issues or bugs. I still try to figure out what's the problem.

      Regards,
      Gregory

      Comment

      Working...