Ad Widget

Collapse

Fixing a corrupt discovered item Interval.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nprdev
    Junior Member
    • Jul 2023
    • 11

    #1

    Fixing a corrupt discovered item Interval.

    There's some discovered items with a wrong delay value in my zabbix, somehow, different from the template's delay.

    I've got one host that's causing a huge amount of data inflow because many of its discovered items (there's a lot which are supposed to run at high intervals) are stuck at a very low interval of '2'. Not '2s', the value in the database is literally the number '2' only. Even though the discovery is a much higher value. It's not similar either, I have no idea where the magic two came from.

    Is it possible to fix that with this kind of query:

    Code:
    UPDATE `items` SET `delay` = '10m' WHERE `hostid` = '10329' AND `delay` = '2'
    Or will this break things and is it better to remove and re-apply the template, at the cost of removing all the history?

  • kyus
    Senior Member
    • Feb 2024
    • 210

    #2
    I would not update it directly in the database nor would I remove the template.

    You said your discovered items have a much lower interval than your discovery: unless you are talking about dependent items, you should be looking at the interval in your item prototypes, not the discovery.

    When theres no time suffix, it is implied you are using seconds, so 2=2s.

    Some screenshots would help to have a better ideia of what's happening...

    Comment

    • nprdev
      Junior Member
      • Jul 2023
      • 11

      #3
      I ended up editing it in the database as a test and that worked out just fine, so that's what I did in the end.

      These are not dependant items. They're regular items. I can't change their interval in the item itself in the UI, it's disabled / won't let you, since they're from a discovery rule (as it should, as these items are basically 'generated', thus controlled by said discovery). You can only change the discovery rule (either in the template, or for just that host). Basically this is something that 'shouldn't happen', data corruption of some kind. I don't know how screenshots would help, the only information I have is that it's possible.

      Click image for larger version

Name:	image.png
Views:	26
Size:	18.3 KB
ID:	518289
      It would just say '2' here instead of '60', even though '60' is the value in the template. (Meaning I'm getting 30x the normal amount of data in this case.). Same goes for the value in the item. Checking the database indeed confirmed that this one host (interestingly the problem only happened for one host, though there are others with the same template) has 12M history records while other similar hosts (same template set) have around 200-400K.

      I have no idea how to cause the problem, since I only spotted that it happened at some point (the history has advanced beyond the point where I could identify the beginning of the issue, it's before the retention period so I can't tell).

      In any case, I can answer the original question with an affirmative 'yes', you can just edit these faulty values in the database if you happen to run into an item where its interval doesn't match that of the discovery rule that generated it.

      Comment

      • kyus
        Senior Member
        • Feb 2024
        • 210

        #4
        Great that it worked out.

        As of the interval, those items get their interval from the item prototypes that exists inside the discovery rule, not from the discovery rule itself.
        And yes, it's weird that those intervals were different from what was configured.

        Comment

        Working...