{"id":10,"date":"2013-03-10T12:06:29","date_gmt":"2013-03-10T11:06:29","guid":{"rendered":"http:\/\/sam-soul.fr\/Info\/?p=10"},"modified":"2013-03-10T12:06:29","modified_gmt":"2013-03-10T11:06:29","slug":"install-zabbix-agent-linux-ubuntu","status":"publish","type":"post","link":"http:\/\/les-fougs.com\/wordpress\/2013\/03\/10\/install-zabbix-agent-linux-ubuntu\/","title":{"rendered":"Install zabbix agent Linux UBUNTU 2.2.1"},"content":{"rendered":"<p>wget http:\/\/repo.zabbix.com\/zabbix\/2.2\/ubuntu\/pool\/main\/z\/zabbix-release\/zabbix-release_2.2-1+precise_all.deb<\/p>\n<p>dpkg -i zabbix-release_2.2-1+precise_all.deb<\/p>\n<p>apt-get update<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>alias ll=&rsquo;ls -ltra&rsquo;<\/strong><\/p>\n<p><strong>Install the 64-bit Compatibility vs 32 bits.<\/strong><\/p>\n<p>if necessary. <strong>apt-get install ia32-libs<\/strong><\/p>\n<p><strong>cat \/etc\/passwd<\/strong><\/p>\n<p><strong>adduser zabbix<\/strong><\/p>\n<p>pwd :<strong> zabbixadm<\/strong><\/p>\n<p><strong>addgroup zabbix admin<\/strong><\/p>\n<p><strong>su &#8211; zabbix<\/strong><\/p>\n<p><strong>cd \/home\/zabbix<\/strong><\/p>\n<p><strong>download agent and server components, unpack:<\/strong><br \/>\nwget http:\/\/downloads.sourceforge.net\/project\/zabbix\/ZABBIX%20Latest%20Stable\/2.2.3\/zabbix-2.2.3.tar.gz tar zxvpf zabbix-2.2.3.tar.gz<\/p>\n<p>wget http:\/\/www.zabbix.com\/downloads\/1.8\/zabbix_agents_1.8.linux2_6.i386.tar.gz tar zxvf zabbix_agents_1.8.linux2_6.i386.tar.gz*exit*<\/p>\n<p><strong>Copy agent files and create needed directories:<\/strong><\/p>\n<p>cd \/home\/zabbix\/zabbix-1.8\/<br \/>\nmkdir \/etc\/zabbix<br \/>\nmkdir \/var\/log\/zabbix<br \/>\nchown -R zabbix.zabbix \/etc\/zabbix\/<br \/>\nchown -R zabbix.zabbix \/var\/log\/zabbix<br \/>\ncp \/home\/zabbix\/zabbix-1.8\/misc\/conf\/zabbix_agent* \/etc\/zabbix\/<br \/>\ncp \/home\/zabbix\/zabbix-1.8\/bin\/zabbix_get \/usr\/bin\/<br \/>\ncp \/home\/zabbix\/zabbix-1.8\/bin\/zabbix_sender \/usr\/bin\/<br \/>\ncp \/home\/zabbix\/zabbix-1.8\/sbin\/zabbix_agent \/usr\/sbin\/<br \/>\ncp \/home\/zabbix\/zabbix-1.8\/sbin\/zabbix_agentd \/usr\/sbin\/<\/p>\n<p><strong>Edit zabbix agent configuration:<\/strong><\/p>\n<p><strong>vi \/etc\/zabbix\/zabbix_agentd.conf<\/strong><\/p>\n<p>#make sure server ip is correct:<br \/>\n<strong>Server=vmoni.ft.grp<\/strong><\/p>\n<h2>Edit Services file :<\/h2>\n<p><strong>vi \/etc\/services<\/strong><\/p>\n<p>#Add the following rules at the end:<br \/>\nzabbix_agent 10050\/tcp # Zabbix ports<br \/>\nzabbix_trap 10051\/tcp # Zabbix ports<\/p>\n<p>Copy the init.d scripts:<\/p>\n<p><strong>cp \/home\/zabbix\/zabbix-1.8\/misc\/init.d\/debian\/zabbix-agent \/etc\/init.d<\/strong><\/p>\n<h2>Edit the script files :<\/h2>\n<p><strong>vi \/etc\/init.d\/zabbix-agent<\/strong><br \/>\n<strong>#Change:<\/strong><br \/>\n<strong> #DAEMON=\/home\/zabbix\/bin\/${NAME}<\/strong><br \/>\n<strong> DAEMON=\/usr\/sbin\/${NAME}<\/strong><br \/>\n<strong><\/strong><\/p>\n<p>Set the correct permissions and set zabbix to start automatically:<\/p>\n<p><strong>chmod 755 \/etc\/init.d\/zabbix-agent<\/strong><br \/>\n<strong>update-rc.d zabbix-agent defaults<\/strong><\/p>\n<h2><strong>Stop \/ Start the agent:<\/strong><\/h2>\n<p>To stop zabbix agent<\/p>\n<p><strong>.\/etc\/init.d\/zabbix-agent stop<\/strong><br \/>\nStopping Zabbix agent daemon: zabbix_agentd<\/p>\n<p>To start zabbix agent<\/p>\n<p><strong>.\/etc\/init.d\/zabbix-agent start<\/strong><br \/>\nStarting Zabbix agent daemon: zabbix_agentd<\/p>\n<p>Check if the Agent is running:<br \/>\n<strong>ps -aux | grep -v grep | grep zabbix_agentd<\/strong><\/p>\n<pre>zabbix 10302 0.0 0.0 3368 556 ? SN 14:32 0:00 \/usr\/sbin\/zabbix_agentd\n zabbix 10303 0.4 0.0 3368 796 ? SN 14:32 0:00 \/usr\/sbin\/zabbix_agentd\n zabbix 10304 0.0 0.0 3368 440 ? SN 14:32 0:00 \/usr\/sbin\/zabbix_agentd\n zabbix 10305 0.0 0.0 3368 440 ? SN 14:32 0:00 \/usr\/sbin\/zabbix_agentd\n zabbix 10306 0.0 0.0 3368 440 ? SN 14:32 0:00 \/usr\/sbin\/zabbix_agentd\n zabbix 10307 0.0 0.0 3404 840 ? SN 14:32 0:00 \/usr\/sbin\/zabbix_agentd\n zabbix 10323 0.0 0.0 7528 892 pts\/1 R+ 14:32 0:00 grep zabbix_agent<\/pre>\n<h2><strong>Test\u00a0<\/strong><\/h2>\n<p>Connect on <strong>vmoni<\/strong> with <strong>root<\/strong> account<\/p>\n<p><strong>cd \/usr\/local\/bin<\/strong><\/p>\n<p>root@vmoni:~# <strong>zabbix_get -p 10050 -k agent.version -s <em>servername<\/em><br \/>\n<\/strong><\/p>\n<p>1.8<\/p>\n<p>Must return the version of the zabbix agent.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>wget http:\/\/repo.zabbix.com\/zabbix\/2.2\/ubuntu\/pool\/main\/z\/zabbix-release\/zabbix-release_2.2-1+precise_all.deb dpkg -i zabbix-release_2.2-1+precise_all.deb apt-get update &nbsp; &nbsp; &nbsp; &nbsp; alias ll=&rsquo;ls -ltra&rsquo; Install the 64-bit Compatibility vs 32 bits. if necessary. apt-get install ia32-libs cat \/etc\/passwd adduser zabbix pwd : zabbixadm addgroup zabbix admin su &#8211; zabbix cd \/home\/zabbix download agent and server components, unpack: wget http:\/\/downloads.sourceforge.net\/project\/zabbix\/ZABBIX%20Latest%20Stable\/2.2.3\/zabbix-2.2.3.tar.gz tar zxvpf zabbix-2.2.3.tar.gz wget http:\/\/www.zabbix.com\/downloads\/1.8\/zabbix_agents_1.8.linux2_6.i386.tar.gz tar &hellip; <a href=\"http:\/\/les-fougs.com\/wordpress\/2013\/03\/10\/install-zabbix-agent-linux-ubuntu\/\" class=\"more-link\">Continuer la lecture<span class=\"screen-reader-text\"> de &laquo;&nbsp;Install zabbix agent Linux UBUNTU 2.2.1&nbsp;&raquo;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[47],"tags":[],"_links":{"self":[{"href":"http:\/\/les-fougs.com\/wordpress\/wp-json\/wp\/v2\/posts\/10"}],"collection":[{"href":"http:\/\/les-fougs.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/les-fougs.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/les-fougs.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/les-fougs.com\/wordpress\/wp-json\/wp\/v2\/comments?post=10"}],"version-history":[{"count":0,"href":"http:\/\/les-fougs.com\/wordpress\/wp-json\/wp\/v2\/posts\/10\/revisions"}],"wp:attachment":[{"href":"http:\/\/les-fougs.com\/wordpress\/wp-json\/wp\/v2\/media?parent=10"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/les-fougs.com\/wordpress\/wp-json\/wp\/v2\/categories?post=10"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/les-fougs.com\/wordpress\/wp-json\/wp\/v2\/tags?post=10"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}