Hi,
I had a power failure, and my postgres DB was corrupted and I had to do some tricks to get it starting again..
Everything "seems" ok, but triggers don;t appear to be working correctly..
And I get the following in the action log:
I have done some googling but have been unsuccessful in finding a suitable example and solution.
I would appreciate some help from the zabbix community.
Can I clean the database of all previous data to help fit recover?
Can I extract current hosts and triggers etc and make a new zabbit instance?
Whatever, I just don't want to have to add all the hosts and custom configurations again.
THANKS
James
I had a power failure, and my postgres DB was corrupted and I had to do some tricks to get it starting again..
Everything "seems" ok, but triggers don;t appear to be working correctly..
And I get the following in the action log:
pg_query(): Query failed: ERROR: invalid page in block 16 of relation base/16385/17507 [auditacts.php:120 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CAlert->get() → DBselect() → pg_query() in include/db.inc.php:247]
Error in query [SELECT a.alertid,a.actionid,a.userid,a.clock,a.sendto,a.s ubject,a.message,a.status,a.retries,a.error,a.aler ttype,a.mediatypeid FROM alerts a WHERE EXISTS (SELECT NULL FROM actions aa WHERE a.actionid=aa.actionid AND aa.eventsource='0') AND a.clock>'1604885439' AND a.clock<'1604885741' ORDER BY a.alertid DESC LIMIT 1001] [ERROR: invalid page in block 16 of relation base/16385/17507]
pg_query(): Query failed: ERROR: invalid page in block 16 of relation base/16385/17507 [auditacts.php:120 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CAlert->get() → DBselect() → pg_query() in include/db.inc.php:247]
Error in query [SELECT a.alertid,a.actionid,a.userid,a.clock,a.sendto,a.s ubject,a.message,a.status,a.retries,a.error,a.aler ttype,a.mediatypeid FROM alerts a WHERE EXISTS (SELECT NULL FROM events e WHERE a.eventid=e.eventid AND e.source='1' AND e.object='1') AND a.clock>'1604885439' AND a.clock<'1604885741' ORDER BY a.alertid DESC LIMIT 1001] [ERROR: invalid page in block 16 of relation base/16385/17507]
pg_query(): Query failed: ERROR: invalid page in block 16 of relation base/16385/17507 [auditacts.php:120 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CAlert->get() → DBselect() → pg_query() in include/db.inc.php:247]
Error in query [SELECT a.alertid,a.actionid,a.userid,a.clock,a.sendto,a.s ubject,a.message,a.status,a.retries,a.error,a.aler ttype,a.mediatypeid FROM alerts a WHERE EXISTS (SELECT NULL FROM events e WHERE a.eventid=e.eventid AND e.source='1' AND e.object='2') AND a.clock>'1604885439' AND a.clock<'1604885741' ORDER BY a.alertid DESC LIMIT 1001] [ERROR: invalid page in block 16 of relation base/16385/17507]
pg_query(): Query failed: ERROR: invalid page in block 16 of relation base/16385/17507 [auditacts.php:120 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CAlert->get() → DBselect() → pg_query() in include/db.inc.php:247]
Error in query [SELECT a.alertid,a.actionid,a.userid,a.clock,a.sendto,a.s ubject,a.message,a.status,a.retries,a.error,a.aler ttype,a.mediatypeid FROM alerts a WHERE EXISTS (SELECT NULL FROM actions aa WHERE a.actionid=aa.actionid AND aa.eventsource='2') AND a.clock>'1604885439' AND a.clock<'1604885741' ORDER BY a.alertid DESC LIMIT 1001] [ERROR: invalid page in block 16 of relation base/16385/17507]
pg_query(): Query failed: ERROR: invalid page in block 16 of relation base/16385/17507 [auditacts.php:120 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CAlert->get() → DBselect() → pg_query() in include/db.inc.php:247]
Error in query [SELECT a.alertid,a.actionid,a.userid,a.clock,a.sendto,a.s ubject,a.message,a.status,a.retries,a.error,a.aler ttype,a.mediatypeid FROM alerts a WHERE EXISTS (SELECT NULL FROM events e WHERE a.eventid=e.eventid AND e.source='3' AND e.object='0') AND a.clock>'1604885439' AND a.clock<'1604885741' ORDER BY a.alertid DESC LIMIT 1001] [ERROR: invalid page in block 16 of relation base/16385/17507]
pg_query(): Query failed: ERROR: invalid page in block 16 of relation base/16385/17507 [auditacts.php:120 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CAlert->get() → DBselect() → pg_query() in include/db.inc.php:247]
Error in query [SELECT a.alertid,a.actionid,a.userid,a.clock,a.sendto,a.s ubject,a.message,a.status,a.retries,a.error,a.aler ttype,a.mediatypeid FROM alerts a WHERE EXISTS (SELECT NULL FROM events e WHERE a.eventid=e.eventid AND e.source='3' AND e.object='4') AND a.clock>'1604885439' AND a.clock<'1604885741' ORDER BY a.alertid DESC LIMIT 1001] [ERROR: invalid page in block 16 of relation base/16385/17507]
pg_query(): Query failed: ERROR: invalid page in block 16 of relation base/16385/17507 [auditacts.php:120 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CAlert->get() → DBselect() → pg_query() in include/db.inc.php:247]
Error in query [SELECT a.alertid,a.actionid,a.userid,a.clock,a.sendto,a.s ubject,a.message,a.status,a.retries,a.error,a.aler ttype,a.mediatypeid FROM alerts a WHERE EXISTS (SELECT NULL FROM events e WHERE a.eventid=e.eventid AND e.source='3' AND e.object='5') AND a.clock>'1604885439' AND a.clock<'1604885741' ORDER BY a.alertid DESC LIMIT 1001] [ERROR: invalid page in block 16 of relation base/16385/17507]
Error in query [SELECT a.alertid,a.actionid,a.userid,a.clock,a.sendto,a.s ubject,a.message,a.status,a.retries,a.error,a.aler ttype,a.mediatypeid FROM alerts a WHERE EXISTS (SELECT NULL FROM actions aa WHERE a.actionid=aa.actionid AND aa.eventsource='0') AND a.clock>'1604885439' AND a.clock<'1604885741' ORDER BY a.alertid DESC LIMIT 1001] [ERROR: invalid page in block 16 of relation base/16385/17507]
pg_query(): Query failed: ERROR: invalid page in block 16 of relation base/16385/17507 [auditacts.php:120 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CAlert->get() → DBselect() → pg_query() in include/db.inc.php:247]
Error in query [SELECT a.alertid,a.actionid,a.userid,a.clock,a.sendto,a.s ubject,a.message,a.status,a.retries,a.error,a.aler ttype,a.mediatypeid FROM alerts a WHERE EXISTS (SELECT NULL FROM events e WHERE a.eventid=e.eventid AND e.source='1' AND e.object='1') AND a.clock>'1604885439' AND a.clock<'1604885741' ORDER BY a.alertid DESC LIMIT 1001] [ERROR: invalid page in block 16 of relation base/16385/17507]
pg_query(): Query failed: ERROR: invalid page in block 16 of relation base/16385/17507 [auditacts.php:120 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CAlert->get() → DBselect() → pg_query() in include/db.inc.php:247]
Error in query [SELECT a.alertid,a.actionid,a.userid,a.clock,a.sendto,a.s ubject,a.message,a.status,a.retries,a.error,a.aler ttype,a.mediatypeid FROM alerts a WHERE EXISTS (SELECT NULL FROM events e WHERE a.eventid=e.eventid AND e.source='1' AND e.object='2') AND a.clock>'1604885439' AND a.clock<'1604885741' ORDER BY a.alertid DESC LIMIT 1001] [ERROR: invalid page in block 16 of relation base/16385/17507]
pg_query(): Query failed: ERROR: invalid page in block 16 of relation base/16385/17507 [auditacts.php:120 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CAlert->get() → DBselect() → pg_query() in include/db.inc.php:247]
Error in query [SELECT a.alertid,a.actionid,a.userid,a.clock,a.sendto,a.s ubject,a.message,a.status,a.retries,a.error,a.aler ttype,a.mediatypeid FROM alerts a WHERE EXISTS (SELECT NULL FROM actions aa WHERE a.actionid=aa.actionid AND aa.eventsource='2') AND a.clock>'1604885439' AND a.clock<'1604885741' ORDER BY a.alertid DESC LIMIT 1001] [ERROR: invalid page in block 16 of relation base/16385/17507]
pg_query(): Query failed: ERROR: invalid page in block 16 of relation base/16385/17507 [auditacts.php:120 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CAlert->get() → DBselect() → pg_query() in include/db.inc.php:247]
Error in query [SELECT a.alertid,a.actionid,a.userid,a.clock,a.sendto,a.s ubject,a.message,a.status,a.retries,a.error,a.aler ttype,a.mediatypeid FROM alerts a WHERE EXISTS (SELECT NULL FROM events e WHERE a.eventid=e.eventid AND e.source='3' AND e.object='0') AND a.clock>'1604885439' AND a.clock<'1604885741' ORDER BY a.alertid DESC LIMIT 1001] [ERROR: invalid page in block 16 of relation base/16385/17507]
pg_query(): Query failed: ERROR: invalid page in block 16 of relation base/16385/17507 [auditacts.php:120 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CAlert->get() → DBselect() → pg_query() in include/db.inc.php:247]
Error in query [SELECT a.alertid,a.actionid,a.userid,a.clock,a.sendto,a.s ubject,a.message,a.status,a.retries,a.error,a.aler ttype,a.mediatypeid FROM alerts a WHERE EXISTS (SELECT NULL FROM events e WHERE a.eventid=e.eventid AND e.source='3' AND e.object='4') AND a.clock>'1604885439' AND a.clock<'1604885741' ORDER BY a.alertid DESC LIMIT 1001] [ERROR: invalid page in block 16 of relation base/16385/17507]
pg_query(): Query failed: ERROR: invalid page in block 16 of relation base/16385/17507 [auditacts.php:120 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CAlert->get() → DBselect() → pg_query() in include/db.inc.php:247]
Error in query [SELECT a.alertid,a.actionid,a.userid,a.clock,a.sendto,a.s ubject,a.message,a.status,a.retries,a.error,a.aler ttype,a.mediatypeid FROM alerts a WHERE EXISTS (SELECT NULL FROM events e WHERE a.eventid=e.eventid AND e.source='3' AND e.object='5') AND a.clock>'1604885439' AND a.clock<'1604885741' ORDER BY a.alertid DESC LIMIT 1001] [ERROR: invalid page in block 16 of relation base/16385/17507]
I would appreciate some help from the zabbix community.
Can I clean the database of all previous data to help fit recover?
Can I extract current hosts and triggers etc and make a new zabbit instance?
Whatever, I just don't want to have to add all the hosts and custom configurations again.
THANKS
James