{"id":342,"date":"2019-10-03T11:29:52","date_gmt":"2019-10-03T10:29:52","guid":{"rendered":"https:\/\/www.syslab.network\/?page_id=342"},"modified":"2019-12-19T13:39:40","modified_gmt":"2019-12-19T13:39:40","slug":"zabbix-agent-install","status":"publish","type":"page","link":"https:\/\/www.syslab.network\/index.php\/zabbix-2\/zabbix-agent-install\/","title":{"rendered":"Zabbix Agent Install"},"content":{"rendered":"<div class=\"post-content\">\n<p>We can monitor with Zabbix by different methods. Such as Zabbix Agent, SNMP, IPMI and in the case of VMWare ESXI we can use the SDK.<\/p>\n\n\n\n<p>In this scenario we will install Zabbix agent in a Windows environment and a Linux environment more specifically on CentOS 7.<\/p>\n\n\n\n<h3>Zabbix Agent on Windows<\/h3>\n\n\n\n<p>Go to the download page from zabbix <a href=\"https:\/\/www.zabbix.com\/download_agents\">here<\/a>, and download the agent of your Zabbix Server version.<\/p>\n\n\n\n<p>Run the msi installer<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" width=\"741\" height=\"580\" src=\"https:\/\/www.syslab.network\/wp-content\/uploads\/2019\/10\/zabbix1.png\" alt=\"\" class=\"wp-image-344\" srcset=\"https:\/\/www.syslab.network\/wp-content\/uploads\/2019\/10\/zabbix1.png 741w, https:\/\/www.syslab.network\/wp-content\/uploads\/2019\/10\/zabbix1-300x235.png 300w, https:\/\/www.syslab.network\/wp-content\/uploads\/2019\/10\/zabbix1-100x78.png 100w, https:\/\/www.syslab.network\/wp-content\/uploads\/2019\/10\/zabbix1-150x117.png 150w, https:\/\/www.syslab.network\/wp-content\/uploads\/2019\/10\/zabbix1-200x157.png 200w, https:\/\/www.syslab.network\/wp-content\/uploads\/2019\/10\/zabbix1-450x352.png 450w, https:\/\/www.syslab.network\/wp-content\/uploads\/2019\/10\/zabbix1-600x470.png 600w, https:\/\/www.syslab.network\/wp-content\/uploads\/2019\/10\/zabbix1-45x35.png 45w, https:\/\/www.syslab.network\/wp-content\/uploads\/2019\/10\/zabbix1-36x28.png 36w, https:\/\/www.syslab.network\/wp-content\/uploads\/2019\/10\/zabbix1-48x38.png 48w\" sizes=\"(max-width: 741px) 100vw, 741px\" \/><\/figure><\/div>\n\n\n\n<p>Hit next<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" width=\"496\" height=\"389\" src=\"https:\/\/www.syslab.network\/wp-content\/uploads\/2019\/10\/zabbix2.png\" alt=\"\" class=\"wp-image-345\" srcset=\"https:\/\/www.syslab.network\/wp-content\/uploads\/2019\/10\/zabbix2.png 496w, https:\/\/www.syslab.network\/wp-content\/uploads\/2019\/10\/zabbix2-300x235.png 300w, https:\/\/www.syslab.network\/wp-content\/uploads\/2019\/10\/zabbix2-100x78.png 100w, https:\/\/www.syslab.network\/wp-content\/uploads\/2019\/10\/zabbix2-150x118.png 150w, https:\/\/www.syslab.network\/wp-content\/uploads\/2019\/10\/zabbix2-200x157.png 200w, https:\/\/www.syslab.network\/wp-content\/uploads\/2019\/10\/zabbix2-450x353.png 450w, https:\/\/www.syslab.network\/wp-content\/uploads\/2019\/10\/zabbix2-45x35.png 45w, https:\/\/www.syslab.network\/wp-content\/uploads\/2019\/10\/zabbix2-36x28.png 36w, https:\/\/www.syslab.network\/wp-content\/uploads\/2019\/10\/zabbix2-48x38.png 48w\" sizes=\"(max-width: 496px) 100vw, 496px\" \/><\/figure><\/div>\n\n\n\n<p>Select all items and hit next<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" width=\"495\" height=\"413\" src=\"https:\/\/www.syslab.network\/wp-content\/uploads\/2019\/10\/zabbix3.png\" alt=\"\" class=\"wp-image-346\" srcset=\"https:\/\/www.syslab.network\/wp-content\/uploads\/2019\/10\/zabbix3.png 495w, https:\/\/www.syslab.network\/wp-content\/uploads\/2019\/10\/zabbix3-300x250.png 300w, https:\/\/www.syslab.network\/wp-content\/uploads\/2019\/10\/zabbix3-100x83.png 100w, https:\/\/www.syslab.network\/wp-content\/uploads\/2019\/10\/zabbix3-150x125.png 150w, https:\/\/www.syslab.network\/wp-content\/uploads\/2019\/10\/zabbix3-200x167.png 200w, https:\/\/www.syslab.network\/wp-content\/uploads\/2019\/10\/zabbix3-450x375.png 450w, https:\/\/www.syslab.network\/wp-content\/uploads\/2019\/10\/zabbix3-45x38.png 45w, https:\/\/www.syslab.network\/wp-content\/uploads\/2019\/10\/zabbix3-36x30.png 36w, https:\/\/www.syslab.network\/wp-content\/uploads\/2019\/10\/zabbix3-48x40.png 48w\" sizes=\"(max-width: 495px) 100vw, 495px\" \/><\/figure><\/div>\n\n\n\n<ol><li>IP from your Zabbix Server<\/li><li>Check this option<\/li><li>Check this optiom<\/li><\/ol>\n\n\n\n<p>And finish the installation.<\/p>\n\n\n\n<h3>Zabbix Agent on CentOS 7<\/h3>\n\n\n\n<p>Install rpm from Zabbix website<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;smarty&quot;,&quot;mime&quot;:&quot;text\/x-smarty&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;language&quot;:&quot;Smarty&quot;,&quot;modeName&quot;:&quot;smarty&quot;}\">rpm -Uvh https:\/\/repo.zabbix.com\/zabbix\/4.2\/rhel\/7\/x86_64\/zabbix-release-4.2-2.el7.noarch.rpm<\/pre><\/div>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;language&quot;:&quot;HTML&quot;,&quot;modeName&quot;:&quot;html&quot;}\">yum clean<\/pre><\/div>\n\n\n\n<p>Install Zabbix agent<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;smarty&quot;,&quot;mime&quot;:&quot;text\/x-smarty&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;language&quot;:&quot;Smarty&quot;,&quot;modeName&quot;:&quot;smarty&quot;}\">yum install zabbix-agent<\/pre><\/div>\n\n\n\n<p>Now edit the Zabbix Agent configuration file in \/etc\/zabbix\/ and insert the IP from Zabbix Server.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;language&quot;:&quot;Shell&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">##### Passive checks related\n\n### Option: Server\n#\tList of comma delimited IP addresses, optionally in CIDR notation, or DNS names of Zabbix servers and Zabbix proxies.\n#\tIncoming connections will be accepted only from the hosts listed here.\n#\tIf IPv6 support is enabled then '127.0.0.1', '::127.0.0.1', '::ffff:127.0.0.1' are treated equally\n#\tand '::\/0' will allow any IPv4 or IPv6 address.\n#\t'0.0.0.0\/0' can be used to allow any IPv4 address.\n#\tExample: Server=127.0.0.1,192.168.1.0\/24,::1,2001:db8::\/32,zabbix.example.com\n#\n# Mandatory: yes, if StartAgents is not explicitly set to 0\n# Default:\n# Server=\n\nServer= Your Zabbix Server IP\n\n### Option: ListenPort\n#\tAgent will listen on this port for connections from the server.\n#\n# Mandatory: no\n# Range: 1024-32767\n# Default:\n# ListenPort=10050\n\n### Option: ListenIP\n#\tList of comma delimited IP addresses that the agent should listen on.\n#\tFirst IP address is sent to Zabbix server if connecting to it to retrieve list of active checks.<\/pre><\/div>\n\n\n\n<p>Now set the Zabbix Agent start on boot and start the agent<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;smarty&quot;,&quot;mime&quot;:&quot;text\/x-smarty&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;language&quot;:&quot;Smarty&quot;,&quot;modeName&quot;:&quot;smarty&quot;}\">yum enable zabbix-agent<\/pre><\/div>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;smarty&quot;,&quot;mime&quot;:&quot;text\/x-smarty&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;language&quot;:&quot;Smarty&quot;,&quot;modeName&quot;:&quot;smarty&quot;}\">yum start zabbiz-agent<\/pre><\/div>\n\n\n\n<p>It&#8217;s important that SELINUX is disabled and for last open Zabbix Agent port on firewall<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;smarty&quot;,&quot;mime&quot;:&quot;text\/x-smarty&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;language&quot;:&quot;Smarty&quot;,&quot;modeName&quot;:&quot;smarty&quot;}\">firewall-cmd \u2014 permanent \u2014 add-port=10050\/tcp<\/pre><\/div>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;language&quot;:&quot;HTML&quot;,&quot;modeName&quot;:&quot;html&quot;}\">firewall-cmd --reload<\/pre><\/div>\n\n\n\n<p>Check zabbix agent state<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;language&quot;:&quot;HTML&quot;,&quot;modeName&quot;:&quot;html&quot;}\">systemctl status zabbix-agent<\/pre><\/div>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;smarty&quot;,&quot;mime&quot;:&quot;text\/x-smarty&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;language&quot;:&quot;Smarty&quot;,&quot;modeName&quot;:&quot;smarty&quot;}\">\u25cf zabbix-agent.service - Zabbix Agent\n   Loaded: loaded (\/usr\/lib\/systemd\/system\/zabbix-agent.service; enabled; vendor preset: disabled)\n   Active: active (running) since Qua 2019-10-02 10:51:29 WEST; 1 day 1h ago\n  Process: 1179 ExecStart=\/usr\/sbin\/zabbix_agentd -c $CONFFILE (code=exited, status=0\/SUCCESS)\n Main PID: 1211 (zabbix_agentd)\n   CGroup: \/system.slice\/zabbix-agent.service\n           \u251c\u25001211 \/usr\/sbin\/zabbix_agentd -c \/etc\/zabbix\/zabbix_agentd.conf\n           \u251c\u25001233 \/usr\/sbin\/zabbix_agentd: collector [idle 1 sec]\n           \u251c\u25001234 \/usr\/sbin\/zabbix_agentd: listener #1 [waiting for connection]\n           \u251c\u25001235 \/usr\/sbin\/zabbix_agentd: listener #2 [waiting for connection]\n           \u251c\u25001236 \/usr\/sbin\/zabbix_agentd: listener #3 [waiting for connection]\n           \u2514\u25001237 \/usr\/sbin\/zabbix_agentd: active checks #1 [idle 1 sec]<\/pre><\/div>\n\n\n\n<p>And it\u00b4s done!!!<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>We can monitor with Zabbix by different methods. Such as<a href=\"https:\/\/www.syslab.network\/index.php\/zabbix-2\/zabbix-agent-install\/\">Read More<i class=\"fa fa-long-arrow-right\" aria-hidden=\"true\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":309,"parent":232,"menu_order":1,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_mi_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0},"_links":{"self":[{"href":"https:\/\/www.syslab.network\/index.php\/wp-json\/wp\/v2\/pages\/342"}],"collection":[{"href":"https:\/\/www.syslab.network\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.syslab.network\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.syslab.network\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.syslab.network\/index.php\/wp-json\/wp\/v2\/comments?post=342"}],"version-history":[{"count":8,"href":"https:\/\/www.syslab.network\/index.php\/wp-json\/wp\/v2\/pages\/342\/revisions"}],"predecessor-version":[{"id":368,"href":"https:\/\/www.syslab.network\/index.php\/wp-json\/wp\/v2\/pages\/342\/revisions\/368"}],"up":[{"embeddable":true,"href":"https:\/\/www.syslab.network\/index.php\/wp-json\/wp\/v2\/pages\/232"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.syslab.network\/index.php\/wp-json\/wp\/v2\/media\/309"}],"wp:attachment":[{"href":"https:\/\/www.syslab.network\/index.php\/wp-json\/wp\/v2\/media?parent=342"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}