Line 8: |
Line 8: |
| === Description === | | === Description === |
| | | |
− | [http://www.zabbix.com Zabbix] offers advanced monitoring, alerting and visualisation features today which are missing in other monitoring systems, even some of the best commercial ones: | + | [http://www.zabbix.com Zabbix] offers advanced monitoring, alerting and visualisation features today which are missing in other monitoring systems, even some of the best commercial ones. |
| | | |
| === Features === | | === Features === |
Line 131: |
Line 131: |
| === Full documentation === | | === Full documentation === |
| | | |
− | A complete documentation is available as a PDF file here http://www.zabbix.com/documentation.php | + | A complete documentation is available as a PDF file [https://www.zabbix.com/documentation/current/en here.] |
− | You'll also find some useful informations on the official [http://www.zabbix.com/wiki/doku.php wiki] of the project and the [http://www.zabbix.com/forum/ forum]. | + | You'll also find some useful informations on the official [https://www.zabbix.com/forum/ forum]. |
| | | |
| {{Note box|This wiki page is not a complete guide for Zabbix, but just a starting point to run it on your SME Server using this contrib. | | {{Note box|This wiki page is not a complete guide for Zabbix, but just a starting point to run it on your SME Server using this contrib. |
− | For a complete documentation, please refer to the project documentation: http://www.zabbix.com/documentation.php}} | + | For a complete documentation, please refer to the project documentation: https://www.zabbix.com/documentation/current/en.}} |
| | | |
| === Versions === | | === Versions === |
Line 203: |
Line 203: |
| ===== Installation===== | | ===== Installation===== |
| <tabs container=""><tab name="SME 10"> | | <tabs container=""><tab name="SME 10"> |
| + | to install zabbix 4.4 |
| yum install smeserver-extrarepositories-zabbix -y | | yum install smeserver-extrarepositories-zabbix -y |
| db yum_repositories setprop zabbix44 status enabled | | db yum_repositories setprop zabbix44 status enabled |
Line 212: |
Line 213: |
| zabbix42 zabbix44 zabbix45 zabbix50 zabbix51 zabbix52 zabbix53 | | zabbix42 zabbix44 zabbix45 zabbix50 zabbix51 zabbix52 zabbix53 |
| | | |
− | Zabbix is not provided as server on Rhel 7 for version 4.5 and up. This is because of base php version, which could be worked around using php-fpm, but would also us to build it. | + | Zabbix is not provided as server on Rhel 7 for version 5.1 and up. This is because of base php version, which could be worked around using php-fpm, but would also need us to build it. |
| | | |
| install zabbix 50 server | | install zabbix 50 server |
Line 274: |
Line 275: |
| | | |
| The main web interface is available (if not disabled with the key WebAccess) on https://server.domain.tld/zabbix. | | The main web interface is available (if not disabled with the key WebAccess) on https://server.domain.tld/zabbix. |
− | The default user is '''Admin''' (with uppercase A as first letter), with strong password found in the config property AdminPasswd starting smeserver-zabbix-server 0.1-29. If you change it, it will not be overwritten on update. ( prior that the default was '''zabbix''', in this case you should change this password ASAP) | + | The default user is '''Admin''' (with uppercase A as first letter), with strong password found in the config property AdminPasswd starting smeserver-zabbix-server 0.1-29. If you change it, it will not be overwritten on update. ( prior that the default was '''zabbix''', in this case you should change this password ASAP)<syntaxhighlight lang="bash"> |
− | | + | config getprop zabbix-server AdminPassword |
− | Here are some screenshots of what you can get with zabbix | + | </syntaxhighlight>Here are some screenshots of what you can get with zabbix |
| [[File:Zabbix_graph_cpu.png|768px|thumb|center|CPU Usage Graph]] | | [[File:Zabbix_graph_cpu.png|768px|thumb|center|CPU Usage Graph]] |
| [[File:Zabbix_graph_mem.png|768px|thumb|center|Memory Usage Graph]] | | [[File:Zabbix_graph_mem.png|768px|thumb|center|Memory Usage Graph]] |
Line 333: |
Line 334: |
| | | |
| *'''Template_icmp''': will configure two items to check if the server is alive, and measure the latency. It also provides latency graphs and some triggers (if latency is too high, if host is down since more than 5min and if hosts is down for more than 1 hour) | | *'''Template_icmp''': will configure two items to check if the server is alive, and measure the latency. It also provides latency graphs and some triggers (if latency is too high, if host is down since more than 5min and if hosts is down for more than 1 hour) |
| + | |
| + | === Monitoring ressources === |
| + | |
| + | * https://github.com/zabbix/community-templates |
| + | * https://git.lapiole.org/rpms/zabbix-agent-addons |
| + | * |
| | | |
| === Upgrading 4.4 to 5.0 === | | === Upgrading 4.4 to 5.0 === |
Line 345: |
Line 352: |
| echo "SELECT CONCAT('ALTER TABLE ',TABLE_NAME,' ENGINE=InnoDB;') FROM INFORMATION_SCHEMA.TABLES WHERE ENGINE='MyISAM' AND table_schema = 'zabbixdb';" |mysql105 -s|mysql105 zabbixdb | | echo "SELECT CONCAT('ALTER TABLE ',TABLE_NAME,' ENGINE=InnoDB;') FROM INFORMATION_SCHEMA.TABLES WHERE ENGINE='MyISAM' AND table_schema = 'zabbixdb';" |mysql105 -s|mysql105 zabbixdb |
| </syntaxhighlight> | | </syntaxhighlight> |
− | * fix collation | + | * fix collation, for the issue "[Z3005] query failed: [1071] Specified key was too long; max key length is 3072 bytes [create index items_1 on items (hostid,key_(1021))]" [https://www.zabbix.com/forum/zabbix-troubleshooting-and-problems/401826-database-upgrade-failed-specified-key-was-too-long-max-key-length-is-3072-bytes see here.]<syntaxhighlight lang="bash"> |
− | <syntaxhighlight lang="bash">
| + | echo "SELECT CONCAT('ALTER TABLE ',TABLE_SCHEMA,'.',TABLE_NAME,' CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;') FROM information_schema.TABLES WHERE TABLE_SCHEMA = 'zabbixdb';" |mysql105 -s |mysql10 |
− | echo "alter database $(config getprop zabbix-server DbName) character set utf8mb4 collate utf8mb4_bin;" |mysql105
| |
− | wget https://www.zabbix.com/documentation/current/assets/en/manual/appendix/install/utf8mb4_convert.sql
| |
− | cat utf8mb4_convert.sql |mysql105 `config getprop zabbix-server DbName`
| |
− | echo "SET @ZABBIX_DATABASE = '$(config getprop zabbix-server DbName)'; \ | |
− | set innodb_strict_mode = OFF; \
| |
− | CALL zbx_convert_utf8(); \
| |
− | set innodb_strict_mode = ON; \
| |
− | drop procedure zbx_convert_utf8;"|mysql105 `config getprop zabbix-server DbName`
| |
| </syntaxhighlight> | | </syntaxhighlight> |
| * fix the table with database/mysql/double.sql<syntaxhighlight lang="mysql"> | | * fix the table with database/mysql/double.sql<syntaxhighlight lang="mysql"> |
| cat /usr/share/doc/zabbix-server-mysql-5.0.30/double.sql |mysql105 `config getprop zabbix-server DbName` | | cat /usr/share/doc/zabbix-server-mysql-5.0.30/double.sql |mysql105 `config getprop zabbix-server DbName` |
| + | </syntaxhighlight> |
| + | * fix the foreign key for the issue "[Z3005] query failed: [1091] Can't DROP FOREIGN KEY `c_items_1`; check that it exists [alter table items drop foreign key c_items_1]" [https://www.zabbix.com/forum/zabbix-troubleshooting-and-problems/402412-zabbix-4-4-8-to-5-0-upgrade-failure see here]<syntaxhighlight lang="bash"> |
| + | echo "ALTER TABLE items ADD CONSTRAINT c_items_1 FOREIGN KEY (hostid) REFERENCES hosts (hostid) ON DELETE CASCADE; |
| + | CREATE INDEX items_1 ON items (hostid);" |mysql105 zabbixdb |
| </syntaxhighlight> | | </syntaxhighlight> |
| | | |
Line 367: |
Line 370: |
| rpm -e --nodeps zabbix-web-mysql zabbix-web smeserver-zabbix-server | | rpm -e --nodeps zabbix-web-mysql zabbix-web smeserver-zabbix-server |
| yum install smeserver-zabbix-server-z50 --enablerepo=smecontribs,smetest,smedev | | yum install smeserver-zabbix-server-z50 --enablerepo=smecontribs,smetest,smedev |
| + | </syntaxhighlight> |
| + | ** fix collation after install |
| + | <syntaxhighlight lang="bash"> |
| + | echo "alter database $(config getprop zabbix-server DbName) character set utf8mb4 collate utf8mb4_bin;" |mysql105 |
| + | wget https://www.zabbix.com/documentation/current/assets/en/manual/appendix/install/utf8mb4_convert.sql |
| + | cat utf8mb4_convert.sql |mysql105 `config getprop zabbix-server DbName` |
| + | echo "SET @ZABBIX_DATABASE = '$(config getprop zabbix-server DbName)'; \ |
| + | set innodb_strict_mode = OFF; \ |
| + | CALL zbx_convert_utf8(); \ |
| + | set innodb_strict_mode = ON; \ |
| + | drop procedure zbx_convert_utf8;"|mysql105 `config getprop zabbix-server DbName` |
| </syntaxhighlight> | | </syntaxhighlight> |
| | | |
Line 385: |
Line 399: |
| === Bugs === | | === Bugs === |
| Please raise bugs under the SME-Contribs section in [http://bugs.contribs.org/enter_bug.cgi bugzilla] | | Please raise bugs under the SME-Contribs section in [http://bugs.contribs.org/enter_bug.cgi bugzilla] |
− | and select the smeserver-zabbix component or use on of this link: | + | and select the smeserver-zabbix-server component or use {{BugzillaFileBug|product=SME%20Contribs|component=smeserver-zabbix-server|title=this link.}} |
− | ====smeserver-zabbix-server====
| + | Below is an overview of the current issues for this contrib:{{#bugzilla:columns=id,product,version,status,summary |sort=id|order=desc |component=smeserver-zabbix-server|noresultsmessage="No open bugs found."}} |
− | new bug for {{BugzillaFileBug|product=SME%20Contribs|component=smeserver-zabbix-server|title=server}}
| + | |
− | {{#bugzilla:columns=id,product,version,status,summary |sort=id|order=desc |component=smeserver-zabbix-server|noresultsmessage="No open bugs found."}} | + | ===Changelog=== |
| + | Only released version in smecontrib are listed here. |
| | | |
| + | {{#smechangelog: smeserver-zabbix-server }} |
| | | |
| | | |