{"id":317,"date":"2013-03-11T13:28:59","date_gmt":"2013-03-11T12:28:59","guid":{"rendered":"http:\/\/sam-soul.fr\/Info\/?p=317"},"modified":"2018-10-25T15:29:35","modified_gmt":"2018-10-25T13:29:35","slug":"install-zabbix-agent-linux-redhat","status":"publish","type":"post","link":"http:\/\/les-fougs.com\/wordpress\/2013\/03\/11\/install-zabbix-agent-linux-redhat\/","title":{"rendered":"Install zabbix agent Linux REDHAT"},"content":{"rendered":"<p><strong>alias ll=&rsquo;ls -ltra\u2019<\/strong><\/p>\n<p><a name=\"download-agent-and-server-components-unpack-and-compiles-\"><\/a><\/p>\n<h2>download agent and server components, unpack and compiles :ll \/et<\/h2>\n<p>[ora102@hyde ERPMIG agent]$ <strong>cd \/data\/zabbix\/agent<\/strong><br \/>\n[ora102@hyde ERPMIG agent]$ <strong>gunzip zabbix-1.8.5.tar.gz<\/strong><br \/>\n[ora102@hyde ERPMIG agent]$ <strong>tar -xvf zabbix-1.8.5.tar<\/strong><br \/>\n[root@hyde ~]# <strong>sudo groupadd -g 9000 zabbix<\/strong><br \/>\n[root@hyde ~]# <strong>sudo adduser -m -d \/home\/zabbix -g 9000 zabbix<\/strong><br \/>\n[root@hyde ~]# <strong>sudo passwd zabbix<\/strong><br \/>\n<strong>zabbix#123<\/strong><\/p>\n<pre>[root@hyde ~]# cd \/data\/zabbix\/agent\/zabbix-1.8.5 \r\n[root@hyde zabbix-1.8.5]# .\/configure --enable-agent \r\n\r\nconfig.status: creating src\/zabbix_server\/proxypoller\/Makefile config.status: creating src\/zabbix_server\/selfmon\/Makefile config.status: creating src\/zabbix_proxy\/Makefile config.status: creating src\/zabbix_proxy\/heart\/Makefile config.status: creating src\/zabbix_proxy\/housekeeper\/Makefile config.status: creating src\/zabbix_proxy\/proxyconfig\/Makefile config.status: creating src\/zabbix_proxy\/datasender\/Makefile config.status: creating upgrades\/Makefile config.status: creating man\/Makefile config.status: creating include\/config.h config.status: executing depfiles commands Configuration: Detected OS: linux-gnu Install path: \/usr\/local Compilation arch: linux Compiler: gcc Compiler flags: -g -O2 Enable server: no Enable proxy: no Enable agent: yes Agent details: Linker flags: -rdynamic Libraries: -lm -lresolv LDAP support: no IPv6 support: no *********************************************************** * Now run 'make install' * * * * Thank you for using Zabbix! * * * ***********************************************************<\/pre>\n<p>[root@hyde zabbix-1.8.5]# <strong>make install<\/strong><br \/>\n\u2026<br \/>\n\u2026<\/p>\n<p><a name=\"Set-etcservices-and-agentconf\"><\/a><\/p>\n<h2>Set \/etc\/services and agent.conf<\/h2>\n<p>[root@hyde zabbix-1.8.5]# <strong>vim \/etc\/services<\/strong><\/p>\n<pre>#------------------------------------- # Srvices Zabbix #-------------------------- \r\n\r\nzabbix_agent 10050\/tcp \r\nzabbix_trap 10051\/tcp<\/pre>\n<p>[root@hyde sbin]# <strong>cd \/usr\/local\/sbin<\/strong><br \/>\n[root@hyde sbin]# <strong>ll<\/strong><br \/>\ntotal 1084<br \/>\n-rwxr-xr-x 1 root root 492955 mai 23 14:51 zabbix_agent<br \/>\n-rwxr-xr-x 1 root root 594638 mai 23 14:51 zabbix_agentd<\/p>\n<p>[root@hyde etc]# <strong>cd \/etc<\/strong><br \/>\n[root@hyde etc]# <strong>mkdir zabbix<\/strong><br \/>\n[root@hyde etc]# <strong>cp \/data\/zabbix\/agent\/zabbix-1.8.5\/misc\/conf\/zabbix_agent.conf \/etc\/zabbix\/<\/strong><br \/>\n[root@hyde sbin]# <strong>cp \/data\/zabbix\/agent\/zabbix-1.8.5\/misc\/conf\/zabbix_agentd.conf \/etc\/zabbix\/<\/strong><\/p>\n<p>[root@hyde sbin]# <strong>vim \/etc\/zabbix\/zabbix_agentd.conf<\/strong><\/p>\n<pre># \r\n# Mandatory: no \r\n# Default: \r\n# LogRemoteCommands=0 \r\n##### Passive checks related ### \r\nOption: Server \r\n# List of comma delimited IP addresses (or hostnames) of Zabbix servers. \r\n# No spaces allowed. First entry is used for receiving list of and sending active checks. \r\n# If IPv6 support is enabled then '127.0.0.1', '::127.0.0.1', '::ffff:127.0.0.1' are treated equally. \r\n# \r\n# Mandatory: yes \r\n# Default: \r\n# Server= Server=vmoni.ft.grp ### \r\nOption: Hostname \r\n# Unique, case sensitive hostname. \r\n# Required for active checks and must match hostname as configured on the server. \r\n# System hostname is used if undefined. \r\n# \r\n# Default: \r\n# Hostname=system.hostname Hostname=Hyde \r\n### Option: ListenPort \r\n# Agent will listen on this port for connections from the server. # \r\n# Mandatory: no \r\n# Range: 1024-32767 \r\n# Default: \r\nListenPort=10050 \r\n### Option: ListenIP \r\n# List of comma delimited IP addresses that the agent should listen on. \r\n# \r\n# \r\nMandatory: no \r\n# \r\nDefault: ListenIP=10.1.1.79 \r\n### \r\nOption: DisablePassive<\/pre>\n<p><a name=\"Copy-and-Modify-zabbix_agentd_ctl-file-\"><\/a><\/p>\n<h2>Copy and Modify zabbix_agentd_ctl file :<\/h2>\n<p>[root@hyde redhat]# <strong>cd \/data\/zabbix\/agent\/zabbix-1.8.5\/misc\/init.d\/redhat\/<\/strong><br \/>\n[root@hyde redhat]# <strong>ll<\/strong><br \/>\ntotal 24<br \/>\ndrwxr-xr-x 2 zabbix zabbix 4096 avr 15 21:20 8.0<br \/>\n-rwxr-xr-x 1 zabbix zabbix 3214 avr 15 21:17 zabbix_agentd_ctl<br \/>\n-rwxr-xr-x 1 zabbix zabbix 3198 avr 15 21:17 zabbix_server_ctl<br \/>\n[root@hyde redhat]# <strong>cp zabbix_agentd_ctl \/etc\/init.d\/<\/strong><\/p>\n<p>[root@hyde redhat]# <strong>cd \/etc\/init.d\/<\/strong><br \/>\n[root@hyde redhat]# <strong>vim zabbix_agentd_ctl<\/strong><\/p>\n<pre># base zabbix dir \r\n#BASEDIR=\/opt\/zabbix \r\nBASEDIR=\/usr\/local\/<\/pre>\n<p><a name=\"STOP-START-Agent\"><\/a><\/p>\n<h2>STOP \/ START Agent<\/h2>\n<p>[root@hyde init.d]# <strong>.\/zabbix_agentd_ctl stop<\/strong><br \/>\n.\/zabbix_agentd_ctl stop: zabbix_agentd process(es) stopped<br \/>\n[root@hyde init.d]# <strong>ps aux |grep zabbix_agent<\/strong><br \/>\nroot 12057 0.0 0.0 52148 768 pts\/3 S+ 11:08 0:00 grep zabbix_agent<br \/>\n[root@hyde init.d]# <strong>.\/zabbix_agentd_ctl start<\/strong><br \/>\n.\/zabbix_agentd_ctl start: zabbix_agentd started<br \/>\n[root@hyde init.d]# <strong>ps aux |grep zabbix_agent<\/strong><br \/>\nzabbix 12064 0.0 0.0 7188 788 ? SN 11:08 0:00 \/usr\/local\/sbin\/zabbix_agentd<br \/>\nzabbix 12065 0.0 0.0 7188 1000 ? SN 11:08 0:00 \/usr\/local\/sbin\/zabbix_agentd<br \/>\nzabbix 12066 0.0 0.0 7188 788 ? SN 11:08 0:00 \/usr\/local\/sbin\/zabbix_agentd<br \/>\nzabbix 12067 0.0 0.0 7188 788 ? SN 11:08 0:00 \/usr\/local\/sbin\/zabbix_agentd<br \/>\nzabbix 12068 0.0 0.0 7188 788 ? SN 11:08 0:00 \/usr\/local\/sbin\/zabbix_agentd<br \/>\nzabbix 12069 0.0 0.0 8232 912 ? SN 11:08 0:00 \/usr\/local\/sbin\/zabbix_agentd<br \/>\nroot 12089 0.0 0.0 52148 768 pts\/3 S+ 11:08 0:00 grep zabbix_agent<br \/>\n[root@hyde init.d]#<\/p>\n<p><a name=\"Test-the-proper-operation-of-the-agent\"><\/a><\/p>\n<p>cd \/etc\/rc3.d\/<br \/>\nln -s ..\/init.d\/zabbix_agent_stop.sh K20zabbix-agent<br \/>\nln -s ..\/init.d\/zabbix_agent_start.sh S20zabbix-agent<\/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:~# <strong>zabbix_get -p 10050 -k agent.version -s<\/strong> <em>servername<\/em><\/p>\n<p>1.8.5<\/p>\n<p>Must return the version of the zabbix agent.<\/p>\n<hr \/>\n<p><a name=\"NLE-notes-test-oracle-probes\"><\/a><\/p>\n<h2>NLE notes, test oracle probes<\/h2>\n<p>[zabbix@hyde ERPTEST sbin]$ .\/zabbix_agent -c \/etc\/zabbix\/zabbix_agentd.conf -t ora-check-instance-erptest<\/p>\n<p>root@vmoni:\/etc\/zabbix# zabbix_get -s hyde.faiveleytransport.local -p 10050 -k ora-check-instance-erptest<br \/>\nZBX_NOTSUPPORTED<\/p>\n<p>root@vmoni:\/etc\/zabbix# zabbix_get -s 127.0.0.1 -p 10050 -k agent.version<br \/>\n1.8.5<br \/>\nroot@vmoni:\/etc\/zabbix# zabbix_get -s 127.0.0.1 -p 10050 -k testnico<br \/>\n3<\/p>\n<p>3.7 Zabbix Get (UNIX)<br \/>\nZabbix UNIX Get est un processus qui communique avec l\u2019agent ZABBIX et r\u00e9cup\u00e8re les informations n\u00e9cessaires.<br \/>\nCet utilitaire est g\u00e9n\u00e9ralement utilis\u00e9 pour r\u00e9soudre les probl\u00e8mes des agents ZABBIX.<br \/>\nZabbix Get peut \u00eatre d\u00e9marr\u00e9 en utilisant:<br \/>\nshell&gt; cd bin<br \/>\nshell&gt; .\/zabbix_get -s127.0.0.1 -p10050 -k&nbsp;&raquo;system.cpu.load[all,avg1]&nbsp;&raquo;<br \/>\nZabbix Get accepte les param\u00e8tres en ligne de commandes suivants:<br \/>\n-p \u2013port Sp\u00e9cifie le port de l\u2019agent qui fonctionne sur l\u2019h\u00f4te. La valeur par d\u00e9faut est 10050.<br \/>\n-s -host Sp\u00e9cifie le nom machine ou l\u2019adresse IP de l\u2019h\u00f4te.<br \/>\n-I \u2013source-address Sp\u00e9cifie l\u2019adresse IP source<br \/>\n-k -key Sp\u00e9cifie le nom de la m\u00e9trique (cl\u00e9) que nous voulons r\u00e9cup\u00e9rer.<br \/>\n-h \u2013help Affiche cette aide.<br \/>\n-v \u2013version Affiche la version.<br \/>\nPour afficher cette aide:<br \/>\nshell&gt; zabbix_get -h<\/p>\n<p>V\u00e9rification d\u2019un item<\/p>\n<p>root@vmoni:~# zabbix_get -s hyde.faiveleytransport.local -p 10050 -k oracle[latchfree,erptest,gpbatch,hornet]<br \/>\n658<\/p>\n<p>root@vmoni:~# zabbix_get -s hyde.faiveleytransport.local -p 10050 -k oracle[version,erptest,gpbatch,hornet]<br \/>\nOracle Database 10g Release 10.2.0.4.0 &#8211; 64bit Production<\/p>\n","protected":false},"excerpt":{"rendered":"<p>alias ll=&rsquo;ls -ltra\u2019 download agent and server components, unpack and compiles :ll \/et [ora102@hyde ERPMIG agent]$ cd \/data\/zabbix\/agent [ora102@hyde ERPMIG agent]$ gunzip zabbix-1.8.5.tar.gz [ora102@hyde ERPMIG agent]$ tar -xvf zabbix-1.8.5.tar [root@hyde ~]# sudo groupadd -g 9000 zabbix [root@hyde ~]# sudo adduser -m -d \/home\/zabbix -g 9000 zabbix [root@hyde ~]# sudo passwd zabbix zabbix#123 [root@hyde ~]# cd &hellip; <a href=\"http:\/\/les-fougs.com\/wordpress\/2013\/03\/11\/install-zabbix-agent-linux-redhat\/\" class=\"more-link\">Continuer la lecture<span class=\"screen-reader-text\"> de &laquo;&nbsp;Install zabbix agent Linux REDHAT&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\/317"}],"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=317"}],"version-history":[{"count":5,"href":"http:\/\/les-fougs.com\/wordpress\/wp-json\/wp\/v2\/posts\/317\/revisions"}],"predecessor-version":[{"id":2067,"href":"http:\/\/les-fougs.com\/wordpress\/wp-json\/wp\/v2\/posts\/317\/revisions\/2067"}],"wp:attachment":[{"href":"http:\/\/les-fougs.com\/wordpress\/wp-json\/wp\/v2\/media?parent=317"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/les-fougs.com\/wordpress\/wp-json\/wp\/v2\/categories?post=317"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/les-fougs.com\/wordpress\/wp-json\/wp\/v2\/tags?post=317"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}