{"id":8583,"date":"2020-08-28T13:32:56","date_gmt":"2020-08-28T05:32:56","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=8583"},"modified":"2020-08-28T13:32:56","modified_gmt":"2020-08-28T05:32:56","slug":"zabbix-get","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/zabbix-get","title":{"rendered":"zabbix_get\u547d\u4ee4 – zabbix\u83b7\u53d6\u6570\u636e\u5b9e\u7528\u5de5\u5177"},"content":{"rendered":"\n

zabbix_get \u662f\u4e00\u4e2a\u547d\u4ee4\u884c\u5de5\u5177\uff0c\u7528\u4e8e\u4ece Zabbix \u4ee3\u7406\u83b7\u53d6\u6570\u636e\u3002<\/p>\n\n\n\n

zabbix_get \u662f\u5728server\u7aef\u7528\u6765\u68c0\u67e5agent\u7aef\u7684\u4e00\u4e2a\u547d\u4ee4\uff0c\u5728\u6dfb\u52a0\u5b8c\u4e3b\u673a\u6216\u8005\u89e6\u53d1\u5668\u540e\uff0c\u4e0d\u80fd\u6b63\u5e38\u83b7\u5f97\u6570\u636e\uff0c\u53ef\u4ee5\u7528zabbix_get\u6765\u68c0\u67e5\u80fd\u5426\u91c7\u96c6\u5230\u6570\u636e\uff0c\u4ee5\u4fbf\u5224\u65ad\u95ee\u9898\u75c7\u7ed3\u6240\u5728\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>zabbix_get [\u53c2\u6570]<\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n

-s<\/td>\u6307\u5b9a\u5ba2\u6237\u7aef\u4e3b\u673a\u540d\u6216\u8005IP<\/td><\/tr>
-p<\/td>\u5ba2\u6237\u7aef\u7aef\u53e3\uff0c\u9ed8\u8ba4\uff1a10050<\/td><\/tr>
-I<\/td>\u6307\u5b9a\u6e90IP<\/td><\/tr>
-k<\/td>\u60f3\u8981\u83b7\u53d6\u7684key<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n

\u83b7\u53d6\u4e3b\u673a\u7684\u8d1f\u8f7d\u6570\u636e\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# zabbix_get -s 127.0.0.1 -p 10050 -k \"system.cpu.load[all,avg1]\"<\/pre>\n\n\n\n

\u83b7\u53d6\u4e3b\u673a\u540d\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# zabbix_get -s 127.0.0.1 -p 10050 -I 127.0.0.1 -k \"system.hostname\"<\/pre>\n\n\n\n

\u83b7\u53d6\u76d1\u63a7nginx\u72b6\u6001\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# zabbix_get -s 127.0.0.1 -p 10050 -k nginx.status[active]<\/pre>\n","protected":false},"excerpt":{"rendered":"

zabbix_get \u662f\u4e00\u4e2a\u547d\u4ee4\u884c\u5de5\u5177\uff0c\u7528\u4e8e\u4ece Zabbix \u4ee3\u7406\u83b7\u53d6\u6570\u636e\u3002 zabbix_get \u662f\u5728ser […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[11],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/8583"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=8583"}],"version-history":[{"count":3,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/8583\/revisions"}],"predecessor-version":[{"id":8607,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/8583\/revisions\/8607"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=8583"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=8583"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=8583"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}