Ad Widget

Collapse

Report on "The item is not discovered anymore and will be deleted"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 13manson666
    Junior Member
    • Jan 2022
    • 5

    #1

    Report on "The item is not discovered anymore and will be deleted"


    looking for a method to list items that will be deleted due to no longer being discovered. direct database queries are good too if anyone developed one.

    maybe someone knows what table and column this is in or how this is calculated within zabbix webui?

  • Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1782

    #2
    I'd guess looking at the status column in the items table:

    select itemid, hostid, name, status from items where status > 0;

    if that leads you somewhere.

    Markku

    Comment

    • 13manson666
      Junior Member
      • Jan 2022
      • 5

      #3
      sorry, no, that shows me a discovery rule that is disabled. this does not show, nor lead to, items being deleted due to no longer being discovered. my thinking is that their is some calculation made based on zabbixdb.items.lifetime (keep lost resources time) but i see no other field within the items table that assist in this.

      in my server i have 2 items on one host that are showing in the web ui under the "info" column that they will be deleted due to no longer being discovered (items still report as good as they are still present on my host). this is the test scenario: i set these to no longer be discovered so that i can find a method of reporting on these for other members of my team in case this was not expected; in reality these items are important and should not be deleted. we've lost historical data due to items being deleted when no one realized they were going to be deleted. i can also use this list to fine tune my zabbix server and discovery rules so we dont discover items we dont need to monitor.

      Comment

      • Markku
        Senior Member
        Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
        • Sep 2018
        • 1782

        #4
        item.get API (https://www.zabbix.com/documentation...rence/item/get) seems to have a property for items that are not discovered anymore.

        Markku

        Comment

        • 13manson666
          Junior Member
          • Jan 2022
          • 5

          #5
          many thanks for that, it has lead me to exactly what i needed to use/do with the api query

          for anyone that finds this looking for something similar, the item.get parameter is 'selectItemDiscovery'. i recommend initially setting it in the json to be a string of "extend" which will pull all properties. then make it an array with the specific properties you want when ready to put this into actual use. my case is simply pulling the 'ts_delete' property. additional note for everyone, 'ts_delete' is 0 for items that will not be deleted.

          thanks again Markku

          Comment

          Working...