Ad Widget

Collapse

Question on manually updating rows in alerts table.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mcontreras
    Junior Member
    • Mar 2023
    • 2

    #1

    Question on manually updating rows in alerts table.

    Hello,

    I've run into an situation where it appears the only way out is for me to manually set all pending rows (status=0) to failed (status=2). My question is if I do this via mysql query do I need to restart my zabbix-server instance. I would prefer not to, as it currently takes ~1 hour to complete a full stop and start of the service.

    I had to restart the Zabbix-server process about a week ago and the alerter process has been pegged at 100% since then. Looking at the alerts table I see that there are ~2.7 million rows that match status=0 and alerttype=0.
    I don't need the actions from the week to actually complete at this point, but I would like to get back to seeing the emails and other actions happen on time.

    To provide some context on my zabbix installation, we are currently running 275+ proxies, average of 10kvps, with ~4.7 million items and ~3.5 million triggers. We are running zabbix 3.0.29 on an ubuntu 16.04 host.


    If there is another way to handle this I am open to suggestions.​
  • mcontreras
    Junior Member
    • Mar 2023
    • 2

    #2
    I was able to ride out the backlog, thankfully we are using an external system for ticketing the alerts. Took 5 days for the system to clear it. Still am curious if a restart after manually updating database fields would be necessary.

    Comment

    • Joseph89
      Junior Member
      • Jul 2023
      • 1

      #3
      Hello, mcontreras
      i have suggest you can try this
      Manually updating the status of rows in the Zabbix database via a MySQL query can be done without restarting the Zabbix server instance. The changes should take effect immediately without requiring a service restart.
      t's essential to exercise caution when directly modifying the Zabbix database. Make sure to create a backup of the database before performing any manual changes, as it can help restore the system in case of any issues.
      To update the rows with a status of 0 to a status of 2, you can execute an SQL query similar to write this :

      UPDATE alerts SET status = 2 WHERE status = 0 AND alerttype = 0;
      ​This query will update the status of all rows where status is 0 and alerttype is 0 in the alerts table.

      After executing the query, Zabbix should no longer consider these rows as pending, and the related actions should resume their normal execution.
      i hope you can sol. this, there are any issue to reply this

      Comment

      Working...