{"id":2002,"date":"2024-03-13T18:30:13","date_gmt":"2024-03-13T09:30:13","guid":{"rendered":"https:\/\/www.rocher.kyoto.jp\/arbr\/?p=2002"},"modified":"2024-09-19T13:50:43","modified_gmt":"2024-09-19T04:50:43","slug":"ubuntu-22-04-4%e3%81%abzabbix-agent%e3%82%92%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%ef%bc%88apt-get%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.rocher.kyoto.jp\/arbr\/?p=2002","title":{"rendered":"Ubuntu 22.04.4\u306bzabbix-agent\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\uff08apt-get\uff09"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">2024\/09\/19\u8ffd\u8a18<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">ubuntsu24\u306b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3057\u305f\u969b\u306bzabbix\u7528\u306e\u30ec\u30dd\u30b8\u30c8\u30ea\u304c\u306a\u304f\u3066update\u3067\u304d\u306a\u304b\u3063\u305f\u3002\u3082\u3057\u304b\u3057\u305f\u3089\u4e0b\u8a18\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806\u306e\u524d\u306bapt\u7528\u306e\u30ec\u30dd\u30b8\u30c8\u30ea\u306e\u8a2d\u5b9a\u304c\u3044\u308b\u304b\u3082\u3002\u8a2d\u5b9a\u65b9\u6cd5\u306f\u4ee5\u4e0b\u306e\u30a4\u30e1\u30fc\u30b8\u3002deb\u30d5\u30a1\u30a4\u30eb\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u90e8\u5206\u306b\u95a2\u3057\u3066\u306f<a href=\"https:\/\/repo.zabbix.com\/zabbix\/6.4\/ubuntu\/pool\/main\/z\/zabbix-release\/\">\u3053\u3061\u3089\u306e\u516c\u5f0f\u30da\u30fc\u30b8<\/a>\u3092\u898b\u3066\u9069\u5b9c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308bOS\u60c5\u5831\u3067\u66f8\u304d\u63db\u3048<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wget https:\/\/repo.zabbix.com\/zabbix\/6.4\/ubuntu\/pool\/main\/z\/zabbix-release\/<strong><em>zabbix-release_6.4-1%2Bubuntu24.04_all.deb<\/em><\/strong>\nsudo dpkg -i <strong><em>zabbix-release_6.4-1+ubuntu24.04_all.deb<\/em><\/strong>\n\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u30d0\u30fc\u30b8\u30e7\u30f3<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-dark-gray-background-color has-text-color has-background has-link-color wp-elements-6b97343624beaeaa5876fd289a7c96f8\"><code>yoshitake@mail:~$ cat \/etc\/issue\nUbuntu 22.04.4 LTS \\n \\l<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u3092\u5165\u308c\u308b\u30b5\u30fc\u30d0\u30fc\u5074\u306e\u4f5c\u696d<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\uff08\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6642\u306e\u30ed\u30b0\u306f\u4e0b\u306e\u65b9\u306b\u5f35\u308a\u4ed8\u3051\u3066\u304a\u3044\u305f\uff09<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-dark-gray-background-color has-text-color has-background has-link-color wp-elements-539c448841ee7b6c3d4f14ee536c7909\"><code>sudo apt-get update\nsudo apt-get install zabbix-agent<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u3068\u308a\u3042\u3048\u305a\u8d77\u52d5\uff08\u540c\u3058\u304f\u30ed\u30b0\u306f\u4e0b\u306e\u65b9\u306b\u5f35\u308a\u4ed8\u3051\u3066\u304a\u3044\u305f\uff09<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-dark-gray-background-color has-text-color has-background has-link-color wp-elements-7483a6516d0018ab49899871378e0c9a\"><code>sudo systemctl enable zabbix-agent\nsudo systemctl start zabbix-agent\nsudo systemctl status zabbix-agent<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8a2d\u5b9a\u958b\u59cb\u524d\u306e\u30d5\u30a1\u30a4\u30eb\u9000\u907f<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-dark-gray-background-color has-text-color has-background has-link-color wp-elements-b063c12fdd2a967c196bd4464b64e8fa\"><code>cd \/etc\/zabbix\/\nsudo git init\nsudo git add --all\nsudo git commit -m \"\u521d\u671f\u72b6\u614b\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\/etc\/zabbix\/zabbix_agentd.conf\u306eServer\u3068Hostname\u3092\u7de8\u96c6\u3057\u3066\uff08hostname\u8a2d\u5b9a\u3057\u305f\u3051\u3069\u4f7f\u308f\u306a\u3044\u304b\u3082\uff09<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-dark-gray-background-color has-text-color has-background has-link-color wp-elements-8f849561a14d53342ebc8d3f43d671da\"><code>yoshitake@mail:\/etc\/zabbix$ sudo git diff\ndiff --git a\/zabbix_agentd.conf b\/zabbix_agentd.conf\nindex 1a4978a..838895d 100644\n--- a\/zabbix_agentd.conf\n+++ b\/zabbix_agentd.conf\n@@ -114,7 +114,7 @@ LogFileSize=0\n # Default:\n # Server=\n\n-Server=127.0.0.1\n+Server=<strong><em>kanshiserver.example.co.jp<\/em><\/strong>\n\n ### Option: ListenPort\n #      Agent will listen on this port for connections from the server.\n@@ -165,7 +165,7 @@ ServerActive=127.0.0.1\n # Mandatory: no\n # Default:\n # Hostname=\n-\n+Hostname=<strong><em>kanshisareruserver.example.co.jp<\/em><\/strong>\n\n ### Option: HostnameItem\n #      Item used for generating Hostname if it is undefined. Ignored if Hostname is defined.<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u30b5\u30fc\u30d3\u30b9\u518d\u8d77\u52d5<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-white-color has-dark-gray-background-color has-text-color has-background has-link-color wp-elements-5ecaaa05ea0d68d87bdbc9f1c90c4422\">sudo systemctl restart zabbix-agent<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5fc5\u8981\u306a\u3089\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u5074\u306e\u30dd\u30fc\u30c8\u306e\u30d5\u30a1\u30a4\u30e4\u30a6\u30a9\u30fc\u30eb\u3092\u958b\u3051\u308b<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-dark-gray-background-color has-text-color has-background has-link-color wp-elements-547880a4bfe52d59a4ac9c327c756aef\"><code>sudo ufw allow 10050<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u672c\u4f53\u30b5\u30fc\u30d0\u30fc\u5074\u306e\u4f5c\u696d<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u3059\u3067\u306b\u3042\u308b\u524d\u63d0\u3067\u3001Web\u306e\u753b\u9762\u304b\u3089\u30ed\u30b0\u30a4\u30f3<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Configration-&gt;Hosts\u304b\u3089\u53f3\u4e0a\u306e&#8221;Create host&#8221;\u30dc\u30bf\u30f3\u3092\u9078\u629e<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">name\u4efb\u610f\u3001group\u4efb\u610f\u3001inrterface\u306f\u30a2\u30fc\u30b8\u30a7\u30f3\u30c8\u306e\u30b5\u30fc\u30d0\u306e\u5024\u3001\u5fc5\u8981\u306a\u3089\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u6307\u5b9a\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3057\u3070\u3089\u304f\u5f85\u3063\u3066\u3044\u308b\u3068\u901a\u4fe1\u3067\u304d\u3066\u305f\u3089Configration\u306ehosts\u306b\u751f\u3048\u3066\u304d\u305f\u8ffd\u52a0\u3057\u305fhost\u306eAvailability-&gt;ZBX\u304c\u7dd1\u306b\u306a\u308b\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30ed\u30b0\u95a2\u4fc2<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6642\u30ed\u30b0<\/h3>\n\n\n\n<pre class=\"wp-block-code has-white-color has-dark-gray-background-color has-text-color has-background has-link-color wp-elements-4bd299c3ab7e1a5f9caa0ad75899a457\"><code>yoshitake@mail:~$ sudo apt-get install zabbix-agent\n\u30d1\u30c3\u30b1\u30fc\u30b8\u30ea\u30b9\u30c8\u3092\u8aad\u307f\u8fbc\u3093\u3067\u3044\u307e\u3059... \u5b8c\u4e86\n\u4f9d\u5b58\u95a2\u4fc2\u30c4\u30ea\u30fc\u3092\u4f5c\u6210\u3057\u3066\u3044\u307e\u3059... \u5b8c\u4e86\n\u72b6\u614b\u60c5\u5831\u3092\u8aad\u307f\u53d6\u3063\u3066\u3044\u307e\u3059... \u5b8c\u4e86\n\u4ee5\u4e0b\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u65b0\u305f\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3059:\n  zabbix-agent\n\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9: 0 \u500b\u3001\u65b0\u898f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb: 1 \u500b\u3001\u524a\u9664: 0 \u500b\u3001\u4fdd\u7559: 2 \u500b\u3002\n298 kB \u306e\u30a2\u30fc\u30ab\u30a4\u30d6\u3092\u53d6\u5f97\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\n\u3053\u306e\u64cd\u4f5c\u5f8c\u306b\u8ffd\u52a0\u3067 945 kB \u306e\u30c7\u30a3\u30b9\u30af\u5bb9\u91cf\u304c\u6d88\u8cbb\u3055\u308c\u307e\u3059\u3002\n\u53d6\u5f97:1 http:\/\/archive.ubuntu.com\/ubuntu jammy\/universe amd64 zabbix-agent amd64 1:5.0.17+dfsg-1 &#91;298 kB]\n298 kB \u3092 2\u79d2 \u3067\u53d6\u5f97\u3057\u307e\u3057\u305f (163 kB\/s)\n\u4ee5\u524d\u306b\u672a\u9078\u629e\u306e\u30d1\u30c3\u30b1\u30fc\u30b8 zabbix-agent \u3092\u9078\u629e\u3057\u3066\u3044\u307e\u3059\u3002\n(\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u8aad\u307f\u8fbc\u3093\u3067\u3044\u307e\u3059 ... \u73fe\u5728 135471 \u500b\u306e\u30d5\u30a1\u30a4\u30eb\u3068\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u307e\u3059\u3002)\n...\/zabbix-agent_1%3a5.0.17+dfsg-1_amd64.deb \u3092\u5c55\u958b\u3059\u308b\u6e96\u5099\u3092\u3057\u3066\u3044\u307e\u3059 ...\nzabbix-agent (1:5.0.17+dfsg-1) \u3092\u5c55\u958b\u3057\u3066\u3044\u307e\u3059...\nzabbix-agent (1:5.0.17+dfsg-1) \u3092\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059 ...\n\nCreating config file \/etc\/zabbix\/zabbix_agentd.conf with new version\nCreated symlink \/etc\/systemd\/system\/multi-user.target.wants\/zabbix-agent.service \u2192 \/lib\/systemd\/system\/zabbix-agent.service.\nman-db (2.10.2-1) \u306e\u30c8\u30ea\u30ac\u3092\u51e6\u7406\u3057\u3066\u3044\u307e\u3059 ...\nScanning processes...\nScanning linux images...\n\nRunning kernel seems to be up-to-date.\n\nNo services need to be restarted.\n\nNo containers need to be restarted.\n\nNo user sessions are running outdated binaries.\n\nNo VM guests are running outdated hypervisor (qemu) binaries on this host.<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u8d77\u52d5\u8a2d\u5b9a\u6642\u30ed\u30b0<\/h3>\n\n\n\n<pre class=\"wp-block-code has-white-color has-dark-gray-background-color has-text-color has-background has-link-color wp-elements-78100430871b95e238a04888c4b35d61\"><code>yoshitake@mail:~$ sudo systemctl enable zabbix-agent\nSynchronizing state of zabbix-agent.service with SysV service script with \/lib\/systemd\/systemd-sysv-install.\nExecuting: \/lib\/systemd\/systemd-sysv-install enable zabbix-agent\nyoshitake@mail:~$ sudo systemctl start zabbix-agent\nyoshitake@mail:~$ sudo systemctl status zabbix-agent\n\u25cf zabbix-agent.service - Zabbix Agent\n     Loaded: loaded (\/lib\/systemd\/system\/zabbix-agent.service; enabled; vendor &gt;\n     Active: active (running) since Wed 2024-03-13 17:37:38 JST; 5min ago\n       Docs: man:zabbix_agentd\n   Main PID: 24243 (zabbix_agentd)\n      Tasks: 6 (limit: 1012)\n     Memory: 4.3M\n        CPU: 88ms\n     CGroup: \/system.slice\/zabbix-agent.service\n             tq24243 \/usr\/sbin\/zabbix_agentd --foreground\n             tq24246 \"\/usr\/sbin\/zabbix_agentd: collector &#91;idle 1 sec]\"\n             tq24247 \"\/usr\/sbin\/zabbix_agentd: listener #1 &#91;waiting for connect&gt;\n             tq24248 \"\/usr\/sbin\/zabbix_agentd: listener #2 &#91;waiting for connect&gt;\n             tq24249 \"\/usr\/sbin\/zabbix_agentd: listener #3 &#91;waiting for connect&gt;\n             mq24250 \"\/usr\/sbin\/zabbix_agentd: active checks #1 &#91;idle 1 sec]\"\n\n 3\u6708 13 17:37:38 mail.epea.co.jp systemd&#91;1]: Started Zabbix Agent.\n 3\u6708 13 17:37:38 mail.epea.co.jp zabbix_agentd&#91;24243]: Starting Zabbix Agent &#91;m&gt;\n 3\u6708 13 17:37:38 mail.epea.co.jp zabbix_agentd&#91;24243]: Press Ctrl+C to exit.\n...skipping...\n\u25cf zabbix-agent.service - Zabbix Agent\n     Loaded: loaded (\/lib\/systemd\/system\/zabbix-agent.service; enabled; vendor &gt;\n     Active: active (running) since Wed 2024-03-13 17:37:38 JST; 5min ago\n       Docs: man:zabbix_agentd\n   Main PID: 24243 (zabbix_agentd)\n      Tasks: 6 (limit: 1012)\n     Memory: 4.3M\n        CPU: 88ms\n     CGroup: \/system.slice\/zabbix-agent.service\n             tq24243 \/usr\/sbin\/zabbix_agentd --foreground\n             tq24246 \"\/usr\/sbin\/zabbix_agentd: collector &#91;idle 1 sec]\"\n             tq24247 \"\/usr\/sbin\/zabbix_agentd: listener #1 &#91;waiting for connect&gt;\n             tq24248 \"\/usr\/sbin\/zabbix_agentd: listener #2 &#91;waiting for connect&gt;\n             tq24249 \"\/usr\/sbin\/zabbix_agentd: listener #3 &#91;waiting for connect&gt;\n             mq24250 \"\/usr\/sbin\/zabbix_agentd: active checks #1 &#91;idle 1 sec]\"\n\n 3\u6708 13 17:37:38 mail.epea.co.jp systemd&#91;1]: Started Zabbix Agent.\n 3\u6708 13 17:37:38 mail.epea.co.jp zabbix_agentd&#91;24243]: Starting Zabbix Agent &#91;m&gt;\n 3\u6708 13 17:37:38 mail.epea.co.jp zabbix_agentd&#91;24243]: Press Ctrl+C to exit.<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>2024\/09\/19\u8ffd\u8a18 ubuntsu24\u306b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3057\u305f\u969b\u306bzabbix\u7528\u306e\u30ec\u30dd\u30b8\u30c8\u30ea\u304c\u306a\u304f\u3066update\u3067\u304d\u306a\u304b\u3063\u305f\u3002\u3082\u3057\u304b\u3057\u305f\u3089\u4e0b\u8a18\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806\u306e\u524d\u306bapt\u7528\u306e\u30ec\u30dd\u30b8\u30c8\u30ea\u306e\u8a2d\u5b9a\u304c\u3044\u308b\u304b\u3082\u3002\u8a2d\u5b9a\u65b9\u6cd5\u306f\u4ee5\u4e0b\u306e [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[58],"tags":[],"class_list":["post-2002","post","type-post","status-publish","format-standard","hentry","category-58"],"_links":{"self":[{"href":"https:\/\/www.rocher.kyoto.jp\/arbr\/index.php?rest_route=\/wp\/v2\/posts\/2002","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rocher.kyoto.jp\/arbr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rocher.kyoto.jp\/arbr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rocher.kyoto.jp\/arbr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rocher.kyoto.jp\/arbr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2002"}],"version-history":[{"count":3,"href":"https:\/\/www.rocher.kyoto.jp\/arbr\/index.php?rest_route=\/wp\/v2\/posts\/2002\/revisions"}],"predecessor-version":[{"id":2084,"href":"https:\/\/www.rocher.kyoto.jp\/arbr\/index.php?rest_route=\/wp\/v2\/posts\/2002\/revisions\/2084"}],"wp:attachment":[{"href":"https:\/\/www.rocher.kyoto.jp\/arbr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2002"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rocher.kyoto.jp\/arbr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2002"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rocher.kyoto.jp\/arbr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2002"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}