{"id":315,"date":"2013-03-11T13:28:37","date_gmt":"2013-03-11T12:28:37","guid":{"rendered":"http:\/\/sam-soul.fr\/Info\/?p=315"},"modified":"2013-03-11T13:28:37","modified_gmt":"2013-03-11T12:28:37","slug":"install-zabbix-agent-linux-oel5","status":"publish","type":"post","link":"http:\/\/les-fougs.com\/wordpress\/2013\/03\/11\/install-zabbix-agent-linux-oel5\/","title":{"rendered":"Install zabbix agent Linux OEL5"},"content":{"rendered":"<p>alias ll=&rsquo;ls -ltra\u2019<\/p>\n<p>Example : Install zabbix agent on vdtb4.<\/p>\n<p><a name=\"Create-zabbix-user\"><\/a><\/p>\n<h2>Create zabbix user<\/h2>\n<p>cat \/etc\/passwd<\/p>\n<p>adduser zabbix<\/p>\n<p>pwd : zabbixadm<\/p>\n<p>addgroup zabbix admin<\/p>\n<p>su &#8211; zabbix<\/p>\n<p>cd \/home\/zabbix<\/p>\n<p><a name=\"Download-agent-and-server-components-unpack\"><\/a><\/p>\n<h2>Download agent and server components, unpack:<\/h2>\n<p><a href=\"http:\/\/www.zabbix.com\/download2.php\">Distrib Zabbix : <\/a><a href=\"http:\/\/www.zabbix.com\/download2.php\">www.zabbix.com\/download2.php<\/a><\/p>\n<p>wget <a href=\"http:\/\/downloads.sourceforge.net\/project\/zabbix\/ZABBIX%20Latest%20Stable\/1.8\/zabbix-1.8.tar.gz\">http:\/\/downloads.sourceforge.net\/project\/zabbix\/ZABBIX%20Latest%20Stable\/1.8\/zabbix-1.8.tar.gz<\/a><br \/>\ntar zxvpf zabbix-1.8.tar.gz<br \/>\nwget <a href=\"http:\/\/www.zabbix.com\/downloads\/1.8.5\/zabbix_agents_1.8.5.linux2_6.i386.tar.gz\">http:\/\/www.zabbix.com\/downloads\/1.8.5\/zabbix_agents_1.8.5.linux2_6.i386.tar.gz<\/a><br \/>\ntar zxvf zabbix_agents_1.8.5.linux2_6.i386.tar.gz<\/p>\n<p><a name=\"Copy-agent-files-and-create-needed-directories\"><\/a><\/p>\n<h2>Copy agent files and create needed directories:<\/h2>\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.5\/misc\/conf\/zabbix_agent* \/etc\/zabbix\/<br \/>\ncp \/home\/zabbix\/bin\/zabbix_get \/usr\/bin\/<br \/>\ncp \/home\/zabbix\/bin\/zabbix_sender \/usr\/bin\/<br \/>\ncp \/home\/zabbix\/sbin\/zabbix_agent \/usr\/sbin\/<br \/>\ncp \/home\/zabbix\/sbin\/zabbix_agentd \/usr\/sbin\/<\/p>\n<p><a name=\"Edit-zabbix-agent-configuration\"><\/a><\/p>\n<h2>Edit zabbix agent configuration:<\/h2>\n<p>vim \/etc\/zabbix\/zabbix_agentd.conf<\/p>\n<p>Change :<br \/>\n<strong>DebugLevel=1<\/strong><\/p>\n<p><strong>Server=vmoni.ft.grp<\/strong><\/p>\n<p><strong>Hostname=vdtb4.ft.grp<\/strong> (Nom du client)<\/p>\n<p><strong>ListenPort=10050<\/strong><\/p>\n<p><strong>ListenIP=130.117.62.228<\/strong> (Ip du client)<\/p>\n<p><a name=\"Edit-Services-file\"><\/a><\/p>\n<h2>Edit Services file:<\/h2>\n<p>cat \/etc\/services | grep 10050<br \/>\ncat \/etc\/services | grep 10051<\/p>\n<p>vim \/etc\/services<\/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><a name=\"Copy-the-initd-scripts\"><\/a><\/p>\n<h2>Copy the init.d scripts:<\/h2>\n<p>cp \/home\/zabbix\/zabbix-1.8\/misc\/init.d\/redhat\/zabbix_agentd_ctl \/etc\/init.d<\/p>\n<p>#Edit the script files:<br \/>\nvim \/etc\/init.d\/zabbix_agentd_ctl<\/p>\n<p>#Change:<br \/>\n#BASEDIR=\/opt\/zabbix<br \/>\nBASEDIR=\/usr<\/p>\n<p>#ZABBIX_AGENTD=$BASEDIR\/bin\/zabbix_agentd<br \/>\nZABBIX_AGENTD=$BASEDIR\/sbin\/zabbix_agentd<\/p>\n<p><a name=\"Set-the-correct-rights-and-set-zabbix-to-start-automatically\"><\/a><\/p>\n<h2>Set the correct rights and set zabbix to start automatically:<\/h2>\n<p>ll \/etc\/init.d\/zabbix_agentd_ctl<br \/>\nchmod 755 \/etc\/init.d\/zabbix_agentd_ctl<br \/>\nupdate-rc.d zabbix_agentd_ctl defaults<\/p>\n<p>#Start the agent:<br \/>\n.\/zabbix_agentd_ctl start<\/p>\n<p>#Check if the Agent is running:<br \/>\nps aux | grep -v grep | grep zabbix_agentd<\/p>\n<p>zabbix 3479 0.0 0.0 2748 536 ? SN 10:21 0:00 \/usr\/sbin\/zabbix_agentd<br \/>\nzabbix 3480 0.0 0.0 2748 764 ? SN 10:21 0:00 \/usr\/sbin\/zabbix_agentd<br \/>\nzabbix 3481 0.0 0.0 2748 420 ? SN 10:21 0:00 \/usr\/sbin\/zabbix_agentd<br \/>\nzabbix 3482 0.0 0.0 2748 420 ? SN 10:21 0:00 \/usr\/sbin\/zabbix_agentd<br \/>\nzabbix 3483 0.0 0.0 2772 768 ? SN 10:21 0:00 \/usr\/sbin\/zabbix_agentd<br \/>\nzabbix 3484 0.0 0.0 2780 772 ? SN 10:21 0:00 \/usr\/sbin\/zabbix_agentd<\/p>\n<p><a name=\"Test-the-proper-operation-of-the-agent\"><\/a><\/p>\n<h2>Test the proper operation of the agent.<\/h2>\n<p>Connect on vmoni with root account.<\/p>\n<p>cd \/usr\/local\/bin<\/p>\n<p>root@vmoni:~# zabbix_get -p 10050 -k agent.version -s servername<\/p>\n<p>1.8.5<\/p>\n<p>Must return the version of the zabbix agent.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>alias ll=&rsquo;ls -ltra\u2019 Example : Install zabbix agent on vdtb4. Create zabbix user cat \/etc\/passwd adduser zabbix pwd : zabbixadm addgroup zabbix admin su &#8211; zabbix cd \/home\/zabbix Download agent and server components, unpack: Distrib Zabbix : www.zabbix.com\/download2.php wget http:\/\/downloads.sourceforge.net\/project\/zabbix\/ZABBIX%20Latest%20Stable\/1.8\/zabbix-1.8.tar.gz tar zxvpf zabbix-1.8.tar.gz wget http:\/\/www.zabbix.com\/downloads\/1.8.5\/zabbix_agents_1.8.5.linux2_6.i386.tar.gz tar zxvf zabbix_agents_1.8.5.linux2_6.i386.tar.gz Copy agent files and create needed directories: &hellip; <a href=\"http:\/\/les-fougs.com\/wordpress\/2013\/03\/11\/install-zabbix-agent-linux-oel5\/\" class=\"more-link\">Continuer la lecture<span class=\"screen-reader-text\"> de &laquo;&nbsp;Install zabbix agent Linux OEL5&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":[52,47],"tags":[],"_links":{"self":[{"href":"http:\/\/les-fougs.com\/wordpress\/wp-json\/wp\/v2\/posts\/315"}],"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=315"}],"version-history":[{"count":0,"href":"http:\/\/les-fougs.com\/wordpress\/wp-json\/wp\/v2\/posts\/315\/revisions"}],"wp:attachment":[{"href":"http:\/\/les-fougs.com\/wordpress\/wp-json\/wp\/v2\/media?parent=315"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/les-fougs.com\/wordpress\/wp-json\/wp\/v2\/categories?post=315"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/les-fougs.com\/wordpress\/wp-json\/wp\/v2\/tags?post=315"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}