User/Maffblaster/Drafts/Zabbix
Zabbix is software for monitoring applications, networks, and servers, and cloud services.
Zabbix is written in C and PHP.
Installation
USE flags
USE flags for net-analyzer/zabbix ZABBIX is software for monitoring of your applications, network and servers
+agent
|
Enable zabbix agent (for to-be-monitored machines) |
+agent2
|
Enable go-based zabbix agent 2 (for to-be-monitored machines) |
+openssl
|
Use dev-libs/openssl as TLS backend |
+postgres
|
Add support for the postgresql database |
curl
|
Add support for client-side URL transfer library |
frontend
|
Enable zabbix web frontend |
gnutls
|
Prefer net-libs/gnutls as SSL/TLS provider (ineffective with USE=-ssl) |
ipv6
|
Turn on support of IPv6 |
java
|
Enable Zabbix Java JMX Management Gateway |
ldap
|
Add LDAP support (Lightweight Directory Access Protocol) |
libxml2
|
Use libxml2 client library |
mysql
|
Add mySQL Database support |
odbc
|
Enable Database Monitor and use UnixODBC Library by default |
openipmi
|
Enable openipmi things |
oracle
|
Enable Oracle Database support |
proxy
|
Enable proxy support |
selinux
|
!!internal use only!! Security Enhanced Linux support, this must be set by the selinux profile or breakage will occur |
server
|
Enable zabbix server |
snmp
|
Add support for the Simple Network Management Protocol if available |
sqlite
|
Add support for sqlite - embedded sql database |
ssh
|
SSH v2 based checks |
static
|
Build statically linked binaries |
Zabbix server
On hosts acting as a Zabbix server, ensure the server
flag is enabled. Typically the same host will serve the web front end as well as an agent for self-monitoring as well.
The ebuild's server
USE flag requires exactly-one-of either mysql
or postgres
, so disable whichever will not be utilized.
# Zabbix servers will typically serve the web frontend as well as self-monitoring
net-analyzer/zabbix agent frontend server mysql -postgres # Alternatively sqlite or postgres could be used as the DB's backend.
# required by net-analyzer/zabbix-7.0.3::gentoo[server,-proxy]
# required by zabbix (argument)
>=net-analyzer/fping-5.2 suid
The fping software license will be required to be accepted when running Zabbix in a server configuration:
root #
echo "net-analyzer/fping fping" >> /etc/portage/package.license
net-analyzer/fping fping # For Zabbix
Zabbix clients
Systems to be monitored will need to run the agent only.
# Zabbix clients - which will only run the agent
net-analyzer/zabbix agent
Emerge
root #
emerge --ask net-analyzer/zabbix
Web interface (frontend)
Copy the appropriate webapp files from the /usr/share/webapps/zabbix directory into the area used by the web server.
root #
cp -r /usr/share/webapps/zabbix/<version>/htdocs/* /var/www/<place for>/zabbix
PHP requirements
dev-lang/php gd bcmath session sockets xml xmlwriter xmlreader mysql #feel free to change database
Configuration
Services file
Adding info about zabbix services into the /etc/service file. This file serves as a reference database for network services. It contains service names and their associated port number and protocols.
...
# Local services
zabbix-agent 10050/tcp Zabbix Agent
zabbix-agent 10050/udp Zabbix Agent
zabbix-trapper 10051/tcp Zabbix Trapper
zabbix-trapper 10051/udp Zabbix Trapper
MySQL backend database
Zabbix requires a database to hold state information.
root #
mysql -u root -p <password>
root #
create database zabbix character set utf8 collate utf8_bin;
root #
grant all privileges on zabbix.* to zabbix@localhost identified by '<zabbix-user-password>';
root #
quit;
root #
mysql -u zabbix -p zabbix < /usr/share/zabbix/database/mysql/schema.sql
root #
mysql -u zabbix -p zabbix < /usr/share/zabbix/database/mysql/images.sql
root #
mysql -u zabbix -p zabbix < /usr/share/zabbix/database/mysql/data.sql
See also
- Nagios — a complete monitoring and alerting for servers, switches, applications, and services.