<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Konev</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Konev"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Konev"/>
	<updated>2026-04-25T23:41:13Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Zabbix_-_cgi_and_mysql&amp;diff=12944</id>
		<title>Zabbix - cgi and mysql</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Zabbix_-_cgi_and_mysql&amp;diff=12944"/>
		<updated>2016-09-10T01:56:16Z</updated>

		<summary type="html">&lt;p&gt;Konev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The purpose of this document is to assist in installing the Zabbix server software and Zabbix agent on the Alpine Linux operating system. Instructions on how to configure and use Zabbix - as well as many useful tutorials - can be found at http://www.zabbix.com.&lt;br /&gt;
&lt;br /&gt;
{{Note|The minimum required version of Alpine Linux required to install Zabbix is Alpine 2.2. this guide has been updated to zabbix 3.0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Install Lighttpd, and PHP =&lt;br /&gt;
&lt;br /&gt;
{{:Setting Up Lighttpd With FastCGI}}&lt;br /&gt;
&lt;br /&gt;
= Configure PostgreSQL =&lt;br /&gt;
&lt;br /&gt;
Install PostgreSQL&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add postgresql postgresql-client}}&lt;br /&gt;
&lt;br /&gt;
Now configure PostgreSQL:&lt;br /&gt;
{{Cmd|/etc/init.d/postgresql setup&lt;br /&gt;
/etc/init.d/postgresql start&lt;br /&gt;
rc-update add postgresql}}&lt;br /&gt;
&lt;br /&gt;
= Install Zabbix =&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add zabbix zabbix-pgsql zabbix-webif zabbix-setup}}&lt;br /&gt;
&lt;br /&gt;
Now we need to set up the zabbix database. Substitute &#039;*********&#039; in the example below for a real password:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;psql –U postgres&lt;br /&gt;
postgres=# create user zabbix with password &#039;*********&#039;;&lt;br /&gt;
postgres=# create database zabbix owner zabbix;&lt;br /&gt;
postgres=# \q&lt;br /&gt;
cd /usr/share/zabbix/database/postgresql&lt;br /&gt;
cat schema.sql | psql -U zabbix zabbix&lt;br /&gt;
cat data.sql | psql -U zabbix zabbix&lt;br /&gt;
cat images.sql | psql -U zabbix zabbix&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Create a softlink for the Zabbix web-frontend files:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|rm /var/www/localhost/htdocs -R&lt;br /&gt;
ln -s /usr/share/webapps/zabbix /var/www/localhost/htdocs}}&lt;br /&gt;
&lt;br /&gt;
Edit PHP configuration to satisfy some zabbix requirements. Edit /etc/php/php.ini and configure the following values at least:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Max_execution_time = 600&lt;br /&gt;
Expose_php = off&lt;br /&gt;
Date.timezone = &amp;lt;insert your timezone here&amp;gt;&lt;br /&gt;
post_max_size = 32M&lt;br /&gt;
upload_max_filesize = 16M&lt;br /&gt;
max_input_time = 600&lt;br /&gt;
memory_limit = 256M&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Configure the following entries in /etc/zabbix/zabbix_server.conf, where DBPassword is the password chosen for the database above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DBName=zabbix&lt;br /&gt;
&lt;br /&gt;
# Database user&lt;br /&gt;
&lt;br /&gt;
DBUser=zabbix&lt;br /&gt;
&lt;br /&gt;
# Database password&lt;br /&gt;
# Comment this line if no password used&lt;br /&gt;
&lt;br /&gt;
DBPassword=*********&lt;br /&gt;
&lt;br /&gt;
FpingLocation=/usr/sbin/fping&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start Zabbix server:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|rc-update add zabbix-server&lt;br /&gt;
/etc/init.d/zabbix-server start}}&lt;br /&gt;
&lt;br /&gt;
Fix permissions on conf directory.&lt;br /&gt;
&lt;br /&gt;
{{Cmd|chown -R lighttpd /usr/share/webapps/zabbix/conf}}&lt;br /&gt;
&lt;br /&gt;
You should now be able to browse to the Zabbix frontend: http://yourservername/.&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
You should now be able to browse to the Zabbix setup frontend: http://yourserverip/instal.php.&lt;br /&gt;
&lt;br /&gt;
Follow the setup instructions to configure Zabbix, supplying the database information used above.&lt;br /&gt;
&lt;br /&gt;
After setup, login using: Login name: &#039;&#039;&#039;Admin&#039;&#039;&#039; Password:&#039;&#039;&#039;zabbix&#039;&#039;&#039;. (as described at http://www.zabbix.com/documentation/1.8/manual/installation)&lt;br /&gt;
&lt;br /&gt;
Finally, Zabbix requires special permissions to use the fping binary.&lt;br /&gt;
&lt;br /&gt;
{{Cmd|chmod u+s /usr/sbin/fping}}&lt;br /&gt;
&lt;br /&gt;
= Install Zabbix Agent on Monitored Servers =&lt;br /&gt;
&lt;br /&gt;
Zabbix can monitor almost any operating system, including Alpine Linux hosts. Complete the following steps to install the Zabbix agent on Alpine Linux.&lt;br /&gt;
&lt;br /&gt;
{{Note|Support to allow zabbix-agentd to view running processes on Alpine Linux has been added since linux-grsec-2.6.35.9-r2. Please ensure you have that kernel installed prior to attempting to run zabbix-agentd.}}&lt;br /&gt;
&lt;br /&gt;
Ensure that the readproc group exists (support added since alpine-baselayout-2.0_rc1-r1), by adding the following line to /etc/group:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|readproc:x:30:zabbix}}&lt;br /&gt;
&lt;br /&gt;
Install the agent package:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add zabbix-agent}}&lt;br /&gt;
&lt;br /&gt;
Edit the /etc/zabbix/zabbix_agentd.conf file and configure at least the following option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Server=&amp;lt;ip or hostname of zabbix server&amp;gt;&lt;br /&gt;
Hostname=&amp;lt;ip or hostname of zabbix agent&amp;gt;&lt;br /&gt;
ListenPort=10050&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start the zabbix-agent:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|rc-update add zabbix-agentd&lt;br /&gt;
/etc/init.d/zabbix-agentd start}}&lt;br /&gt;
&lt;br /&gt;
In case you want to monitor using SNMP agent on remote machines you have to add these packages on zabbix server:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add net-snmp net-snmp-tools}}&lt;br /&gt;
&lt;br /&gt;
And add these packages on remote machines:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add net-snmp }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Optional: Crash course in adding hosts, checks, and notifications =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; This is optional since it&#039;s not specific to Alpine Linux, but I wanted a couple notes for how to perform a simple check on a server that doesn&#039;t have the agent installed on it, and be notified on state changes.&lt;br /&gt;
&lt;br /&gt;
Administration -&amp;gt; Media Types -&amp;gt; Email&lt;br /&gt;
* Setup server, helo, email from address&lt;br /&gt;
&lt;br /&gt;
Administration -&amp;gt; Users&lt;br /&gt;
* Setup each user who&#039;ll get notified, make sure they have media type &amp;quot;Email&amp;quot; added with their address&lt;br /&gt;
&lt;br /&gt;
Configuration -&amp;gt; Hosts -&amp;gt; Create host&lt;br /&gt;
* In Linux Servers hostgroup&lt;br /&gt;
* Define dns name, ip, connect by IP&lt;br /&gt;
* If the machine is a simple networking device that will only be monitored using SNMP, add it to Template_SNMPv2_Device, and you&#039;re done.&lt;br /&gt;
&lt;br /&gt;
Configuration -&amp;gt; Templates -&amp;gt; Create template&lt;br /&gt;
* Give it a name (Template_Alpine_Linux_Infra_HTTP)&lt;br /&gt;
* In Templates group&lt;br /&gt;
&lt;br /&gt;
Configuration -&amp;gt; Templates -&amp;gt; Template_Alpine_Linux_Infra_HTTP -&amp;gt; Items&lt;br /&gt;
* Create Item&lt;br /&gt;
* Host: Template_Alpine_Linux_Infra_HTTP&lt;br /&gt;
* Description: HTTP Basic Check&lt;br /&gt;
* Type: Simple_check&lt;br /&gt;
* Key: http,80&lt;br /&gt;
&lt;br /&gt;
Configuration -&amp;gt; Templates -&amp;gt; Template_Alpine_Linux_Infra_HTTP -&amp;gt; Triggers&lt;br /&gt;
* Create Trigger&lt;br /&gt;
* Name: &amp;quot;HTTP Trigger&amp;quot;&lt;br /&gt;
* Expression: {Template_Alpine_Linux_Infra_HTTP:http,80.last(0)}#1&lt;br /&gt;
* Severity: High&lt;br /&gt;
&lt;br /&gt;
Configuration -&amp;gt; Actions -&amp;gt; &lt;br /&gt;
* Create Action&lt;br /&gt;
* name: Email notifications&lt;br /&gt;
* Event source: triggers&lt;br /&gt;
* Default Subject: add &amp;quot;{HOST.DNS}:&amp;quot; to the beginning&lt;br /&gt;
* Default message: add &amp;quot;{HOST.DNS}:&amp;quot; to the beginning&lt;br /&gt;
* Conditions: make host have to be from &amp;quot;Linux Servers&amp;quot; hostgroup, and Template_Alpine_Linux_Infra_HTTP:HTTP trigger&amp;quot; is not 1&lt;br /&gt;
* Email affected users&lt;br /&gt;
&lt;br /&gt;
[[Category:Monitoring]]&lt;br /&gt;
[[Category:PHP]]&lt;br /&gt;
[[Category:SQL]]&lt;/div&gt;</summary>
		<author><name>Konev</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Zabbix_-_cgi_and_mysql&amp;diff=12943</id>
		<title>Zabbix - cgi and mysql</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Zabbix_-_cgi_and_mysql&amp;diff=12943"/>
		<updated>2016-09-10T01:54:45Z</updated>

		<summary type="html">&lt;p&gt;Konev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The purpose of this document is to assist in installing the Zabbix server software and Zabbix agent on the Alpine Linux operating system. Instructions on how to configure and use Zabbix - as well as many useful tutorials - can be found at http://www.zabbix.com.&lt;br /&gt;
&lt;br /&gt;
{{Note|The minimum required version of Alpine Linux required to install Zabbix is Alpine 2.2. this guide has ben updated to zabbix 3.0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Install Lighttpd, and PHP =&lt;br /&gt;
&lt;br /&gt;
{{:Setting Up Lighttpd With FastCGI}}&lt;br /&gt;
&lt;br /&gt;
= Configure PostgreSQL =&lt;br /&gt;
&lt;br /&gt;
Install PostgreSQL&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add postgresql postgresql-client}}&lt;br /&gt;
&lt;br /&gt;
Now configure PostgreSQL:&lt;br /&gt;
{{Cmd|/etc/init.d/postgresql setup&lt;br /&gt;
/etc/init.d/postgresql start&lt;br /&gt;
rc-update add postgresql}}&lt;br /&gt;
&lt;br /&gt;
= Install Zabbix =&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add zabbix zabbix-pgsql zabbix-webif zabbix-setup}}&lt;br /&gt;
&lt;br /&gt;
Now we need to set up the zabbix database. Substitute &#039;*********&#039; in the example below for a real password:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;psql –U postgres&lt;br /&gt;
postgres=# create user zabbix with password &#039;*********&#039;;&lt;br /&gt;
postgres=# create database zabbix owner zabbix;&lt;br /&gt;
postgres=# \q&lt;br /&gt;
cd /usr/share/zabbix/database/postgresql&lt;br /&gt;
cat schema.sql | psql -U zabbix zabbix&lt;br /&gt;
cat data.sql | psql -U zabbix zabbix&lt;br /&gt;
cat images.sql | psql -U zabbix zabbix&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Create a softlink for the Zabbix web-frontend files:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|rm /var/www/localhost/htdocs -R&lt;br /&gt;
ln -s /usr/share/webapps/zabbix /var/www/localhost/htdocs}}&lt;br /&gt;
&lt;br /&gt;
Edit PHP configuration to satisfy some zabbix requirements. Edit /etc/php/php.ini and configure the following values at least:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Max_execution_time = 600&lt;br /&gt;
Expose_php = off&lt;br /&gt;
Date.timezone = &amp;lt;insert your timezone here&amp;gt;&lt;br /&gt;
post_max_size = 32M&lt;br /&gt;
upload_max_filesize = 16M&lt;br /&gt;
max_input_time = 600&lt;br /&gt;
memory_limit = 256M&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Configure the following entries in /etc/zabbix/zabbix_server.conf, where DBPassword is the password chosen for the database above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DBName=zabbix&lt;br /&gt;
&lt;br /&gt;
# Database user&lt;br /&gt;
&lt;br /&gt;
DBUser=zabbix&lt;br /&gt;
&lt;br /&gt;
# Database password&lt;br /&gt;
# Comment this line if no password used&lt;br /&gt;
&lt;br /&gt;
DBPassword=*********&lt;br /&gt;
&lt;br /&gt;
FpingLocation=/usr/sbin/fping&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start Zabbix server:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|rc-update add zabbix-server&lt;br /&gt;
/etc/init.d/zabbix-server start}}&lt;br /&gt;
&lt;br /&gt;
Fix permissions on conf directory.&lt;br /&gt;
&lt;br /&gt;
{{Cmd|chown -R lighttpd /usr/share/webapps/zabbix/conf}}&lt;br /&gt;
&lt;br /&gt;
You should now be able to browse to the Zabbix frontend: http://yourservername/.&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
You should now be able to browse to the Zabbix setup frontend: http://yourserverip/instal.php.&lt;br /&gt;
&lt;br /&gt;
Follow the setup instructions to configure Zabbix, supplying the database information used above.&lt;br /&gt;
&lt;br /&gt;
After setup, login using: Login name: &#039;&#039;&#039;Admin&#039;&#039;&#039; Password:&#039;&#039;&#039;zabbix&#039;&#039;&#039;. (as described at http://www.zabbix.com/documentation/1.8/manual/installation)&lt;br /&gt;
&lt;br /&gt;
Finally, Zabbix requires special permissions to use the fping binary.&lt;br /&gt;
&lt;br /&gt;
{{Cmd|chmod u+s /usr/sbin/fping}}&lt;br /&gt;
&lt;br /&gt;
= Install Zabbix Agent on Monitored Servers =&lt;br /&gt;
&lt;br /&gt;
Zabbix can monitor almost any operating system, including Alpine Linux hosts. Complete the following steps to install the Zabbix agent on Alpine Linux.&lt;br /&gt;
&lt;br /&gt;
{{Note|Support to allow zabbix-agentd to view running processes on Alpine Linux has been added since linux-grsec-2.6.35.9-r2. Please ensure you have that kernel installed prior to attempting to run zabbix-agentd.}}&lt;br /&gt;
&lt;br /&gt;
Ensure that the readproc group exists (support added since alpine-baselayout-2.0_rc1-r1), by adding the following line to /etc/group:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|readproc:x:30:zabbix}}&lt;br /&gt;
&lt;br /&gt;
Install the agent package:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add zabbix-agent}}&lt;br /&gt;
&lt;br /&gt;
Edit the /etc/zabbix/zabbix_agentd.conf file and configure at least the following option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Server=&amp;lt;ip or hostname of zabbix server&amp;gt;&lt;br /&gt;
Hostname=&amp;lt;ip or hostname of zabbix agent&amp;gt;&lt;br /&gt;
ListenPort=10050&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start the zabbix-agent:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|rc-update add zabbix-agentd&lt;br /&gt;
/etc/init.d/zabbix-agentd start}}&lt;br /&gt;
&lt;br /&gt;
In case you want to monitor using SNMP agent on remote machines you have to add these packages on zabbix server:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add net-snmp net-snmp-tools}}&lt;br /&gt;
&lt;br /&gt;
And add these packages on remote machines:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add net-snmp }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Optional: Crash course in adding hosts, checks, and notifications =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; This is optional since it&#039;s not specific to Alpine Linux, but I wanted a couple notes for how to perform a simple check on a server that doesn&#039;t have the agent installed on it, and be notified on state changes.&lt;br /&gt;
&lt;br /&gt;
Administration -&amp;gt; Media Types -&amp;gt; Email&lt;br /&gt;
* Setup server, helo, email from address&lt;br /&gt;
&lt;br /&gt;
Administration -&amp;gt; Users&lt;br /&gt;
* Setup each user who&#039;ll get notified, make sure they have media type &amp;quot;Email&amp;quot; added with their address&lt;br /&gt;
&lt;br /&gt;
Configuration -&amp;gt; Hosts -&amp;gt; Create host&lt;br /&gt;
* In Linux Servers hostgroup&lt;br /&gt;
* Define dns name, ip, connect by IP&lt;br /&gt;
* If the machine is a simple networking device that will only be monitored using SNMP, add it to Template_SNMPv2_Device, and you&#039;re done.&lt;br /&gt;
&lt;br /&gt;
Configuration -&amp;gt; Templates -&amp;gt; Create template&lt;br /&gt;
* Give it a name (Template_Alpine_Linux_Infra_HTTP)&lt;br /&gt;
* In Templates group&lt;br /&gt;
&lt;br /&gt;
Configuration -&amp;gt; Templates -&amp;gt; Template_Alpine_Linux_Infra_HTTP -&amp;gt; Items&lt;br /&gt;
* Create Item&lt;br /&gt;
* Host: Template_Alpine_Linux_Infra_HTTP&lt;br /&gt;
* Description: HTTP Basic Check&lt;br /&gt;
* Type: Simple_check&lt;br /&gt;
* Key: http,80&lt;br /&gt;
&lt;br /&gt;
Configuration -&amp;gt; Templates -&amp;gt; Template_Alpine_Linux_Infra_HTTP -&amp;gt; Triggers&lt;br /&gt;
* Create Trigger&lt;br /&gt;
* Name: &amp;quot;HTTP Trigger&amp;quot;&lt;br /&gt;
* Expression: {Template_Alpine_Linux_Infra_HTTP:http,80.last(0)}#1&lt;br /&gt;
* Severity: High&lt;br /&gt;
&lt;br /&gt;
Configuration -&amp;gt; Actions -&amp;gt; &lt;br /&gt;
* Create Action&lt;br /&gt;
* name: Email notifications&lt;br /&gt;
* Event source: triggers&lt;br /&gt;
* Default Subject: add &amp;quot;{HOST.DNS}:&amp;quot; to the beginning&lt;br /&gt;
* Default message: add &amp;quot;{HOST.DNS}:&amp;quot; to the beginning&lt;br /&gt;
* Conditions: make host have to be from &amp;quot;Linux Servers&amp;quot; hostgroup, and Template_Alpine_Linux_Infra_HTTP:HTTP trigger&amp;quot; is not 1&lt;br /&gt;
* Email affected users&lt;br /&gt;
&lt;br /&gt;
[[Category:Monitoring]]&lt;br /&gt;
[[Category:PHP]]&lt;br /&gt;
[[Category:SQL]]&lt;/div&gt;</summary>
		<author><name>Konev</name></author>
	</entry>
</feed>