Skip to content

Instantly share code, notes, and snippets.

@cherts
Created January 13, 2020 11:00
Show Gist options
  • Select an option

  • Save cherts/a7c0962b6c06211f61bd86305f6e1de0 to your computer and use it in GitHub Desktop.

Select an option

Save cherts/a7c0962b6c06211f61bd86305f6e1de0 to your computer and use it in GitHub Desktop.
Cleaning filter in web-interface from Zabbix v4.4.4
# Get zabbix user id:
SELECT u.userid FROM users u WHERE u.ALIAS='mgrigoriev';
# Cleaning filter on 'Problems' page:
DELETE FROM profiles WHERE idx='web.problem.filter.show' AND idx2='0' AND userid='XXX'
DELETE FROM profiles WHERE idx='web.problem.filter.groupids' AND userid='XXX'
DELETE FROM profiles WHERE idx='web.problem.filter.hostids' AND userid='XXX'
DELETE FROM profiles WHERE idx='web.problem.filter.application' AND idx2='0' AND userid='XXX'
DELETE FROM profiles WHERE idx='web.problem.filter.triggerids' AND userid='XXX'
DELETE FROM profiles WHERE idx='web.problem.filter.name' AND idx2='0' AND userid='XXX'
DELETE FROM profiles WHERE idx='web.problem.filter.severity' AND idx2='0' AND userid='XXX'
DELETE FROM profiles WHERE idx='web.problem.filter.age_state' AND idx2='0' AND userid='XXX'
DELETE FROM profiles WHERE idx='web.problem.filter.age' AND idx2='0' AND userid='XXX'
DELETE FROM profiles WHERE idx='web.problem.filter.inventory.field' AND userid='XXX'
DELETE FROM profiles WHERE idx='web.problem.filter.inventory.value' AND userid='XXX'
DELETE FROM profiles WHERE idx='web.problem.filter.evaltype' AND idx2='0' AND userid='XXX'
DELETE FROM profiles WHERE idx='web.problem.filter.tags.tag' AND userid='XXX'
DELETE FROM profiles WHERE idx='web.problem.filter.tags.value' AND userid='XXX'
DELETE FROM profiles WHERE idx='web.problem.filter.tags.operator' AND userid='XXX'
DELETE FROM profiles WHERE idx='web.problem.filter.show_tags' AND idx2='0' AND userid='XXX'
DELETE FROM profiles WHERE idx='web.problem.filter.tag_name_format' AND idx2='0' AND userid='XXX'
DELETE FROM profiles WHERE idx='web.problem.filter.tag_priority' AND idx2='0' AND userid='XXX'
DELETE FROM profiles WHERE idx='web.problem.filter.show_suppressed' AND idx2='0' AND userid='XXX'
DELETE FROM profiles WHERE idx='web.problem.filter.unacknowledged' AND idx2='0' AND userid='XXX'
DELETE FROM profiles WHERE idx='web.problem.filter.compact_view' AND idx2='0' AND userid='XXX'
DELETE FROM profiles WHERE idx='web.problem.filter.show_timeline' AND idx2='0' AND userid='XXX'
DELETE FROM profiles WHERE idx='web.problem.filter.details' AND idx2='0' AND userid='XXX'
DELETE FROM profiles WHERE idx='web.problem.filter.highlight_row' AND idx2='0' AND userid='XXX'
DELETE FROM profiles WHERE idx='web.problem.filter.show_opdata' AND idx2='0' AND userid='XXX'
# Cleaning filter on 'Latest data' page:
DELETE FROM profiles WHERE idx='web.latest.filter.select' AND idx2='0' AND userid='XXX';
DELETE FROM profiles WHERE idx='web.latest.filter.show_without_data' AND idx2='0' AND userid='XXX';
DELETE FROM profiles WHERE idx='web.latest.filter.show_details' AND idx2='0' AND userid='XXX';
DELETE FROM profiles WHERE idx='web.latest.filter.application' AND idx2='0' AND userid='XXX';
DELETE FROM profiles WHERE idx='web.latest.filter.groupids' AND userid='XXX';
DELETE FROM profiles WHERE idx='web.latest.filter.hostids' AND userid='XXX';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment