Difference between revisions of "Zabbix One-Liners"
Jump to navigation
Jump to search
Line 8: | Line 8: | ||
UPDATE interface SET ip = '192.168.1.1', dns = 'example.com' WHERE hostid = 11111 AND main = 1; | UPDATE interface SET ip = '192.168.1.1', dns = 'example.com' WHERE hostid = 11111 AND main = 1; | ||
+ | |||
+ | |||
+ | zabbix_get -s host.example.com -p 10050 -k vm.memory.size[free] | ||
+ | |||
+ | |||
+ | zabbix_agent -t vm.memory.size[free] | ||
+ | zabbix_agentd -p |
Revision as of 00:08, 26 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';
UPDATE interface SET ip = '192.168.1.1', dns = 'example.com' WHERE hostid = 11111 AND main = 1;
zabbix_get -s host.example.com -p 10050 -k vm.memory.size[free]
zabbix_agent -t vm.memory.size[free] zabbix_agentd -p