Difference between revisions of "Zabbix One-Liners"
Jump to navigation
Jump to search
(Created page with "sudo -u postgres pg_dump -d zabbix --table public.interface | gzip -9 > zabbix.interface.sql.gz") |
|||
| Line 1: | Line 1: | ||
sudo -u postgres pg_dump -d zabbix --table public.interface | gzip -9 > zabbix.interface.sql.gz | sudo -u postgres pg_dump -d zabbix --table public.interface | gzip -9 > zabbix.interface.sql.gz | ||
| + | |||
| + | DELETE FROM interface WHERE interface.main <> 1 | ||
| + | |||
| + | select * FROM interface WHERE interface.hostid = (SELECT hostid from hosts WHERE hosts.name = 'test'); | ||
| + | |||
| + | select * FROM interface INNER JOIN hosts ON interface.hostid = hosts.hostid AND interface.main <> 0 AND hosts.name = 'test'; | ||
Revision as of 23:25, 25 June 2021
sudo -u postgres pg_dump -d zabbix --table public.interface | gzip -9 > zabbix.interface.sql.gz
DELETE FROM interface WHERE interface.main <> 1
select * FROM interface WHERE interface.hostid = (SELECT hostid from hosts WHERE hosts.name = 'test');
select * FROM interface INNER JOIN hosts ON interface.hostid = hosts.hostid AND interface.main <> 0 AND hosts.name = 'test';