Ad Widget

Collapse

How to delete a specific record from DB

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bobrivers
    Senior Member
    • Feb 2007
    • 115

    #1

    How to delete a specific record from DB

    Hi,

    We are monitoring a windows perfcounter that accumulates it's value since the last time that the server was restarted. Actually it's the server print spooler.

    Ok, no problem with that. We created an item in zabbix (perf_counter[\Print Queue(xpto)\Total Jobs Printed]) and we are storing it as a Delta (simple change).

    For some reason, after rhe restart of the server in which zabbix is hosted, zabbix miscalculated the value. In general, the value is arounf 50 and after the restart it registered a value of 1000.

    In fact, I don't know if it's miscalculated or not, but this value is messing my graphs...

    Is it possible to delete it from zabbix? I was thinking about delete it directly from the DB.

    Could someone point to me the tables that I need to manipulate?

    TIA,

    Bob
  • jroberson
    Senior Member
    • May 2008
    • 124

    #2
    Do you mean to "clear history" of the item? There is a button for that on every item and at the bottom of the list so you can check and clear multiple at once.

    Comment

    • bobrivers
      Senior Member
      • Feb 2007
      • 115

      #3
      Thanks, but no, I don't want to clear al the history. Just te record that seems to be wrong...

      Comment

      • bbrendon
        Senior Member
        • Sep 2005
        • 870

        #4
        If you know the value of the record, you can go into the db and do something like (untested)

        delete from history_uint where itemid = ### and max_value > 100

        ...or is it trends_uint?

        Anyway, I do this sometimes if the values get crazy.
        Unofficial Zabbix Expert
        Blog, Corporate Site

        Comment

        Working...