Showing posts with label zabbix_agent. Show all posts
Showing posts with label zabbix_agent. Show all posts

Thursday, February 22, 2018

How to install zabbix agent on windows ?


Zabbix Agent is installed on remote systems needs to monitor through Zabbix server. The Zabbix agent collects resource utilization and applications data on client system and provide such information to zabbix server on their requests.
install Zabbix agent service on windows system
Step 1 – Download Agent Source Code

Download latest windows zabbix agent source code from zabbix official site or use below link to download zabbix agent 3.0.0.
After downloading the zipped archive of zabbix client, extract its content under c:\zabbix directory.
Step 2 – Create Agent Configuration File
Now make of copy of sample configuration file c:\zabbix\conf\zabbix_agentd.win.conf to create zabbix agent configuration file at c:\zabbix\zabbix_agentd.conf. Now edit configuration and update following values.
#Server=[zabbix server ip]
#Hostname=[Hostname of client system ]

Server=192.168.1.26
Serveractive=192.168.1.26
Hostname=linuxforfreshers.com
Step 3: Install Zabbix Agent as Windows Service
Lets install zabbix agent as windows server by executing following command from command line.
c:\zabbix\bin\win64> zabbix_agentd.exe -c c:\zabbix\zabbix_agentd.conf --install

zabbix_agentd.exe [9084]: service [Zabbix Agent] installed successfully
zabbix_agentd.exe [9084]: event source [Zabbix Agent] installed successfully
Step 4 – Start/Stop Agent Service
Use following command to start zabbix agent service from command line
c:\zabbix\bin\win64> zabbix_agentd.exe --start

zabbix_agentd.exe [7048]: service [Zabbix Agent] started successfully
c:\zabbix\bin\win64> zabbix_agentd.exe --stop

zabbix_agentd.exe [9608]: service [Zabbix Agent] stopped successfully
Uninstalling agent
c:\zabbix\bin\win64> zabbix_agentd.exe -c c:\zabbix\zabbix_agentd.conf --uninstall

Tuesday, February 13, 2018

how to install and configure zabbix agent on linux ?

Zabbix Agent is required to install on all remote systems needs to monitor through Zabbix server. The Zabbix Agent collects resource utilization and applications data on the client system and provides such information to Zabbix server on their requests.
There are two types of checks can be configured between Zabbix Server and Client.
  • Passive check Zabbix Agent only sent data to server on their request.
  • Active check – Zabbix Agent sends data periodically to Server.
After installing zabbix server on your server, this article will help you to install zabbix agent on Ubuntu 16.04 LTS, 14.04 LTS, and Debian 9/8 systems. After completing this below steps go to next article add host in zabbix server.
Step 1 – Enable Apt Repository
Zabbix apt repositories are available on Zabbix official website. Add the repository to install required packages for Zabbix agent using the following command. For the older version of Ubuntu 12.04 LTS can download and install Zabbix agent version 2.2.
On Ubuntu systems & Debian
In RHEL system
wget
Step 2 – Install Zabbix Agent
As you have successfully added Zabbix apt repositories in your system let’s use the following command to install Zabbix agent using the following command
On Ubuntu & Debian based systems
sudo apt-get update
sudo apt-get install zabbix-agent
In RHEL Based Systems.
rpm -Uvh  zabbix-agent-3.4.0-1.el7.x86_64.rpm
Step 3 – Edit Zabbix Agent Configuration
After installing completed of Zabbix aget. Edit zabbix agent configuration file /etc/zabbix/zabbix_agentd.conf and update Zabbix server ip
#Server=[zabbix server ip]
#Hostname=[Hostname of client system ]

Server=
192.168.101.25
ServerActive=192.168.101.25
Hostname=linuxforfreshers.com
Where
Server=IP of Zabbix Server
ServerActive=IP of Zabbix Server
Hostname=use the hostname of the node where the agent runs
Step 4 – Adding port 10050 to firewall
If your system is behind a firewall then you need to open 10050/tcp port on the system in order to reach through Zabbix server.
For Debian based systems, including Ubuntu, you can use ufw tool to open the port and on RHEL 7 you can use Firewalld utility to manage the firewall rules as the below examples:
On Debian based systems
sudo ufw allow 10050/tcp
On RHEL/CENTOS 7 systems
sudo firewall-cmd --add-port=10050/tcp --permanent
For older distributions such as centOS/Rhel 6 or unmanaged firewalls through specific utilities use the powerful iptables command to open ports:
iptables -A INPUT -p tcp -m tcp --dport 10050 -j ACCEPT
Step 5 – Restarting Zabbix Agent
After adding Zabbix server IP in the configuration file, now restart agent service using below command.
sudo service zabbix-agent restart
Troubleshooting
Finally, in order to test if you can reach Zabbix Agent from Zabbix Server, use Telnet command from Zabbix server machine to the IP addresses of the machines that run the agents, as illustrated below (don’t worry about the thrown error from agents):
telnet zabbix_agent_IP 10050
[ram@zabbixserver]$ telnet 192.168.101.26 10050
Trying 192.168.101.26...
Connected to 192.168.101.26 (192.168.101.26).
Escape character is '^]'.
ZBXD)ZBX_NOTSUPPORTEDInvalid item key format.Connection closed by foreign host