Zabbix is another monitoring system and runs on Linux and uses PHP and MySQL and can run on Apache Web Server
The install target is a CentOS 7 server
Get RPM
sudo rpm -ivh http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm
Then install Zabbix server and agent
sudo yum install zabbix-server-mysql zabbix-web-mysql
sudo yum install zabbix-agent
Goto mysql
mysql -uroot -p
First, create the Zabbix database with UTF-8 character support:
create database zabbix character set utf8;
Next, create a user that the Zabbix server will use, give it access to the new database, and set the password:
grant all privileges on zabbix.* to zabbix@localhost identified by 'your_password';
Then apply these new permissions
flush privileges;
Exit out of the database console.
quit;
Next we have to import the initial schema and data. The Zabbix installation provided us with a file that sets this up for us. We just have to import it. Navigate to the directory:
cd /usr/share/doc/zabbix-server-mysql-***
Run the following command to set up the schema and import the data into the zabbix database. We’ll use zcat since the data in the file is compressed.
zcat create.sql.gz | mysql -uzabbix -p zabbix
Enter the password for the zabbix user that you configured when prompted.
In order for the Zabbix server to use this database, you need to set the database password in the Zabbix server configuration file.
sudo vi /etc/zabbix/zabbix_server.conf
### Option: DBPassword
# Database password. Ignored for SQLite.
# Comment this line if no password is used.
#
# Mandatory: no
# Default:
# DBPassword=
Then enter the below in the browser
http://zabbix_server_ip_address/zabbix/
and configure the rest of the steps
For the agent
sudo rpm -ivh http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm
sudo yum install zabbix-agent
sudo vi /etc/zabbix/zabbix_agentd.conf
sudo systemctl restart zabbix-agent
sudo systemctl status zabbix-agent
sudo systemctl enable zabbix-agent
In the agent config file zabbix_agentd.conf,set the following
Server=zabbixserverIPaddress
ServerActive=zabbixserveripaddress
Hostname=Zabbix server
Hostname of zabbix server will be in the front end in web admin and is not the hostname of the server.
net.tcp.service[ssh,,155]
0 is down
1 is up
create new item and add to template
create new trigger
TriggerName sshcheck on {HOST.NAME}
expression
{Template OS Linux:net.tcp.service[ssh,,22].last()}=0
Had issues on the zabbix client machine with the agent sending data and we have to either disable firewall or configure the firewall to allow zabbix port 10050.