<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Wiki - Zabbix - Vědomostní báze od initMAX s.r.o.</title>
	<atom:link href="https://www.initmax.cz/wiki/kapitola/zabbix/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.initmax.cz/wiki/kapitola/zabbix/</link>
	<description>Nabízíme monitoring všech prvků infrastruktury; správu identit, automatizaci serverů, služeb i aplikací; správu logů, databází a mnoho více.</description>
	<lastBuildDate>Thu, 12 Feb 2026 12:57:18 +0000</lastBuildDate>
	<language>cs</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>Instalace Zabbix Java Gateway a&#160;monitoring Tomcatu</title>
		<link>https://www.initmax.cz/wiki/instalace-zabbix-java-gateway-a-monitoring-tomcatu/</link>
		
		<dc:creator><![CDATA[Tomáš Heřmánek]]></dc:creator>
		<pubDate>Mon, 29 Dec 2025 22:06:00 +0000</pubDate>
				<guid isPermaLink="false">https://www.initmax.cz/?post_type=wiki&#038;p=19064</guid>

					<description><![CDATA[<p>V tomto článku vám ukážeme, jak snadno nainstalovat a nakonfigurovat Zabbix Java Gateway, včetně doplňkového příkladu monitoringu Tomcatu. Výběr operačního systému ...</p>
<p>The post <a href="https://www.initmax.cz/wiki/instalace-zabbix-java-gateway-a-monitoring-tomcatu/">Instalace Zabbix Java Gateway a&nbsp;monitoring Tomcatu</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>V tomto článku vám ukážeme, jak snadno nainstalovat a&nbsp;nakonfigurovat Zabbix Java Gateway, včetně doplňkového příkladu monitoringu Tomcatu.</p>


<section id="block-webinar-block_739717bb6fcf6dfa64906502f3bbf65e" data-id="block-webinar-block_739717bb6fcf6dfa64906502f3bbf65e" class="gt-block block-webinar">
    <div class="connected-webinars__grid">
        <a href="https://www.initmax.cz/webinar/zabbix-java-gateway-instalace-tipy-a-monitoring-tomcatu-a-wildfly/" class="grid-item">
	<article class="webinar-promotion">
		<div class="webinar-promotion__thumbnail-wrap">
			<figure class="webinar-promotion__thumbnail">
					<img decoding="async" src="https://www.initmax.cz/wp-content/uploads/2025/01/06_thumbnail_web-copy.png"
				 width="400"
		 height="250"
		 class=""
		 alt="Zabbix Java Gateway: Instalace, tipy a&nbsp;monitoring Tomcatu a&nbsp;WildFly"
		 loading="lazy"	>
									<div class="webinar-promotion__tags">
						<span class="tag tag--small" style="color:#ffffff;background-color:#4caf50;">Nový</span><span class="tag tag--small" style="color:#ffffff;background-color:#d40000;">Zabbix</span>					</div>
							</figure>
		</div>
		<div class="webinar-promotion__text">
			<div>
									<time datetime="2025-05-22">22.&nbsp;5.&nbsp;2025</time>
							</div>
			<h3 class="webinar-promotion__title">Zabbix Java Gateway: Instalace, tipy a&nbsp;monitoring Tomcatu a&nbsp;WildFly</h3>
			<div class="icon-link">
				<figure class="icon-wrap icon-wrap--primary"><svg data-name="Group 3411" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 455" d="M0,0H24V24H0Z" fill="none"/><path data-name="Path 456" d="M15,10l4.553-2.276A1,1,0,0,1,21,8.618v6.764a1,1,0,0,1-1.447.894L15,14V10Z" transform="translate(0 0)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><rect data-name="Rectangle 1286" width="12" height="12" rx="2" transform="translate(3.112 6)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</figure>
				<span>Zhlédnout záznam</span>
			</div>
		</div>
	</article>
</a>    </div>
</section>



<h2 class="wp-block-heading" id="vyber-operacniho-systemu">Výběr operačního systému</h2>



<p>Návod obsahuje postup pro RHEL platformy na&nbsp;verzi 9, kde stačí případně jen poupravit repozitáře. Návod pro Debian je připraven pro verzi 12, která je aktuálně poslední podporovanou verzí.</p>


<section id="os-switcher-block_faf2d12f132bcdc19ff57122b211fe86" data-id="os-switcher-block_faf2d12f132bcdc19ff57122b211fe86" class="gt-block os-switcher">
                    <a class="os-switcher__item is-active" onclick="osSwitch(this,'#rhel')">
                            <figure>
                     <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="800px" height="800px" viewBox="0 -31 256 256" version="1.1" preserveAspectRatio="xMidYMid"><g><path d="M170.758031,111.610687 C187.582343,111.610687 211.924474,108.140925 211.924474,88.1292728 C211.974775,86.5848226 211.834752,85.0400539 211.507565,83.5298204 L201.48829,40.009856 C199.175115,30.434388 197.144363,26.0904607 180.333499,17.6850288 C167.288269,11.014478 138.871184,0 130.465752,0 C122.638614,0 120.365785,10.0865183 111.032394,10.0865183 C102.048668,10.0865183 95.3781173,2.55525131 86.9726853,2.55525131 C78.9034707,2.55525131 73.6450325,8.05576597 69.5835277,19.3661152 C69.5835277,19.3661152 58.2731785,51.2664105 56.8207199,55.8927602 C56.5898643,56.7423115 56.4900906,57.6221338 56.5248487,58.5018063 C56.5248487,70.9014995 105.343597,111.556893 170.758031,111.556893 M214.506623,96.2522822 C216.833247,107.26676 216.833247,108.423348 216.833247,109.875806 C216.833247,128.703974 195.665007,139.153607 167.839665,139.153607 C104.953585,139.193953 49.8677466,102.344539 49.8677466,77.9889597 C49.8641113,74.5987697 50.555245,71.2437963 51.898499,68.1310691 C29.2778005,69.2607592 0,73.2953665 0,99.1437508 C0,141.48023 100.313787,193.661152 179.741757,193.661152 C240.63743,193.661152 255.995835,166.118232 255.995835,144.371699 C255.995835,127.264964 241.202275,107.845054 214.53352,96.2522822" fill="#EE0000"></path><path d="M214.506623,96.2522822 C216.833247,107.26676 216.833247,108.423348 216.833247,109.875806 C216.833247,128.703974 195.665007,139.15364 167.839665,139.15364 C104.953585,139.193953 49.8677323,102.344539 49.8677323,77.9889597 C49.8641113,74.5987697 50.555245,71.2437963 51.898499,68.1310691 L56.8207199,55.946555 C56.5952566,56.7787916 56.4955298,57.6400686 56.5248487,58.5018063 C56.5248487,70.9014995 105.343597,111.556893 170.758031,111.556893 C187.582343,111.556893 211.924474,108.08713 211.924474,88.075478 C211.974775,86.5310279 211.834752,84.9862591 211.507565,83.4760257 L214.506623,96.2522822 Z" fill="#000000"></path></g></svg>                 </figure>
                        <span>Alma/CentOS/RHEL/Rocky 9</span>
        </a>
                    <a class="os-switcher__item" onclick="osSwitch(this,'#debian')">
                            <figure>
                     <svg xmlns="http://www.w3.org/2000/svg" width="30.412" height="37.855" viewBox="0 0 30.412 37.855"><g data-name="Group 4978" transform="translate(0)"><path data-name="Path 3295" d="M51.55,57.148c-.627.009.119.323.938.449.226-.177.431-.355.614-.529a4.68,4.68,0,0,1-1.552.08" transform="translate(-33.375 -37.148)" fill="#a80030"></path><path data-name="Path 3296" d="M60.9,51.791a3.984,3.984,0,0,0,.742-1.664,4.059,4.059,0,0,1-.522,1.154c-1.172.738-.11-.438,0-.886-1.261,1.587-.173.952-.219,1.395" transform="translate(-39.357 -32.63)" fill="#a80030"></path><path data-name="Path 3297" d="M64.59,44.219c.076-1.13-.222-.772-.323-.341.117.061.209.8.323.341" transform="translate(-41.805 -28.292)" fill="#a80030"></path><path data-name="Path 3298" d="M45.172,1.4c.335.06.723.106.669.186.366-.08.449-.154-.669-.186" transform="translate(-29.376 -0.911)" fill="#a80030"></path><path data-name="Path 3299" d="M46.647,1.932l-.237.049.22-.02.016-.029" transform="translate(-30.181 -1.258)" fill="#a80030"></path><path data-name="Path 3300" d="M27.224,16.859a5.583,5.583,0,0,1-.6,2.378l-.542.271c-.444.861.043.547-.275,1.232a14.973,14.973,0,0,1-2.553,2.047c-.329-.007.223-.389.3-.538-.927.637-.744.956-2.162,1.342l-.042-.092c-3.5,1.645-8.354-1.615-8.291-6.064-.037.282-.106.212-.184.326a5.6,5.6,0,0,1,3.144-5.526,5.3,5.3,0,0,1,5.9.767,5.257,5.257,0,0,0-4.3-2.063,4.856,4.856,0,0,0-4.172,2.489c-.951.6-1.061,2.308-1.475,2.62-.557,4.1,1.049,5.867,3.765,7.949.428.288.12.332.178.552a7.372,7.372,0,0,1-2.409-1.842,6.473,6.473,0,0,0,1.253,1.444c-.851-.288-1.988-2.062-2.32-2.135,1.467,2.627,5.952,4.607,8.3,3.624a9.8,9.8,0,0,1-3.688-.429c-.513-.264-1.21-.811-1.086-.913a9.158,9.158,0,0,0,9.289-1.316c.705-.549,1.476-1.484,1.7-1.5-.335.5.057.243-.2.688.7-1.134-.305-.461.727-1.958l.381.525c-.142-.941,1.169-2.084,1.036-3.572.3-.455.335.49.016,1.537.443-1.162.117-1.348.23-2.307a8.71,8.71,0,0,1,.367,1,4.423,4.423,0,0,1,.441-2.543c-.142-.063-.445.5-.514-.83.01-.576.16-.3.218-.444a2.546,2.546,0,0,1-.59-1.353c.131-.2.35.516.528.545a13.163,13.163,0,0,1-.32-1.7c-.52-1.087-.184.145-.606-.467-.554-1.727.459-.4.528-1.185A13.868,13.868,0,0,1,30.732,13.3a15.9,15.9,0,0,0-.769-2.765c.255.107-.41-1.958.331-.59A12.326,12.326,0,0,0,24.513,3.03c.293.268.662.6.529.657-1.189-.708-.98-.763-1.15-1.062-.969-.394-1.032.032-1.674,0A19.878,19.878,0,0,0,18.36,1.153l.076.357c-1.209-.4-1.409.153-2.716,0-.08-.062.419-.225.829-.284-1.169.154-1.115-.23-2.259.043a9.724,9.724,0,0,1,.881-.5c-.954.058-2.277.555-1.868.1C11.748,1.57,8.986,2.544,7.436,4l-.049-.326c-.71.853-3.1,2.547-3.288,3.651l-.19.044a20.47,20.47,0,0,0-.9,1.979c-.483.824-.709.317-.64.446A30.106,30.106,0,0,0,.536,14.669c.291.435.007,2.616.117,4.362-.478,8.623,6.052,17,13.189,18.929a14.369,14.369,0,0,0,3.925.4c-1.561-.446-1.763-.237-3.284-.767-1.1-.517-1.338-1.107-2.115-1.781l.308.543c-1.524-.539-.886-.667-2.126-1.06l.328-.429a2.824,2.824,0,0,1-1.531-1.273l-.54.021c-.649-.8-1-1.378-.97-1.826l-.175.311c-.2-.34-2.389-3-1.252-2.384a2.563,2.563,0,0,1-.8-.867l.231-.265a4.4,4.4,0,0,1-.972-1.906,1.236,1.236,0,0,0,.695.535c-1.381-3.427-1.459-.189-2.5-3.489l.221-.018a7.327,7.327,0,0,1-.409-.805l.1-.96c-.994-1.15-.278-4.889-.135-6.94.1-.834.83-1.722,1.386-3.114l-.339-.058C4.532,10.7,7.58,7.3,8.992,7.471c.684-.859-.136,0-.269-.22,1.5-1.554,1.974-1.1,2.988-1.378,1.093-.649-.938.253-.42-.247,1.89-.483,1.339-1.1,3.8-1.342.26.148-.6.229-.82.421,1.575-.77,4.983-.6,7.2.428,2.569,1.2,5.455,4.749,5.569,8.088l.13.035c-.066,1.327.2,2.862-.262,4.272l.317-.667" transform="translate(-0.32 -0.503)" fill="#a80030"></path><path data-name="Path 3301" d="M32.208,59.764l-.088.44a8.451,8.451,0,0,0,1.266,1.6c-.379-.739-.66-1.045-1.178-2.044" transform="translate(-20.88 -38.903)" fill="#a80030"></path><path data-name="Path 3302" d="M34.247,58.123a3.488,3.488,0,0,1-.492-.821,5.711,5.711,0,0,0,.685,1.39l-.193-.569" transform="translate(-21.944 -37.3)" fill="#a80030"></path><path data-name="Path 3303" d="M82.358,48.916l-.092.231a11.156,11.156,0,0,1-1.093,3.489,10.961,10.961,0,0,0,1.185-3.72" transform="translate(-52.81 -31.841)" fill="#a80030"></path><path data-name="Path 3304" d="M45.054.187A13.512,13.512,0,0,1,46.546,0c-.586.049-1.17.079-1.746.153l.254.035" transform="translate(-29.133)" fill="#a80030"></path><path data-name="Path 3305" d="M2.44,23.219c.1.9-.681,1.256.172.659.457-1.03-.179-.284-.172-.659" transform="translate(-1.409 -15.114)" fill="#a80030"></path><path data-name="Path 3306" d="M-.053,32.764a9.824,9.824,0,0,0,.307-1.315c-.543.694-.25.842-.307,1.315" transform="translate(0.082 -20.471)" fill="#a80030"></path></g></svg>                 </figure>
                        <span>Debian 12</span>
        </a>
    </section>




<h2 class="wp-block-heading">Co je Zabbix Java Gateway?</h2>



<ul class="wp-block-list">
<li><strong>Samostatná komponenta Zabbixu</strong> pro monitoring Java aplikací pomocí <strong>JMX</strong> (Java Management Extensions).</li>



<li>Umožňuje Zabbixu sbírat metriky <strong>přímo z&nbsp;Java aplikací.</strong></li>



<li>Musí být připojena k&nbsp;<strong>Zabbix serveru</strong> nebo <strong>Zabbix proxy.</strong></li>



<li>J<strong>e napsaná v&nbsp;Javě</strong> (vyžaduje Java Runtime Environment).</li>
</ul>



<h2 class="wp-block-heading">Doporučení pro nasazení</h2>



<p><strong>Pouze jedna Java Gateway</strong> na&nbsp;jeden Zabbix Server nebo Proxy.<br>(Pro více Java Gateway nasaďte další <strong>Zabbix Proxy</strong> (active/passive).)</p>



<p><strong>Komunikace mezi komponentami Zabbixu a&nbsp;Java Gateway nemůže být šifrovaná.</strong><br>Od verze 7.4 je to poslední zbývající interní komunikační kanál Zabbixu bez šifrování.</p>



<p>Komunikaci z&nbsp;Java Gateway na&nbsp;monitorované Java aplikace <strong>lze zabezpečit</strong> (šifrováním a/nebo autentizací).</p>



<p><strong>Sjednocení verzí je kritické</strong> – Zabbix Java Gateway musí odpovídat verzi Zabbix serveru/proxy.</p>



<p>Nezapomeňte v&nbsp;konfiguraci Java Gateway (zabbix_java_gateway.conf) <strong>explicitně definovat povolené IP adresy.</strong></p>



<h2 class="wp-block-heading">Osvědčené postupy instalace</h2>



<p><strong>Java Runtime Environment (JRE)</strong> se automaticky nainstaluje spolu se Zabbix Java Gateway (je postavená na&nbsp;Javě).</p>



<p><strong>Zabbix neposkytuje dedikovanou šablonu</strong> přímo pro Java Gateway – použijte obecnou Java šablonu.</p>



<p>Pro konkrétní Java server <strong>mohou být potřeba vlastní knihovny (JAR soubory)</strong>, typicky umístěné v&nbsp;bin&nbsp;adresáři aplikace.</p>



<p>Správné nastavení <strong>Java pollerů</strong> je zásadní – konfigurace musí být sladěná na&nbsp;obou stranách:</p>



<ul class="wp-block-list">
<li>Zabbix Server/Proxy <strong>(počet Java pollerů)</strong></li>



<li>Zabbix Java Gateway <strong>(start pollers)</strong></li>
</ul>



<p><strong>Doporučená praxe</strong>: nasadit Zabbix Java Gateway na&nbsp;stejný server jako Zabbix Server nebo Proxy kvůli vyšší bezpečnosti.</p>



<h2 class="wp-block-heading">Instalace a&nbsp;self-monitoring</h2>



<p>Now, when we are aware of basic description of what <strong>Zabbix Java Gateway</strong> is, and we have learned it&#8217;s&nbsp;terminology, we can proceed with the installation.</p>



<div id="rhel" class="wp-block-group"><div class="wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained">
<p>Nejprve vyloučíme všechny instalační balíčky související se Zabbixem z&nbsp;repozitáře EPEL (za předpokladu, že je EPEL nainstalovaný).</p>



<p>Uděláme to tak, že na&nbsp;konec souboru&nbsp;<code>/etc/yum.repos.d/epel.repo</code>&nbsp;přidáme následující řádek:</p>


<section id="block-code-block_1c0a8a74e2bda619b016029c0fce2631" data-id="block-code-block_1c0a8a74e2bda619b016029c0fce2631" class="gt-block block-code">
    <pre><code>[epel]
...
excludepkgs=zabbix*</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Přidáme repozitáře Zabbixu a&nbsp;vyčistíme instalační cache. Nahraďte verzi&nbsp;<strong>7.0</strong>&nbsp;vaší verzí (např.&nbsp;<strong>8.0</strong>,&nbsp;<strong>6.0</strong>,&nbsp;<strong>7.2</strong>, …).</p>


<section id="block-code-block_15937a423926d82db3c80b4e1a489ee2" data-id="block-code-block_15937a423926d82db3c80b4e1a489ee2" class="gt-block block-code">
    <pre><code>rpm -Uvh https://repo.zabbix.com/zabbix/7.0/rocky/9/x86_64/zabbix-release-latest.el9.noarch.rpm
dnf clean all</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A teď už můžeme pokračovat instalací <strong>Zabbix Java Gateway</strong></p>


<section id="block-code-block_6e76a7a3c085571ea4c11f9726aba804" data-id="block-code-block_6e76a7a3c085571ea4c11f9726aba804" class="gt-block block-code">
    <pre><code>dnf install zabbix-java-gateway</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>

</div></div>



<div id="debian" class="wp-block-group"><div class="wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained">
<p>Přidáme repozitáře Zabbixu a&nbsp;vyčistíme instalační cache. Nahraďte verzi&nbsp;<strong>7.0</strong>&nbsp;vaší verzí (např.&nbsp;<strong>8.0</strong>,&nbsp;<strong>6.0</strong>,&nbsp;<strong>7.2</strong>, …).</p>


<section id="block-code-block_eb32106ce7e4c3beac832d084517c84b" data-id="block-code-block_eb32106ce7e4c3beac832d084517c84b" class="gt-block block-code">
    <pre><code>wget https://repo.zabbix.com/zabbix/7.0/debian/pool/main/z/zabbix-release/zabbix-release_latest_7.0+debian12_all.deb
dpkg -i zabbix-release_latest_7.0+debian12_all.deb
apt update</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A teď už můžeme pokračovat instalací <strong>Zabbix Java Gateway</strong></p>


<section id="block-code-block_b5e2b145eb642a8d4825dfdb657b8c85" data-id="block-code-block_b5e2b145eb642a8d4825dfdb657b8c85" class="gt-block block-code">
    <pre><code>apt install zabbix-java-gateway</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>

</div></div>



<h2 class="wp-block-heading">Umístění konfiguračních souborů</h2>



<ul class="wp-block-list">
<li>Zabbix Java Gateway</li>
</ul>


<section id="block-code-block_b91eb7f3765692d588c75b93adfb2f9f" data-id="block-code-block_b91eb7f3765692d588c75b93adfb2f9f" class="gt-block block-code">
    <pre><code>/etc/zabbix/zabbix_java_gateway.conf - hlavní konfigurační soubor
/etc/zabbix/zabbix_java_gateway_logback.xml - konfigurace logování</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<ul class="wp-block-list">
<li>Zabbix Server</li>
</ul>


<section id="block-code-block_a57d19029c78835a9944c85c10eb5dc8" data-id="block-code-block_a57d19029c78835a9944c85c10eb5dc8" class="gt-block block-code">
    <pre><code>/etc/zabbix/zabbix_server.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<ul class="wp-block-list">
<li>Zabbix Proxy</li>
</ul>


<section id="block-code-block_524dc560c222813e89c1c4a7b0028e79" data-id="block-code-block_524dc560c222813e89c1c4a7b0028e79" class="gt-block block-code">
    <pre><code>/etc/zabbix/zabbix_proxy.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Povolení Zabbix Java Gateway</h2>



<p>Po instalaci povolte Java monitoring na&nbsp;<strong>serveru</strong> nebo <strong>proxy</strong> úpravou konfiguračního souboru</p>


<section id="block-code-block_51542b1668cd90d4e1cc911be99cd6a7" data-id="block-code-block_51542b1668cd90d4e1cc911be99cd6a7" class="gt-block block-code">
    <pre><code>nano /etc/zabbix/zabbix_server.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A upravte následující parametry, kde:</p>



<ul class="wp-block-list">
<li><strong>JavaGateway</strong>: IP nebo DNS adresa Zabbix Java Gateway</li>



<li><strong>JavaGatewayPort</strong>: komunikační port</li>



<li><strong>StartJavaPollers</strong>: počet Java pollerů spouštěných na&nbsp;Zabbix serveru/proxy</li>
</ul>


<section id="block-code-block_f585c924ffbbfa3becf95a3b7e568daa" data-id="block-code-block_f585c924ffbbfa3becf95a3b7e568daa" class="gt-block block-code">
    <pre><code>JavaGateway=127.0.0.1
JavaGatewayPort=10052
StartJavaPollers=5</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="812" height="874" src="https://www.initmax.cz/wp-content/uploads/2025/12/javagateway-zabbix-conf.png" alt="" class="wp-image-21536" style="object-fit:cover" srcset="https://www.initmax.cz/wp-content/uploads/2025/12/javagateway-zabbix-conf.png 812w, https://www.initmax.cz/wp-content/uploads/2025/12/javagateway-zabbix-conf-279x300.png 279w, https://www.initmax.cz/wp-content/uploads/2025/12/javagateway-zabbix-conf-768x827.png 768w, https://www.initmax.cz/wp-content/uploads/2025/12/javagateway-zabbix-conf-608x654.png 608w" sizes="(max-width: 812px) 100vw, 812px" /></figure>



<p><strong>StartJavaPollers</strong>&nbsp;je důležitý parametr, na&nbsp;který je potřeba vždy myslet</p>



<ul class="wp-block-list">
<li>Výchozí hodnota je vypnuto (0), tedy Java monitoring je neaktivní</li>



<li>Doporučená startovní hodnota: 5 pollerů</li>



<li>Pokud hodnotu změníte, sladěte toto číslo také v&nbsp;konfiguraci Java Gateway</li>



<li>Pokud používáte více Zabbix serverů/proxy s&nbsp;jednou gateway, sečtěte jejich počty pollerů</li>
</ul>



<p>Po finální konfiguraci nezapomeňte restartovat komponentu Zabbix serveru</p>


<section id="block-code-block_aaeadaf1f8f3576a15cff70155f09479" data-id="block-code-block_aaeadaf1f8f3576a15cff70155f09479" class="gt-block block-code">
    <pre><code>systemctl restart zabbix-server</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Povolení self-monitoringu Java Gateway</h2>



<p>Upravte konfigurační soubor Zabbix Java Gateway</p>


<section id="block-code-block_940d6ef1cff54e8e9a493fc06a9dae89" data-id="block-code-block_940d6ef1cff54e8e9a493fc06a9dae89" class="gt-block block-code">
    <pre><code>nano /etc/zabbix/zabbix_java_gateway.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Speciální monitorovací sekce (self-monitoring):<br>Odkomentujte následující řádek pro povolení vestavěného JMX monitoringu samotné gateway (JAVA_OPTIONS):</p>


<section id="block-code-block_f8d0bb7943d9dbd96b9168caf73e0d13" data-id="block-code-block_f8d0bb7943d9dbd96b9168caf73e0d13" class="gt-block block-code">
    <pre><code>JAVA_OPTIONS=&quot;$JAVA_OPTIONS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=12345
-Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -
Dcom.sun.management.jmxremote.registry.ssl=false&quot;</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<figure class="wp-block-image size-full"><img decoding="async" width="1650" height="402" src="https://www.initmax.cz/wp-content/uploads/2025/12/javagateway-zabbix-conf-jmx.png" alt="" class="wp-image-21540" style="object-fit:cover" srcset="https://www.initmax.cz/wp-content/uploads/2025/12/javagateway-zabbix-conf-jmx.png 1650w, https://www.initmax.cz/wp-content/uploads/2025/12/javagateway-zabbix-conf-jmx-300x73.png 300w, https://www.initmax.cz/wp-content/uploads/2025/12/javagateway-zabbix-conf-jmx-1024x249.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/12/javagateway-zabbix-conf-jmx-768x187.png 768w, https://www.initmax.cz/wp-content/uploads/2025/12/javagateway-zabbix-conf-jmx-1536x374.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/12/javagateway-zabbix-conf-jmx-608x148.png 608w, https://www.initmax.cz/wp-content/uploads/2025/12/javagateway-zabbix-conf-jmx-1216x296.png 1216w" sizes="(max-width: 1650px) 100vw, 1650px" /></figure>



<p><strong>Důležité</strong>: Ujistěte se, že každá Java volba (-Dcom&#8230;) začíná hned za mezerou a&nbsp;že uvnitř nejsou <strong>žádné další mezery navíc!</strong></p>



<p>Aplikujte nové nastavení, spusťte Zabbix Java Gateway a&nbsp;povolte její automatické spuštění po&nbsp;restartu serveru.</p>


<section id="block-code-block_e056c7131bd19394c755144964bceb02" data-id="block-code-block_e056c7131bd19394c755144964bceb02" class="gt-block block-code">
    <pre><code>systemctl enable zabbix-java-gateway.service --now</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Ověření a&nbsp;nastavení monitoringu</h2>



<p>Vytvořte hosta pro samotnou <strong>Zabbix Java Gateway</strong> (nebo použijte existujícího hosta)</p>



<ul class="wp-block-list">
<li>Přidejte nové <strong>rozhraní typu JMX</strong></li>



<li>Aplikujte vestavěnou šablonu:&nbsp;<strong>Generic Java JMX</strong></li>
</ul>



<figure class="wp-block-image size-full"><img decoding="async" width="2086" height="1276" src="https://www.initmax.cz/wp-content/uploads/2025/12/javagateway-zabbix-jmx.png" alt="" class="wp-image-21546" style="object-fit:cover" srcset="https://www.initmax.cz/wp-content/uploads/2025/12/javagateway-zabbix-jmx.png 2086w, https://www.initmax.cz/wp-content/uploads/2025/12/javagateway-zabbix-jmx-300x184.png 300w, https://www.initmax.cz/wp-content/uploads/2025/12/javagateway-zabbix-jmx-1024x626.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/12/javagateway-zabbix-jmx-768x470.png 768w, https://www.initmax.cz/wp-content/uploads/2025/12/javagateway-zabbix-jmx-1536x940.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/12/javagateway-zabbix-jmx-2048x1253.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/12/javagateway-zabbix-jmx-608x372.png 608w, https://www.initmax.cz/wp-content/uploads/2025/12/javagateway-zabbix-jmx-1216x744.png 1216w" sizes="(max-width: 2086px) 100vw, 2086px" /></figure>



<p>Po krátké chvíli <strong>se ikona JMX zbarví zeleně</strong>. Java Gateway je nyní připravená a&nbsp;monitorovaná.</p>



<figure class="wp-block-image size-full is-resized"><img loading="lazy" decoding="async" width="2224" height="288" src="https://www.initmax.cz/wp-content/uploads/2025/12/javagateway-zabbix-jmx-verify-1.png" alt="" class="wp-image-21548" style="width:1021px;height:auto" srcset="https://www.initmax.cz/wp-content/uploads/2025/12/javagateway-zabbix-jmx-verify-1.png 2224w, https://www.initmax.cz/wp-content/uploads/2025/12/javagateway-zabbix-jmx-verify-1-300x39.png 300w, https://www.initmax.cz/wp-content/uploads/2025/12/javagateway-zabbix-jmx-verify-1-1024x133.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/12/javagateway-zabbix-jmx-verify-1-768x99.png 768w, https://www.initmax.cz/wp-content/uploads/2025/12/javagateway-zabbix-jmx-verify-1-1536x199.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/12/javagateway-zabbix-jmx-verify-1-2048x265.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/12/javagateway-zabbix-jmx-verify-1-608x79.png 608w, https://www.initmax.cz/wp-content/uploads/2025/12/javagateway-zabbix-jmx-verify-1-1216x157.png 1216w" sizes="auto, (max-width: 2224px) 100vw, 2224px" /></figure>



<h2 class="wp-block-heading">Monitoring Tomcatu – instalace a&nbsp;nastavení</h2>



<p>Pro tento <strong>ukázkový monitoring setup</strong> nainstalujeme také <strong>Tomcat</strong> a&nbsp;další potřebné balíčky.</p>



<p><strong>Upozorňujeme</strong>, že následující příklad je proveden na&nbsp;Rocky Linux 9. <strong>Ve vašem prostředí bude Tomcat nejspíš už nainstalovaný</strong> (nebo součástí vašeho stávajícího aplikačního setupu).</p>


<section id="block-code-block_60c85ebbc44db9ba6cf2e92c72e45677" data-id="block-code-block_60c85ebbc44db9ba6cf2e92c72e45677" class="gt-block block-code">
    <pre><code>dnf install tomcat tomcat-webapps tomcat-admin-webapps tomcat-docs-webapp
</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Po instalaci Tomcatu je potřeba povolit JMX monitoring s&nbsp;autentizací, abychom zajistili bezpečnost.</p>



<p>Upravte&nbsp;/etc/tomcat/tomcat.conf.</p>


<section id="block-code-block_17ce524688e5e64939d9c4d503d43517" data-id="block-code-block_17ce524688e5e64939d9c4d503d43517" class="gt-block block-code">
    <pre><code>nano /etc/tomcat/tomcat.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Přidejte následující&nbsp;<strong>(nezapomeňte nahradit IP adresu &#8211; musí to být monitorovaný host, ne Zabbix server ani Java Gateway!)</strong></p>



<p>V našem případě byl parametr&nbsp;-Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFactory&nbsp;už předdefinovaný, takže další parametry umístíme hned za něj.&nbsp;<strong>Dbejte na&nbsp;správné uvozovky a&nbsp;zalamování/odsazení pomocí \.</strong></p>


<section id="block-code-block_ab0b060ddd3f496cbbead8fb63be305c" data-id="block-code-block_ab0b060ddd3f496cbbead8fb63be305c" class="gt-block block-code">
    <pre><code># Set default javax.sql.DataSource factory to apache commons one. See rhbz#1214381
JAVA_OPTS=&quot;-Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFactory \
-Dcom.sun.management.jmxremote \
-Dcom.sun.management.jmxremote.port=9010 \
-Dcom.sun.management.jmxremote.rmi.port=9010 \
-Dcom.sun.management.jmxremote.ssl=false \
-Dcom.sun.management.jmxremote.authenticate=true \
-Dcom.sun.management.jmxremote.password.file=/etc/tomcat/jmxremote.password \
-Dcom.sun.management.jmxremote.access.file=/etc/tomcat/jmxremote.access \
-Djava.rmi.server.hostname=185.74.63.152 \
-Djava.net.preferIPv4Stack=true&quot;</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1294" height="696" src="https://www.initmax.cz/wp-content/uploads/2025/12/tomcat-jmx-setting.png" alt="" class="wp-image-21551" style="object-fit:cover" srcset="https://www.initmax.cz/wp-content/uploads/2025/12/tomcat-jmx-setting.png 1294w, https://www.initmax.cz/wp-content/uploads/2025/12/tomcat-jmx-setting-300x161.png 300w, https://www.initmax.cz/wp-content/uploads/2025/12/tomcat-jmx-setting-1024x551.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/12/tomcat-jmx-setting-768x413.png 768w, https://www.initmax.cz/wp-content/uploads/2025/12/tomcat-jmx-setting-608x327.png 608w, https://www.initmax.cz/wp-content/uploads/2025/12/tomcat-jmx-setting-1216x654.png 1216w" sizes="auto, (max-width: 1294px) 100vw, 1294px" /></figure>



<p>Pro vytvoření JMX přístupových rolí a&nbsp;hesel je potřeba vytvořit nebo upravit následující soubory</p>



<p><strong>Upravte (nebo vytvořte)</strong>&nbsp;<code>/etc/tomcat/jmxremote.access</code>:</p>


<section id="block-code-block_fd7daeebc98f9cf3a58894845851268e" data-id="block-code-block_fd7daeebc98f9cf3a58894845851268e" class="gt-block block-code">
    <pre><code>nano /etc/tomcat/jmxremote.access</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V tomto souboru <strong>definujeme uživatelskou roli</strong> s&nbsp;požadovanými oprávněními.</p>


<section id="block-code-block_6e23f2ec14b0f7300d021eeee204102f" data-id="block-code-block_6e23f2ec14b0f7300d021eeee204102f" class="gt-block block-code">
    <pre><code>monitorRole readonly
controlRole readwrite</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Upravte (nebo vytvořte)&nbsp;<code>/etc/tomcat/jmxremote.password</code>:</p>


<section id="block-code-block_19a7019955c4cc162e5e909d21e7c8e5" data-id="block-code-block_19a7019955c4cc162e5e909d21e7c8e5" class="gt-block block-code">
    <pre><code>nano /etc/tomcat/jmxremote.password</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V tomto souboru <strong>definujeme hesla pro uživatele</strong> nakonfigurované pro JMX přístup</p>


<section id="block-code-block_7d750a832bd124c92977ecc13aec7b19" data-id="block-code-block_7d750a832bd124c92977ecc13aec7b19" class="gt-block block-code">
    <pre><code>monitorRole Password1
controlRole Password2</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nastavte správná oprávnění z&nbsp;bezpečnostních důvodů&nbsp;<strong>(uživatel ve vašem systému může být jiný &#8211; my používáme stejného uživatele, pod kterým běží služba Tomcat)</strong></p>


<section id="block-code-block_b548ec5cc364ea1b54ac3157f26e5b8d" data-id="block-code-block_b548ec5cc364ea1b54ac3157f26e5b8d" class="gt-block block-code">
    <pre><code>chmod 600 /etc/tomcat/jmxremote.*
chown tomcat:tomcat /etc/tomcat/jmxremote.*</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Po úpravě všech konfiguračních souborů dle doporučení <strong>nezapomeňte restartovat službu Tomcat</strong></p>


<section id="block-code-block_8164095073c5a4bd90c6dd42d748acc4" data-id="block-code-block_8164095073c5a4bd90c6dd42d748acc4" class="gt-block block-code">
    <pre><code>systemctl restart tomcat.service
</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A pokud je to potřeba, otevřete port ve firewallu <strong>(9010/tcp)</strong>.</p>


<section id="block-code-block_e5e626ec241477df512297568bf32550" data-id="block-code-block_e5e626ec241477df512297568bf32550" class="gt-block block-code">
    <pre><code>firewall-cmd --permanent --add-port=9010/tcp
firewall-cmd --reload</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Vytvořte ve webovém rozhraní Zabbixu hosta pro monitoring Tomcatu</p>



<ul class="wp-block-list">
<li>Připojte šablonu <strong>Apache Tomcat by JMX</strong>.</li>



<li>Nastavte správnou IP nebo DNS adresu Tomcatu a&nbsp;port <strong>(ujistěte se, že firewall umožňuje přístup ze Zabbix Java Gateway)</strong>. V&nbsp;našem případě běží Tomcat, Zabbix Server i&nbsp;Zabbix Java Gateway na&nbsp;stejném hostu, proto používáme localhost. V&nbsp;praxi je takové nasazení spíše nepravděpodobné.</li>



<li>Nastavte správné makro <strong>(viz další screenshot)</strong>.</li>
</ul>



<figure class="wp-block-image size-full is-resized"><img loading="lazy" decoding="async" width="2090" height="1272" src="https://www.initmax.cz/wp-content/uploads/2025/12/tomcat-jmx-setting-zabbix.png" alt="" class="wp-image-21556" style="width:954px;height:auto" srcset="https://www.initmax.cz/wp-content/uploads/2025/12/tomcat-jmx-setting-zabbix.png 2090w, https://www.initmax.cz/wp-content/uploads/2025/12/tomcat-jmx-setting-zabbix-300x183.png 300w, https://www.initmax.cz/wp-content/uploads/2025/12/tomcat-jmx-setting-zabbix-1024x623.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/12/tomcat-jmx-setting-zabbix-768x467.png 768w, https://www.initmax.cz/wp-content/uploads/2025/12/tomcat-jmx-setting-zabbix-1536x935.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/12/tomcat-jmx-setting-zabbix-2048x1246.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/12/tomcat-jmx-setting-zabbix-608x370.png 608w, https://www.initmax.cz/wp-content/uploads/2025/12/tomcat-jmx-setting-zabbix-1216x740.png 1216w" sizes="auto, (max-width: 2090px) 100vw, 2090px" /></figure>



<p>Šablony v&nbsp;Zabbixu používají uživatelská makra pro uživatelské jméno a&nbsp;heslo. Klikněte na <strong>Macros</strong> a poté vyberte <strong>Inherited and host macros</strong>.</p>



<ul class="wp-block-list">
<li><code>{$TOMCAT.PASSWORD}</code> &#8211; v&nbsp;našem případě je to <code>Password1</code> (<strong>best practice: označte tuto hodnotu jako Secret text</strong>)</li>



<li><code>{$TOMCAT.USER}</code> &#8211; náš uživatel je <code>monitorRole</code></li>
</ul>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2088" height="1286" src="https://www.initmax.cz/wp-content/uploads/2025/12/tomcat-jmx-setting-zabbix-macros.png" alt="" class="wp-image-21558" style="object-fit:cover" srcset="https://www.initmax.cz/wp-content/uploads/2025/12/tomcat-jmx-setting-zabbix-macros.png 2088w, https://www.initmax.cz/wp-content/uploads/2025/12/tomcat-jmx-setting-zabbix-macros-300x185.png 300w, https://www.initmax.cz/wp-content/uploads/2025/12/tomcat-jmx-setting-zabbix-macros-1024x631.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/12/tomcat-jmx-setting-zabbix-macros-768x473.png 768w, https://www.initmax.cz/wp-content/uploads/2025/12/tomcat-jmx-setting-zabbix-macros-1536x946.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/12/tomcat-jmx-setting-zabbix-macros-2048x1261.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/12/tomcat-jmx-setting-zabbix-macros-608x374.png 608w, https://www.initmax.cz/wp-content/uploads/2025/12/tomcat-jmx-setting-zabbix-macros-1216x749.png 1216w" sizes="auto, (max-width: 2088px) 100vw, 2088px" /></figure>



<p>V tuto chvíli by měly vaše monitoring položky na&nbsp;hostu Tomcat začít přijímat data.</p>



<p>Šablona také obsahuje Low-Level Discovery (LLD).</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2560" height="959" src="https://www.initmax.com/wp-content/uploads/2025/12/tomcat-jmx-setting-zabbix-latestdata-scaled.png" alt="" class="wp-image-21561" srcset="https://www.initmax.cz/wp-content/uploads/2025/12/tomcat-jmx-setting-zabbix-latestdata-scaled.png 2560w, https://www.initmax.cz/wp-content/uploads/2025/12/tomcat-jmx-setting-zabbix-latestdata-300x112.png 300w, https://www.initmax.cz/wp-content/uploads/2025/12/tomcat-jmx-setting-zabbix-latestdata-1024x384.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/12/tomcat-jmx-setting-zabbix-latestdata-768x288.png 768w, https://www.initmax.cz/wp-content/uploads/2025/12/tomcat-jmx-setting-zabbix-latestdata-1536x576.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/12/tomcat-jmx-setting-zabbix-latestdata-2048x767.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/12/tomcat-jmx-setting-zabbix-latestdata-608x228.png 608w, https://www.initmax.cz/wp-content/uploads/2025/12/tomcat-jmx-setting-zabbix-latestdata-1216x456.png 1216w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></figure>



<h2 class="wp-block-heading">Závěrečné tipy a&nbsp;monitoring databáze</h2>



<ul class="wp-block-list">
<li>Pro rychlé ladění doporučujeme použít <strong>jconsole</strong> (součást balíčku JDK), který můžete spustit na&nbsp;svém desktopu</li>



<li>Pokud nevidíte metriky, které vás zajímají (například <strong>statistiky DB connection poolu</strong>), může být potřeba je povolit na&nbsp;úrovni driveru/poolu. Například lze přidat parametr <strong>jmxEnabled=&#8220;true&#8220;</strong> – ten bývá často definovaný v <strong>context.xml</strong></li>
</ul>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2560" height="1440" src="https://www.initmax.com/wp-content/uploads/2025/12/zabbix-java-gateway-installation-tips-and-monitoring-tomcat-scaled.png" alt="" class="wp-image-21565" srcset="https://www.initmax.cz/wp-content/uploads/2025/12/zabbix-java-gateway-installation-tips-and-monitoring-tomcat-scaled.png 2560w, https://www.initmax.cz/wp-content/uploads/2025/12/zabbix-java-gateway-installation-tips-and-monitoring-tomcat-300x169.png 300w, https://www.initmax.cz/wp-content/uploads/2025/12/zabbix-java-gateway-installation-tips-and-monitoring-tomcat-1024x576.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/12/zabbix-java-gateway-installation-tips-and-monitoring-tomcat-768x432.png 768w, https://www.initmax.cz/wp-content/uploads/2025/12/zabbix-java-gateway-installation-tips-and-monitoring-tomcat-1536x864.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/12/zabbix-java-gateway-installation-tips-and-monitoring-tomcat-2048x1152.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/12/zabbix-java-gateway-installation-tips-and-monitoring-tomcat-608x342.png 608w, https://www.initmax.cz/wp-content/uploads/2025/12/zabbix-java-gateway-installation-tips-and-monitoring-tomcat-1216x684.png 1216w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></figure>



<ul class="wp-block-list">
<li>Také se podívejte na&nbsp;naše <a href="https://www.initmax.com/wp-content/uploads/2025/01/zabbix-java-gateway-installation-tips-and-monitoring-tomcat-and-wildfly-7.0-en.pdf">webinářové PDF materiály</a> pro více informací</li>
</ul>


<section id="social-links-block_fe54a467c03af7e8b568734d724f6a07" data-id="social-links-block_fe54a467c03af7e8b568734d724f6a07" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>



<section id="block-newsletter-block_e0aa1dc8688c0f7f82a49229a1a19caa" data-id="block-newsletter-block_e0aa1dc8688c0f7f82a49229a1a19caa" class="gt-block block-newsletter">
    <section id="newsletter" class="newsletter">
	<div class="gradient basic">
		<div class="newsletter__inner width width--general">
			<div class="col left">
									<h2 class="newsletter__title">Buďte v&nbsp;obraze s&nbsp;naším newsletterem</h2>
													<div class="newsletter__content"><p>Díky initMAX newsletteru Vám neunikne žádná z&nbsp;pozvánek na&nbsp;akce a&nbsp;webináře, žádný z&nbsp;tipů, jak dostat ze svého IT MAXimum, ani ověřené informace o&nbsp;novinkách ze světa Zabbix a&nbsp;dalších technologií.</p>
</div>
							</div>
			<div class="col right form-wrapper">
				<div class="newsletter-form">
	<form method="post" action="/wiki/kapitola/zabbix/feed/" enctype="multipart/form-data">
		<input type="hidden" name="url" value="https://www.initmax.cz/wiki/kapitola/zabbix/feed/">

		<div class="inputs">

			<label for="newsletter-form_contact_email" class="top">Vaše e-mailová adresa:</label>
			<div class="df">

				<div class="input">
					<input type="text" id="newsletter-form_contact_email" name="newsletter_email" placeholder="@" data-format="email" data-required="1">
									</div><!-- /.input -->

				<a href="#" class="btn btn--white sendBtn">Odeslat</a>

			</div>

			<div class="bottom nm">
				<label for="newsletter-form_gdpr" class="checkbox gdpr">
					<input type="checkbox" id="newsletter-form_gdpr" name="newsletter_gdpr">
					<span>Souhlasím se&nbsp;<a href="https://www.initmax.cz/ochrana-osobnich-udaju/" target="_blank">zpracováním osobních údajů</a>.</span>
				</label>
			</div>

		</div><!-- /.inputs -->
		<div class="sent hidden">
			<div class="iconOk"><h3>Děkujeme, že jste se přihlásili k&nbsp;odběru našeho newsletteru.</h3>
</div>
			<button class="sent__close" title="Zavřít" onclick="closeFormMessage(this,event)"><svg data-name="Group 3602" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 3272" d="M0,0H24V24H0Z" fill="none"/><line data-name="Line 98" y2="14" transform="translate(7.05 7.05) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 99" x2="14" transform="translate(7.05 16.95) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</button>
		</div><!-- /.sent -->
	</form>
</div>			</div>
		</div>
	</div>
</section></section>



<section id="social-links-block_fe54a467c03af7e8b568734d724f6a07" data-id="social-links-block_fe54a467c03af7e8b568734d724f6a07" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>

<p>The post <a href="https://www.initmax.cz/wiki/instalace-zabbix-java-gateway-a-monitoring-tomcatu/">Instalace Zabbix Java Gateway a&nbsp;monitoring Tomcatu</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Zabbix 8.0 LTS &#8211; návod na&#160;instalaci v&#160;5 minutách</title>
		<link>https://www.initmax.cz/wiki/zabbix-8-0-navod-na-instalaci-v-5-minutach/</link>
		
		<dc:creator><![CDATA[Tomáš Heřmánek]]></dc:creator>
		<pubDate>Thu, 06 Nov 2025 06:16:54 +0000</pubDate>
				<guid isPermaLink="false">https://www.initmax.cz/?post_type=wiki&#038;p=21302</guid>

					<description><![CDATA[<p>V tomto návodu si ukážeme, jak během pěti minut nainstalovat a nakonfigurovat nejnovější Zabbix verze 8.0 s databází PostgreSQL 18 a TimescaleDB. Výběr ...</p>
<p>The post <a href="https://www.initmax.cz/wiki/zabbix-8-0-navod-na-instalaci-v-5-minutach/">Zabbix 8.0 LTS &#8211; návod na&nbsp;instalaci v&nbsp;5 minutách</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>V tomto návodu si ukážeme, jak během pěti minut nainstalovat a&nbsp;nakonfigurovat nejnovější Zabbix verze 8.0 s&nbsp;databází PostgreSQL 18 a&nbsp;TimescaleDB.</p>



<h2 class="wp-block-heading" id="vyber-operacniho-systemu">Výběr operačního systému</h2>



<p>Návod obsahuje postup pro RHEL platformy na&nbsp;verzi 10, kde stačí případně jen poupravit repozitáře. Návod pro Debian je připraven pro verzi 13, která je aktuálně poslední podporovanou verzí.</p>


<section id="os-switcher-block_7866c8a9a39d0cd0441b4c526f2e1052" data-id="os-switcher-block_7866c8a9a39d0cd0441b4c526f2e1052" class="gt-block os-switcher">
                    <a class="os-switcher__item is-active" onclick="osSwitch(this,'#rhel')">
                            <figure>
                     <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="800px" height="800px" viewBox="0 -31 256 256" version="1.1" preserveAspectRatio="xMidYMid"><g><path d="M170.758031,111.610687 C187.582343,111.610687 211.924474,108.140925 211.924474,88.1292728 C211.974775,86.5848226 211.834752,85.0400539 211.507565,83.5298204 L201.48829,40.009856 C199.175115,30.434388 197.144363,26.0904607 180.333499,17.6850288 C167.288269,11.014478 138.871184,0 130.465752,0 C122.638614,0 120.365785,10.0865183 111.032394,10.0865183 C102.048668,10.0865183 95.3781173,2.55525131 86.9726853,2.55525131 C78.9034707,2.55525131 73.6450325,8.05576597 69.5835277,19.3661152 C69.5835277,19.3661152 58.2731785,51.2664105 56.8207199,55.8927602 C56.5898643,56.7423115 56.4900906,57.6221338 56.5248487,58.5018063 C56.5248487,70.9014995 105.343597,111.556893 170.758031,111.556893 M214.506623,96.2522822 C216.833247,107.26676 216.833247,108.423348 216.833247,109.875806 C216.833247,128.703974 195.665007,139.153607 167.839665,139.153607 C104.953585,139.193953 49.8677466,102.344539 49.8677466,77.9889597 C49.8641113,74.5987697 50.555245,71.2437963 51.898499,68.1310691 C29.2778005,69.2607592 0,73.2953665 0,99.1437508 C0,141.48023 100.313787,193.661152 179.741757,193.661152 C240.63743,193.661152 255.995835,166.118232 255.995835,144.371699 C255.995835,127.264964 241.202275,107.845054 214.53352,96.2522822" fill="#EE0000"></path><path d="M214.506623,96.2522822 C216.833247,107.26676 216.833247,108.423348 216.833247,109.875806 C216.833247,128.703974 195.665007,139.15364 167.839665,139.15364 C104.953585,139.193953 49.8677323,102.344539 49.8677323,77.9889597 C49.8641113,74.5987697 50.555245,71.2437963 51.898499,68.1310691 L56.8207199,55.946555 C56.5952566,56.7787916 56.4955298,57.6400686 56.5248487,58.5018063 C56.5248487,70.9014995 105.343597,111.556893 170.758031,111.556893 C187.582343,111.556893 211.924474,108.08713 211.924474,88.075478 C211.974775,86.5310279 211.834752,84.9862591 211.507565,83.4760257 L214.506623,96.2522822 Z" fill="#000000"></path></g></svg>                 </figure>
                        <span>Alma/CentOS/RHEL/Rocky 10</span>
        </a>
                    <a class="os-switcher__item" onclick="osSwitch(this,'#debian')">
                            <figure>
                     <svg xmlns="http://www.w3.org/2000/svg" width="30.412" height="37.855" viewBox="0 0 30.412 37.855"><g data-name="Group 4978" transform="translate(0)"><path data-name="Path 3295" d="M51.55,57.148c-.627.009.119.323.938.449.226-.177.431-.355.614-.529a4.68,4.68,0,0,1-1.552.08" transform="translate(-33.375 -37.148)" fill="#a80030"></path><path data-name="Path 3296" d="M60.9,51.791a3.984,3.984,0,0,0,.742-1.664,4.059,4.059,0,0,1-.522,1.154c-1.172.738-.11-.438,0-.886-1.261,1.587-.173.952-.219,1.395" transform="translate(-39.357 -32.63)" fill="#a80030"></path><path data-name="Path 3297" d="M64.59,44.219c.076-1.13-.222-.772-.323-.341.117.061.209.8.323.341" transform="translate(-41.805 -28.292)" fill="#a80030"></path><path data-name="Path 3298" d="M45.172,1.4c.335.06.723.106.669.186.366-.08.449-.154-.669-.186" transform="translate(-29.376 -0.911)" fill="#a80030"></path><path data-name="Path 3299" d="M46.647,1.932l-.237.049.22-.02.016-.029" transform="translate(-30.181 -1.258)" fill="#a80030"></path><path data-name="Path 3300" d="M27.224,16.859a5.583,5.583,0,0,1-.6,2.378l-.542.271c-.444.861.043.547-.275,1.232a14.973,14.973,0,0,1-2.553,2.047c-.329-.007.223-.389.3-.538-.927.637-.744.956-2.162,1.342l-.042-.092c-3.5,1.645-8.354-1.615-8.291-6.064-.037.282-.106.212-.184.326a5.6,5.6,0,0,1,3.144-5.526,5.3,5.3,0,0,1,5.9.767,5.257,5.257,0,0,0-4.3-2.063,4.856,4.856,0,0,0-4.172,2.489c-.951.6-1.061,2.308-1.475,2.62-.557,4.1,1.049,5.867,3.765,7.949.428.288.12.332.178.552a7.372,7.372,0,0,1-2.409-1.842,6.473,6.473,0,0,0,1.253,1.444c-.851-.288-1.988-2.062-2.32-2.135,1.467,2.627,5.952,4.607,8.3,3.624a9.8,9.8,0,0,1-3.688-.429c-.513-.264-1.21-.811-1.086-.913a9.158,9.158,0,0,0,9.289-1.316c.705-.549,1.476-1.484,1.7-1.5-.335.5.057.243-.2.688.7-1.134-.305-.461.727-1.958l.381.525c-.142-.941,1.169-2.084,1.036-3.572.3-.455.335.49.016,1.537.443-1.162.117-1.348.23-2.307a8.71,8.71,0,0,1,.367,1,4.423,4.423,0,0,1,.441-2.543c-.142-.063-.445.5-.514-.83.01-.576.16-.3.218-.444a2.546,2.546,0,0,1-.59-1.353c.131-.2.35.516.528.545a13.163,13.163,0,0,1-.32-1.7c-.52-1.087-.184.145-.606-.467-.554-1.727.459-.4.528-1.185A13.868,13.868,0,0,1,30.732,13.3a15.9,15.9,0,0,0-.769-2.765c.255.107-.41-1.958.331-.59A12.326,12.326,0,0,0,24.513,3.03c.293.268.662.6.529.657-1.189-.708-.98-.763-1.15-1.062-.969-.394-1.032.032-1.674,0A19.878,19.878,0,0,0,18.36,1.153l.076.357c-1.209-.4-1.409.153-2.716,0-.08-.062.419-.225.829-.284-1.169.154-1.115-.23-2.259.043a9.724,9.724,0,0,1,.881-.5c-.954.058-2.277.555-1.868.1C11.748,1.57,8.986,2.544,7.436,4l-.049-.326c-.71.853-3.1,2.547-3.288,3.651l-.19.044a20.47,20.47,0,0,0-.9,1.979c-.483.824-.709.317-.64.446A30.106,30.106,0,0,0,.536,14.669c.291.435.007,2.616.117,4.362-.478,8.623,6.052,17,13.189,18.929a14.369,14.369,0,0,0,3.925.4c-1.561-.446-1.763-.237-3.284-.767-1.1-.517-1.338-1.107-2.115-1.781l.308.543c-1.524-.539-.886-.667-2.126-1.06l.328-.429a2.824,2.824,0,0,1-1.531-1.273l-.54.021c-.649-.8-1-1.378-.97-1.826l-.175.311c-.2-.34-2.389-3-1.252-2.384a2.563,2.563,0,0,1-.8-.867l.231-.265a4.4,4.4,0,0,1-.972-1.906,1.236,1.236,0,0,0,.695.535c-1.381-3.427-1.459-.189-2.5-3.489l.221-.018a7.327,7.327,0,0,1-.409-.805l.1-.96c-.994-1.15-.278-4.889-.135-6.94.1-.834.83-1.722,1.386-3.114l-.339-.058C4.532,10.7,7.58,7.3,8.992,7.471c.684-.859-.136,0-.269-.22,1.5-1.554,1.974-1.1,2.988-1.378,1.093-.649-.938.253-.42-.247,1.89-.483,1.339-1.1,3.8-1.342.26.148-.6.229-.82.421,1.575-.77,4.983-.6,7.2.428,2.569,1.2,5.455,4.749,5.569,8.088l.13.035c-.066,1.327.2,2.862-.262,4.272l.317-.667" transform="translate(-0.32 -0.503)" fill="#a80030"></path><path data-name="Path 3301" d="M32.208,59.764l-.088.44a8.451,8.451,0,0,0,1.266,1.6c-.379-.739-.66-1.045-1.178-2.044" transform="translate(-20.88 -38.903)" fill="#a80030"></path><path data-name="Path 3302" d="M34.247,58.123a3.488,3.488,0,0,1-.492-.821,5.711,5.711,0,0,0,.685,1.39l-.193-.569" transform="translate(-21.944 -37.3)" fill="#a80030"></path><path data-name="Path 3303" d="M82.358,48.916l-.092.231a11.156,11.156,0,0,1-1.093,3.489,10.961,10.961,0,0,0,1.185-3.72" transform="translate(-52.81 -31.841)" fill="#a80030"></path><path data-name="Path 3304" d="M45.054.187A13.512,13.512,0,0,1,46.546,0c-.586.049-1.17.079-1.746.153l.254.035" transform="translate(-29.133)" fill="#a80030"></path><path data-name="Path 3305" d="M2.44,23.219c.1.9-.681,1.256.172.659.457-1.03-.179-.284-.172-.659" transform="translate(-1.409 -15.114)" fill="#a80030"></path><path data-name="Path 3306" d="M-.053,32.764a9.824,9.824,0,0,0,.307-1.315c-.543.694-.25.842-.307,1.315" transform="translate(0.082 -20.471)" fill="#a80030"></path></g></svg>                 </figure>
                        <span>Debian 13</span>
        </a>
    </section>





<section id="social-links-block_4f4a585c553ec4bb2946ce5f70487ed2" data-id="social-links-block_4f4a585c553ec4bb2946ce5f70487ed2" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>




<div id="rhel" class="wp-block-group"><div class="wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained">
<h2 class="wp-block-heading">Než začneme</h2>



<p>Pro účely této <strong>ukázky</strong> si nejdříve přepneme SELinux do&nbsp;Permissive módu. </p>



<p>Pokud plánujete SELinux trvale deaktivovat, můžete tak učinit úpravou konfiguračního souboru.&nbsp;Nicméně, doporučujeme zvážit možnost naučit se s&nbsp;SELinuxem pracovat a&nbsp;využít jeho bezpečnostní výhody.&nbsp;Podrobné informace o&nbsp;správném nastavení a&nbsp;monitorování SELinuxu naleznete <a href="https://www.initmax.cz/wiki/selinux-integrace-se-zabbixem-a-dalsimi-nastroji/">v našem samostatném článku.​</a></p>


<section id="block-code-block_d50813134d10a5566717656b65c7ee85" data-id="block-code-block_d50813134d10a5566717656b65c7ee85" class="gt-block block-code">
    <pre><code>setenforce 0</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Instalace PostgreSQL</h2>



<p>V prvním kroku si naistalujeme repozitáře pro PostgreSQL a&nbsp;zakážeme výchozí, systémové PostgreSQL repozitáře.</p>


<section id="block-code-block_697ca9cb94515f429f7da4e30c5225c2" data-id="block-code-block_697ca9cb94515f429f7da4e30c5225c2" class="gt-block block-code">
    <pre><code>dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-10-x86_64/pgdg-redhat-repo-latest.noarch.rpm
dnf -qy module disable postgresql</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Následně pak nainstalujeme PostgreSQL, v&nbsp;tomto případě to bude aktuálně podporovaná verze 18.</p>


<section id="block-code-block_60325e4f05e2ae9914ffaa78eb2fbd60" data-id="block-code-block_60325e4f05e2ae9914ffaa78eb2fbd60" class="gt-block block-code">
    <pre><code>dnf install -y postgresql18-server</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Inicializujeme databázi a&nbsp;nastavíme její automatické spouštění.</p>


<section id="block-code-block_e6b5fd4e9d0777875953edcd83b0fbd0" data-id="block-code-block_e6b5fd4e9d0777875953edcd83b0fbd0" class="gt-block block-code">
    <pre><code>/usr/pgsql-18/bin/postgresql-18-setup initdb
systemctl enable postgresql-18 --now</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Instalace Zabbix serveru a&nbsp;jeho součástí</h2>



<p>Databáze je nyní nainstalovaná, a&nbsp;můžeme tedy přikročit k&nbsp;instalaci Zabbix serveru a&nbsp;všech jeho součástí.</p>



<p>Nejprve si z&nbsp;repozitáře EPEL vyloučíme jakékoliv instalační balíčky týkající se Zabbixu. Za předpokladu, že je nainstalován.</p>



<p>To provedeme tak, že na&nbsp;konec souboru <code>/etc/yum.repos.d/epel.repo</code> vložíme následující řádek:</p>


<section id="block-code-block_4bc70cb1da1dec35c6f39b3b357fb9f4" data-id="block-code-block_4bc70cb1da1dec35c6f39b3b357fb9f4" class="gt-block block-code">
    <pre><code>[epel]
...
excludepkgs=zabbix*</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Přidáme si repozitáře Zabbixu a&nbsp;vyčistíme instalační cache.</p>


<section id="block-code-block_8d82e8bf4873073eb738e3250f26cbac" data-id="block-code-block_8d82e8bf4873073eb738e3250f26cbac" class="gt-block block-code">
    <pre><code>rpm -Uvh https://repo.zabbix.com/zabbix/8.0/release/rocky/10/noarch/zabbix-release-latest.el10.noarch.rpm
dnf clean all</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A nainstalujeme všechny potřebné součásti Zabbixu.</p>



<p>V tomto případě použijeme jako primárního monitorovacího agenta Zabbix Agent 2, který vám doporučujeme používat, jelikož přináší daleko více funkcionalit.</p>


<section id="block-code-block_0691a87d2690e5a61f22b0b18856872f" data-id="block-code-block_0691a87d2690e5a61f22b0b18856872f" class="gt-block block-code">
    <pre><code>dnf install zabbix-server-pgsql zabbix-web-pgsql zabbix-apache-conf zabbix-sql-scripts zabbix-agent2 zabbix-web-service</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Inicializace databáze</h2>



<p>Nejprve vytvoříme databázového uživatele pro Zabbix, budeme vyzváni k&nbsp;zadání jeho přístupového hesla.</p>


<section id="block-code-block_b5737919838f2bde519350e3b1a84c88" data-id="block-code-block_b5737919838f2bde519350e3b1a84c88" class="gt-block block-code">
    <pre><code>cd /tmp
sudo -u postgres createuser --pwprompt zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V tuto chvíli jsme schopni naimportovat výchozí schéma a&nbsp;data. Opět budeme vyzváni k&nbsp;zadání hesla. <br>Zde použijeme heslo z&nbsp;předchozího kroku.</p>


<section id="block-code-block_7e6343b7a85e5d00ed1172f9d549030f" data-id="block-code-block_7e6343b7a85e5d00ed1172f9d549030f" class="gt-block block-code">
    <pre><code>sudo -u postgres createdb -O zabbix zabbix
zcat /usr/share/zabbix/sql-scripts/postgresql/server.sql.gz | sudo -u zabbix psql zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Nastavení firewallu</h2>



<p>Nazávěr na&nbsp;firewallu povolíme porty, které jsou nezbytné pro běh Zabbix serveru.</p>


<section id="block-code-block_9c52c809daffb87c360f87e56c5607af" data-id="block-code-block_9c52c809daffb87c360f87e56c5607af" class="gt-block block-code">
    <pre><code>firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-port=10051/tcp
firewall-cmd --reload</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Instalace TimescaleDB</h2>



<p>Nejčistší varianta je instalace z&nbsp;oficiálních TimescaleDB/TigerData repozitářů, jenže pro&nbsp;<strong>EL/10</strong>&nbsp;zatím nejsou (v&nbsp;našem případě) potřebné balíčky k&nbsp;dispozici. Proto použijeme&nbsp;<strong>malý workaround</strong>&nbsp;přes&nbsp;<strong>oficiální PGDG non-free repo</strong>, abychom mohli nainstalovat&nbsp;<strong>Community/TSL</strong>&nbsp;variantu.</p>



<p>Jakmile budou balíčky pro EL/10 v&nbsp;oficiálním TimescaleDB repozitáři dostupné,&nbsp;<strong>přejdeme na&nbsp;něj</strong>&nbsp;(a&nbsp;tenhle workaround už nebude potřeba).</p>



<p><br>Přidání repozitářů (PGDG non-free)</p>


<section id="block-code-block_7756cbb7985073bbfb4056b7dc81f8b8" data-id="block-code-block_7756cbb7985073bbfb4056b7dc81f8b8" class="gt-block block-code">
    <pre><code>dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/non-free/EL-10-x86_64/pgdg-redhat-nonfree-repo-latest.noarch.rpm</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Instalace TimescaleDB (TSL / Community)</p>


<section id="block-code-block_0a36f4e49684f5817eb8a5ef68b68580" data-id="block-code-block_0a36f4e49684f5817eb8a5ef68b68580" class="gt-block block-code">
    <pre><code>dnf install timescaledb-tsl_18</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Dále si nainstalujeme&nbsp;timescaledb-tune. V&nbsp;ideálním případě bychom použili oficiální TimescaleDB balíčky, kde bývá tento nástroj součástí distribuce, ale protože na&nbsp;EL/10 zatím jedeme workaround přes PGDG, doinstalujeme ho zvlášť.</p>


<section id="block-code-block_751b94a44be362cda3d715e2509698e4" data-id="block-code-block_751b94a44be362cda3d715e2509698e4" class="gt-block block-code">
    <pre><code>dnf install -y golang

# nainstaluje binary do /usr/local/sbin
GOBIN=/usr/local/sbin go install github.com/timescale/timescaledb-tune/cmd/timescaledb-tune@latest</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Spustíme utilitu <code>timescaledb-tune</code> a&nbsp;jako parametr jí předáme vyšší hodnotu maximálního množství připojení (<code>--max-conns</code>), které pro tyto testovací účely nastavíme na&nbsp;<code>125</code>.</p>



<p>Tato utilita slouží k&nbsp;přizpůsobení výchozího nastavení PostgreSQL vůčihledně výkonu a&nbsp;adekvátnímu nastavení parametrů PostgreSQL pro fungování s&nbsp;TimescaleDB.</p>



<p>Zároveň nám tato utilit pomocí instalačního průvodce pomůže vybrat aktuální a&nbsp;platný konfigurační soubor PostgreSQL a&nbsp;nastaví i&nbsp;automatické načítání knihoven TimescaleDB.</p>



<p>Prosím, odpovídejte &#8222;ano&#8220; (y) na&nbsp;všechny otázky. Pozor, automatický tuner předpokládá, že PostgreSQL běží na&nbsp;samostatném serveru, a&nbsp;proto může být potřeba případně upravit parametry.</p>


<section id="block-code-block_fc90badc9c839f45b315a8c15cf16019" data-id="block-code-block_fc90badc9c839f45b315a8c15cf16019" class="gt-block block-code">
    <pre><code>timescaledb-tune --pg-config /usr/pgsql-18/bin --max-conns=125</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1350" height="532" src="https://www.initmax.cz/wp-content/uploads/2025/11/zabbix80-tune.png" alt="" class="wp-image-21502" srcset="https://www.initmax.cz/wp-content/uploads/2025/11/zabbix80-tune.png 1350w, https://www.initmax.cz/wp-content/uploads/2025/11/zabbix80-tune-300x118.png 300w, https://www.initmax.cz/wp-content/uploads/2025/11/zabbix80-tune-1024x404.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/11/zabbix80-tune-768x303.png 768w, https://www.initmax.cz/wp-content/uploads/2025/11/zabbix80-tune-608x240.png 608w, https://www.initmax.cz/wp-content/uploads/2025/11/zabbix80-tune-1216x479.png 1216w" sizes="auto, (max-width: 1350px) 100vw, 1350px" /></figure>



<p>Následně restartujeme systémovou službu pro PostgreSQL:</p>


<section id="block-code-block_2ff21132e1dcd88b16bbbd007291da60" data-id="block-code-block_2ff21132e1dcd88b16bbbd007291da60" class="gt-block block-code">
    <pre><code>systemctl restart postgresql-18.service</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Zbývá již jen vytvořit a&nbsp;aktivovat samotnou TimescaleDB:</p>



<p><strong>Pozor:</strong> Během vývoje došlo ke změně cesty z&nbsp;původní <code>/usr/share/zabbix-sql-scripts/postgresql/timescaledb/schema.sql</code> na&nbsp;novou <code>/usr/share/zabbix/sql-scripts/postgresql/timescaledb/schema.sql</code>.</p>


<section id="block-code-block_36477242caf4f17b0b03870077b36c32" data-id="block-code-block_36477242caf4f17b0b03870077b36c32" class="gt-block block-code">
    <pre><code>echo &quot;CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;&quot; | sudo -u postgres psql zabbix
cat /usr/share/zabbix/sql-scripts/postgresql/timescaledb/schema.sql | sudo -u zabbix psql zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Nastavení Zabbix serveru</h2>



<p>Otevřeme konfigurační soubor Zabbix serveru v&nbsp;cestě:</p>


<section id="block-code-block_6c126d07c264a0971459db7cc62769b4" data-id="block-code-block_6c126d07c264a0971459db7cc62769b4" class="gt-block block-code">
    <pre><code>nano /etc/zabbix/zabbix_server.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V tomto konfiguračním souboru upravíme následující parametry tak, jak vídíte na&nbsp;předloze níže:</p>


<section id="block-code-block_a077734e72cd705cb85eadb6fb645504" data-id="block-code-block_a077734e72cd705cb85eadb6fb645504" class="gt-block block-code">
    <pre><code>...
DBPassword=password
StartReportWriters=1
WebServiceURL=http://localhost:10053/report
...</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V dalším kroku doinstalujeme všechny jazykové balíčky pro Zabbix frontend:</p>


<section id="block-code-block_96eb99512b3b58d976ba0cfa5c88018f" data-id="block-code-block_96eb99512b3b58d976ba0cfa5c88018f" class="gt-block block-code">
    <pre><code>dnf install glibc-langpack-en glibc-langpack-cs glibc-langpack-sk glibc-langpack-fr glibc-langpack-de glibc-langpack-es glibc-langpack-it glibc-langpack-zh glibc-langpack-pt glibc-langpack-da glibc-langpack-nb glibc-langpack-pl glibc-langpack-tr glibc-langpack-he glibc-langpack-ja glibc-langpack-ko glibc-langpack-ru glibc-langpack-uk glibc-langpack-ca glibc-langpack-ka glibc-langpack-vi glibc-langpack-uz</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A nakonec restartujeme všechny související služby a&nbsp;nastavíme je tak, aby se spouštěly automaticky po&nbsp;startu:</p>


<section id="block-code-block_822239481cbb2ce44bddee0ee98c4d4a" data-id="block-code-block_822239481cbb2ce44bddee0ee98c4d4a" class="gt-block block-code">
    <pre><code>systemctl restart zabbix-server zabbix-web-service zabbix-agent2 httpd php-fpm
systemctl enable zabbix-server zabbix-web-service zabbix-agent2 httpd php-fpm</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Pro ověření stavu, že nám Zabbix server nastartoval v&nbsp;pořádku můžeme kromě jiného zkontrolovat i&nbsp;jeho log soubor:</p>


<section id="block-code-block_c1ae0f3bd2cf191e94e4ef6a00b7595f" data-id="block-code-block_c1ae0f3bd2cf191e94e4ef6a00b7595f" class="gt-block block-code">
    <pre><code>less /var/log/zabbix/zabbix_server.log</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V případě, že uvidíte v&nbsp;log souboru zprávu o&nbsp;tom, že je verze TimescaleDB příliš nová, pak to není žádný velký problém. Zabbix nedokáže dostatečně rychle reagovat na&nbsp;nejnovější verze TimescaleDB tak, aby ji ve svém kódu nastavil jako podporovanou, ovšem kompatibilita je Zabbixem zaručena a&nbsp;námi ověřena.</p>



<p>V případě této chyby stačí otevřít konfigurační soubor Zabbix serveru v&nbsp;cestě <code>/etc/zabbix/zabbix_server.conf</code> a&nbsp;zde upravte následující konfigurační parametr:</p>


<section id="block-code-block_0d9c654be5eb573375d8ef3ac591e5c2" data-id="block-code-block_0d9c654be5eb573375d8ef3ac591e5c2" class="gt-block block-code">
    <pre><code>AllowUnsupportedDBVersions=1</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Soubor s&nbsp;tímto nastavením uložte a&nbsp;zrestartujte systémovou službu Zabbix serveru.</p>


<section id="block-code-block_d38c4c1a02cadd8b4beb5d49c2ff722e" data-id="block-code-block_d38c4c1a02cadd8b4beb5d49c2ff722e" class="gt-block block-code">
    <pre><code>systemctl restart zabbix-server</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Nastavení Zabbix frontendu</h2>



<p>V prohlížeči si otevřeme cílové URL, na&nbsp;kterém Zabbix běží. Například tedy <code>http://192.168.0.50/zabbix</code>, kde nás uvítá průvodce prvotní instalací.</p>



<p>Po zvolení implicitního jazyka se tlačítkem <strong>Next step</strong> posuneme na&nbsp;stránku s&nbsp;kontrolou minimálních požadavků.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1796" height="1116" src="https://www.initmax.com/wp-content/uploads/2025/11/setup-8.0lts1.png" alt="" class="wp-image-21325" srcset="https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts1.png 1796w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts1-300x186.png 300w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts1-1024x636.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts1-768x477.png 768w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts1-1536x954.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts1-608x378.png 608w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts1-1216x756.png 1216w" sizes="auto, (max-width: 1796px) 100vw, 1796px" /></figure>



<p>Pokud je kontrola v&nbsp;pořádku, pak se tedy můžeme kliknutím na&nbsp;<code>Next step</code> posunout na&nbsp;další stránku s&nbsp;nastavením připojení do&nbsp;databáze.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1796" height="1116" src="https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts3.png" alt="" class="wp-image-21340" srcset="https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts3.png 1796w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts3-300x186.png 300w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts3-1024x636.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts3-768x477.png 768w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts3-1536x954.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts3-608x378.png 608w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts3-1216x756.png 1216w" sizes="auto, (max-width: 1796px) 100vw, 1796px" /></figure>



<p>Zde vyplňujeme pouze políčko <strong>Password</strong> pro přístup do&nbsp;databáze, nic dalšího není třeba měnit.</p>



<p>Po vyplnění opět klikneme na&nbsp;<strong>Next step</strong>.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1796" height="1116" src="https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts2.png" alt="" class="wp-image-21338" srcset="https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts2.png 1796w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts2-300x186.png 300w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts2-1024x636.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts2-768x477.png 768w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts2-1536x954.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts2-608x378.png 608w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts2-1216x756.png 1216w" sizes="auto, (max-width: 1796px) 100vw, 1796px" /></figure>



<p>Na následující stránce se základním nastavením vyplníme název serveru, časové pásmo, a&nbsp;kliknutím na&nbsp;<strong>Next step</strong> pokračujeme k&nbsp;souhrnu konfigurace.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1796" height="1116" src="https://www.initmax.com/wp-content/uploads/2025/11/setup-8.0lts4.png" alt="" class="wp-image-21336" srcset="https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts4.png 1796w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts4-300x186.png 300w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts4-1024x636.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts4-768x477.png 768w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts4-1536x954.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts4-608x378.png 608w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts4-1216x756.png 1216w" sizes="auto, (max-width: 1796px) 100vw, 1796px" /></figure>



<p>V tomto souhrnu zkontrolumeme všechny zadané hodnoty a&nbsp;kliknutím na&nbsp;<strong>Next step</strong> dokončíme instalaci.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1796" height="1116" src="https://www.initmax.com/wp-content/uploads/2025/11/setup-8.0lts5.png" alt="" class="wp-image-21334" srcset="https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts5.png 1796w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts5-300x186.png 300w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts5-1024x636.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts5-768x477.png 768w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts5-1536x954.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts5-608x378.png 608w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts5-1216x756.png 1216w" sizes="auto, (max-width: 1796px) 100vw, 1796px" /></figure>



<p>Nyní již kliknutím na&nbsp;tlačítko <strong>Finish</strong> přejdeme na&nbsp;přihlašovací obrazovku.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1796" height="1116" src="https://www.initmax.com/wp-content/uploads/2025/11/setup-8.0lts6.png" alt="" class="wp-image-21330" srcset="https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts6.png 1796w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts6-300x186.png 300w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts6-1024x636.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts6-768x477.png 768w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts6-1536x954.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts6-608x378.png 608w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts6-1216x756.png 1216w" sizes="auto, (max-width: 1796px) 100vw, 1796px" /></figure>



<p>Po úspěšném přihlášení pomocí dříve zadaných údajů můžeme začít používat nejnovější Zabbix verze 8.0 (<strong>Admin/zabbix</strong>).</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="816" height="860" src="https://www.initmax.com/wp-content/uploads/2025/11/setup-8.0lts7.png" alt="" class="wp-image-21332" srcset="https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts7.png 816w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts7-285x300.png 285w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts7-768x809.png 768w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts7-608x641.png 608w" sizes="auto, (max-width: 816px) 100vw, 816px" /></figure>
</div>


<p>A takto vypada úvodní dashboard nového Zabbixu 8.0:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2560" height="1307" src="https://www.initmax.com/wp-content/uploads/2025/11/setup-8.0lts8-scaled.png" alt="" class="wp-image-21348" srcset="https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts8-scaled.png 2560w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts8-300x153.png 300w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts8-1024x523.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts8-768x392.png 768w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts8-1536x784.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts8-2048x1046.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts8-608x310.png 608w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts8-1216x621.png 1216w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></figure>



<h2 class="wp-block-heading">Nastavení Zabbix reportingu</h2>



<p>Proto, aby byl plně funkční reporting se všemi jeho vylepšeními si nejprve musíme nainstalovat Google Chrome.</p>



<p>Následujícím příkazem stáhneme instalační balíček, a&nbsp;ten také nainstalujeme:</p>


<section id="block-code-block_d253bf302ae9e6468b1580ab3c155692" data-id="block-code-block_d253bf302ae9e6468b1580ab3c155692" class="gt-block block-code">
    <pre><code>wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
dnf localinstall google-chrome-stable_current_x86_64.rpm</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V dalším kroku upravíme v&nbsp;Zabbix frontendu parametr &#8222;<strong>Frontend URL</strong>&#8220; na&nbsp;aktuálně platnou hodnotu, toto nastavení se nachází zde:</p>


<section id="block-code-block_4553b1299956d6798c00f9132fe8801f" data-id="block-code-block_4553b1299956d6798c00f9132fe8801f" class="gt-block block-code">
    <pre><code>Administration -&gt; General -&gt; Other</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Příklad této konfigurace pak můžete vidět na&nbsp;obrázku níže.</p>



<figure class="wp-block-image size-full is-style-default"><img loading="lazy" decoding="async" width="2560" height="1307" src="https://www.initmax.cz/wp-content/uploads/2025/11/reporting-8.0-scaled.png" alt="" class="wp-image-21353" srcset="https://www.initmax.cz/wp-content/uploads/2025/11/reporting-8.0-scaled.png 2560w, https://www.initmax.cz/wp-content/uploads/2025/11/reporting-8.0-300x153.png 300w, https://www.initmax.cz/wp-content/uploads/2025/11/reporting-8.0-1024x523.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/11/reporting-8.0-768x392.png 768w, https://www.initmax.cz/wp-content/uploads/2025/11/reporting-8.0-1536x784.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/11/reporting-8.0-2048x1046.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/11/reporting-8.0-608x310.png 608w, https://www.initmax.cz/wp-content/uploads/2025/11/reporting-8.0-1216x621.png 1216w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></figure>



<hr class="wp-block-separator has-alpha-channel-opacity"/>
</div></div>



<div id="debian" class="wp-block-group"><div class="wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained">
<h2 class="wp-block-heading">Instalace závislostí</h2>


<section id="block-code-block_40f1feb80f08d24f4b24b9f2fe8bcb59" data-id="block-code-block_40f1feb80f08d24f4b24b9f2fe8bcb59" class="gt-block block-code">
    <pre><code>apt install sudo gpg curl wget</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Instalace PostgreSQL</h2>



<p>V prvním kroku si nainstalujeme repozitáře pro PostgreSQL a&nbsp;zakážeme výchozí systémové repozitáře PostgreSQL. Na&nbsp;otázku &#8218;<strong>This script will enable the PostgreSQL APT repository on apt.postgresql.org on<br>your system. The distribution codename used will be trixie-pgdg.</strong>&#8218; stiskněte <strong>Enter </strong>pro pokračování a&nbsp;potvrzení instalace z&nbsp;oficiálního repozitáře.</p>


<section id="block-code-block_49e9544151a1c40bf7377d4fc6b5e26c" data-id="block-code-block_49e9544151a1c40bf7377d4fc6b5e26c" class="gt-block block-code">
    <pre><code>apt install -y postgresql-common
/usr/share/postgresql-common/pgdg/apt.postgresql.org.sh</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Následně pak nainstalujeme PostgreSQL, v&nbsp;tomto případě to bude aktuálně podporovaná verze 18.</p>


<section id="block-code-block_3224af98e5afb1945575288bca5fa85f" data-id="block-code-block_3224af98e5afb1945575288bca5fa85f" class="gt-block block-code">
    <pre><code>apt -y install postgresql-18</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nastartování PostgreSQL a&nbsp;nastavení automatického spuštění při&nbsp;startu systému</p>


<section id="block-code-block_93f0e4ff21e713e3243a62aede0ba1b0" data-id="block-code-block_93f0e4ff21e713e3243a62aede0ba1b0" class="gt-block block-code">
    <pre><code>systemctl enable postgresql --now</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Instalace Zabbix serveru a&nbsp;jeho součástí</h2>



<p>Databáze je nyní nainstalovaná, a&nbsp;můžeme tedy přikročit k&nbsp;instalaci Zabbix serveru a&nbsp;všech jeho součástí.</p>



<p>Přidáme si repozitáře Zabbixu a&nbsp;vyčistíme instalační cache.</p>


<section id="block-code-block_c4e90c0d2222c0f86bedf7af2c91365a" data-id="block-code-block_c4e90c0d2222c0f86bedf7af2c91365a" class="gt-block block-code">
    <pre><code>wget https://repo.zabbix.com/zabbix/8.0/release/debian/pool/main/z/zabbix-release/zabbix-release_latest_8.0+debian13_all.deb
dpkg -i zabbix-release_latest_8.0+debian13_all.deb
apt update</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A nainstalujeme všechny potřebné součásti Zabbixu.</p>



<p>V tomto případě použijeme jako primárního monitorovacího agenta Zabbix Agent 2, který vám doporučujeme používat, jelikož přináší daleko více funkcionalit.</p>


<section id="block-code-block_1b8612bfc042dc6c26957ee011db3bdb" data-id="block-code-block_1b8612bfc042dc6c26957ee011db3bdb" class="gt-block block-code">
    <pre><code>apt install zabbix-server-pgsql zabbix-frontend-php php8.4-pgsql zabbix-apache-conf zabbix-sql-scripts zabbix-agent2 zabbix-web-service</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Inicializace databáze</h2>



<p>Nejprve vytvoříme databázového uživatele pro Zabbix. Během procesu budeme vyzváni k&nbsp;zadání jeho přístupového hesla. Dále vytvoříme prázdnou databázi a&nbsp;nastavíme jí příslušná oprávnění.</p>


<section id="block-code-block_d097c13649605aae5e4cc6e3f3bbb135" data-id="block-code-block_d097c13649605aae5e4cc6e3f3bbb135" class="gt-block block-code">
    <pre><code>sudo -u postgres createuser --pwprompt zabbix
sudo -u postgres createdb -O zabbix zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V tuto chvíli jsme schopni naimportovat výchozí schéma a&nbsp;data. Opět budeme vyzváni k&nbsp;zadání hesla. <br>Zde použijeme heslo z&nbsp;předchozího kroku.</p>


<section id="block-code-block_cbef31dbc19dea345e15928e9b917281" data-id="block-code-block_cbef31dbc19dea345e15928e9b917281" class="gt-block block-code">
    <pre><code>zcat /usr/share/zabbix/sql-scripts/postgresql/server.sql.gz | sudo -u zabbix psql zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Instalace TimescaleDB</h2>



<p>Nyní se pustíme do&nbsp;instalace TimescaleDB a&nbsp;začneme tím, že přidáme její oficiální repozitář.</p>


<section id="block-code-block_fd3d60729d47872db6e7ff2d2ccd2ee3" data-id="block-code-block_fd3d60729d47872db6e7ff2d2ccd2ee3" class="gt-block block-code">
    <pre><code>echo &quot;deb https://packagecloud.io/timescale/timescaledb/debian/ $(lsb_release -c -s) main&quot; | sudo tee /etc/apt/sources.list.d/timescaledb.list
wget --quiet -O - https://packagecloud.io/timescale/timescaledb/gpgkey | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/timescaledb.gpg</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nainstalujme TimescaleDB.</p>


<section id="block-code-block_6dc30d3600db41ccdb2b22e4e0daf5b5" data-id="block-code-block_6dc30d3600db41ccdb2b22e4e0daf5b5" class="gt-block block-code">
    <pre><code>apt update
apt install timescaledb-2-postgresql-18 timescaledb-2-loader-postgresql-18</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Spustíme utilitu <code>timescaledb-tune</code> a&nbsp;jako parametr jí předáme vyšší hodnotu maximálního množství připojení (<code>--max-conns</code>), které pro tyto testovací účely nastavíme na&nbsp;<code>125</code>.</p>



<p>Tato utilita slouží k&nbsp;přizpůsobení výchozího nastavení PostgreSQL vůčihledně výkonu a&nbsp;adekvátnímu nastavení parametrů PostgreSQL pro fungování s&nbsp;TimescaleDB.</p>



<p>Zároveň nám tato utilit pomocí instalačního průvodce pomůže vybrat aktuální a&nbsp;platný konfigurační soubor PostgreSQL a&nbsp;nastaví i&nbsp;automatické načítání knihoven TimescaleDB.</p>



<p>Prosím, odpovídejte &#8222;ano&#8220; (y) na&nbsp;všechny otázky. Pozor, automatický tuner předpokládá, že PostgreSQL běží na&nbsp;samostatném serveru, a&nbsp;proto může být potřeba případně upravit parametry.</p>


<section id="block-code-block_f8162d8143f483a73fee2cfb1d71dab6" data-id="block-code-block_f8162d8143f483a73fee2cfb1d71dab6" class="gt-block block-code">
    <pre><code>timescaledb-tune --pg-config /usr/bin --max-conns=125</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1020" height="524" src="https://www.initmax.cz/wp-content/uploads/2025/11/timescaledb-debian13.png" alt="" class="wp-image-21317" srcset="https://www.initmax.cz/wp-content/uploads/2025/11/timescaledb-debian13.png 1020w, https://www.initmax.cz/wp-content/uploads/2025/11/timescaledb-debian13-300x154.png 300w, https://www.initmax.cz/wp-content/uploads/2025/11/timescaledb-debian13-768x395.png 768w, https://www.initmax.cz/wp-content/uploads/2025/11/timescaledb-debian13-608x312.png 608w" sizes="auto, (max-width: 1020px) 100vw, 1020px" /></figure>



<p>Následně restartujeme systémovou službu pro PostgreSQL:</p>


<section id="block-code-block_d3fd1eb69ece9d87ff4f4926bed11f0a" data-id="block-code-block_d3fd1eb69ece9d87ff4f4926bed11f0a" class="gt-block block-code">
    <pre><code>systemctl restart postgresql</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Zbývá již jen vytvořit a&nbsp;aktivovat samotnou TimescaleDB:</p>


<section id="block-code-block_36477242caf4f17b0b03870077b36c32" data-id="block-code-block_36477242caf4f17b0b03870077b36c32" class="gt-block block-code">
    <pre><code>echo &quot;CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;&quot; | sudo -u postgres psql zabbix
cat /usr/share/zabbix/sql-scripts/postgresql/timescaledb/schema.sql | sudo -u zabbix psql zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Nastavení Zabbix serveru</h2>



<p>Otevřeme konfigurační soubor Zabbix serveru v&nbsp;cestě:</p>


<section id="block-code-block_6c126d07c264a0971459db7cc62769b4" data-id="block-code-block_6c126d07c264a0971459db7cc62769b4" class="gt-block block-code">
    <pre><code>nano /etc/zabbix/zabbix_server.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V tomto konfiguračním souboru upravíme následující parametry tak, jak vídíte na&nbsp;předloze níže:</p>


<section id="block-code-block_a077734e72cd705cb85eadb6fb645504" data-id="block-code-block_a077734e72cd705cb85eadb6fb645504" class="gt-block block-code">
    <pre><code>...
DBPassword=password
StartReportWriters=1
WebServiceURL=http://localhost:10053/report
...</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V dalším kroku nastavíme jazykové balíčky pro Zabbix frontend. Můžete zvolit pouze ty, které potřebujete, nebo povolit všechny.</p>


<section id="block-code-block_99527f83f6de59ef57150ed13ae13851" data-id="block-code-block_99527f83f6de59ef57150ed13ae13851" class="gt-block block-code">
    <pre><code>sed -i &#039;/# en_US.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# en_GB.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# cs_CZ.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# sk_SK.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# fr_FR.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# de_DE.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# es_ES.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# it_IT.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# zh_CN.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# pt_PT.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# pt_BR.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# da_DK.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# nb_NO.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# pl_PL.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# tr_TR.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# he_IL.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# ja_JP.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# ko_KR.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# ru_RU.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# uk_UA.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# ca_ES.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# ka_GE.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# uz_UZ.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# vi_VN UTF-8/s/^# //&#039; /etc/locale.gen
locale-gen</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A nakonec restartujeme všechny související služby a&nbsp;nastavíme je tak, aby se spouštěly automaticky po&nbsp;startu:</p>


<section id="block-code-block_55ae8296384529bb2b722415ae386083" data-id="block-code-block_55ae8296384529bb2b722415ae386083" class="gt-block block-code">
    <pre><code>systemctl restart zabbix-server zabbix-web-service zabbix-agent2 apache2
systemctl enable zabbix-server zabbix-web-service zabbix-agent2 apache2</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Pro ověření stavu, že nám Zabbix server nastartoval v&nbsp;pořádku můžeme kromě jiného zkontrolovat i&nbsp;jeho log soubor:</p>


<section id="block-code-block_c1ae0f3bd2cf191e94e4ef6a00b7595f" data-id="block-code-block_c1ae0f3bd2cf191e94e4ef6a00b7595f" class="gt-block block-code">
    <pre><code>less /var/log/zabbix/zabbix_server.log</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V případě, že uvidíte v&nbsp;log souboru zprávu o&nbsp;tom, že je verze TimescaleDB příliš nová, pak to není žádný velký problém. Zabbix nedokáže dostatečně rychle reagovat na&nbsp;nejnovější verze TimescaleDB tak, aby ji ve svém kódu nastavil jako podporovanou, ovšem kompatibilita je Zabbixem zaručena a&nbsp;námi ověřena.</p>



<p>V případě této chyby stačí otevřít konfigurační soubor Zabbix serveru v&nbsp;cestě <code>/etc/zabbix/zabbix_server.conf</code> a&nbsp;zde upravte následující konfigurační parametr:</p>


<section id="block-code-block_0d9c654be5eb573375d8ef3ac591e5c2" data-id="block-code-block_0d9c654be5eb573375d8ef3ac591e5c2" class="gt-block block-code">
    <pre><code>AllowUnsupportedDBVersions=1</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Soubor s&nbsp;tímto nastavením uložte a&nbsp;zrestartujte systémovou službu Zabbix serveru.</p>


<section id="block-code-block_d38c4c1a02cadd8b4beb5d49c2ff722e" data-id="block-code-block_d38c4c1a02cadd8b4beb5d49c2ff722e" class="gt-block block-code">
    <pre><code>systemctl restart zabbix-server</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Nastavení Zabbix frontendu</h2>



<p>V prohlížeči si otevřeme cílové URL, na&nbsp;kterém Zabbix běží. Například tedy <code>http://192.168.0.50/zabbix</code>, kde nás uvítá průvodce prvotní instalací.</p>



<p>Po zvolení implicitního jazyka se tlačítkem <strong>Next step</strong> posuneme na&nbsp;stránku s&nbsp;kontrolou minimálních požadavků.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1796" height="1116" src="https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts1.png" alt="" class="wp-image-21325" srcset="https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts1.png 1796w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts1-300x186.png 300w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts1-1024x636.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts1-768x477.png 768w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts1-1536x954.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts1-608x378.png 608w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts1-1216x756.png 1216w" sizes="auto, (max-width: 1796px) 100vw, 1796px" /></figure>



<p>Pokud je kontrola v&nbsp;pořádku, pak se tedy můžeme kliknutím na&nbsp;<strong>Next step</strong> posunout na&nbsp;další stránku s&nbsp;nastavením připojení do&nbsp;databáze.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1796" height="1116" src="https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts3.png" alt="" class="wp-image-21340" srcset="https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts3.png 1796w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts3-300x186.png 300w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts3-1024x636.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts3-768x477.png 768w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts3-1536x954.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts3-608x378.png 608w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts3-1216x756.png 1216w" sizes="auto, (max-width: 1796px) 100vw, 1796px" /></figure>



<p>Zde vyplňujeme pouze políčko <strong>Password</strong> pro přístup do&nbsp;databáze, nic dalšího není třeba měnit.</p>



<p>Po vyplnění opět klikneme na&nbsp;<strong>Next step</strong>.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1796" height="1116" src="https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts2.png" alt="" class="wp-image-21338" srcset="https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts2.png 1796w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts2-300x186.png 300w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts2-1024x636.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts2-768x477.png 768w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts2-1536x954.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts2-608x378.png 608w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts2-1216x756.png 1216w" sizes="auto, (max-width: 1796px) 100vw, 1796px" /></figure>



<p>Na následující stránce se základním nastavením vyplníme název serveru, časové pásmo, a&nbsp;kliknutím na&nbsp;<strong>Next step</strong> pokračujeme k&nbsp;souhrnu konfigurace.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1796" height="1116" src="https://www.initmax.com/wp-content/uploads/2025/11/setup-8.0lts4.png" alt="" class="wp-image-21336" srcset="https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts4.png 1796w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts4-300x186.png 300w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts4-1024x636.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts4-768x477.png 768w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts4-1536x954.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts4-608x378.png 608w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts4-1216x756.png 1216w" sizes="auto, (max-width: 1796px) 100vw, 1796px" /></figure>



<p>V tomto souhrnu zkontrolumeme všechny zadané hodnoty a&nbsp;kliknutím na&nbsp;<strong>Next step</strong> dokončíme instalaci.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1796" height="1116" src="https://www.initmax.com/wp-content/uploads/2025/11/setup-8.0lts5.png" alt="" class="wp-image-21334" srcset="https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts5.png 1796w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts5-300x186.png 300w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts5-1024x636.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts5-768x477.png 768w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts5-1536x954.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts5-608x378.png 608w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts5-1216x756.png 1216w" sizes="auto, (max-width: 1796px) 100vw, 1796px" /></figure>



<p>Nyní již kliknutím na&nbsp;tlačítko <strong>Finish</strong> přejdeme na&nbsp;přihlašovací obrazovku.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1796" height="1116" src="https://www.initmax.com/wp-content/uploads/2025/11/setup-8.0lts6.png" alt="" class="wp-image-21330" srcset="https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts6.png 1796w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts6-300x186.png 300w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts6-1024x636.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts6-768x477.png 768w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts6-1536x954.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts6-608x378.png 608w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts6-1216x756.png 1216w" sizes="auto, (max-width: 1796px) 100vw, 1796px" /></figure>



<p>Po úspěšném přihlášení pomocí dříve zadaných údajů můžeme začít používat nejnovější Zabbix verze 8.0 (<code><strong>Admin/zabbix</strong></code>).</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="816" height="860" src="https://www.initmax.com/wp-content/uploads/2025/11/setup-8.0lts7.png" alt="" class="wp-image-21332" srcset="https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts7.png 816w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts7-285x300.png 285w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts7-768x809.png 768w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts7-608x641.png 608w" sizes="auto, (max-width: 816px) 100vw, 816px" /></figure>
</div>


<p>A takto vypada úvodní dashboard nového Zabbixu 8.0:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2560" height="1307" src="https://www.initmax.com/wp-content/uploads/2025/11/setup-8.0lts8-scaled.png" alt="" class="wp-image-21348" srcset="https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts8-scaled.png 2560w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts8-300x153.png 300w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts8-1024x523.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts8-768x392.png 768w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts8-1536x784.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts8-2048x1046.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts8-608x310.png 608w, https://www.initmax.cz/wp-content/uploads/2025/11/setup-8.0lts8-1216x621.png 1216w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></figure>



<h2 class="wp-block-heading">Nastavení Zabbix reportingu</h2>



<p>Proto, aby byl plně funkční reporting se všemi jeho vylepšeními si nejprve musíme nainstalovat Google Chrome.</p>



<p>Následujícím příkazem stáhneme instalační balíček, a&nbsp;ten také nainstalujeme:</p>


<section id="block-code-block_de90f10d587cb8cb6f39f904a031b593" data-id="block-code-block_de90f10d587cb8cb6f39f904a031b593" class="gt-block block-code">
    <pre><code>curl -fSsL https://dl.google.com/linux/linux_signing_key.pub | sudo gpg --dearmor | sudo tee /usr/share/keyrings/google-chrome.gpg &gt;&gt; /dev/null
echo deb [arch=amd64 signed-by=/usr/share/keyrings/google-chrome.gpg] http://dl.google.com/linux/chrome/deb/ stable main | sudo tee /etc/apt/sources.list.d/google-chrome.list
apt update
apt install google-chrome-stable</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V dalším kroku upravíme v&nbsp;Zabbix frontendu parametr &#8222;<strong>Frontend URL</strong>&#8220; na&nbsp;aktuálně platnou hodnotu, toto nastavení se nachází zde:</p>


<section id="block-code-block_4553b1299956d6798c00f9132fe8801f" data-id="block-code-block_4553b1299956d6798c00f9132fe8801f" class="gt-block block-code">
    <pre><code>Administration -&gt; General -&gt; Other</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Příklad této konfigurace pak můžete vidět na&nbsp;obrázku níže.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2560" height="1307" src="https://www.initmax.cz/wp-content/uploads/2025/11/reporting-8.0-scaled.png" alt="" class="wp-image-21353" srcset="https://www.initmax.cz/wp-content/uploads/2025/11/reporting-8.0-scaled.png 2560w, https://www.initmax.cz/wp-content/uploads/2025/11/reporting-8.0-300x153.png 300w, https://www.initmax.cz/wp-content/uploads/2025/11/reporting-8.0-1024x523.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/11/reporting-8.0-768x392.png 768w, https://www.initmax.cz/wp-content/uploads/2025/11/reporting-8.0-1536x784.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/11/reporting-8.0-2048x1046.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/11/reporting-8.0-608x310.png 608w, https://www.initmax.cz/wp-content/uploads/2025/11/reporting-8.0-1216x621.png 1216w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></figure>
</div></div>



<h2 class="wp-block-heading">Dokončovací práce</h2>



<ul class="wp-block-list">
<li>Zkontrolujte, že správně běží Zabbix server, databázový server a&nbsp;mají správnou verzi</li>
</ul>



<h2 class="wp-block-heading">Podpora pro Item Browser</h2>



<p>Veškeré potřebné kroky naleznete v&nbsp;<a href="https://www.initmax.cz/wiki/instalace-a-zakladni-pouziti-pro-item-browser/">samostatném návodu na&nbsp;naší wiki<strong>.</strong></a></p>


<section id="block-webinar-block_d3484b2c5ce9723da4a4a23e99241c8b" data-id="block-webinar-block_d3484b2c5ce9723da4a4a23e99241c8b" class="gt-block block-webinar">
    <div class="connected-webinars__grid">
        <a href="https://www.initmax.cz/webinar/7-0-workshop-zabbix-7-0-monitorovani-pomoci-browser-item-pomoci-aplikace-selenium/" class="grid-item">
	<article class="webinar-promotion">
		<div class="webinar-promotion__thumbnail-wrap">
			<figure class="webinar-promotion__thumbnail">
					<img decoding="async" src="https://www.initmax.cz/wp-content/uploads/2024/05/ilustrace_webinare_zabbix_7.0_13_thumbnail_web-copy-2.png"
				 width="400"
		 height="250"
		 class=""
		 alt="7.0 Workshop: Zabbix 7.0 &#8211; Monitorování pomocí Browser Item pomocí aplikace Selenium"
		 loading="lazy"	>
									<div class="webinar-promotion__tags">
						<span class="tag tag--small" style="color:#ffffff;background-color:#4caf50;">Nový</span><span class="tag tag--small" style="color:#ffffff;background-color:#d40000;">Zabbix</span>					</div>
							</figure>
		</div>
		<div class="webinar-promotion__text">
			<div>
									<time datetime="2024-06-21">21.&nbsp;6.&nbsp;2024</time>
							</div>
			<h3 class="webinar-promotion__title">7.0 Workshop: Zabbix 7.0 &#8211; Monitorování pomocí Browser Item pomocí aplikace Selenium</h3>
			<div class="icon-link">
				<figure class="icon-wrap icon-wrap--primary"><svg data-name="Group 3411" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 455" d="M0,0H24V24H0Z" fill="none"/><path data-name="Path 456" d="M15,10l4.553-2.276A1,1,0,0,1,21,8.618v6.764a1,1,0,0,1-1.447.894L15,14V10Z" transform="translate(0 0)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><rect data-name="Rectangle 1286" width="12" height="12" rx="2" transform="translate(3.112 6)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</figure>
				<span>Zhlédnout záznam</span>
			</div>
		</div>
	</article>
</a>    </div>
</section>



<h2 class="wp-block-heading">Vlastní rebranding</h2>



<p>Veškeré potřebné kroky naleznete v&nbsp;<a href="https://www.initmax.cz/wiki/rebranding-zabbixu/">samostatném návodu na&nbsp;naší wiki<strong>.</strong></a></p>


<section id="block-newsletter-block_013e792015f7decc1aca31a52d4bb416" data-id="block-newsletter-block_013e792015f7decc1aca31a52d4bb416" class="gt-block block-newsletter">
    <section id="newsletter" class="newsletter">
	<div class="gradient basic">
		<div class="newsletter__inner width width--general">
			<div class="col left">
									<h2 class="newsletter__title">Buďte v&nbsp;obraze s&nbsp;naším newsletterem</h2>
													<div class="newsletter__content"><p>Díky initMAX newsletteru Vám neunikne žádná z&nbsp;pozvánek na&nbsp;akce a&nbsp;webináře, žádný z&nbsp;tipů, jak dostat ze svého IT MAXimum, ani ověřené informace o&nbsp;novinkách ze světa Zabbix a&nbsp;dalších technologií.</p>
</div>
							</div>
			<div class="col right form-wrapper">
				<div class="newsletter-form">
	<form method="post" action="/wiki/kapitola/zabbix/feed/" enctype="multipart/form-data">
		<input type="hidden" name="url" value="https://www.initmax.cz/wiki/kapitola/zabbix/feed/">

		<div class="inputs">

			<label for="newsletter-form_contact_email" class="top">Vaše e-mailová adresa:</label>
			<div class="df">

				<div class="input">
					<input type="text" id="newsletter-form_contact_email" name="newsletter_email" placeholder="@" data-format="email" data-required="1">
									</div><!-- /.input -->

				<a href="#" class="btn btn--white sendBtn">Odeslat</a>

			</div>

			<div class="bottom nm">
				<label for="newsletter-form_gdpr" class="checkbox gdpr">
					<input type="checkbox" id="newsletter-form_gdpr" name="newsletter_gdpr">
					<span>Souhlasím se&nbsp;<a href="https://www.initmax.cz/ochrana-osobnich-udaju/" target="_blank">zpracováním osobních údajů</a>.</span>
				</label>
			</div>

		</div><!-- /.inputs -->
		<div class="sent hidden">
			<div class="iconOk"><h3>Děkujeme, že jste se přihlásili k&nbsp;odběru našeho newsletteru.</h3>
</div>
			<button class="sent__close" title="Zavřít" onclick="closeFormMessage(this,event)"><svg data-name="Group 3602" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 3272" d="M0,0H24V24H0Z" fill="none"/><line data-name="Line 98" y2="14" transform="translate(7.05 7.05) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 99" x2="14" transform="translate(7.05 16.95) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</button>
		</div><!-- /.sent -->
	</form>
</div>			</div>
		</div>
	</div>
</section></section>



<section id="social-links-block_4f4a585c553ec4bb2946ce5f70487ed2" data-id="social-links-block_4f4a585c553ec4bb2946ce5f70487ed2" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>

<p>The post <a href="https://www.initmax.cz/wiki/zabbix-8-0-navod-na-instalaci-v-5-minutach/">Zabbix 8.0 LTS &#8211; návod na&nbsp;instalaci v&nbsp;5 minutách</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Zabbix a&#160;WhatsApp &#8211; Integrace notifikací</title>
		<link>https://www.initmax.cz/wiki/zabbix-a-whatsapp-integrace-notifikaci/</link>
		
		<dc:creator><![CDATA[Tomáš Heřmánek]]></dc:creator>
		<pubDate>Thu, 01 May 2025 11:15:18 +0000</pubDate>
				<guid isPermaLink="false">https://www.initmax.cz/?post_type=wiki&#038;p=18294</guid>

					<description><![CDATA[<p>Tento návod popisuje postup integrace Zabbixu s WhatsApp pro posílání notifikací pomocí webhooku WhatsApp Cloud API. Postup je aktuální pro Zabbix ...</p>
<p>The post <a href="https://www.initmax.cz/wiki/zabbix-a-whatsapp-integrace-notifikaci/">Zabbix a&nbsp;WhatsApp &#8211; Integrace notifikací</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Tento návod popisuje postup integrace Zabbixu s&nbsp;WhatsApp pro posílání notifikací pomocí webhooku WhatsApp Cloud API. Postup je aktuální pro Zabbix ve verzi 7.0 a&nbsp;WhatsApp Cloud API verze 22, která již podporuje pojmenované parametry pro šablony zpráv. Zaměřujeme se zde na&nbsp;řešení využívající bezplatnou verzi WhatsApp Cloud API, která má určitá omezení. Rovněž si vysvětlíme výhody placené a&nbsp;ověřené varianty, která nabízí vyšší limity, lepší podporu a&nbsp;další pokročilé funkce.</p>




<section id="social-links-block_c264a0ae126a6eeee5f60aafd676a3e8" data-id="social-links-block_c264a0ae126a6eeee5f60aafd676a3e8" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>




<h2 class="wp-block-heading">Meta Developer účet</h2>



<ul class="wp-block-list">
<li>Pokud již máte Facebook účet, přejděte na&nbsp;<a href="https://developers.facebook.com/" target="_blank" rel="noreferrer noopener nofollow">developers.facebook.com</a>&nbsp;a&nbsp;přihlaste se svým osobním Facebook účtem.</li>



<li>Pokud Facebook účet nemáte, založte si jej na&nbsp;<a href="https://facebook.com/" target="_blank" rel="noreferrer noopener nofollow">facebook.com</a>&nbsp;pomocí e-mailu nebo telefonu.</li>



<li>Následně na&nbsp;<a href="https://developers.facebook.com/" target="_blank" rel="noreferrer noopener nofollow">developers.facebook.com</a>&nbsp;klikněte na&nbsp;„Get Started“, ověřte e-mail a&nbsp;telefon, a&nbsp;akceptujte podmínky pro vytvoření Meta Developer účtu.</li>
</ul>



<h2 class="wp-block-heading">Vytvoření aplikace s&nbsp;WhatsApp produktem</h2>



<p>Klikněte <code>My Apps</code></p>



<figure class="wp-block-image size-full is-style-default"><img loading="lazy" decoding="async" width="2560" height="958" src="https://www.initmax.cz/wp-content/uploads/2025/05/createapp-scaled.png" alt="" class="wp-image-18299" srcset="https://www.initmax.cz/wp-content/uploads/2025/05/createapp-scaled.png 2560w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp-300x112.png 300w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp-1024x383.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp-768x287.png 768w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp-1536x575.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp-2048x767.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp-608x228.png 608w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp-1216x455.png 1216w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></figure>



<p>Dále klikněte na&nbsp;<code>Create App</code></p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2560" height="1165" src="https://www.initmax.cz/wp-content/uploads/2025/05/createapp1-1-scaled.png" alt="" class="wp-image-18304" srcset="https://www.initmax.cz/wp-content/uploads/2025/05/createapp1-1-scaled.png 2560w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp1-1-300x137.png 300w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp1-1-1024x466.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp1-1-768x349.png 768w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp1-1-1536x699.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp1-1-2048x932.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp1-1-608x277.png 608w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp1-1-1216x553.png 1216w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></figure>



<p>Vyplňte název aplikace (např.&nbsp;Whats-Zabbix).</p>



<p>Vyplňte kontaktní e-mail aplikace (existující e-mailová adresa).</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2560" height="747" src="https://www.initmax.cz/wp-content/uploads/2025/05/createapp3-scaled.png" alt="" class="wp-image-18306" srcset="https://www.initmax.cz/wp-content/uploads/2025/05/createapp3-scaled.png 2560w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp3-300x88.png 300w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp3-1024x299.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp3-768x224.png 768w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp3-1536x448.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp3-2048x597.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp3-608x177.png 608w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp3-1216x355.png 1216w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></figure>



<p>Z use-case vybereme možnost „Ostatní“.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2560" height="1254" src="https://www.initmax.cz/wp-content/uploads/2025/05/createapp4-scaled.png" alt="" class="wp-image-18308" srcset="https://www.initmax.cz/wp-content/uploads/2025/05/createapp4-scaled.png 2560w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp4-300x147.png 300w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp4-1024x502.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp4-768x376.png 768w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp4-1536x752.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp4-2048x1003.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp4-608x298.png 608w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp4-1216x596.png 1216w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></figure>



<p>Pro přístup k&nbsp;části WhatsApp je potřeba zvolit typ aplikace „Firemní“.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2560" height="777" src="https://www.initmax.cz/wp-content/uploads/2025/05/createapp5-scaled.png" alt="" class="wp-image-18310" srcset="https://www.initmax.cz/wp-content/uploads/2025/05/createapp5-scaled.png 2560w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp5-300x91.png 300w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp5-1024x311.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp5-768x233.png 768w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp5-1536x466.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp5-2048x622.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp5-608x185.png 608w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp5-1216x369.png 1216w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></figure>



<p>Znovu vyplníme název aplikace a&nbsp;e-mail, portfolio prozatím necháme prázdné.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2560" height="954" src="https://www.initmax.cz/wp-content/uploads/2025/05/createapp6-scaled.png" alt="" class="wp-image-18312" srcset="https://www.initmax.cz/wp-content/uploads/2025/05/createapp6-scaled.png 2560w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp6-300x112.png 300w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp6-1024x381.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp6-768x286.png 768w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp6-1536x572.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp6-2048x763.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp6-608x226.png 608w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp6-1216x453.png 1216w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></figure>



<p>Po vytvoření kostry aplikace k&nbsp;ní přidáme produkt WhatsApp, o&nbsp;který nám jde.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2560" height="1301" src="https://www.initmax.cz/wp-content/uploads/2025/05/createapp7-2-scaled.png" alt="" class="wp-image-18814" srcset="https://www.initmax.cz/wp-content/uploads/2025/05/createapp7-2-scaled.png 2560w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp7-2-300x152.png 300w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp7-2-1024x520.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp7-2-768x390.png 768w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp7-2-1536x780.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp7-2-2048x1041.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp7-2-608x309.png 608w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp7-2-1216x618.png 1216w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></figure>



<p>Pravděpodobně pro nás neexistuje žádné vhodné portfolio, proto jej vytvoříme. <strong>Pokud však již vhodné portfolio existuje, můžete ho vybrat a&nbsp;tuto část přeskočit.</strong></p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2560" height="1123" src="https://www.initmax.cz/wp-content/uploads/2025/05/createbussinesportfolio-scaled.png" alt="" class="wp-image-18316" srcset="https://www.initmax.cz/wp-content/uploads/2025/05/createbussinesportfolio-scaled.png 2560w, https://www.initmax.cz/wp-content/uploads/2025/05/createbussinesportfolio-300x132.png 300w, https://www.initmax.cz/wp-content/uploads/2025/05/createbussinesportfolio-1024x449.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/05/createbussinesportfolio-768x337.png 768w, https://www.initmax.cz/wp-content/uploads/2025/05/createbussinesportfolio-1536x674.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/05/createbussinesportfolio-2048x898.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/05/createbussinesportfolio-608x267.png 608w, https://www.initmax.cz/wp-content/uploads/2025/05/createbussinesportfolio-1216x533.png 1216w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></figure>



<p>V kroku pro vytvoření portfolia vyplňte název firmy a&nbsp;účtu, dále pak vaše jméno a&nbsp;firemní e-mail. (Omlouváme se, ale nepodařilo se nám zajistit screenshot v&nbsp;anglické verzi.)</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2560" height="1216" src="https://www.initmax.cz/wp-content/uploads/2025/05/createbussinesportfolio1-scaled.png" alt="" class="wp-image-18318" srcset="https://www.initmax.cz/wp-content/uploads/2025/05/createbussinesportfolio1-scaled.png 2560w, https://www.initmax.cz/wp-content/uploads/2025/05/createbussinesportfolio1-300x143.png 300w, https://www.initmax.cz/wp-content/uploads/2025/05/createbussinesportfolio1-1024x487.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/05/createbussinesportfolio1-768x365.png 768w, https://www.initmax.cz/wp-content/uploads/2025/05/createbussinesportfolio1-1536x730.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/05/createbussinesportfolio1-2048x973.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/05/createbussinesportfolio1-608x289.png 608w, https://www.initmax.cz/wp-content/uploads/2025/05/createbussinesportfolio1-1216x578.png 1216w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></figure>



<p>V dalším kroku už jen počkáte na&nbsp;potvrzení. Pokud je váš účet příliš nový, je možné, že budete muset počkat až jednu hodinu, než bude možné portfolio vytvořit.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2560" height="1240" src="https://www.initmax.cz/wp-content/uploads/2025/05/createbussinesportfolio2-1-scaled.png" alt="" class="wp-image-18818" srcset="https://www.initmax.cz/wp-content/uploads/2025/05/createbussinesportfolio2-1-scaled.png 2560w, https://www.initmax.cz/wp-content/uploads/2025/05/createbussinesportfolio2-1-300x145.png 300w, https://www.initmax.cz/wp-content/uploads/2025/05/createbussinesportfolio2-1-1024x496.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/05/createbussinesportfolio2-1-768x372.png 768w, https://www.initmax.cz/wp-content/uploads/2025/05/createbussinesportfolio2-1-1536x744.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/05/createbussinesportfolio2-1-2048x992.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/05/createbussinesportfolio2-1-608x295.png 608w, https://www.initmax.cz/wp-content/uploads/2025/05/createbussinesportfolio2-1-1216x589.png 1216w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></figure>



<p>Když se nyní znovu podíváme do&nbsp;naší aplikace, v&nbsp;části WhatsApp &gt; API Setup se nám nově zobrazí naše portfolio, které potvrdíme.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2560" height="1279" src="https://www.initmax.cz/wp-content/uploads/2025/05/createapp8-scaled.png" alt="" class="wp-image-18322" srcset="https://www.initmax.cz/wp-content/uploads/2025/05/createapp8-scaled.png 2560w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp8-300x150.png 300w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp8-1024x512.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp8-768x384.png 768w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp8-1536x767.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp8-2048x1023.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp8-608x304.png 608w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp8-1216x608.png 1216w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></figure>



<p>Hned poté se nám objeví naše WhatsApp aplikace a&nbsp;její údaje.</p>



<h2 class="wp-block-heading">Přidání čísel pro notifikace</h2>



<p>Protože se jedná o&nbsp;free verzi aplikace, je nutné předem zadat čísla, na&nbsp;která budeme chtít zasílat notifikace (může jich být maximálně 5). Pokud bychom použili vlastní ověřené telefonní číslo, tento krok by nebyl nutný, ale aplikace by již nebyla zdarma.</p>



<p>Telefonní číslo vygenerované společností Meta slouží primárně pro testování, ale bez problémů jej můžeme použít i&nbsp;pro naše zamýšlené notifikace. Jediným omezením je nutnost každých 90&nbsp;dní prodloužit používání tohoto čísla. Toto omezení se netýká vlastních ověřených telefonních čísel.</p>



<p>Zde si rovnou poznamenáme naše „Phone Number ID“, které budeme později potřebovat pro vytvoření „Media Template“ v&nbsp;Zabbixu.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2560" height="1250" src="https://www.initmax.cz/wp-content/uploads/2025/05/createapp9-scaled.png" alt="" class="wp-image-18324" srcset="https://www.initmax.cz/wp-content/uploads/2025/05/createapp9-scaled.png 2560w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp9-300x146.png 300w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp9-1024x500.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp9-768x375.png 768w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp9-1536x750.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp9-2048x1000.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp9-608x297.png 608w, https://www.initmax.cz/wp-content/uploads/2025/05/createapp9-1216x594.png 1216w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></figure>



<p>Následně zadáte vaše telefonní číslo pro WhatsApp. Do&nbsp;aplikace WhatsApp na&nbsp;tomto čísle vám přijde zpráva s&nbsp;číselným ověřovacím kódem.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2560" height="920" src="https://www.initmax.cz/wp-content/uploads/2025/05/createappnumber-scaled.png" alt="" class="wp-image-18326" srcset="https://www.initmax.cz/wp-content/uploads/2025/05/createappnumber-scaled.png 2560w, https://www.initmax.cz/wp-content/uploads/2025/05/createappnumber-300x108.png 300w, https://www.initmax.cz/wp-content/uploads/2025/05/createappnumber-1024x368.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/05/createappnumber-768x276.png 768w, https://www.initmax.cz/wp-content/uploads/2025/05/createappnumber-1536x552.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/05/createappnumber-2048x736.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/05/createappnumber-608x218.png 608w, https://www.initmax.cz/wp-content/uploads/2025/05/createappnumber-1216x437.png 1216w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></figure>



<p>Po chvíli by vám do&nbsp;aplikace WhatsApp mělo přijít ověřovací číslo, které vyplníte do&nbsp;formuláře. Stejným způsobem postupujte i&nbsp;pro další případná telefonní čísla. Pozor, tato čísla je nutné zadat ještě před jejich použitím pro zasílání notifikací ze Zabbixu.</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="472" height="1024" src="https://www.initmax.cz/wp-content/uploads/2025/05/whatsapp_verify-472x1024.png" alt="" class="wp-image-18328" srcset="https://www.initmax.cz/wp-content/uploads/2025/05/whatsapp_verify-472x1024.png 472w, https://www.initmax.cz/wp-content/uploads/2025/05/whatsapp_verify-138x300.png 138w, https://www.initmax.cz/wp-content/uploads/2025/05/whatsapp_verify-768x1665.png 768w, https://www.initmax.cz/wp-content/uploads/2025/05/whatsapp_verify-709x1536.png 709w, https://www.initmax.cz/wp-content/uploads/2025/05/whatsapp_verify-945x2048.png 945w, https://www.initmax.cz/wp-content/uploads/2025/05/whatsapp_verify-608x1318.png 608w, https://www.initmax.cz/wp-content/uploads/2025/05/whatsapp_verify.png 1179w" sizes="auto, (max-width: 472px) 100vw, 472px" /></figure>
</div>


<p></p>



<h2 class="wp-block-heading">Odeslání první testovací zprávy</h2>



<p>Pro odeslání naší první testovací zprávy už máme připraveno vše důležité a&nbsp;můžeme využít přímo aplikační formulář pro testování. Pro tento první test nám však ještě chybí zásadní věc – přístupový token.</p>



<p>Tento token si můžeme vygenerovat přímo zde, ale pozor: token má platnost pouze 1 hodinu. <strong>Proto jej nepoužívejte jako trvalý token pro Zabbix!</strong></p>



<p>Nejprve klikneme na&nbsp;tlačítko „Generate access token“.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2560" height="918" src="https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken-scaled.png" alt="" class="wp-image-18374" srcset="https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken-scaled.png 2560w, https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken-300x108.png 300w, https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken-1024x367.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken-768x275.png 768w, https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken-1536x551.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken-2048x734.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken-608x218.png 608w, https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken-1216x436.png 1216w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></figure>



<p>V nově otevřeném pop-up okně potvrdíme přihlášení pod naším uživatelským účtem.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2560" height="1291" src="https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken1-scaled.png" alt="" class="wp-image-18377" srcset="https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken1-scaled.png 2560w, https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken1-300x151.png 300w, https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken1-1024x516.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken1-768x387.png 768w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></figure>



<p>Na další stránce potvrdíme udělení přístupu pro naši aplikaci.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2560" height="1290" src="https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken2-scaled.png" alt="" class="wp-image-18379" srcset="https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken2-scaled.png 2560w, https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken2-300x151.png 300w, https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken2-1024x516.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken2-768x387.png 768w, https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken2-1536x774.png 1536w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></figure>



<p>Odsouhlasíme souhrn oprávnění.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2560" height="1288" src="https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken3-scaled.png" alt="" class="wp-image-18381" srcset="https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken3-scaled.png 2560w, https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken3-300x151.png 300w, https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken3-1024x515.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken3-768x387.png 768w, https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken3-1536x773.png 1536w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></figure>



<p>Počkáme na&nbsp;dokončení operace a&nbsp;poté okno zavřeme.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2560" height="1283" src="https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken4-1-scaled.png" alt="" class="wp-image-18386" srcset="https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken4-1-scaled.png 2560w, https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken4-1-300x150.png 300w, https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken4-1-1024x513.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken4-1-768x385.png 768w, https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken4-1-1536x770.png 1536w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></figure>



<p>Po spárování uživatelského účtu se nám konečně vygeneruje token.</p>



<ul class="wp-block-list">
<li><strong>První řádek obsahuje náš token</strong>&nbsp;(znovu připomínáme, že jeho platnost je pouze 1 hodina!).</li>



<li><strong>Naše odchozí (testovací) telefonní číslo</strong></li>



<li><strong>Telefonní číslo, na&nbsp;které budeme odesílat testovací notifikaci</strong></li>



<li><strong>Tlačítko pro odeslání naší testovací notifikace</strong></li>
</ul>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2560" height="1294" src="https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken5-scaled.png" alt="" class="wp-image-18388" srcset="https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken5-scaled.png 2560w, https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken5-300x152.png 300w, https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken5-1024x517.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken5-768x388.png 768w, https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken5-1536x776.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken5-2048x1035.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken5-608x307.png 608w, https://www.initmax.cz/wp-content/uploads/2025/05/cretatetemptoken5-1216x614.png 1216w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></figure>



<p>Po kontrole všech polí můžete kliknout na&nbsp;tlačítko „Send message“. Během několika okamžiků by vám měla přijít testovací zpráva.</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="472" height="1024" src="https://www.initmax.cz/wp-content/uploads/2025/05/testwhatsappmessage-472x1024.png" alt="" class="wp-image-18390" srcset="https://www.initmax.cz/wp-content/uploads/2025/05/testwhatsappmessage-472x1024.png 472w, https://www.initmax.cz/wp-content/uploads/2025/05/testwhatsappmessage-138x300.png 138w, https://www.initmax.cz/wp-content/uploads/2025/05/testwhatsappmessage-768x1665.png 768w, https://www.initmax.cz/wp-content/uploads/2025/05/testwhatsappmessage-709x1536.png 709w, https://www.initmax.cz/wp-content/uploads/2025/05/testwhatsappmessage-945x2048.png 945w, https://www.initmax.cz/wp-content/uploads/2025/05/testwhatsappmessage-608x1318.png 608w, https://www.initmax.cz/wp-content/uploads/2025/05/testwhatsappmessage.png 1179w" sizes="auto, (max-width: 472px) 100vw, 472px" /></figure>
</div>


<h2 class="wp-block-heading">Úprava meta šablony „hello_world“</h2>



<p>Na stejné stránce, kde jste přidávali telefonní čísla, najdete níže v&nbsp;bodě č.&nbsp;5 modře uvedený odkaz „see the Overview page“. Tento odkaz si otevřete v&nbsp;novém okně – jedná se o&nbsp;nejjednodušší způsob, jak se rychle dostat k&nbsp;nastavení šablon zpráv.</p>



<p>Šablony nastavujeme z&nbsp;jednoduchého důvodu – WhatsApp Cloud API neumožňuje zasílat libovolné zprávy na&nbsp;neověřená telefonní čísla. Pomocí šablon proto využíváme workaround, kdy předem určíme, jak bude zpráva vypadat.</p>



<p>Pro neověřená (testovací) telefonní čísla máme k&nbsp;dispozici pouze jednu předdefinovanou šablonu, konkrétně „hello_world“. Pokud bychom použili vlastní ověřené telefonní číslo, můžeme si vytvořit šablony vlastní – například různé varianty dle závažnosti s&nbsp;barevnou hlavičkou či&nbsp;speciální šablonu pro zprávy informující o&nbsp;vyřešení problému.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2560" height="1075" src="https://www.initmax.cz/wp-content/uploads/2025/05/template-link-1-scaled.png" alt="" class="wp-image-18336" srcset="https://www.initmax.cz/wp-content/uploads/2025/05/template-link-1-scaled.png 2560w, https://www.initmax.cz/wp-content/uploads/2025/05/template-link-1-300x126.png 300w, https://www.initmax.cz/wp-content/uploads/2025/05/template-link-1-1024x430.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/05/template-link-1-768x323.png 768w, https://www.initmax.cz/wp-content/uploads/2025/05/template-link-1-1536x645.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/05/template-link-1-2048x860.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/05/template-link-1-608x255.png 608w, https://www.initmax.cz/wp-content/uploads/2025/05/template-link-1-1216x511.png 1216w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></figure>



<p>Zde klikneme na&nbsp;„Manage templates“.</p>



<figure class="wp-block-image size-full"><img decoding="async" src="https://www.initmax.cz/wp-content/uploads/2025/05/messagetemplate.png" alt="" class="wp-image-18338"/></figure>



<p>Klikneme na&nbsp;naši šablonu „hello_world“.</p>



<figure class="wp-block-image size-full"><img decoding="async" src="https://www.initmax.cz/wp-content/uploads/2025/05/messagetemplate1.png" alt="" class="wp-image-18340"/></figure>



<p>Klikneme na&nbsp;tlačítko „Edit template“.</p>



<figure class="wp-block-image size-full"><img decoding="async" src="https://www.initmax.cz/wp-content/uploads/2025/05/messagetemplate2.png" alt="" class="wp-image-18346"/></figure>



<p>V první sekci <strong>zkontrolujeme</strong> ale neměníme jazyk šablony („Select language“).</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1494" height="516" src="https://www.initmax.cz/wp-content/uploads/2025/05/messagetemplate3.png" alt="" class="wp-image-18350" srcset="https://www.initmax.cz/wp-content/uploads/2025/05/messagetemplate3.png 1494w, https://www.initmax.cz/wp-content/uploads/2025/05/messagetemplate3-300x104.png 300w, https://www.initmax.cz/wp-content/uploads/2025/05/messagetemplate3-1024x354.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/05/messagetemplate3-768x265.png 768w, https://www.initmax.cz/wp-content/uploads/2025/05/messagetemplate3-608x210.png 608w, https://www.initmax.cz/wp-content/uploads/2025/05/messagetemplate3-1216x420.png 1216w" sizes="auto, (max-width: 1494px) 100vw, 1494px" /></figure>



<p>Dále budeme vyplňovat sekce „Header“, „Body“ a&nbsp;„Footer“.</p>



<p><strong>Pozor:</strong>&nbsp;Zde buďte velmi opatrní – šablonu lze upravit pouze jednou za 24 hodin! Použijte náš přiložený příklad („example“) a&nbsp;případně upravte jen doménu svého Zabbixu.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1156" height="1438" src="https://www.initmax.cz/wp-content/uploads/2025/05/messagetemplate4.png" alt="" class="wp-image-18352" srcset="https://www.initmax.cz/wp-content/uploads/2025/05/messagetemplate4.png 1156w, https://www.initmax.cz/wp-content/uploads/2025/05/messagetemplate4-241x300.png 241w, https://www.initmax.cz/wp-content/uploads/2025/05/messagetemplate4-823x1024.png 823w, https://www.initmax.cz/wp-content/uploads/2025/05/messagetemplate4-768x955.png 768w, https://www.initmax.cz/wp-content/uploads/2025/05/messagetemplate4-608x756.png 608w" sizes="auto, (max-width: 1156px) 100vw, 1156px" /></figure>



<p>Přepněte typ proměnné („Variable“) na&nbsp;„Name“.</p>



<p>Obsah pro sekci „Header“:</p>


<section id="block-code-block_66c930e2d09e5814455aca0472f1bfad" data-id="block-code-block_66c930e2d09e5814455aca0472f1bfad" class="gt-block block-code">
    <pre><code>{{event_status}}</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Obsah pro sekci „Body“:</p>


<section id="block-code-block_d5016a4b7e48c8cb7434e207fb77903e" data-id="block-code-block_d5016a4b7e48c8cb7434e207fb77903e" class="gt-block block-code">
    <pre><code>*Problem name:* {{event_name}}
*Problem started* at {{event_time}} on {{event_date}}
*Host:* {{host_name}}
*Severity:* {{event_severity}}
*Operational data:* {{item_lastvalue}}
*Original problem ID:* {{event_id}}</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Do příkladu pro obsah vložte naše vzorová data:</p>



<ul class="wp-block-list">
<li>{{event_name}}<strong> </strong>Windows: Operating system description has changed</li>



<li>{{event_time}}<strong> </strong>10:57:12</li>



<li>{{event_date}}<strong> </strong>28.4.2025</li>



<li>{{host_name}}<strong> </strong>DC1</li>



<li>{{event_severity}}<strong> </strong>Information</li>



<li>{{item_lastvalue}}<strong> </strong>version123</li>



<li>{{event_id}}<strong> </strong>123</li>
</ul>



<p>Obsah pro sekci „Footer“:</p>


<section id="block-code-block_02600d1cd7639470beda577d98be3fd2" data-id="block-code-block_02600d1cd7639470beda577d98be3fd2" class="gt-block block-code">
    <pre><code>WhatsAPP notification developed by initMAX s.r.o.</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Naši šablonu rovnou rozšíříme o&nbsp;odkaz na&nbsp;zobrazení problému podle jeho jména a&nbsp;další odkaz na&nbsp;zobrazení posledních naměřených hodnot.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1798" height="922" src="https://www.initmax.cz/wp-content/uploads/2025/05/messagetemplate5.png" alt="" class="wp-image-18359" srcset="https://www.initmax.cz/wp-content/uploads/2025/05/messagetemplate5.png 1798w, https://www.initmax.cz/wp-content/uploads/2025/05/messagetemplate5-300x154.png 300w, https://www.initmax.cz/wp-content/uploads/2025/05/messagetemplate5-1024x525.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/05/messagetemplate5-768x394.png 768w, https://www.initmax.cz/wp-content/uploads/2025/05/messagetemplate5-1536x788.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/05/messagetemplate5-608x312.png 608w, https://www.initmax.cz/wp-content/uploads/2025/05/messagetemplate5-1216x624.png 1216w" sizes="auto, (max-width: 1798px) 100vw, 1798px" /></figure>



<p><strong>Do prvního odkazu vložíme název</strong> „Visit problem page“. Do&nbsp;URL vložíme náš odkaz bez posledního parametru – ten tam automaticky doplní META.</p>



<p><strong>Pozor:</strong> URL adresu si upravte podle své vlastní!</p>


<section id="block-code-block_e4c387f1d80f6131b8c8fd7471285dd3" data-id="block-code-block_e4c387f1d80f6131b8c8fd7471285dd3" class="gt-block block-code">
    <pre><code>https://www.initmax.cz/zabbix/zabbix.php?action=problem.view&amp;filter_set=1&amp;name=</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<ul class="wp-block-list">
<li><strong>Priklad URL pro overeni:</strong> https://www.initmax.cz/zabbix/zabbix.php?action=problem.view&amp;filter_set=1&amp;name=problem</li>
</ul>



<p><strong>Do druhého odkazu vložíme název</strong> „Check latest data“. Do&nbsp;URL vložíme náš odkaz bez posledního parametru – ten tam automaticky doplní META.</p>



<p><strong>Pozor:</strong> URL adresu si upravte podle své vlastní!</p>


<section id="block-code-block_c69e6d5b5120035e29c3bff852e49266" data-id="block-code-block_c69e6d5b5120035e29c3bff852e49266" class="gt-block block-code">
    <pre><code>https://www.initmax.cz/zabbix/history.php?action=showgraph&amp;itemids%5B%5D=</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<ul class="wp-block-list">
<li><strong>Priklad URL pro overeni:</strong> https://www.initmax.cz/zabbix/history.php?action=showgraph&amp;itemids%5B%5D=12344</li>
</ul>



<p>V pravém rohu obrazovky můžete vidět náhled předgenerované zprávy. Vše si pečlivě zkontrolujte!</p>


<div class="wp-block-image">
<figure class="aligncenter size-medium"><img loading="lazy" decoding="async" width="274" height="300" src="https://www.initmax.cz/wp-content/uploads/2025/05/messagetemplate6-1-274x300.png" alt="" class="wp-image-18365" srcset="https://www.initmax.cz/wp-content/uploads/2025/05/messagetemplate6-1-274x300.png 274w, https://www.initmax.cz/wp-content/uploads/2025/05/messagetemplate6-1-936x1024.png 936w, https://www.initmax.cz/wp-content/uploads/2025/05/messagetemplate6-1-768x840.png 768w, https://www.initmax.cz/wp-content/uploads/2025/05/messagetemplate6-1-608x665.png 608w, https://www.initmax.cz/wp-content/uploads/2025/05/messagetemplate6-1.png 1060w" sizes="auto, (max-width: 274px) 100vw, 274px" /></figure>
</div>


<p>Posledním krokem je uložení šablon. Po&nbsp;jejich uložení je po&nbsp;dobu následujících 24 hodin nebudete moci upravovat! Proto je velmi důležité vše zkontrolovat a&nbsp;udělat správně hned napoprvé.</p>



<figure class="wp-block-image size-full"><img decoding="async" src="https://www.initmax.cz/wp-content/uploads/2025/05/messagetemplate7.png" alt="" class="wp-image-18370"/></figure>



<h2 class="wp-block-heading">Generování dlouhodobého systémového tokenu</h2>



<p>Na straně Meta providera máme nyní vše připravené a&nbsp;ověřené. Nyní je čas přesunout se do&nbsp;Zabbixu. Protože ale pro naše notifikace potřebujeme token, který ideálně neexpiruje, pustíme se ještě do&nbsp;jeho vygenerování.</p>



<p>Toto nastavení provedeme na&nbsp;stránce&nbsp;<a href="https://business.facebook.com/" target="_blank" rel="noreferrer noopener nofollow">https://business.facebook.com/</a>, kde se přesuneme do&nbsp;sekce:</p>



<p><code>Settings → Users → System Users</code></p>



<p>Zde klikneme na&nbsp;tlačítko „+ Add“.</p>



<figure class="wp-block-image size-full"><img decoding="async" src="https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_user.png" alt="" class="wp-image-18399"/></figure>



<p>Zde vytvoříme uživatele. V&nbsp;našem případě můžete zvolit název například „Zabbix-WhatsApp“. Pro jeho systémovou roli stačí zvolit úroveň „Employee“ – nedávejte mu administrátorská oprávnění!</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1146" height="858" src="https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_user1.png" alt="" class="wp-image-18401" srcset="https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_user1.png 1146w, https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_user1-300x225.png 300w, https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_user1-1024x767.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_user1-768x575.png 768w, https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_user1-608x455.png 608w" sizes="auto, (max-width: 1146px) 100vw, 1146px" /></figure>



<p>Po vytvoření uživatele mu musíme přidělit příslušná oprávnění k&nbsp;aplikaci.</p>



<p>Oprávnění nastavíme pomocí tlačítka se třemi tečkami („…“).</p>



<figure class="wp-block-image size-full"><img decoding="async" src="https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_user2.png" alt="" class="wp-image-18405"/></figure>



<p>V části „Apps“ vybereme naši aplikaci a&nbsp;nastavíme maximální dostupná oprávnění (při&nbsp;testování s&nbsp;nižší úrovní oprávnění se nám nepodařilo aplikaci úspěšně provozovat).</p>



<figure class="wp-block-image size-full"><img decoding="async" src="https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_user3-1.png" alt="" class="wp-image-18409"/></figure>



<p>Totéž platí i&nbsp;pro sekci „WhatsApp accounts“.</p>



<figure class="wp-block-image size-full"><img decoding="async" src="https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_user4.png" alt="" class="wp-image-18411"/></figure>



<p>V dalším okně počkáme na&nbsp;potvrzení a&nbsp;následně jej zavřeme tlačítkem „Done“.</p>



<figure class="wp-block-image size-full"><img decoding="async" src="https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_user5.png" alt="" class="wp-image-18413"/></figure>



<p>Po nastavení uživatelských oprávnění k&nbsp;aplikacím můžeme nakonec kliknout na&nbsp;„Generate token“.</p>



<figure class="wp-block-image size-full"><img decoding="async" src="https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_token.png" alt="" class="wp-image-18416"/></figure>



<p>V prvním kroku vybereme naši WhatsApp aplikaci.</p>



<figure class="wp-block-image size-full"><img decoding="async" src="https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_token1.png" alt="" class="wp-image-18421"/></figure>



<p>V dalším kroku nastavíme platnost tokenu („Token expiration“). Pro bezpečný a&nbsp;bezproblémový provoz zvolíme možnost „Never“ (token tedy nikdy neexpiruje).</p>



<figure class="wp-block-image size-full"><img decoding="async" src="https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_token2.png" alt="" class="wp-image-18423"/></figure>



<p>V sekci opravneni tokenu pro apliaci zvolime jen tyto 2 opravneni</p>



<ul class="wp-block-list">
<li>whatsapp_business_messaging</li>



<li>whatsapp_business_management</li>
</ul>



<figure class="wp-block-image size-full"><img decoding="async" src="https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_token3.png" alt="" class="wp-image-18425"/></figure>



<p>V posledním kroku se nám zobrazí náš vygenerovaný token. <strong>Tento token si pečlivě uložte</strong>, protože později jej nebude možné znovu zobrazit – pouze vygenerovat nový.</p>



<figure class="wp-block-image size-full"><img decoding="async" src="https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_token4.png" alt="" class="wp-image-18427"/></figure>



<p>Tento token budeme potřebovat jako druhou a&nbsp;zároveň poslední položku pro nastavení media typu v&nbsp;Zabbixu.</p>



<h2 class="wp-block-heading">Import YAML média typu do&nbsp;Zabbixu</h2>



<p><strong>Připravili jsme pro vás šablonu pro WhatsApp. Tuto šablonu naleznete zde:</strong><br><a class="" href="https://git.initmax.cz/initMAX-Public/zabbix-templates">https://git.initmax.cz/initMAX-Public/zabbix-templates</a></p>



<p>Následně staženou šablonu importujte do&nbsp;Zabbixu:</p>



<p><code>Alerts → Media types → Import</code></p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2560" height="1354" src="https://www.initmax.cz/wp-content/uploads/2025/05/mediatype-scaled.png" alt="" class="wp-image-18431" srcset="https://www.initmax.cz/wp-content/uploads/2025/05/mediatype-scaled.png 2560w, https://www.initmax.cz/wp-content/uploads/2025/05/mediatype-300x159.png 300w, https://www.initmax.cz/wp-content/uploads/2025/05/mediatype-1024x541.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/05/mediatype-768x406.png 768w, https://www.initmax.cz/wp-content/uploads/2025/05/mediatype-1536x812.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/05/mediatype-2048x1083.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/05/mediatype-608x321.png 608w, https://www.initmax.cz/wp-content/uploads/2025/05/mediatype-1216x643.png 1216w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></figure>



<p>Vyberte staženou šablonu a&nbsp;klikněte na&nbsp;„Import“.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2560" height="1348" src="https://www.initmax.cz/wp-content/uploads/2025/05/mediatype1-scaled.png" alt="" class="wp-image-18433" srcset="https://www.initmax.cz/wp-content/uploads/2025/05/mediatype1-scaled.png 2560w, https://www.initmax.cz/wp-content/uploads/2025/05/mediatype1-300x158.png 300w, https://www.initmax.cz/wp-content/uploads/2025/05/mediatype1-1024x539.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/05/mediatype1-768x404.png 768w, https://www.initmax.cz/wp-content/uploads/2025/05/mediatype1-1536x809.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/05/mediatype1-2048x1078.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/05/mediatype1-608x320.png 608w, https://www.initmax.cz/wp-content/uploads/2025/05/mediatype1-1216x640.png 1216w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></figure>



<p>Po úspěšném importu se vám zobrazí hláška „Imported successfully“. Následně klikněte na&nbsp;naši šablonu, kde dokončíme její nastavení.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2560" height="1352" src="https://www.initmax.cz/wp-content/uploads/2025/05/mediatype2-scaled.png" alt="" class="wp-image-18435" srcset="https://www.initmax.cz/wp-content/uploads/2025/05/mediatype2-scaled.png 2560w, https://www.initmax.cz/wp-content/uploads/2025/05/mediatype2-300x158.png 300w, https://www.initmax.cz/wp-content/uploads/2025/05/mediatype2-1024x541.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/05/mediatype2-768x406.png 768w, https://www.initmax.cz/wp-content/uploads/2025/05/mediatype2-1536x811.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/05/mediatype2-2048x1082.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/05/mediatype2-608x321.png 608w, https://www.initmax.cz/wp-content/uploads/2025/05/mediatype2-1216x642.png 1216w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></figure>



<p><strong>Zde je potřeba vyplnit dva parametry:</strong></p>



<ul class="wp-block-list">
<li><strong><code>access_token</code></strong>: Zde vložte váš permanentní token, který jste získali v&nbsp;předchozím kroku v&nbsp;kapitole&nbsp;<strong>„Generování dlouhodobého systémového tokenu“</strong>.</li>



<li><strong><code>phone_number_id</code></strong>: Zde vložte číselné ID uvedené v&nbsp;kapitole&nbsp;<strong>„Přidání čísel pro notifikace“</strong>&nbsp;– toto ID najdete hned pod vaším testovacím číslem.</li>
</ul>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2560" height="1350" src="https://www.initmax.cz/wp-content/uploads/2025/05/mediatype3-scaled.png" alt="" class="wp-image-18437" srcset="https://www.initmax.cz/wp-content/uploads/2025/05/mediatype3-scaled.png 2560w, https://www.initmax.cz/wp-content/uploads/2025/05/mediatype3-300x158.png 300w, https://www.initmax.cz/wp-content/uploads/2025/05/mediatype3-1024x540.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/05/mediatype3-768x405.png 768w, https://www.initmax.cz/wp-content/uploads/2025/05/mediatype3-1536x810.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/05/mediatype3-2048x1080.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/05/mediatype3-608x321.png 608w, https://www.initmax.cz/wp-content/uploads/2025/05/mediatype3-1216x641.png 1216w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></figure>



<p>Následně nastavení uložíme. Poté můžeme naši notifikaci rovnou otestovat přímo v&nbsp;Zabbixu pomocí tlačítka „Test“.</p>



<h2 class="wp-block-heading">Testování notifikace v&nbsp;Zabbixu</h2>



<p>Využijeme testovací tlačítko, které je přímo dostupné u&nbsp;našeho média.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2560" height="1350" src="https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_test-scaled.png" alt="" class="wp-image-18445" srcset="https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_test-scaled.png 2560w, https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_test-300x158.png 300w, https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_test-1024x540.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_test-768x405.png 768w, https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_test-1536x810.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_test-2048x1080.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_test-608x321.png 608w, https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_test-1216x641.png 1216w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></figure>



<p>Ve formuláři vyplníme naše telefonní číslo. Toto číslo se musí shodovat s&nbsp;číslem, které jsme přidali v&nbsp;sekci „Přidání čísel pro notifikace“. Následně klikneme na&nbsp;tlačítko „Test“.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2560" height="1349" src="https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_test1-scaled.png" alt="" class="wp-image-18447" srcset="https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_test1-scaled.png 2560w, https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_test1-300x158.png 300w, https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_test1-1024x540.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_test1-768x405.png 768w, https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_test1-1536x810.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_test1-2048x1080.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_test1-608x320.png 608w, https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_test1-1216x641.png 1216w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></figure>



<p>Výstup by měl vrátit zprávu „Media type test successful.“ a&nbsp;ve spodní části „Response: OK“.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2560" height="1353" src="https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_test2-scaled.png" alt="" class="wp-image-18449" srcset="https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_test2-scaled.png 2560w, https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_test2-300x159.png 300w, https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_test2-1024x541.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_test2-768x406.png 768w, https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_test2-1536x812.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_test2-2048x1083.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_test2-608x321.png 608w, https://www.initmax.cz/wp-content/uploads/2025/05/permanenttoken_test2-1216x643.png 1216w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></figure>



<p>Příklad přijaté testovací notifikace se vzorovými daty. Na&nbsp;screenshotu vidíme nevyplněná vestavěná makra Zabbixu (např.&nbsp;<code>{EVENT.NAME}</code>,&nbsp;<code>{HOST.NAME}</code>), což je v&nbsp;pořádku, protože se jedná o&nbsp;testovací zprávu. Při&nbsp;reálném použití budou tato pole správně vyplněna.</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="472" height="1024" src="https://www.initmax.cz/wp-content/uploads/2025/05/whatsapptestnotification-472x1024.png" alt="" class="wp-image-18469" srcset="https://www.initmax.cz/wp-content/uploads/2025/05/whatsapptestnotification-472x1024.png 472w, https://www.initmax.cz/wp-content/uploads/2025/05/whatsapptestnotification-138x300.png 138w, https://www.initmax.cz/wp-content/uploads/2025/05/whatsapptestnotification-768x1665.png 768w, https://www.initmax.cz/wp-content/uploads/2025/05/whatsapptestnotification-709x1536.png 709w, https://www.initmax.cz/wp-content/uploads/2025/05/whatsapptestnotification-945x2048.png 945w, https://www.initmax.cz/wp-content/uploads/2025/05/whatsapptestnotification-608x1318.png 608w, https://www.initmax.cz/wp-content/uploads/2025/05/whatsapptestnotification.png 1179w" sizes="auto, (max-width: 472px) 100vw, 472px" /></figure>
</div>


<h2 class="wp-block-heading">Použití u&nbsp;uživatelů</h2>



<p><strong>Nezapomeňte jako poslední krok přidat nový media typ vašim uživatelům.</strong>&nbsp;V&nbsp;rámci free režimu je doporučeno přidávat média ručně. Je sice možné použít i&nbsp;JIT (Just-in-time provisioning), ale protože je v&nbsp;tomto režimu limit maximálně 5 telefonních čísel a&nbsp;zároveň musíte čísla ručně registrovat a&nbsp;ověřovat, doporučujeme tuto konfiguraci provádět manuálně.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2560" height="948" src="https://www.initmax.cz/wp-content/uploads/2025/05/usermedia-scaled.png" alt="" class="wp-image-18453" srcset="https://www.initmax.cz/wp-content/uploads/2025/05/usermedia-scaled.png 2560w, https://www.initmax.cz/wp-content/uploads/2025/05/usermedia-300x111.png 300w, https://www.initmax.cz/wp-content/uploads/2025/05/usermedia-1024x379.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/05/usermedia-768x284.png 768w, https://www.initmax.cz/wp-content/uploads/2025/05/usermedia-1536x569.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/05/usermedia-2048x759.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/05/usermedia-608x225.png 608w, https://www.initmax.cz/wp-content/uploads/2025/05/usermedia-1216x450.png 1216w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></figure>



<p>Příklad nastavení vidíte zde. Nezapomeňte telefonní čísla vždy zadávat v&nbsp;úplném formátu včetně mezinárodní předvolby (např.&nbsp;+420&#8230;).</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2560" height="947" src="https://www.initmax.cz/wp-content/uploads/2025/05/usermedia1-scaled.png" alt="" class="wp-image-18455" srcset="https://www.initmax.cz/wp-content/uploads/2025/05/usermedia1-scaled.png 2560w, https://www.initmax.cz/wp-content/uploads/2025/05/usermedia1-300x111.png 300w, https://www.initmax.cz/wp-content/uploads/2025/05/usermedia1-1024x379.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/05/usermedia1-768x284.png 768w, https://www.initmax.cz/wp-content/uploads/2025/05/usermedia1-1536x568.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/05/usermedia1-2048x757.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/05/usermedia1-608x225.png 608w, https://www.initmax.cz/wp-content/uploads/2025/05/usermedia1-1216x450.png 1216w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></figure>



<h2 class="wp-block-heading">Rozdíly mezi Free Sandboxem a&nbsp;Produkční verzí WhatsApp Cloud API</h2>



<figure class="wp-block-table is-style-regular"><table class="has-fixed-layout"><thead><tr><th>Vlastnost / Omezení</th><th>Free Sandbox (testovací)</th><th>Produkční verze (ověřená)</th></tr></thead><tbody><tr><td><strong>Telefonní číslo</strong></td><td>Přidělené testovací číslo od Meta</td><td>Vlastní ověřené firemní číslo</td></tr><tr><td><strong>Platnost čísla</strong></td><td>Nutné každých 90 dnů prodloužit</td><td>Neomezená, bez nutnosti prodloužení</td></tr><tr><td><strong>Počet čísel pro notifikace</strong></td><td>Max. 5 čísel (každé je nutné ručně ověřit)</td><td>Bez omezení počtu čísel</td></tr><tr><td><strong>Vytváření vlastních šablon</strong></td><td>Není možné, pouze předdefinovaná šablona („hello_world“)</td><td>Ano, vlastní šablony včetně barevné hlavičky</td></tr><tr><td><strong>Limity zpráv</strong></td><td>Nízké limity zpráv</td><td>Vyšší limity zpráv</td></tr><tr><td><strong>Podpora od Meta</strong></td><td>Omezená (komunita, dokumentace)</td><td>Prioritní a&nbsp;rychlejší podpora</td></tr></tbody></table></figure>



<h3 class="wp-block-heading">⚠️&nbsp;<strong>Co se stane po&nbsp;90 dnech s&nbsp;testovacím číslem?</strong></h3>



<p>U testovacího čísla, které získáte od společnosti Meta, platí omezení, že&nbsp;<strong>každých 90&nbsp;dní je nutné jeho platnost prodloužit</strong>.</p>



<ul class="wp-block-list">
<li>Pokud číslo včas neprodloužíte:
<ul class="wp-block-list">
<li>Nebudete moci posílat ani přijímat zprávy.</li>



<li>Bude nutné číslo opětovně aktivovat (prodloužit) přímo v&nbsp;nastavení Meta Developer účtu.</li>
</ul>
</li>



<li>Doporučení:
<ul class="wp-block-list">
<li>Pravidelně kontrolujte stav čísla.</li>



<li>Ideálně přejděte na&nbsp;vlastní produkční číslo, abyste se vyhnuli nutnosti pravidelných obnov.</li>
</ul>
</li>
</ul>


<section id="block-newsletter-block_a9eb58e2977ec000ef2affeff7e3b1f2" data-id="block-newsletter-block_a9eb58e2977ec000ef2affeff7e3b1f2" class="gt-block block-newsletter">
    <section id="newsletter" class="newsletter">
	<div class="gradient basic">
		<div class="newsletter__inner width width--general">
			<div class="col left">
									<h2 class="newsletter__title">Buďte v&nbsp;obraze s&nbsp;naším newsletterem</h2>
													<div class="newsletter__content"><p>Díky initMAX newsletteru Vám neunikne žádná z&nbsp;pozvánek na&nbsp;akce a&nbsp;webináře, žádný z&nbsp;tipů, jak dostat ze svého IT MAXimum, ani ověřené informace o&nbsp;novinkách ze světa Zabbix a&nbsp;dalších technologií.</p>
</div>
							</div>
			<div class="col right form-wrapper">
				<div class="newsletter-form">
	<form method="post" action="/wiki/kapitola/zabbix/feed/" enctype="multipart/form-data">
		<input type="hidden" name="url" value="https://www.initmax.cz/wiki/kapitola/zabbix/feed/">

		<div class="inputs">

			<label for="newsletter-form_contact_email" class="top">Vaše e-mailová adresa:</label>
			<div class="df">

				<div class="input">
					<input type="text" id="newsletter-form_contact_email" name="newsletter_email" placeholder="@" data-format="email" data-required="1">
									</div><!-- /.input -->

				<a href="#" class="btn btn--white sendBtn">Odeslat</a>

			</div>

			<div class="bottom nm">
				<label for="newsletter-form_gdpr" class="checkbox gdpr">
					<input type="checkbox" id="newsletter-form_gdpr" name="newsletter_gdpr">
					<span>Souhlasím se&nbsp;<a href="https://www.initmax.cz/ochrana-osobnich-udaju/" target="_blank">zpracováním osobních údajů</a>.</span>
				</label>
			</div>

		</div><!-- /.inputs -->
		<div class="sent hidden">
			<div class="iconOk"><h3>Děkujeme, že jste se přihlásili k&nbsp;odběru našeho newsletteru.</h3>
</div>
			<button class="sent__close" title="Zavřít" onclick="closeFormMessage(this,event)"><svg data-name="Group 3602" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 3272" d="M0,0H24V24H0Z" fill="none"/><line data-name="Line 98" y2="14" transform="translate(7.05 7.05) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 99" x2="14" transform="translate(7.05 16.95) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</button>
		</div><!-- /.sent -->
	</form>
</div>			</div>
		</div>
	</div>
</section></section>



<section id="social-links-block_c264a0ae126a6eeee5f60aafd676a3e8" data-id="social-links-block_c264a0ae126a6eeee5f60aafd676a3e8" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>

<p>The post <a href="https://www.initmax.cz/wiki/zabbix-a-whatsapp-integrace-notifikaci/">Zabbix a&nbsp;WhatsApp &#8211; Integrace notifikací</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Úprava a&#160;skrytí login formuláře v&#160;Zabbix Frontendu</title>
		<link>https://www.initmax.cz/wiki/uprava-a-skryti-login-formulare-v-zabbix-frontendu/</link>
		
		<dc:creator><![CDATA[Tomáš Heřmánek]]></dc:creator>
		<pubDate>Wed, 23 Apr 2025 19:07:02 +0000</pubDate>
				<guid isPermaLink="false">https://www.initmax.cz/?post_type=wiki&#038;p=18244</guid>

					<description><![CDATA[<p>Tento návod popisuje, jak v rámci Zabbix frontendu upravit nebo zcela skrýt standardní login formulář. Kompletní rebranding Zabbix frontendu (změna log, ...</p>
<p>The post <a href="https://www.initmax.cz/wiki/uprava-a-skryti-login-formulare-v-zabbix-frontendu/">Úprava a&nbsp;skrytí login formuláře v&nbsp;Zabbix Frontendu</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Tento návod popisuje, jak v&nbsp;rámci Zabbix frontendu upravit nebo zcela skrýt standardní login formulář. Kompletní rebranding Zabbix frontendu (změna log, patiček, apod.) najdete v&nbsp;samostatném návodu pro <strong><a href="https://www.initmax.cz/wiki/rebranding-zabbixu/">Rebranding Zabbixu.</a></strong></p>




<section id="social-links-block_0f70dca2ef0586fd03916a2fcd362548" data-id="social-links-block_0f70dca2ef0586fd03916a2fcd362548" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>




<h2 class="wp-block-heading">Důvody pro skrytí login formuláře</h2>



<ul class="wp-block-list">
<li>Bezpečnostní opatření</li>



<li>Omezení přístupu na&nbsp;veřejně dostupný login</li>



<li>Přesměrování na&nbsp;vlastní autentizační systém</li>
</ul>



<h2 class="wp-block-heading">Technické řešení</h2>



<p>Rebranding Zabbixu je možné provést bez nutnosti zasahovat do&nbsp;zdrojových kódů aplikace. Díky tomu<strong> je taková úprava bezpečná a&nbsp;bez problémů přežije i&nbsp;případné aktualizace Zabbixu</strong> na&nbsp;novější verze.</p>



<p>Celý proces spočívá v&nbsp;<strong>úpravě nebo vytvoření</strong> konfiguračního souboru&nbsp;<strong>brand.conf.php</strong>, který by měl být typicky umístěn zde:</p>



<p><strong>Pro verzi 7.0 a&nbsp;starší</strong></p>


<section id="block-code-block_c68e180440bcd4f370a5d023e7334448" data-id="block-code-block_c68e180440bcd4f370a5d023e7334448" class="gt-block block-code">
    <pre><code>/usr/share/zabbix/local/conf/brand.conf.php</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p><strong>Pro verzi 7.2 a&nbsp;novější</strong></p>


<section id="block-code-block_b8538a9899849c92c42f92c2b5e97ab6" data-id="block-code-block_b8538a9899849c92c42f92c2b5e97ab6" class="gt-block block-code">
    <pre><code>/usr/share/zabbix/ui/local/conf/brand.conf.php</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Příklad 1 &#8211; Minimalistický login – pouze SAML nebo guest</h2>



<p>Ukázka konfigurace Zabbixu, kdy je standardní přihlášení (uživatelské jméno, heslo a&nbsp;tlačítko) kompletně skryté a&nbsp;k&nbsp;dispozici jsou pouze možnosti přihlášení přes SAML nebo jako host (guest). Ideální řešení pro prostředí s&nbsp;centrálním řízením identity.</p>



<p><strong>Poznámka:</strong> Tato konfigurace předpokládá, že máte v Zabbixu již aktivní <strong>ověřování pomocí SAML</strong> a současně <strong>povolený účet hosta</strong>. Pokud tyto podmínky nejsou splněny, zobrazí se uživatelům pouze logo bez jakékoliv možnosti přihlášení.</p>



<h3 class="wp-block-heading">Nastavení brand.conf.php</h3>



<p>Vytvořte nebo upravte soubor&nbsp;<code>brand.conf.php</code>:</p>



<p><strong>Pro verzi 7.0 a&nbsp;starší</strong></p>


<section id="block-code-block_4b824d4957a8dc9d5e436485070eb6b4" data-id="block-code-block_4b824d4957a8dc9d5e436485070eb6b4" class="gt-block block-code">
    <pre><code>sudo nano /usr/share/zabbix/local/conf/brand.conf.php</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p><strong>Pro verzi 7.2 a&nbsp;novější</strong></p>


<section id="block-code-block_314694da803289b1769a4d874fbb5968" data-id="block-code-block_314694da803289b1769a4d874fbb5968" class="gt-block block-code">
    <pre><code>sudo nano /usr/share/zabbix/ui/local/conf/brand.conf.php</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Příklad obsahu souboru:</p>


<section id="block-code-block_b167216a3eeac1c797493a6af9b1517a" data-id="block-code-block_b167216a3eeac1c797493a6af9b1517a" class="gt-block block-code">
    <pre><code>&lt;?php
// Check if the current page is the main login page (index.php)
$is_index = substr($_SERVER[&#039;SCRIPT_NAME&#039;], -10) === &#039;/index.php&#039;;
// Basic rebranding configuration array
$brand_conf = [
    // Custom branding options go here (logo, footer, help link) - Explained in another topic
];

// If the current page is not the main login page, return default branding
if (!$is_index) {
    return $brand_conf;
}

// CSS to hide standard login fields (username, password) and login button, leaving only guest/SAML login options visible
$css = &lt;&lt;&lt;&#039;CSS&#039;
.signin-container form ul {
    li:has([name=&quot;name&quot;]),
    li:has([name=&quot;password&quot;]),
    li:has(#autologin),
    li:has(button[type=&quot;submit&quot;]) {
        display: none !important;
    }
    li.sign-in-txt:has(a[href=&quot;index.php?enter=guest&quot;]) { display: flex; flex-direction: column-reverse; }
    li.sign-in-txt a[href=&quot;index.php?enter=guest&quot;] { width: fit-content; margin: 0 auto 10px; }
    li.sign-in-txt a[href=&quot;index.php?enter=guest&quot;]:hover { width: fit-content; margin: 0 auto 9px; }
}
CSS;

// Inject custom CSS into the footer branding configuration
$brand_conf[&#039;BRAND_FOOTER&#039;] = [$brand_conf[&#039;BRAND_FOOTER&#039;]??null, new CTag(&#039;style&#039;, true, $css)];

// Return the final branding configuration
return $brand_conf;</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V případě potřeby můžete jednotlivé části zakomentovat pomocí dvou obrácených lomítek&nbsp;<code>//</code>.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="962" height="684" src="https://www.initmax.cz/wp-content/uploads/2025/04/login-example1.png" alt="" class="wp-image-18253" srcset="https://www.initmax.cz/wp-content/uploads/2025/04/login-example1.png 962w, https://www.initmax.cz/wp-content/uploads/2025/04/login-example1-300x213.png 300w, https://www.initmax.cz/wp-content/uploads/2025/04/login-example1-768x546.png 768w, https://www.initmax.cz/wp-content/uploads/2025/04/login-example1-608x432.png 608w" sizes="auto, (max-width: 962px) 100vw, 962px" /></figure>
</div>


<p><strong>Co znamenají jednotlivé části v&nbsp;PHP kódu?</strong></p>



<ul class="wp-block-list">
<li><strong>$is_index</strong>&nbsp;– Zjišťuje, zda se uživatel nachází na&nbsp;hlavní přihlašovací stránce (<code>index.php</code>).</li>



<li><strong>$brand_conf</strong>&nbsp;– Pole obsahující konfiguraci vzhledu (loga, patička, odkazy).</li>



<li><strong>$css</strong>&nbsp;– Vlastní CSS styly pro skrytí standardních přihlašovacích prvků na&nbsp;stránce.</li>



<li><strong>BRAND_FOOTER</strong>&nbsp;– Umožňuje vložení vlastního obsahu (např.&nbsp;stylů nebo textů) do&nbsp;patičky stránky.</li>
</ul>



<h3 class="wp-block-heading">Nastavení oprávnění</h3>



<p>Ujistěte se, že soubory a&nbsp;složky mají správná oprávnění a&nbsp;vlastníka (obvykle&nbsp;<code>www-data</code>&nbsp;nebo&nbsp;<code>apache</code>, v&nbsp;závislosti na&nbsp;konfiguraci webového serveru):</p>



<p><strong>Pro verzi 7.0 a&nbsp;starší</strong></p>


<section id="block-code-block_bd47b40c7ac2eda3392d6c6e6ed6b83d" data-id="block-code-block_bd47b40c7ac2eda3392d6c6e6ed6b83d" class="gt-block block-code">
    <pre><code>sudo chown www-data:www-data /usr/share/zabbix/local/conf/brand.conf.php
sudo chmod 644 /usr/share/zabbix/local/conf/brand.conf.php</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p><strong>Pro verzi 7.2 a&nbsp;novější</strong></p>


<section id="block-code-block_3394ac2201434673b35cf6e779905a55" data-id="block-code-block_3394ac2201434673b35cf6e779905a55" class="gt-block block-code">
    <pre><code>sudo chown -R www-data:www-data /usr/share/zabbix/ui/local/conf/brand.conf.php
sudo chmod 644 /usr/share/zabbix/ui/local/conf/brand.conf.php</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Příklad 2 &#8211; Přizpůsobený branding s&nbsp;oddělenými možnostmi přihlášení</h2>



<p>Tento příklad ukazuje komplexnější úpravu login stránky Zabbixu. Obsahuje vlastní logo, barevné odlišení jednotlivých typů přihlášení a&nbsp;doplněné informační texty. Praktické pro organizace, které používají více způsobů autentizace současně.</p>



<h3 class="wp-block-heading">Nastavení brand.conf.php</h3>



<p>Vytvořte nebo upravte soubor&nbsp;<code>brand.conf.php</code>:</p>



<p><strong>Pro verzi 7.0 a&nbsp;starší</strong></p>


<section id="block-code-block_4b824d4957a8dc9d5e436485070eb6b4" data-id="block-code-block_4b824d4957a8dc9d5e436485070eb6b4" class="gt-block block-code">
    <pre><code>sudo nano /usr/share/zabbix/local/conf/brand.conf.php</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p><strong>Pro verzi 7.2 a&nbsp;novější</strong></p>


<section id="block-code-block_314694da803289b1769a4d874fbb5968" data-id="block-code-block_314694da803289b1769a4d874fbb5968" class="gt-block block-code">
    <pre><code>sudo nano /usr/share/zabbix/ui/local/conf/brand.conf.php</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Příklad obsahu souboru:</p>


<section id="block-code-block_d5ad19a587f9b73b335354e39947890a" data-id="block-code-block_d5ad19a587f9b73b335354e39947890a" class="gt-block block-code">
    <pre><code>&lt;?php
// Check if the current page is the main login page (index.php)
$is_index = substr($_SERVER[&#039;SCRIPT_NAME&#039;], -10) === &#039;/index.php&#039;;

// Basic rebranding configuration array
$brand_conf = [
    // Custom branding options go here (logo, footer, help link) - Explained in another topic
];

// If the current page is not the main login page, return default branding
if (!$is_index) {
    return $brand_conf;
}

$sso_url = (new CUrl(&#039;index_sso.php&#039;))-&gt;setArgument(&#039;request&#039;, getRequest(&#039;request&#039;))-&gt;getUrl();
// Customize footer branding by adding CSS and injecting custom HTML template and JS
$brand_conf[&#039;BRAND_FOOTER&#039;] = [
    // Include existing footer branding content if set, otherwise null
    $brand_conf[&#039;BRAND_FOOTER&#039;] ?? null,
    // Custom CSS to hide the original SAML login link
    new CTag(&#039;style&#039;, true, &lt;&lt;&lt;&#039;CSS&#039;
.signin-container form ul {
    li.sign-in-txt:has(a[href=&quot;index_sso.php&quot;]) { display: none; }
}
CSS),
    // HTML template to insert new login elements (SAML and standard login sections)
    (new CTag(&#039;template&#039;, true, [
        new CListItem((new CTag(&#039;h2&#039;, true, _(&#039;SAML login&#039;)))-&gt;addStyle(&#039;text-align:center; color:#0d142d;&#039;)),
        // Description text for SAML login (e.g., for company employees)
        new CListItem((new CDiv(&#039;Prefered way of login for initMAX employee&#039;))-&gt;addStyle(&#039;text-align:center; color:#A9A9A9;&#039;)),
        // Button for SAML Single Sign-On login
        new CListItem((new CSimpleButton(_(&#039;Sign in with Single Sign-On (SAML)&#039;)))-&gt;onClick(&quot;window.location = &#039;{$sso_url}&#039;&quot;)-&gt;addStyle(&#039;background-color: #0d142d;border-color: #0d142d;&#039;)),
        // Divider line with &quot;or&quot; between login methods
        (new CListItem([
            (new CTag(&#039;hr&#039;))-&gt;addStyle(&#039;width: 44%&#039;),
            (new CSpan(_(&#039;or&#039;)))-&gt;addStyle(&#039;text-transform: uppercase;&#039;),
            (new CTag(&#039;hr&#039;))-&gt;addStyle(&#039;width: 44%&#039;),
        ]))-&gt;addStyle(&#039;display: flex;&#039;),
        // Title for Standard login section
        new CListItem((new CTag(&#039;h2&#039;, true, _(&#039;Standard login&#039;)))-&gt;addStyle(&#039;text-align:center; color:#0d142d;&#039;)),
        // Description text for standard login (e.g., for customers)
        new CListItem((new CDiv(&#039;Customer login&#039;))-&gt;addStyle(&#039;text-align:center; color:#A9A9A9;&#039;)),
    ]))-&gt;setId(&#039;initmax-login-template&#039;),
    // JavaScript code to insert the prepared HTML template elements into the existing login form
    new CTag(&#039;script&#039;, true, &lt;&lt;&lt;&#039;JS&#039;
for (const el of [...document.querySelector(&#039;#initmax-login-template&#039;).content.children].reverse()) document.querySelector(&#039;form ul&#039;).prepend(el);
JS)
];

// Return the final branding configuration with all customizations applied
return $brand_conf;</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V případě potřeby můžete jednotlivé části zakomentovat pomocí dvou obrácených lomítek&nbsp;<code>//</code>.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="916" height="1484" src="https://www.initmax.cz/wp-content/uploads/2025/04/login-example2.png" alt="" class="wp-image-18275" srcset="https://www.initmax.cz/wp-content/uploads/2025/04/login-example2.png 916w, https://www.initmax.cz/wp-content/uploads/2025/04/login-example2-185x300.png 185w, https://www.initmax.cz/wp-content/uploads/2025/04/login-example2-632x1024.png 632w, https://www.initmax.cz/wp-content/uploads/2025/04/login-example2-768x1244.png 768w, https://www.initmax.cz/wp-content/uploads/2025/04/login-example2-608x985.png 608w" sizes="auto, (max-width: 916px) 100vw, 916px" /></figure>
</div>


<p><strong>Co znamenají jednotlivé části v&nbsp;PHP kódu?</strong></p>



<ul class="wp-block-list">
<li><strong><code>$is_index</code></strong>&nbsp;– Zjišťuje podle aktuální URL, zda se uživatel nachází na&nbsp;hlavní přihlašovací stránce (<code>index.php</code>).</li>



<li><strong><code>$brand_conf</code></strong>&nbsp;– Pole obsahující konfiguraci vzhledu (loga, patička, odkazy).</li>



<li><strong><code>$sso_url</code></strong>&nbsp;– Dynamicky sestavená URL pro přesměrování uživatele na&nbsp;SAML Single Sign-On přihlášení (<code>index_sso.php</code>).</li>



<li><strong><code>$css</code></strong>&nbsp;– Vlastní CSS styly pro skrytí původního odkazu na&nbsp;SAML přihlášení.</li>



<li><strong><code>BRAND_FOOTER</code></strong>&nbsp;– Umožňuje vložení vlastního obsahu (např.&nbsp;stylů, HTML šablon nebo JavaScriptu) do&nbsp;patičky stránky. V&nbsp;tomto příkladu přidává nové sekce s&nbsp;odlišnými způsoby přihlášení.</li>



<li><strong>HTML <code>template</code></strong>&nbsp;– Připravená sada HTML prvků, která definuje rozdělení přihlašovací stránky na&nbsp;SAML přihlášení (pro zaměstnance) a&nbsp;standardní přihlášení (pro zákazníky).</li>



<li><strong>JavaScript</strong>&nbsp;– Vkládá připravené prvky z&nbsp;HTML šablony přímo do&nbsp;přihlašovacího formuláře na&nbsp;stránce.</li>
</ul>



<h3 class="wp-block-heading">Nastavení oprávnění</h3>



<p>Ujistěte se, že soubory a&nbsp;složky mají správná oprávnění a&nbsp;vlastníka (obvykle&nbsp;<code>www-data</code>&nbsp;nebo&nbsp;<code>apache</code>, v&nbsp;závislosti na&nbsp;konfiguraci webového serveru):</p>



<p><strong>Pro verzi 7.0 a&nbsp;starší</strong></p>


<section id="block-code-block_bd47b40c7ac2eda3392d6c6e6ed6b83d" data-id="block-code-block_bd47b40c7ac2eda3392d6c6e6ed6b83d" class="gt-block block-code">
    <pre><code>sudo chown www-data:www-data /usr/share/zabbix/local/conf/brand.conf.php
sudo chmod 644 /usr/share/zabbix/local/conf/brand.conf.php</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p><strong>Pro verzi 7.2 a&nbsp;novější</strong></p>


<section id="block-code-block_3394ac2201434673b35cf6e779905a55" data-id="block-code-block_3394ac2201434673b35cf6e779905a55" class="gt-block block-code">
    <pre><code>sudo chown -R www-data:www-data /usr/share/zabbix/ui/local/conf/brand.conf.php
sudo chmod 644 /usr/share/zabbix/ui/local/conf/brand.conf.php</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Vlastní rebranding</h2>



<p>Veškeré potřebné kroky naleznete v&nbsp;<a href="https://www.initmax.cz/wiki/rebranding-zabbixu/">samostatném návodu na&nbsp;naší wiki<strong>.</strong></a></p>


<section id="block-newsletter-block_362bb88a17d25ddb1a504385c173139f" data-id="block-newsletter-block_362bb88a17d25ddb1a504385c173139f" class="gt-block block-newsletter">
    <section id="newsletter" class="newsletter">
	<div class="gradient basic">
		<div class="newsletter__inner width width--general">
			<div class="col left">
									<h2 class="newsletter__title">Buďte v&nbsp;obraze s&nbsp;naším newsletterem</h2>
													<div class="newsletter__content"><p>Díky initMAX newsletteru Vám neunikne žádná z&nbsp;pozvánek na&nbsp;akce a&nbsp;webináře, žádný z&nbsp;tipů, jak dostat ze svého IT MAXimum, ani ověřené informace o&nbsp;novinkách ze světa Zabbix a&nbsp;dalších technologií.</p>
</div>
							</div>
			<div class="col right form-wrapper">
				<div class="newsletter-form">
	<form method="post" action="/wiki/kapitola/zabbix/feed/" enctype="multipart/form-data">
		<input type="hidden" name="url" value="https://www.initmax.cz/wiki/kapitola/zabbix/feed/">

		<div class="inputs">

			<label for="newsletter-form_contact_email" class="top">Vaše e-mailová adresa:</label>
			<div class="df">

				<div class="input">
					<input type="text" id="newsletter-form_contact_email" name="newsletter_email" placeholder="@" data-format="email" data-required="1">
									</div><!-- /.input -->

				<a href="#" class="btn btn--white sendBtn">Odeslat</a>

			</div>

			<div class="bottom nm">
				<label for="newsletter-form_gdpr" class="checkbox gdpr">
					<input type="checkbox" id="newsletter-form_gdpr" name="newsletter_gdpr">
					<span>Souhlasím se&nbsp;<a href="https://www.initmax.cz/ochrana-osobnich-udaju/" target="_blank">zpracováním osobních údajů</a>.</span>
				</label>
			</div>

		</div><!-- /.inputs -->
		<div class="sent hidden">
			<div class="iconOk"><h3>Děkujeme, že jste se přihlásili k&nbsp;odběru našeho newsletteru.</h3>
</div>
			<button class="sent__close" title="Zavřít" onclick="closeFormMessage(this,event)"><svg data-name="Group 3602" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 3272" d="M0,0H24V24H0Z" fill="none"/><line data-name="Line 98" y2="14" transform="translate(7.05 7.05) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 99" x2="14" transform="translate(7.05 16.95) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</button>
		</div><!-- /.sent -->
	</form>
</div>			</div>
		</div>
	</div>
</section></section>



<section id="social-links-block_0f70dca2ef0586fd03916a2fcd362548" data-id="social-links-block_0f70dca2ef0586fd03916a2fcd362548" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>

<p>The post <a href="https://www.initmax.cz/wiki/uprava-a-skryti-login-formulare-v-zabbix-frontendu/">Úprava a&nbsp;skrytí login formuláře v&nbsp;Zabbix Frontendu</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Zabbix &#8211; aktualizace na&#160;poslední verzi 7.4</title>
		<link>https://www.initmax.cz/wiki/zabbix-aktualizace-na-posledni-verzi-7-4/</link>
		
		<dc:creator><![CDATA[Tomáš Heřmánek]]></dc:creator>
		<pubDate>Fri, 18 Apr 2025 17:58:10 +0000</pubDate>
				<guid isPermaLink="false">https://www.initmax.cz/?post_type=wiki&#038;p=18209</guid>

					<description><![CDATA[<p>Tentokrát si ukážeme, jak zaktualizovat Zabbix na nejnovější verzi 7.4. Budeme vycházet při aktualizaci z verze Zabbixu 7.0, PHP verze 8.0 a PostgreSQL 16 ...</p>
<p>The post <a href="https://www.initmax.cz/wiki/zabbix-aktualizace-na-posledni-verzi-7-4/">Zabbix &#8211; aktualizace na&nbsp;poslední verzi 7.4</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Tentokrát si ukážeme, jak zaktualizovat Zabbix na&nbsp;nejnovější verzi 7.4. Budeme vycházet při&nbsp;aktualizaci z&nbsp;verze Zabbixu 7.0, PHP verze 8.0 a&nbsp;PostgreSQL 16 s&nbsp;jeho extenzí TimescaleDB.</p>



<p>Návod, jak aktualizovat PostgreSQL, <a href="https://www.initmax.cz/wiki/jak-aktualizovat-postgresql-na-nejnovejsi-verzi/">naleznete v&nbsp;našem wiki článku</a>. Dále zde najdete i&nbsp;návod na&nbsp;<a href="https://www.initmax.cz/wiki/jak-na-aktualizaci-timescaledb/">aktualizaci TimescaleDB</a>.</p>



<h2 class="wp-block-heading">Výběr operačního systému</h2>



<p>Návod obsahuje postup pro RHEL platformy na&nbsp;verzi 9, kde stačí případně jen poupravit repozitáře. Návod pro Debian je připraven pro verzi 12, která je aktuálně poslední podporovanou verzí.</p>


<section id="os-switcher-block_07cd4cfd8bf4dcb5b3b1b0027c09b0df" data-id="os-switcher-block_07cd4cfd8bf4dcb5b3b1b0027c09b0df" class="gt-block os-switcher">
                    <a class="os-switcher__item is-active" onclick="osSwitch(this,'#rhel')">
                            <figure>
                     <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="800px" height="800px" viewBox="0 -31 256 256" version="1.1" preserveAspectRatio="xMidYMid"><g><path d="M170.758031,111.610687 C187.582343,111.610687 211.924474,108.140925 211.924474,88.1292728 C211.974775,86.5848226 211.834752,85.0400539 211.507565,83.5298204 L201.48829,40.009856 C199.175115,30.434388 197.144363,26.0904607 180.333499,17.6850288 C167.288269,11.014478 138.871184,0 130.465752,0 C122.638614,0 120.365785,10.0865183 111.032394,10.0865183 C102.048668,10.0865183 95.3781173,2.55525131 86.9726853,2.55525131 C78.9034707,2.55525131 73.6450325,8.05576597 69.5835277,19.3661152 C69.5835277,19.3661152 58.2731785,51.2664105 56.8207199,55.8927602 C56.5898643,56.7423115 56.4900906,57.6221338 56.5248487,58.5018063 C56.5248487,70.9014995 105.343597,111.556893 170.758031,111.556893 M214.506623,96.2522822 C216.833247,107.26676 216.833247,108.423348 216.833247,109.875806 C216.833247,128.703974 195.665007,139.153607 167.839665,139.153607 C104.953585,139.193953 49.8677466,102.344539 49.8677466,77.9889597 C49.8641113,74.5987697 50.555245,71.2437963 51.898499,68.1310691 C29.2778005,69.2607592 0,73.2953665 0,99.1437508 C0,141.48023 100.313787,193.661152 179.741757,193.661152 C240.63743,193.661152 255.995835,166.118232 255.995835,144.371699 C255.995835,127.264964 241.202275,107.845054 214.53352,96.2522822" fill="#EE0000"></path><path d="M214.506623,96.2522822 C216.833247,107.26676 216.833247,108.423348 216.833247,109.875806 C216.833247,128.703974 195.665007,139.15364 167.839665,139.15364 C104.953585,139.193953 49.8677323,102.344539 49.8677323,77.9889597 C49.8641113,74.5987697 50.555245,71.2437963 51.898499,68.1310691 L56.8207199,55.946555 C56.5952566,56.7787916 56.4955298,57.6400686 56.5248487,58.5018063 C56.5248487,70.9014995 105.343597,111.556893 170.758031,111.556893 C187.582343,111.556893 211.924474,108.08713 211.924474,88.075478 C211.974775,86.5310279 211.834752,84.9862591 211.507565,83.4760257 L214.506623,96.2522822 Z" fill="#000000"></path></g></svg>                 </figure>
                        <span>Alma/CentOS/RHEL/Rocky 9</span>
        </a>
                    <a class="os-switcher__item" onclick="osSwitch(this,'#debian')">
                            <figure>
                     <svg xmlns="http://www.w3.org/2000/svg" width="30.412" height="37.855" viewBox="0 0 30.412 37.855"><g data-name="Group 4978" transform="translate(0)"><path data-name="Path 3295" d="M51.55,57.148c-.627.009.119.323.938.449.226-.177.431-.355.614-.529a4.68,4.68,0,0,1-1.552.08" transform="translate(-33.375 -37.148)" fill="#a80030"></path><path data-name="Path 3296" d="M60.9,51.791a3.984,3.984,0,0,0,.742-1.664,4.059,4.059,0,0,1-.522,1.154c-1.172.738-.11-.438,0-.886-1.261,1.587-.173.952-.219,1.395" transform="translate(-39.357 -32.63)" fill="#a80030"></path><path data-name="Path 3297" d="M64.59,44.219c.076-1.13-.222-.772-.323-.341.117.061.209.8.323.341" transform="translate(-41.805 -28.292)" fill="#a80030"></path><path data-name="Path 3298" d="M45.172,1.4c.335.06.723.106.669.186.366-.08.449-.154-.669-.186" transform="translate(-29.376 -0.911)" fill="#a80030"></path><path data-name="Path 3299" d="M46.647,1.932l-.237.049.22-.02.016-.029" transform="translate(-30.181 -1.258)" fill="#a80030"></path><path data-name="Path 3300" d="M27.224,16.859a5.583,5.583,0,0,1-.6,2.378l-.542.271c-.444.861.043.547-.275,1.232a14.973,14.973,0,0,1-2.553,2.047c-.329-.007.223-.389.3-.538-.927.637-.744.956-2.162,1.342l-.042-.092c-3.5,1.645-8.354-1.615-8.291-6.064-.037.282-.106.212-.184.326a5.6,5.6,0,0,1,3.144-5.526,5.3,5.3,0,0,1,5.9.767,5.257,5.257,0,0,0-4.3-2.063,4.856,4.856,0,0,0-4.172,2.489c-.951.6-1.061,2.308-1.475,2.62-.557,4.1,1.049,5.867,3.765,7.949.428.288.12.332.178.552a7.372,7.372,0,0,1-2.409-1.842,6.473,6.473,0,0,0,1.253,1.444c-.851-.288-1.988-2.062-2.32-2.135,1.467,2.627,5.952,4.607,8.3,3.624a9.8,9.8,0,0,1-3.688-.429c-.513-.264-1.21-.811-1.086-.913a9.158,9.158,0,0,0,9.289-1.316c.705-.549,1.476-1.484,1.7-1.5-.335.5.057.243-.2.688.7-1.134-.305-.461.727-1.958l.381.525c-.142-.941,1.169-2.084,1.036-3.572.3-.455.335.49.016,1.537.443-1.162.117-1.348.23-2.307a8.71,8.71,0,0,1,.367,1,4.423,4.423,0,0,1,.441-2.543c-.142-.063-.445.5-.514-.83.01-.576.16-.3.218-.444a2.546,2.546,0,0,1-.59-1.353c.131-.2.35.516.528.545a13.163,13.163,0,0,1-.32-1.7c-.52-1.087-.184.145-.606-.467-.554-1.727.459-.4.528-1.185A13.868,13.868,0,0,1,30.732,13.3a15.9,15.9,0,0,0-.769-2.765c.255.107-.41-1.958.331-.59A12.326,12.326,0,0,0,24.513,3.03c.293.268.662.6.529.657-1.189-.708-.98-.763-1.15-1.062-.969-.394-1.032.032-1.674,0A19.878,19.878,0,0,0,18.36,1.153l.076.357c-1.209-.4-1.409.153-2.716,0-.08-.062.419-.225.829-.284-1.169.154-1.115-.23-2.259.043a9.724,9.724,0,0,1,.881-.5c-.954.058-2.277.555-1.868.1C11.748,1.57,8.986,2.544,7.436,4l-.049-.326c-.71.853-3.1,2.547-3.288,3.651l-.19.044a20.47,20.47,0,0,0-.9,1.979c-.483.824-.709.317-.64.446A30.106,30.106,0,0,0,.536,14.669c.291.435.007,2.616.117,4.362-.478,8.623,6.052,17,13.189,18.929a14.369,14.369,0,0,0,3.925.4c-1.561-.446-1.763-.237-3.284-.767-1.1-.517-1.338-1.107-2.115-1.781l.308.543c-1.524-.539-.886-.667-2.126-1.06l.328-.429a2.824,2.824,0,0,1-1.531-1.273l-.54.021c-.649-.8-1-1.378-.97-1.826l-.175.311c-.2-.34-2.389-3-1.252-2.384a2.563,2.563,0,0,1-.8-.867l.231-.265a4.4,4.4,0,0,1-.972-1.906,1.236,1.236,0,0,0,.695.535c-1.381-3.427-1.459-.189-2.5-3.489l.221-.018a7.327,7.327,0,0,1-.409-.805l.1-.96c-.994-1.15-.278-4.889-.135-6.94.1-.834.83-1.722,1.386-3.114l-.339-.058C4.532,10.7,7.58,7.3,8.992,7.471c.684-.859-.136,0-.269-.22,1.5-1.554,1.974-1.1,2.988-1.378,1.093-.649-.938.253-.42-.247,1.89-.483,1.339-1.1,3.8-1.342.26.148-.6.229-.82.421,1.575-.77,4.983-.6,7.2.428,2.569,1.2,5.455,4.749,5.569,8.088l.13.035c-.066,1.327.2,2.862-.262,4.272l.317-.667" transform="translate(-0.32 -0.503)" fill="#a80030"></path><path data-name="Path 3301" d="M32.208,59.764l-.088.44a8.451,8.451,0,0,0,1.266,1.6c-.379-.739-.66-1.045-1.178-2.044" transform="translate(-20.88 -38.903)" fill="#a80030"></path><path data-name="Path 3302" d="M34.247,58.123a3.488,3.488,0,0,1-.492-.821,5.711,5.711,0,0,0,.685,1.39l-.193-.569" transform="translate(-21.944 -37.3)" fill="#a80030"></path><path data-name="Path 3303" d="M82.358,48.916l-.092.231a11.156,11.156,0,0,1-1.093,3.489,10.961,10.961,0,0,0,1.185-3.72" transform="translate(-52.81 -31.841)" fill="#a80030"></path><path data-name="Path 3304" d="M45.054.187A13.512,13.512,0,0,1,46.546,0c-.586.049-1.17.079-1.746.153l.254.035" transform="translate(-29.133)" fill="#a80030"></path><path data-name="Path 3305" d="M2.44,23.219c.1.9-.681,1.256.172.659.457-1.03-.179-.284-.172-.659" transform="translate(-1.409 -15.114)" fill="#a80030"></path><path data-name="Path 3306" d="M-.053,32.764a9.824,9.824,0,0,0,.307-1.315c-.543.694-.25.842-.307,1.315" transform="translate(0.082 -20.471)" fill="#a80030"></path></g></svg>                 </figure>
                        <span>Debian 12</span>
        </a>
    </section>



<section id="block-webinar-block_62331a450cc2cf3ff7429de1888d5d9d" data-id="block-webinar-block_62331a450cc2cf3ff7429de1888d5d9d" class="gt-block block-webinar">
    <div class="connected-webinars__grid">
        <a href="https://www.initmax.cz/webinar/aktualizace-na-posledni-verzi-7-4/" class="grid-item">
	<article class="webinar-promotion">
		<div class="webinar-promotion__thumbnail-wrap">
			<figure class="webinar-promotion__thumbnail">
					<img decoding="async" src="https://www.initmax.cz/wp-content/uploads/2025/06/07_thumbnail_web_1.png"
				 width="401"
		 height="251"
		 class=""
		 alt="Aktualizace na&nbsp;poslední verzi 7.4"
		 loading="lazy"	>
									<div class="webinar-promotion__tags">
						<span class="tag tag--small" style="color:#ffffff;background-color:#4caf50;">Nový</span><span class="tag tag--small" style="color:#ffffff;background-color:#d40000;">Zabbix</span>					</div>
							</figure>
		</div>
		<div class="webinar-promotion__text">
			<div>
									<time datetime="2025-07-10">10.&nbsp;7.&nbsp;2025</time>
							</div>
			<h3 class="webinar-promotion__title">Aktualizace na&nbsp;poslední verzi 7.4</h3>
			<div class="icon-link">
				<figure class="icon-wrap icon-wrap--primary"><svg data-name="Group 3411" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 455" d="M0,0H24V24H0Z" fill="none"/><path data-name="Path 456" d="M15,10l4.553-2.276A1,1,0,0,1,21,8.618v6.764a1,1,0,0,1-1.447.894L15,14V10Z" transform="translate(0 0)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><rect data-name="Rectangle 1286" width="12" height="12" rx="2" transform="translate(3.112 6)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</figure>
				<span>Zhlédnout záznam</span>
			</div>
		</div>
	</article>
</a>    </div>
</section>


<section id="social-links-block_d23d371c99db0147490e15798311eadc" data-id="social-links-block_d23d371c99db0147490e15798311eadc" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>




<h2 class="wp-block-heading">Přípravné kroky</h2>



<ul class="wp-block-list">
<li>Přečtěte si &#8222;poznámky k&nbsp;vydané verzi&#8220; (release notes) [ <a href="https://www.zabbix.com/rn/rn7.4.0beta1" target="_blank" rel="noreferrer noopener nofollow">Official release notes for Zabbix 7.4</a> ]</li>



<li>Přečtěte si důkladně dokument &#8222;poznámky k&nbsp;aktualizaci&#8220; (upgrade notes) [ <a href="https://www.zabbix.com/documentation/devel/en/manual/installation/upgrade_notes_740" target="_blank" rel="noreferrer noopener nofollow">Official upgrade notes for Zabbix 7.4</a> ]</li>



<li>Zkontrolujte a&nbsp;případně optimalizujte výkon současné databáze dle doporučení vendora a&nbsp;s&nbsp;ohledem na&nbsp;požadavky Zabbix instance</li>



<li>Zkontrolujte, zda verze veškerých komponent odpovídají matici kompatiblity nové verze Zabbix</li>



<li>Zazálohujte konfigurační soubory Zabbix serveru a&nbsp;Zabbix proxy</li>



<li>Zázálohujte databáze Zabbix serveru, případně Zabbix proxy</li>



<li>Zazálohujte veškeré možné úpravy &#8222;na&nbsp;míru&#8220;, které byly na&nbsp;úrovni Zabbix ručně provedeny</li>



<li>Musíte vypnout HA na&nbsp;straně Zabbix serveru.</li>
</ul>



<h2 class="wp-block-heading">Kontrola verzí</h2>



<p>Nejprve zkontrolujeme verze všech komponent, na&nbsp;kterých je běh Zabbixu a&nbsp;jeho součástí závislý, tak aby přesně odpovídaly oficiální matici kompatibility pro Zabbix 7.4.</p>


<section id="block-code-block_facf855f09f2d576bcc7ce504c9ef9d5" data-id="block-code-block_facf855f09f2d576bcc7ce504c9ef9d5" class="gt-block block-code">
    <pre><code>php-fpm -v
psql -V</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<div id="rhel" class="wp-block-group"><div class="wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained">
<h2 class="wp-block-heading">Záloha konfiguračních souborů Zabbix</h2>



<p>Než se pustíme do&nbsp;dalších kroků, zazálohujeme veškeré konfigurační soubory Zabbix serveru a&nbsp;Zabbix Proxy.</p>


<section id="block-code-block_0dc27023266e15f2dbe77a7ac630fdbd" data-id="block-code-block_0dc27023266e15f2dbe77a7ac630fdbd" class="gt-block block-code">
    <pre><code>cp -R /etc/zabbix/ /&lt;backup directory&gt;/
cp -R /usr/lib/zabbix/alertscripts/ /&lt;backup directory&gt;/
cp -R /usr/lib/zabbix/externalscripts/ /&lt;backup directory&gt;/
cp -R /usr/share/zabbix/ /&lt;backup directory&gt;/
cp /etc/httpd/conf/httpd.conf /&lt;backup directory&gt;/
cp /etc/httpd/conf.d/zabbix.conf /&lt;backup directory&gt;/</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Zastavení služeb</h2>



<p>Nejprve zastavíme Zabbix server a&nbsp;webserver, aby do&nbsp;databáze již nic nezapisovaly.</p>


<section id="block-code-block_4842db65e681cabcbcf312a235540c9b" data-id="block-code-block_4842db65e681cabcbcf312a235540c9b" class="gt-block block-code">
    <pre><code>systemctl stop zabbix-server
systemctl stop httpd</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Aktualizace databáze (Volitelně)</h2>



<p>Dejte si prosím pozor na&nbsp;kombinaci <strong>PostgreSQL 17 a&nbsp;TimescaleDB 2.17.</strong> Tato verze má problém s&nbsp;načítáním starších dat. V&nbsp;případě potíží doporučujeme provést jednu z&nbsp;následujících akcí:</p>



<ul class="wp-block-list">
<li><strong>Downgrade extenze</strong>&nbsp;– přejděte na&nbsp;verzi TimescaleDB 2.16.2.</li>



<li><strong>Aktualizace na&nbsp;TimescaleDB 2.18</strong>&nbsp;– tento problém řeší.</li>



<li><strong>Použití workaroundu</strong>&nbsp;– do&nbsp;souboru&nbsp;<code>postgresql.conf</code>&nbsp;přidejte parametr pro vypnutí vektorizace a&nbsp;restartuje DB.</li>
</ul>


<section id="block-code-block_b0c9520833aa816ec479ebc044360c0e" data-id="block-code-block_b0c9520833aa816ec479ebc044360c0e" class="gt-block block-code">
    <pre><code>timescaledb.enable_vectorized_aggregation = off</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p><a href="https://www.initmax.cz/wiki/jak-aktualizovat-postgresql-na-nejnovejsi-verzi/">Detailní návod na&nbsp;aktualizaci PostgreSQL naleznete na&nbsp;naší wiki</a>.</p>



<h2 class="wp-block-heading">Aktualizace Zabbix</h2>



<p>Vše jsme úspěšně zazálohovali a&nbsp;zaktualizovali všechny verze návazných komponent dle oficiální matice kompatibility nové verze Zabbixu.</p>



<p>Nyní přejdeme k&nbsp;aktualizaci samotného Zabbixu a&nbsp;všech jeho součástí.</p>



<p>Nejprve si stáhneme instalační balíčky pro repozitáře nové verze Zabbixu a&nbsp;smažeme instalační cache:</p>


<section id="block-code-block_5bc212790a13ea4f818c513b01da9f29" data-id="block-code-block_5bc212790a13ea4f818c513b01da9f29" class="gt-block block-code">
    <pre><code>rpm -Uvh https://repo.zabbix.com/zabbix/7.4/release/rocky/9/noarch/zabbix-release-latest.el9.noarch.rpm
dnf clean all</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Po tomto úkonu máme dostupné repozitáře nové verze a&nbsp;můžeme tedy zaktualizovat veškeré další komponenty Zabbix, a&nbsp;to postupně i&nbsp;na&nbsp;všech Zabbix Proxy:</p>


<section id="block-code-block_077702f5755302963b93a26b5fec9044" data-id="block-code-block_077702f5755302963b93a26b5fec9044" class="gt-block block-code">
    <pre><code>dnf update zabbix-* -y</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Po úspěšném dokončení aktualizace balíčků Zabbix serveru a&nbsp;všech jeho součástí můžeme Zabbix znovu spustit, aby se dokončil upgrade databázové struktury.</p>


<section id="block-code-block_5de53e3c31eab95cea571cdd3249e1e2" data-id="block-code-block_5de53e3c31eab95cea571cdd3249e1e2" class="gt-block block-code">
    <pre><code>systemctl start zabbix-server.service</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Postupné činnosti i&nbsp;celý proces aktualizace, včetně případných zásahů do&nbsp;struktury databázového schématu, lze sledovat v&nbsp;log souboru Zabbix serveru:</p>


<section id="block-code-block_96d1b264a1cc26e1c645fb058d701aed" data-id="block-code-block_96d1b264a1cc26e1c645fb058d701aed" class="gt-block block-code">
    <pre><code>tail -f /var/log/zabbix/zabbix_server.log</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1150" height="730" src="https://www.initmax.cz/wp-content/uploads/2024/06/upgrade70.png" alt="" class="wp-image-16610" srcset="https://www.initmax.cz/wp-content/uploads/2024/06/upgrade70.png 1150w, https://www.initmax.cz/wp-content/uploads/2024/06/upgrade70-300x190.png 300w, https://www.initmax.cz/wp-content/uploads/2024/06/upgrade70-1024x650.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/06/upgrade70-768x488.png 768w, https://www.initmax.cz/wp-content/uploads/2024/06/upgrade70-608x386.png 608w" sizes="auto, (max-width: 1150px) 100vw, 1150px" /></figure>



<p>Po úspěšném dokončení aktualizace databázové struktury můžeme znovu spustit náš webový server. To provedeme následujícím příkazem:</p>


<section id="block-code-block_8a337f990b5a1702f417902ffabda485" data-id="block-code-block_8a337f990b5a1702f417902ffabda485" class="gt-block block-code">
    <pre><code>systemctl start httpd</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>

</div></div>



<div id="debian" class="wp-block-group"><div class="wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained">
<h2 class="wp-block-heading">Záloha konfiguračních souborů Zabbix</h2>



<p>Než se pustíme do&nbsp;dalších kroků, zazálohujeme veškeré konfigurační soubory Zabbix serveru a&nbsp;Zabbix Proxy.</p>


<section id="block-code-block_8896d8107dea73387866ed568723a810" data-id="block-code-block_8896d8107dea73387866ed568723a810" class="gt-block block-code">
    <pre><code>cp -R /etc/zabbix/ /&lt;backup directory&gt;/
cp -R /usr/lib/zabbix/alertscripts/ /&lt;backup directory&gt;/
cp -R /usr/lib/zabbix/externalscripts/ /&lt;backup directory&gt;/
cp -R /usr/share/zabbix/ /&lt;backup directory&gt;/
cp -R /etc/apache2/ /&lt;backup directory&gt;/</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Zastavení služeb</h2>



<p>Nejprve zastavíme Zabbix server a&nbsp;webserver, aby do&nbsp;databáze již nic nezapisovaly.</p>


<section id="block-code-block_60e0f2a75b0524651033c6a47a6cd90e" data-id="block-code-block_60e0f2a75b0524651033c6a47a6cd90e" class="gt-block block-code">
    <pre><code>systemctl stop zabbix-server
systemctl stop apache2</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Aktualizace databáze (Volitelně)</h2>



<p>Dejte si prosím pozor na&nbsp;kombinaci PostgreSQL 17 a&nbsp;TimescaleDB 2.7. Tato verze má problém s&nbsp;načítáním starších dat. V&nbsp;případě potíží doporučujeme provést jednu z&nbsp;následujících akcí:</p>



<ul class="wp-block-list">
<li><strong>Downgrade extenze</strong>&nbsp;– přejděte na&nbsp;verzi TimescaleDB 2.16.2.</li>



<li><strong>Aktualizace na&nbsp;TimescaleDB 2.8</strong>&nbsp;– tento problém řeší.</li>



<li><strong>Použití workaroundu</strong>&nbsp;– do&nbsp;souboru&nbsp;<code>postgresql.conf</code>&nbsp;přidejte parametr pro vypnutí vektorizace a&nbsp;restartuje DB.</li>
</ul>


<section id="block-code-block_b0c9520833aa816ec479ebc044360c0e" data-id="block-code-block_b0c9520833aa816ec479ebc044360c0e" class="gt-block block-code">
    <pre><code>timescaledb.enable_vectorized_aggregation = off</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p><a href="https://www.initmax.cz/wiki/jak-aktualizovat-postgresql-na-nejnovejsi-verzi/">Detailní návod na&nbsp;aktualizaci PostgreSQL naleznete na&nbsp;naší wiki</a>.</p>



<h2 class="wp-block-heading">Aktualizace Zabbix</h2>



<p>Vše jsme úspěšně zazálohovali a&nbsp;zaktualizovali všechny verze návazných komponent dle oficiální matice kompatibility nové verze Zabbixu.</p>



<p>Nyní přejdeme k&nbsp;aktualizaci samotného Zabbixu a&nbsp;všech jeho součástí.</p>



<p>Nejprve si stáhneme instalační balíčky pro repozitáře nové verze Zabbixu a&nbsp;nainstalujeme je:</p>


<section id="block-code-block_f39bb8e2d5b88803c392a00e44511e87" data-id="block-code-block_f39bb8e2d5b88803c392a00e44511e87" class="gt-block block-code">
    <pre><code>wget https://repo.zabbix.com/zabbix/7.4/release/debian/pool/main/z/zabbix-release/zabbix-release_latest_7.4+debian12_all.deb
dpkg -i zabbix-release_latest_7.4+debian12_all.deb</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Po tomto úkonu máme dostupné repozitáře nové verze a&nbsp;můžeme tedy zaktualizovat veškeré další komponenty Zabbix, a&nbsp;to postupně i&nbsp;na&nbsp;všech Zabbix Proxy:</p>


<section id="block-code-block_4d2eea461bcaab39f2c92dfd820237f0" data-id="block-code-block_4d2eea461bcaab39f2c92dfd820237f0" class="gt-block block-code">
    <pre><code>apt update
apt install --only-upgrade $(dpkg -l | grep zabbix | awk &#039;{print $2}&#039;)</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Po úspěšném dokončení aktualizace balíčků Zabbix serveru a&nbsp;všech jeho součástí můžeme Zabbix znovu spustit, aby se dokončil upgrade databázové struktury.</p>


<section id="block-code-block_5de53e3c31eab95cea571cdd3249e1e2" data-id="block-code-block_5de53e3c31eab95cea571cdd3249e1e2" class="gt-block block-code">
    <pre><code>systemctl start zabbix-server.service</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Postupné činnosti i&nbsp;celý proces aktualizace, včetně případných zásahů do&nbsp;struktury databázového schématu, lze sledovat v&nbsp;log souboru Zabbix serveru:</p>


<section id="block-code-block_96d1b264a1cc26e1c645fb058d701aed" data-id="block-code-block_96d1b264a1cc26e1c645fb058d701aed" class="gt-block block-code">
    <pre><code>tail -f /var/log/zabbix/zabbix_server.log</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1150" height="730" src="https://www.initmax.cz/wp-content/uploads/2024/06/upgrade70.png" alt="" class="wp-image-16610" srcset="https://www.initmax.cz/wp-content/uploads/2024/06/upgrade70.png 1150w, https://www.initmax.cz/wp-content/uploads/2024/06/upgrade70-300x190.png 300w, https://www.initmax.cz/wp-content/uploads/2024/06/upgrade70-1024x650.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/06/upgrade70-768x488.png 768w, https://www.initmax.cz/wp-content/uploads/2024/06/upgrade70-608x386.png 608w" sizes="auto, (max-width: 1150px) 100vw, 1150px" /></figure>



<p>Po úspěšném dokončení aktualizace databázové struktury můžeme znovu spustit náš webový server. To provedeme následujícím příkazem:</p>


<section id="block-code-block_7d9e8de00450a8eb4977b6279a2d701a" data-id="block-code-block_7d9e8de00450a8eb4977b6279a2d701a" class="gt-block block-code">
    <pre><code>systemctl start apache2</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>

</div></div>



<h2 class="wp-block-heading">Dokončovací práce</h2>



<ul class="wp-block-list">
<li>Zkontrolujte, že správně běží Zabbix server, databázový server a&nbsp;mají správnou verzi</li>



<li>Zkontrolujte také, zda při&nbsp;startu serveru nebo proxy v&nbsp;systému neuvidíte následující chybu: ‚…the user limit of 1024 file descriptors is insufficient. The maximum number of concurrent checks per worker has been reduced…‘ <a href="https://www.initmax.cz/wiki/zabbix-7-0-a-navyseni-systemovych-limitu/">Návod na&nbsp;odstranění naleznete na&nbsp;naší wiki</a>.</li>



<li>Zkontrolujte, že běží všechny Zabbix proxy a&nbsp;mají správnou verzi. Je zajištěna zpětná kompatibilita (částečná) pro verzi 7.0. Nicméně i&nbsp;tak důrazně doporučujeme používat stejnou verzi, jakou má Zabbix server. Starší verze nejsou podporovány.</li>



<li>Zkontrolujte stav Zabbix serveru a&nbsp;Zabbix proxy (log soubory, nepodporované položky, fronty, monitorovací skripty, atd.).</li>



<li>Zkontrolujte, zda vaše servery mají přiděleny poslední verze oficiálních šablon od Zabbixu. [ <a href="https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates" target="_blank" rel="noreferrer noopener">Zabbix GIT</a> ]</li>
</ul>



<h2 class="wp-block-heading">Co je nového v&nbsp;Zabbixu 7.4</h2>



<p>Informace o&nbsp;novinkách v&nbsp;Zabbixu 7.4 <a href="https://www.initmax.cz/novy-zabbix-7-4/">naleznete v&nbsp;našem článku</a>, nebo se můžete podívat na&nbsp;náš webinář, který je zaměřen právě na&nbsp;tyto novinky.</p>





<p>A to je vše! Nyní můžete začít využívat váš nově zaktualizovaný Zabbix ve verzi 7.4 se všemi jeho opravami i&nbsp;novinkami.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>


<section id="block-newsletter-block_b232d256f2f24957ee5694857ca54e2f" data-id="block-newsletter-block_b232d256f2f24957ee5694857ca54e2f" class="gt-block block-newsletter">
    <section id="newsletter" class="newsletter">
	<div class="gradient basic">
		<div class="newsletter__inner width width--general">
			<div class="col left">
									<h2 class="newsletter__title">Buďte v&nbsp;obraze s&nbsp;naším newsletterem</h2>
													<div class="newsletter__content"><p>Díky initMAX newsletteru Vám neunikne žádná z&nbsp;pozvánek na&nbsp;akce a&nbsp;webináře, žádný z&nbsp;tipů, jak dostat ze svého IT MAXimum, ani ověřené informace o&nbsp;novinkách ze světa Zabbix a&nbsp;dalších technologií.</p>
</div>
							</div>
			<div class="col right form-wrapper">
				<div class="newsletter-form">
	<form method="post" action="/wiki/kapitola/zabbix/feed/" enctype="multipart/form-data">
		<input type="hidden" name="url" value="https://www.initmax.cz/wiki/kapitola/zabbix/feed/">

		<div class="inputs">

			<label for="newsletter-form_contact_email" class="top">Vaše e-mailová adresa:</label>
			<div class="df">

				<div class="input">
					<input type="text" id="newsletter-form_contact_email" name="newsletter_email" placeholder="@" data-format="email" data-required="1">
									</div><!-- /.input -->

				<a href="#" class="btn btn--white sendBtn">Odeslat</a>

			</div>

			<div class="bottom nm">
				<label for="newsletter-form_gdpr" class="checkbox gdpr">
					<input type="checkbox" id="newsletter-form_gdpr" name="newsletter_gdpr">
					<span>Souhlasím se&nbsp;<a href="https://www.initmax.cz/ochrana-osobnich-udaju/" target="_blank">zpracováním osobních údajů</a>.</span>
				</label>
			</div>

		</div><!-- /.inputs -->
		<div class="sent hidden">
			<div class="iconOk"><h3>Děkujeme, že jste se přihlásili k&nbsp;odběru našeho newsletteru.</h3>
</div>
			<button class="sent__close" title="Zavřít" onclick="closeFormMessage(this,event)"><svg data-name="Group 3602" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 3272" d="M0,0H24V24H0Z" fill="none"/><line data-name="Line 98" y2="14" transform="translate(7.05 7.05) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 99" x2="14" transform="translate(7.05 16.95) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</button>
		</div><!-- /.sent -->
	</form>
</div>			</div>
		</div>
	</div>
</section></section>



<section id="social-links-block_d23d371c99db0147490e15798311eadc" data-id="social-links-block_d23d371c99db0147490e15798311eadc" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>

<p>The post <a href="https://www.initmax.cz/wiki/zabbix-aktualizace-na-posledni-verzi-7-4/">Zabbix &#8211; aktualizace na&nbsp;poslední verzi 7.4</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Zabbix 7.4 &#8211; návod na&#160;instalaci v&#160;5 minutách</title>
		<link>https://www.initmax.cz/wiki/zabbix-7-4-navod-na-instalaci-v-5-minutach/</link>
		
		<dc:creator><![CDATA[Tomáš Heřmánek]]></dc:creator>
		<pubDate>Thu, 17 Apr 2025 18:20:06 +0000</pubDate>
				<guid isPermaLink="false">https://www.initmax.cz/?post_type=wiki&#038;p=18207</guid>

					<description><![CDATA[<p>V tomto návodu si ukážeme, jak během pěti minut nainstalovat a nakonfigurovat nejnovější Zabbix verze 7.4 s databází PostgreSQL 17 a TimescaleDB. Výběr ...</p>
<p>The post <a href="https://www.initmax.cz/wiki/zabbix-7-4-navod-na-instalaci-v-5-minutach/">Zabbix 7.4 &#8211; návod na&nbsp;instalaci v&nbsp;5 minutách</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>V tomto návodu si ukážeme, jak během pěti minut nainstalovat a&nbsp;nakonfigurovat nejnovější Zabbix verze 7.4 s&nbsp;databází PostgreSQL 17 a&nbsp;TimescaleDB.</p>



<h2 class="wp-block-heading" id="vyber-operacniho-systemu">Výběr operačního systému</h2>



<p>Návod obsahuje postup pro RHEL platformy na&nbsp;verzi 9, kde stačí případně jen poupravit repozitáře. Návod pro Debian je připraven pro verzi 12, která je aktuálně poslední podporovanou verzí.</p>


<section id="os-switcher-block_16c9b4c88b5a478c8d02d25788df6288" data-id="os-switcher-block_16c9b4c88b5a478c8d02d25788df6288" class="gt-block os-switcher">
                    <a class="os-switcher__item is-active" onclick="osSwitch(this,'#rhel')">
                            <figure>
                     <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="800px" height="800px" viewBox="0 -31 256 256" version="1.1" preserveAspectRatio="xMidYMid"><g><path d="M170.758031,111.610687 C187.582343,111.610687 211.924474,108.140925 211.924474,88.1292728 C211.974775,86.5848226 211.834752,85.0400539 211.507565,83.5298204 L201.48829,40.009856 C199.175115,30.434388 197.144363,26.0904607 180.333499,17.6850288 C167.288269,11.014478 138.871184,0 130.465752,0 C122.638614,0 120.365785,10.0865183 111.032394,10.0865183 C102.048668,10.0865183 95.3781173,2.55525131 86.9726853,2.55525131 C78.9034707,2.55525131 73.6450325,8.05576597 69.5835277,19.3661152 C69.5835277,19.3661152 58.2731785,51.2664105 56.8207199,55.8927602 C56.5898643,56.7423115 56.4900906,57.6221338 56.5248487,58.5018063 C56.5248487,70.9014995 105.343597,111.556893 170.758031,111.556893 M214.506623,96.2522822 C216.833247,107.26676 216.833247,108.423348 216.833247,109.875806 C216.833247,128.703974 195.665007,139.153607 167.839665,139.153607 C104.953585,139.193953 49.8677466,102.344539 49.8677466,77.9889597 C49.8641113,74.5987697 50.555245,71.2437963 51.898499,68.1310691 C29.2778005,69.2607592 0,73.2953665 0,99.1437508 C0,141.48023 100.313787,193.661152 179.741757,193.661152 C240.63743,193.661152 255.995835,166.118232 255.995835,144.371699 C255.995835,127.264964 241.202275,107.845054 214.53352,96.2522822" fill="#EE0000"></path><path d="M214.506623,96.2522822 C216.833247,107.26676 216.833247,108.423348 216.833247,109.875806 C216.833247,128.703974 195.665007,139.15364 167.839665,139.15364 C104.953585,139.193953 49.8677323,102.344539 49.8677323,77.9889597 C49.8641113,74.5987697 50.555245,71.2437963 51.898499,68.1310691 L56.8207199,55.946555 C56.5952566,56.7787916 56.4955298,57.6400686 56.5248487,58.5018063 C56.5248487,70.9014995 105.343597,111.556893 170.758031,111.556893 C187.582343,111.556893 211.924474,108.08713 211.924474,88.075478 C211.974775,86.5310279 211.834752,84.9862591 211.507565,83.4760257 L214.506623,96.2522822 Z" fill="#000000"></path></g></svg>                 </figure>
                        <span>Alma/CentOS/RHEL/Rocky 9</span>
        </a>
                    <a class="os-switcher__item" onclick="osSwitch(this,'#debian')">
                            <figure>
                     <svg xmlns="http://www.w3.org/2000/svg" width="30.412" height="37.855" viewBox="0 0 30.412 37.855"><g data-name="Group 4978" transform="translate(0)"><path data-name="Path 3295" d="M51.55,57.148c-.627.009.119.323.938.449.226-.177.431-.355.614-.529a4.68,4.68,0,0,1-1.552.08" transform="translate(-33.375 -37.148)" fill="#a80030"></path><path data-name="Path 3296" d="M60.9,51.791a3.984,3.984,0,0,0,.742-1.664,4.059,4.059,0,0,1-.522,1.154c-1.172.738-.11-.438,0-.886-1.261,1.587-.173.952-.219,1.395" transform="translate(-39.357 -32.63)" fill="#a80030"></path><path data-name="Path 3297" d="M64.59,44.219c.076-1.13-.222-.772-.323-.341.117.061.209.8.323.341" transform="translate(-41.805 -28.292)" fill="#a80030"></path><path data-name="Path 3298" d="M45.172,1.4c.335.06.723.106.669.186.366-.08.449-.154-.669-.186" transform="translate(-29.376 -0.911)" fill="#a80030"></path><path data-name="Path 3299" d="M46.647,1.932l-.237.049.22-.02.016-.029" transform="translate(-30.181 -1.258)" fill="#a80030"></path><path data-name="Path 3300" d="M27.224,16.859a5.583,5.583,0,0,1-.6,2.378l-.542.271c-.444.861.043.547-.275,1.232a14.973,14.973,0,0,1-2.553,2.047c-.329-.007.223-.389.3-.538-.927.637-.744.956-2.162,1.342l-.042-.092c-3.5,1.645-8.354-1.615-8.291-6.064-.037.282-.106.212-.184.326a5.6,5.6,0,0,1,3.144-5.526,5.3,5.3,0,0,1,5.9.767,5.257,5.257,0,0,0-4.3-2.063,4.856,4.856,0,0,0-4.172,2.489c-.951.6-1.061,2.308-1.475,2.62-.557,4.1,1.049,5.867,3.765,7.949.428.288.12.332.178.552a7.372,7.372,0,0,1-2.409-1.842,6.473,6.473,0,0,0,1.253,1.444c-.851-.288-1.988-2.062-2.32-2.135,1.467,2.627,5.952,4.607,8.3,3.624a9.8,9.8,0,0,1-3.688-.429c-.513-.264-1.21-.811-1.086-.913a9.158,9.158,0,0,0,9.289-1.316c.705-.549,1.476-1.484,1.7-1.5-.335.5.057.243-.2.688.7-1.134-.305-.461.727-1.958l.381.525c-.142-.941,1.169-2.084,1.036-3.572.3-.455.335.49.016,1.537.443-1.162.117-1.348.23-2.307a8.71,8.71,0,0,1,.367,1,4.423,4.423,0,0,1,.441-2.543c-.142-.063-.445.5-.514-.83.01-.576.16-.3.218-.444a2.546,2.546,0,0,1-.59-1.353c.131-.2.35.516.528.545a13.163,13.163,0,0,1-.32-1.7c-.52-1.087-.184.145-.606-.467-.554-1.727.459-.4.528-1.185A13.868,13.868,0,0,1,30.732,13.3a15.9,15.9,0,0,0-.769-2.765c.255.107-.41-1.958.331-.59A12.326,12.326,0,0,0,24.513,3.03c.293.268.662.6.529.657-1.189-.708-.98-.763-1.15-1.062-.969-.394-1.032.032-1.674,0A19.878,19.878,0,0,0,18.36,1.153l.076.357c-1.209-.4-1.409.153-2.716,0-.08-.062.419-.225.829-.284-1.169.154-1.115-.23-2.259.043a9.724,9.724,0,0,1,.881-.5c-.954.058-2.277.555-1.868.1C11.748,1.57,8.986,2.544,7.436,4l-.049-.326c-.71.853-3.1,2.547-3.288,3.651l-.19.044a20.47,20.47,0,0,0-.9,1.979c-.483.824-.709.317-.64.446A30.106,30.106,0,0,0,.536,14.669c.291.435.007,2.616.117,4.362-.478,8.623,6.052,17,13.189,18.929a14.369,14.369,0,0,0,3.925.4c-1.561-.446-1.763-.237-3.284-.767-1.1-.517-1.338-1.107-2.115-1.781l.308.543c-1.524-.539-.886-.667-2.126-1.06l.328-.429a2.824,2.824,0,0,1-1.531-1.273l-.54.021c-.649-.8-1-1.378-.97-1.826l-.175.311c-.2-.34-2.389-3-1.252-2.384a2.563,2.563,0,0,1-.8-.867l.231-.265a4.4,4.4,0,0,1-.972-1.906,1.236,1.236,0,0,0,.695.535c-1.381-3.427-1.459-.189-2.5-3.489l.221-.018a7.327,7.327,0,0,1-.409-.805l.1-.96c-.994-1.15-.278-4.889-.135-6.94.1-.834.83-1.722,1.386-3.114l-.339-.058C4.532,10.7,7.58,7.3,8.992,7.471c.684-.859-.136,0-.269-.22,1.5-1.554,1.974-1.1,2.988-1.378,1.093-.649-.938.253-.42-.247,1.89-.483,1.339-1.1,3.8-1.342.26.148-.6.229-.82.421,1.575-.77,4.983-.6,7.2.428,2.569,1.2,5.455,4.749,5.569,8.088l.13.035c-.066,1.327.2,2.862-.262,4.272l.317-.667" transform="translate(-0.32 -0.503)" fill="#a80030"></path><path data-name="Path 3301" d="M32.208,59.764l-.088.44a8.451,8.451,0,0,0,1.266,1.6c-.379-.739-.66-1.045-1.178-2.044" transform="translate(-20.88 -38.903)" fill="#a80030"></path><path data-name="Path 3302" d="M34.247,58.123a3.488,3.488,0,0,1-.492-.821,5.711,5.711,0,0,0,.685,1.39l-.193-.569" transform="translate(-21.944 -37.3)" fill="#a80030"></path><path data-name="Path 3303" d="M82.358,48.916l-.092.231a11.156,11.156,0,0,1-1.093,3.489,10.961,10.961,0,0,0,1.185-3.72" transform="translate(-52.81 -31.841)" fill="#a80030"></path><path data-name="Path 3304" d="M45.054.187A13.512,13.512,0,0,1,46.546,0c-.586.049-1.17.079-1.746.153l.254.035" transform="translate(-29.133)" fill="#a80030"></path><path data-name="Path 3305" d="M2.44,23.219c.1.9-.681,1.256.172.659.457-1.03-.179-.284-.172-.659" transform="translate(-1.409 -15.114)" fill="#a80030"></path><path data-name="Path 3306" d="M-.053,32.764a9.824,9.824,0,0,0,.307-1.315c-.543.694-.25.842-.307,1.315" transform="translate(0.082 -20.471)" fill="#a80030"></path></g></svg>                 </figure>
                        <span>Debian 12</span>
        </a>
    </section>



<section id="block-webinar-block_511e0a52ba3c6cc8c3e219acd80f41b4" data-id="block-webinar-block_511e0a52ba3c6cc8c3e219acd80f41b4" class="gt-block block-webinar">
    <div class="connected-webinars__grid">
        <a href="https://www.initmax.cz/webinar/instalace-zabbixu-7-4-v-peti-minutach/" class="grid-item">
	<article class="webinar-promotion">
		<div class="webinar-promotion__thumbnail-wrap">
			<figure class="webinar-promotion__thumbnail">
					<img decoding="async" src="https://www.initmax.cz/wp-content/uploads/2025/06/03_thumbnail_web.png"
				 width="400"
		 height="250"
		 class=""
		 alt="Instalace Zabbixu 7.4 v&nbsp;pěti minutách"
		 loading="lazy"	>
									<div class="webinar-promotion__tags">
						<span class="tag tag--small" style="color:#ffffff;background-color:#4caf50;">Nový</span><span class="tag tag--small" style="color:#ffffff;background-color:#d40000;">Zabbix</span>					</div>
							</figure>
		</div>
		<div class="webinar-promotion__text">
			<div>
									<time datetime="2025-07-11">11.&nbsp;7.&nbsp;2025</time>
							</div>
			<h3 class="webinar-promotion__title">Instalace Zabbixu 7.4 v&nbsp;pěti minutách</h3>
			<div class="icon-link">
				<figure class="icon-wrap icon-wrap--primary"><svg data-name="Group 3411" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 455" d="M0,0H24V24H0Z" fill="none"/><path data-name="Path 456" d="M15,10l4.553-2.276A1,1,0,0,1,21,8.618v6.764a1,1,0,0,1-1.447.894L15,14V10Z" transform="translate(0 0)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><rect data-name="Rectangle 1286" width="12" height="12" rx="2" transform="translate(3.112 6)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</figure>
				<span>Zhlédnout záznam</span>
			</div>
		</div>
	</article>
</a>    </div>
</section>


<section id="social-links-block_6a5156a032db586fa5a8c6584ae45e2c" data-id="social-links-block_6a5156a032db586fa5a8c6584ae45e2c" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>




<div id="rhel" class="wp-block-group"><div class="wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained">
<h2 class="wp-block-heading">Než začneme</h2>



<p>Pro účely této <strong>ukázky</strong> si nejdříve přepneme SELinux do&nbsp;Permissive módu. </p>



<p>Pokud plánujete SELinux trvale deaktivovat, můžete tak učinit úpravou konfiguračního souboru.&nbsp;Nicméně, doporučujeme zvážit možnost naučit se s&nbsp;SELinuxem pracovat a&nbsp;využít jeho bezpečnostní výhody.&nbsp;Podrobné informace o&nbsp;správném nastavení a&nbsp;monitorování SELinuxu naleznete <a href="https://www.initmax.cz/wiki/selinux-integrace-se-zabbixem-a-dalsimi-nastroji/">v našem samostatném článku.​</a></p>


<section id="block-code-block_5d05d55e1fb35ad3867ba93e631109f6" data-id="block-code-block_5d05d55e1fb35ad3867ba93e631109f6" class="gt-block block-code">
    <pre><code>setenforce 0</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Instalace PostgreSQL</h2>



<p>V prvním kroku si naistalujeme repozitáře pro PostgreSQL a&nbsp;zakážeme výchozí, systémové PostgreSQL repozitáře.</p>


<section id="block-code-block_65c01fbbed3ad8f36ffb0637c8809b6f" data-id="block-code-block_65c01fbbed3ad8f36ffb0637c8809b6f" class="gt-block block-code">
    <pre><code>dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm
dnf -qy module disable postgresql</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Následně pak nainstalujeme PostgreSQL, v&nbsp;tomto případě to bude aktuálně podporovaná verze 17.</p>


<section id="block-code-block_0e7c4dca1a3fbfdcb719bd2662d4f04b" data-id="block-code-block_0e7c4dca1a3fbfdcb719bd2662d4f04b" class="gt-block block-code">
    <pre><code>dnf install -y postgresql17-server</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Inicializujeme databázi a&nbsp;nastavíme její automatické spouštění.</p>


<section id="block-code-block_fc4068b830d94d690424503f99acf806" data-id="block-code-block_fc4068b830d94d690424503f99acf806" class="gt-block block-code">
    <pre><code>/usr/pgsql-17/bin/postgresql-17-setup initdb
systemctl enable postgresql-17 --now</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Instalace Zabbix serveru a&nbsp;jeho součástí</h2>



<p>Databáze je nyní nainstalovaná, a&nbsp;můžeme tedy přikročit k&nbsp;instalaci Zabbix serveru a&nbsp;všech jeho součástí.</p>



<p>Nejprve si z&nbsp;repozitáře EPEL vyloučíme jakékoliv instalační balíčky týkající se Zabbixu. Za předpokladu, že je nainstalován.</p>



<p>To provedeme tak, že na&nbsp;konec souboru <code>/etc/yum.repos.d/epel.repo</code> vložíme následující řádek:</p>


<section id="block-code-block_68c267047bfb7fca8a1fbb4d85e5bb10" data-id="block-code-block_68c267047bfb7fca8a1fbb4d85e5bb10" class="gt-block block-code">
    <pre><code>[epel]
...
excludepkgs=zabbix*</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Přidáme si repozitáře Zabbixu a&nbsp;vyčistíme instalační cache.</p>


<section id="block-code-block_df65cae91a2dec8d23b55449b692d538" data-id="block-code-block_df65cae91a2dec8d23b55449b692d538" class="gt-block block-code">
    <pre><code>rpm -Uvh https://repo.zabbix.com/zabbix/7.4/release/rocky/9/noarch/zabbix-release-latest.el9.noarch.rpm
dnf clean all</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A nainstalujeme všechny potřebné součásti Zabbixu.</p>



<p>V tomto případě použijeme jako primárního monitorovacího agenta Zabbix Agent 2, který vám doporučujeme používat, jelikož přináší daleko více funkcionalit.</p>


<section id="block-code-block_3ee3c993c911aadc55052f7cb6f3ec7a" data-id="block-code-block_3ee3c993c911aadc55052f7cb6f3ec7a" class="gt-block block-code">
    <pre><code>dnf install zabbix-server-pgsql zabbix-web-pgsql zabbix-apache-conf zabbix-sql-scripts zabbix-agent2 zabbix-web-service</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Inicializace databáze</h2>



<p>Nejprve vytvoříme databázového uživatele pro Zabbix, budeme vyzváni k&nbsp;zadání jeho přístupového hesla.</p>


<section id="block-code-block_03e761035b8bcee394c10ba736aa383a" data-id="block-code-block_03e761035b8bcee394c10ba736aa383a" class="gt-block block-code">
    <pre><code>cd /tmp
sudo -u postgres createuser --pwprompt zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V tuto chvíli jsme schopni naimportovat výchozí schéma a&nbsp;data. Opět budeme vyzváni k&nbsp;zadání hesla. <br>Zde použijeme heslo z&nbsp;předchozího kroku.</p>


<section id="block-code-block_645addc608e8fe885c1b476e557042d0" data-id="block-code-block_645addc608e8fe885c1b476e557042d0" class="gt-block block-code">
    <pre><code>sudo -u postgres createdb -O zabbix zabbix
zcat /usr/share/zabbix/sql-scripts/postgresql/server.sql.gz | sudo -u zabbix psql zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Nastavení firewallu</h2>



<p>Nazávěr na&nbsp;firewallu povolíme porty, které jsou nezbytné pro běh Zabbix serveru.</p>


<section id="block-code-block_01e9da902ca794263705cbe51f8fed58" data-id="block-code-block_01e9da902ca794263705cbe51f8fed58" class="gt-block block-code">
    <pre><code>firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-port=10051/tcp
firewall-cmd --reload</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Instalace TimescaleDB</h2>



<p>Nyní se pustíme do&nbsp;instalace TimescaleDB a&nbsp;začneme tím, že přidáme její oficiální repozitář.</p>


<section id="block-code-block_cd9c8f6944210ef675f9803d0e1d60a4" data-id="block-code-block_cd9c8f6944210ef675f9803d0e1d60a4" class="gt-block block-code">
    <pre><code>tee /etc/yum.repos.d/timescale_timescaledb.repo &lt;&lt;EOL
[timescale_timescaledb]
name=timescale_timescaledb
baseurl=https://packagecloud.io/timescale/timescaledb/el/$(rpm -E %{rhel})/\$basearch
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/timescale/timescaledb/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
EOL</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nainstalujme TimescaleDB.</p>


<section id="block-code-block_d7beec1638561908c961bfe24f966023" data-id="block-code-block_d7beec1638561908c961bfe24f966023" class="gt-block block-code">
    <pre><code>dnf install timescaledb-2-postgresql-17 timescaledb-2-loader-postgresql-17</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Spustíme utilitu <code>timescaledb-tune</code> a&nbsp;jako parametr jí předáme vyšší hodnotu maximálního množství připojení (<code>--max-conns</code>), které pro tyto testovací účely nastavíme na&nbsp;<code>125</code>.</p>



<p>Tato utilita slouží k&nbsp;přizpůsobení výchozího nastavení PostgreSQL vůčihledně výkonu a&nbsp;adekvátnímu nastavení parametrů PostgreSQL pro fungování s&nbsp;TimescaleDB.</p>



<p>Zároveň nám tato utilit pomocí instalačního průvodce pomůže vybrat aktuální a&nbsp;platný konfigurační soubor PostgreSQL a&nbsp;nastaví i&nbsp;automatické načítání knihoven TimescaleDB.</p>



<p>Prosím, odpovídejte &#8222;ano&#8220; (y) na&nbsp;všechny otázky. Pozor, automatický tuner předpokládá, že PostgreSQL běží na&nbsp;samostatném serveru, a&nbsp;proto může být potřeba případně upravit parametry.</p>


<section id="block-code-block_c486f3a17617160bde6b962e0b077a96" data-id="block-code-block_c486f3a17617160bde6b962e0b077a96" class="gt-block block-code">
    <pre><code>timescaledb-tune --pg-config /usr/pgsql-17/bin --max-conns=125</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1530" height="584" src="https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72-tune.png" alt="" class="wp-image-17150" srcset="https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72-tune.png 1530w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72-tune-300x115.png 300w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72-tune-1024x391.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72-tune-768x293.png 768w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72-tune-608x232.png 608w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72-tune-1216x464.png 1216w" sizes="auto, (max-width: 1530px) 100vw, 1530px" /></figure>



<p>Následně restartujeme systémovou službu pro PostgreSQL:</p>


<section id="block-code-block_f837d92fdcb4579f8daffbaa94a22755" data-id="block-code-block_f837d92fdcb4579f8daffbaa94a22755" class="gt-block block-code">
    <pre><code>systemctl restart postgresql-17.service</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Zbývá již jen vytvořit a&nbsp;aktivovat samotnou TimescaleDB:</p>



<p><strong>Pozor:</strong> Během vývoje došlo ke změně cesty z&nbsp;původní <code>/usr/share/zabbix-sql-scripts/postgresql/timescaledb/schema.sql</code> na&nbsp;novou <code>/usr/share/zabbix/sql-scripts/postgresql/timescaledb/schema.sql</code>.</p>


<section id="block-code-block_589b4abe05cef974c1067fd4b41cece8" data-id="block-code-block_589b4abe05cef974c1067fd4b41cece8" class="gt-block block-code">
    <pre><code>echo &quot;CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;&quot; | sudo -u postgres psql zabbix
cat /usr/share/zabbix/sql-scripts/postgresql/timescaledb/schema.sql | sudo -u zabbix psql zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Nastavení Zabbix serveru</h2>



<p>Otevřeme konfigurační soubor Zabbix serveru v&nbsp;cestě:</p>


<section id="block-code-block_1e431d0344c6f82381d9cb6dc331515d" data-id="block-code-block_1e431d0344c6f82381d9cb6dc331515d" class="gt-block block-code">
    <pre><code>nano /etc/zabbix/zabbix_server.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V tomto konfiguračním souboru upravíme následující parametry tak, jak vídíte na&nbsp;předloze níže:</p>


<section id="block-code-block_980a28eb2aa5656d6dfb40035b1cbe08" data-id="block-code-block_980a28eb2aa5656d6dfb40035b1cbe08" class="gt-block block-code">
    <pre><code>...
DBPassword=password
StartReportWriters=1
WebServiceURL=http://localhost:10053/report
...</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V dalším kroku doinstalujeme všechny jazykové balíčky pro Zabbix frontend:</p>


<section id="block-code-block_1f941763463d87aa15d098b49ca0fc71" data-id="block-code-block_1f941763463d87aa15d098b49ca0fc71" class="gt-block block-code">
    <pre><code>dnf install glibc-langpack-en glibc-langpack-cs glibc-langpack-sk glibc-langpack-fr glibc-langpack-de glibc-langpack-es glibc-langpack-it glibc-langpack-zh glibc-langpack-pt glibc-langpack-da glibc-langpack-nb glibc-langpack-pl glibc-langpack-tr glibc-langpack-he glibc-langpack-ja glibc-langpack-ko glibc-langpack-ru glibc-langpack-uk glibc-langpack-ca glibc-langpack-ka glibc-langpack-vi glibc-langpack-uz</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A nakonec restartujeme všechny související služby a&nbsp;nastavíme je tak, aby se spouštěly automaticky po&nbsp;startu:</p>


<section id="block-code-block_63842e571ac6323dbfc4b13bb6a1a441" data-id="block-code-block_63842e571ac6323dbfc4b13bb6a1a441" class="gt-block block-code">
    <pre><code>systemctl restart zabbix-server zabbix-web-service zabbix-agent2 httpd php-fpm
systemctl enable zabbix-server zabbix-web-service zabbix-agent2 httpd php-fpm</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Pro ověření stavu, že nám Zabbix server nastartoval v&nbsp;pořádku můžeme kromě jiného zkontrolovat i&nbsp;jeho log soubor:</p>


<section id="block-code-block_4d83b05756702e0755bea7a89f539375" data-id="block-code-block_4d83b05756702e0755bea7a89f539375" class="gt-block block-code">
    <pre><code>less /var/log/zabbix/zabbix_server.log</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V případě, že uvidíte v&nbsp;log souboru zprávu o&nbsp;tom, že je verze TimescaleDB příliš nová, pak to není žádný velký problém. Zabbix nedokáže dostatečně rychle reagovat na&nbsp;nejnovější verze TimescaleDB tak, aby ji ve svém kódu nastavil jako podporovanou, ovšem kompatibilita je Zabbixem zaručena a&nbsp;námi ověřena.</p>



<p>V případě této chyby stačí otevřít konfigurační soubor Zabbix serveru v&nbsp;cestě <code>/etc/zabbix/zabbix_server.conf</code> a&nbsp;zde upravte následující konfigurační parametr:</p>


<section id="block-code-block_e9dddb8ee1c2e67a0b3f2b122d2be8c8" data-id="block-code-block_e9dddb8ee1c2e67a0b3f2b122d2be8c8" class="gt-block block-code">
    <pre><code>AllowUnsupportedDBVersions=1</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Soubor s&nbsp;tímto nastavením uložte a&nbsp;zrestartujte systémovou službu Zabbix serveru.</p>


<section id="block-code-block_4b9bf34201b94ec6e590079f2b65b369" data-id="block-code-block_4b9bf34201b94ec6e590079f2b65b369" class="gt-block block-code">
    <pre><code>systemctl restart zabbix-server</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Nastavení Zabbix frontendu</h2>



<p>V prohlížeči si otevřeme cílové URL, na&nbsp;kterém Zabbix běží. Například tedy <code>http://192.168.0.50/zabbix</code>, kde nás uvítá průvodce prvotní instalací.</p>



<p>Po zvolení implicitního jazyka se tlačítkem <strong>Next step</strong> posuneme na&nbsp;stránku s&nbsp;kontrolou minimálních požadavků.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1794" height="1122" src="https://www.initmax.cz/wp-content/uploads/2025/04/install74.png" alt="" class="wp-image-18221" srcset="https://www.initmax.cz/wp-content/uploads/2025/04/install74.png 1794w, https://www.initmax.cz/wp-content/uploads/2025/04/install74-300x188.png 300w, https://www.initmax.cz/wp-content/uploads/2025/04/install74-1024x640.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/04/install74-768x480.png 768w, https://www.initmax.cz/wp-content/uploads/2025/04/install74-1536x961.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/04/install74-608x380.png 608w, https://www.initmax.cz/wp-content/uploads/2025/04/install74-1216x761.png 1216w" sizes="auto, (max-width: 1794px) 100vw, 1794px" /></figure>



<p>Pokud je kontrola v&nbsp;pořádku, pak se tedy můžeme kliknutím na&nbsp;<code>Next step</code> posunout na&nbsp;další stránku s&nbsp;nastavením připojení do&nbsp;databáze.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1794" height="1134" src="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-2.png" alt="" class="wp-image-16593" srcset="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-2.png 1794w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-2-300x190.png 300w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-2-1024x647.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-2-768x485.png 768w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-2-1536x971.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-2-608x384.png 608w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-2-1216x769.png 1216w" sizes="auto, (max-width: 1794px) 100vw, 1794px" /></figure>



<p>Zde vyplňujeme pouze políčko <strong>Password</strong> pro přístup do&nbsp;databáze, nic dalšího není třeba měnit.</p>



<p>Po vyplnění opět klikneme na&nbsp;<strong>Next step</strong>.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1794" height="1134" src="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-3.png" alt="" class="wp-image-16591" srcset="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-3.png 1794w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-3-300x190.png 300w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-3-1024x647.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-3-768x485.png 768w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-3-1536x971.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-3-608x384.png 608w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-3-1216x769.png 1216w" sizes="auto, (max-width: 1794px) 100vw, 1794px" /></figure>



<p>Na následující stránce se základním nastavením vyplníme název serveru, časové pásmo, a&nbsp;kliknutím na&nbsp;<strong>Next step</strong> pokračujeme k&nbsp;souhrnu konfigurace.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1796" height="1124" src="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-4.png" alt="" class="wp-image-16589" srcset="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-4.png 1796w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-4-300x188.png 300w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-4-1024x641.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-4-768x481.png 768w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-4-1536x961.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-4-608x381.png 608w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-4-1216x761.png 1216w" sizes="auto, (max-width: 1796px) 100vw, 1796px" /></figure>



<p>V tomto souhrnu zkontrolumeme všechny zadané hodnoty a&nbsp;kliknutím na&nbsp;<strong>Next step</strong> dokončíme instalaci.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1792" height="1136" src="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-5.png" alt="" class="wp-image-16587" srcset="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-5.png 1792w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-5-300x190.png 300w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-5-1024x649.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-5-768x487.png 768w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-5-1536x974.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-5-608x385.png 608w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-5-1216x771.png 1216w" sizes="auto, (max-width: 1792px) 100vw, 1792px" /></figure>



<p>Nyní již kliknutím na&nbsp;tlačítko <strong>Finish</strong> přejdeme na&nbsp;přihlašovací obrazovku.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1796" height="1130" src="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-6.png" alt="" class="wp-image-16585" srcset="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-6.png 1796w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-6-300x189.png 300w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-6-1024x644.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-6-768x483.png 768w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-6-1536x966.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-6-608x383.png 608w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-6-1216x765.png 1216w" sizes="auto, (max-width: 1796px) 100vw, 1796px" /></figure>



<p>Po úspěšném přihlášení pomocí dříve zadaných údajů můžeme začít používat nejnovější Zabbix verze 7.4 (<strong>Admin/zabbix</strong>).</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2422" height="1112" src="https://www.initmax.cz/wp-content/uploads/2025/04/login74.png" alt="" class="wp-image-18219" srcset="https://www.initmax.cz/wp-content/uploads/2025/04/login74.png 2422w, https://www.initmax.cz/wp-content/uploads/2025/04/login74-300x138.png 300w, https://www.initmax.cz/wp-content/uploads/2025/04/login74-1024x470.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/04/login74-768x353.png 768w, https://www.initmax.cz/wp-content/uploads/2025/04/login74-1536x705.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/04/login74-2048x940.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/04/login74-608x279.png 608w, https://www.initmax.cz/wp-content/uploads/2025/04/login74-1216x558.png 1216w" sizes="auto, (max-width: 2422px) 100vw, 2422px" /></figure>



<p>A takto vypada úvodní dashboard nového Zabbixu 7.4:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="3024" height="1578" src="https://www.initmax.cz/wp-content/uploads/2025/04/dashboard74.png" alt="" class="wp-image-18217" srcset="https://www.initmax.cz/wp-content/uploads/2025/04/dashboard74.png 3024w, https://www.initmax.cz/wp-content/uploads/2025/04/dashboard74-300x157.png 300w, https://www.initmax.cz/wp-content/uploads/2025/04/dashboard74-1024x534.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/04/dashboard74-768x401.png 768w, https://www.initmax.cz/wp-content/uploads/2025/04/dashboard74-1536x802.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/04/dashboard74-2048x1069.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/04/dashboard74-608x317.png 608w, https://www.initmax.cz/wp-content/uploads/2025/04/dashboard74-1216x635.png 1216w" sizes="auto, (max-width: 3024px) 100vw, 3024px" /></figure>



<h2 class="wp-block-heading">Nastavení Zabbix reportingu</h2>



<p>Proto, aby byl plně funkční reporting se všemi jeho vylepšeními si nejprve musíme nainstalovat Google Chrome.</p>



<p>Následujícím příkazem stáhneme instalační balíček, a&nbsp;ten také nainstalujeme:</p>


<section id="block-code-block_e7ddfcd3d012a957987f05c114599791" data-id="block-code-block_e7ddfcd3d012a957987f05c114599791" class="gt-block block-code">
    <pre><code>wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
dnf localinstall google-chrome-stable_current_x86_64.rpm</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V dalším kroku upravíme v&nbsp;Zabbix frontendu parametr &#8222;<strong>Frontend URL</strong>&#8220; na&nbsp;aktuálně platnou hodnotu, toto nastavení se nachází zde:</p>


<section id="block-code-block_9b5e25e8ab97eeda63b9ccd55314c368" data-id="block-code-block_9b5e25e8ab97eeda63b9ccd55314c368" class="gt-block block-code">
    <pre><code>Administration -&gt; General -&gt; Other</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Příklad této konfigurace pak můžete vidět na&nbsp;obrázku níže.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1652" height="1364" src="https://www.initmax.cz/wp-content/uploads/2025/04/general74.png" alt="" class="wp-image-18227" srcset="https://www.initmax.cz/wp-content/uploads/2025/04/general74.png 1652w, https://www.initmax.cz/wp-content/uploads/2025/04/general74-300x248.png 300w, https://www.initmax.cz/wp-content/uploads/2025/04/general74-1024x845.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/04/general74-768x634.png 768w, https://www.initmax.cz/wp-content/uploads/2025/04/general74-1536x1268.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/04/general74-608x502.png 608w, https://www.initmax.cz/wp-content/uploads/2025/04/general74-1216x1004.png 1216w" sizes="auto, (max-width: 1652px) 100vw, 1652px" /></figure>



<hr class="wp-block-separator has-alpha-channel-opacity"/>
</div></div>



<div id="debian" class="wp-block-group"><div class="wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained">
<h2 class="wp-block-heading">Instalace závislostí</h2>


<section id="block-code-block_ac1a351fed849dedcb5917a6c4eec180" data-id="block-code-block_ac1a351fed849dedcb5917a6c4eec180" class="gt-block block-code">
    <pre><code>apt install sudo gpg curl wget</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Instalace PostgreSQL</h2>



<p>V prvním kroku si nainstalujeme repozitáře pro PostgreSQL a&nbsp;zakážeme výchozí systémové repozitáře PostgreSQL. Na&nbsp;otázku &#8218;<strong>This script will enable the PostgreSQL APT repository on apt.postgresql.org on your system. The distribution codename used will be bookworm-pgdg.</strong>&#8218; stiskněte <strong>Enter </strong>pro pokračování a&nbsp;potvrzení instalace z&nbsp;oficiálního repozitáře.</p>


<section id="block-code-block_125f2ec0ec1eba3998f663b94d4e819a" data-id="block-code-block_125f2ec0ec1eba3998f663b94d4e819a" class="gt-block block-code">
    <pre><code>apt install -y postgresql-common
/usr/share/postgresql-common/pgdg/apt.postgresql.org.sh</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Následně pak nainstalujeme PostgreSQL, v&nbsp;tomto případě to bude aktuálně podporovaná verze 17.</p>


<section id="block-code-block_df933ce8112d08b1add3e5fa0cec7e1e" data-id="block-code-block_df933ce8112d08b1add3e5fa0cec7e1e" class="gt-block block-code">
    <pre><code>apt -y install postgresql-17</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nastartování PostgreSQL a&nbsp;nastavení automatického spuštění při&nbsp;startu systému</p>


<section id="block-code-block_639700e5228dcb75bfb377b8ce53c16a" data-id="block-code-block_639700e5228dcb75bfb377b8ce53c16a" class="gt-block block-code">
    <pre><code>systemctl enable postgresql --now</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Instalace Zabbix serveru a&nbsp;jeho součástí</h2>



<p>Databáze je nyní nainstalovaná, a&nbsp;můžeme tedy přikročit k&nbsp;instalaci Zabbix serveru a&nbsp;všech jeho součástí.</p>



<p>Přidáme si repozitáře Zabbixu a&nbsp;vyčistíme instalační cache.</p>


<section id="block-code-block_08b27a38ca705fa4c88eec64013f60a1" data-id="block-code-block_08b27a38ca705fa4c88eec64013f60a1" class="gt-block block-code">
    <pre><code>wget https://repo.zabbix.com/zabbix/7.4/release/debian/pool/main/z/zabbix-release/zabbix-release_latest_7.4+debian12_all.deb
dpkg -i zabbix-release_latest_7.4+debian12_all.deb
apt update</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A nainstalujeme všechny potřebné součásti Zabbixu.</p>



<p>V tomto případě použijeme jako primárního monitorovacího agenta Zabbix Agent 2, který vám doporučujeme používat, jelikož přináší daleko více funkcionalit.</p>


<section id="block-code-block_50d852b6d03b444533c9eb174e951163" data-id="block-code-block_50d852b6d03b444533c9eb174e951163" class="gt-block block-code">
    <pre><code>apt install zabbix-server-pgsql zabbix-frontend-php php8.2-pgsql zabbix-apache-conf zabbix-sql-scripts zabbix-agent2 zabbix-web-service</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Inicializace databáze</h2>



<p>Nejprve vytvoříme databázového uživatele pro Zabbix. Během procesu budeme vyzváni k&nbsp;zadání jeho přístupového hesla. Dále vytvoříme prázdnou databázi a&nbsp;nastavíme jí příslušná oprávnění.</p>


<section id="block-code-block_09ef734d11d79a2af6fcf0ad9a1b521a" data-id="block-code-block_09ef734d11d79a2af6fcf0ad9a1b521a" class="gt-block block-code">
    <pre><code>sudo -u postgres createuser --pwprompt zabbix
sudo -u postgres createdb -O zabbix zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V tuto chvíli jsme schopni naimportovat výchozí schéma a&nbsp;data. Opět budeme vyzváni k&nbsp;zadání hesla. <br>Zde použijeme heslo z&nbsp;předchozího kroku.</p>


<section id="block-code-block_b95bbe837d3ed1dde95b893045a4698d" data-id="block-code-block_b95bbe837d3ed1dde95b893045a4698d" class="gt-block block-code">
    <pre><code>zcat /usr/share/zabbix/sql-scripts/postgresql/server.sql.gz | sudo -u zabbix psql zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Instalace TimescaleDB</h2>



<p>Nyní se pustíme do&nbsp;instalace TimescaleDB a&nbsp;začneme tím, že přidáme její oficiální repozitář.</p>


<section id="block-code-block_67897a2550f829ddf864800685e9ef54" data-id="block-code-block_67897a2550f829ddf864800685e9ef54" class="gt-block block-code">
    <pre><code>echo &quot;deb https://packagecloud.io/timescale/timescaledb/debian/ $(lsb_release -c -s) main&quot; | sudo tee /etc/apt/sources.list.d/timescaledb.list
wget --quiet -O - https://packagecloud.io/timescale/timescaledb/gpgkey | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/timescaledb.gpg</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nainstalujme TimescaleDB.</p>


<section id="block-code-block_e4204362aed0d48c509c76853c6c7efc" data-id="block-code-block_e4204362aed0d48c509c76853c6c7efc" class="gt-block block-code">
    <pre><code>apt update
apt install timescaledb-2-postgresql-17 timescaledb-2-loader-postgresql-17</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Spustíme utilitu <code>timescaledb-tune</code> a&nbsp;jako parametr jí předáme vyšší hodnotu maximálního množství připojení (<code>--max-conns</code>), které pro tyto testovací účely nastavíme na&nbsp;<code>125</code>.</p>



<p>Tato utilita slouží k&nbsp;přizpůsobení výchozího nastavení PostgreSQL vůčihledně výkonu a&nbsp;adekvátnímu nastavení parametrů PostgreSQL pro fungování s&nbsp;TimescaleDB.</p>



<p>Zároveň nám tato utilit pomocí instalačního průvodce pomůže vybrat aktuální a&nbsp;platný konfigurační soubor PostgreSQL a&nbsp;nastaví i&nbsp;automatické načítání knihoven TimescaleDB.</p>



<p>Prosím, odpovídejte &#8222;ano&#8220; (y) na&nbsp;všechny otázky. Pozor, automatický tuner předpokládá, že PostgreSQL běží na&nbsp;samostatném serveru, a&nbsp;proto může být potřeba případně upravit parametry.</p>


<section id="block-code-block_669744d7910721dcd9f39a072871b709" data-id="block-code-block_669744d7910721dcd9f39a072871b709" class="gt-block block-code">
    <pre><code>timescaledb-tune --pg-config /usr/bin --max-conns=125</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1158" height="582" src="https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72-tune-debian.png" alt="" class="wp-image-17171" srcset="https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72-tune-debian.png 1158w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72-tune-debian-300x151.png 300w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72-tune-debian-1024x515.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72-tune-debian-768x386.png 768w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72-tune-debian-608x306.png 608w" sizes="auto, (max-width: 1158px) 100vw, 1158px" /></figure>



<p>Následně restartujeme systémovou službu pro PostgreSQL:</p>


<section id="block-code-block_6ee12845da04206be2a21966b0b6be5e" data-id="block-code-block_6ee12845da04206be2a21966b0b6be5e" class="gt-block block-code">
    <pre><code>systemctl restart postgresql</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Zbývá již jen vytvořit a&nbsp;aktivovat samotnou TimescaleDB:</p>



<p><strong>Pozor:</strong> Během vývoje došlo ke změně cesty z&nbsp;původní <code>/usr/share/zabbix-sql-scripts/postgresql/timescaledb/schema.sql</code> na&nbsp;novou<code> /usr/share/zabbix/sql-scripts/postgresql/timescaledb/schema.sql</code>.</p>


<section id="block-code-block_589b4abe05cef974c1067fd4b41cece8" data-id="block-code-block_589b4abe05cef974c1067fd4b41cece8" class="gt-block block-code">
    <pre><code>echo &quot;CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;&quot; | sudo -u postgres psql zabbix
cat /usr/share/zabbix/sql-scripts/postgresql/timescaledb/schema.sql | sudo -u zabbix psql zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Nastavení Zabbix serveru</h2>



<p>Otevřeme konfigurační soubor Zabbix serveru v&nbsp;cestě:</p>


<section id="block-code-block_1e431d0344c6f82381d9cb6dc331515d" data-id="block-code-block_1e431d0344c6f82381d9cb6dc331515d" class="gt-block block-code">
    <pre><code>nano /etc/zabbix/zabbix_server.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V tomto konfiguračním souboru upravíme následující parametry tak, jak vídíte na&nbsp;předloze níže:</p>


<section id="block-code-block_980a28eb2aa5656d6dfb40035b1cbe08" data-id="block-code-block_980a28eb2aa5656d6dfb40035b1cbe08" class="gt-block block-code">
    <pre><code>...
DBPassword=password
StartReportWriters=1
WebServiceURL=http://localhost:10053/report
...</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V dalším kroku nastavíme jazykové balíčky pro Zabbix frontend. Můžete zvolit pouze ty, které potřebujete, nebo povolit všechny.</p>


<section id="block-code-block_84d2fcb42341003cef4e82ca92513ec4" data-id="block-code-block_84d2fcb42341003cef4e82ca92513ec4" class="gt-block block-code">
    <pre><code>sed -i &#039;/# en_US.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# en_GB.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# cs_CZ.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# sk_SK.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# fr_FR.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# de_DE.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# es_ES.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# it_IT.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# zh_CN.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# pt_PT.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# pt_BR.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# da_DK.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# nb_NO.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# pl_PL.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# tr_TR.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# he_IL.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# ja_JP.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# ko_KR.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# ru_RU.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# uk_UA.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# ca_ES.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# ka_GE.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# uz_UZ.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# vi_VN UTF-8/s/^# //&#039; /etc/locale.gen
locale-gen</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A nakonec restartujeme všechny související služby a&nbsp;nastavíme je tak, aby se spouštěly automaticky po&nbsp;startu:</p>


<section id="block-code-block_38fec4ff688e16e5bb91ee8bcbbebee8" data-id="block-code-block_38fec4ff688e16e5bb91ee8bcbbebee8" class="gt-block block-code">
    <pre><code>systemctl restart zabbix-server zabbix-web-service zabbix-agent2 apache2
systemctl enable zabbix-server zabbix-web-service zabbix-agent2 apache2</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Pro ověření stavu, že nám Zabbix server nastartoval v&nbsp;pořádku můžeme kromě jiného zkontrolovat i&nbsp;jeho log soubor:</p>


<section id="block-code-block_4d83b05756702e0755bea7a89f539375" data-id="block-code-block_4d83b05756702e0755bea7a89f539375" class="gt-block block-code">
    <pre><code>less /var/log/zabbix/zabbix_server.log</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V případě, že uvidíte v&nbsp;log souboru zprávu o&nbsp;tom, že je verze TimescaleDB příliš nová, pak to není žádný velký problém. Zabbix nedokáže dostatečně rychle reagovat na&nbsp;nejnovější verze TimescaleDB tak, aby ji ve svém kódu nastavil jako podporovanou, ovšem kompatibilita je Zabbixem zaručena a&nbsp;námi ověřena.</p>



<p>V případě této chyby stačí otevřít konfigurační soubor Zabbix serveru v&nbsp;cestě <code>/etc/zabbix/zabbix_server.conf</code> a&nbsp;zde upravte následující konfigurační parametr:</p>


<section id="block-code-block_e9dddb8ee1c2e67a0b3f2b122d2be8c8" data-id="block-code-block_e9dddb8ee1c2e67a0b3f2b122d2be8c8" class="gt-block block-code">
    <pre><code>AllowUnsupportedDBVersions=1</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Soubor s&nbsp;tímto nastavením uložte a&nbsp;zrestartujte systémovou službu Zabbix serveru.</p>


<section id="block-code-block_4b9bf34201b94ec6e590079f2b65b369" data-id="block-code-block_4b9bf34201b94ec6e590079f2b65b369" class="gt-block block-code">
    <pre><code>systemctl restart zabbix-server</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Nastavení Zabbix frontendu</h2>



<p>V prohlížeči si otevřeme cílové URL, na&nbsp;kterém Zabbix běží. Například tedy <code>http://192.168.0.50/zabbix</code>, kde nás uvítá průvodce prvotní instalací.</p>



<p>Po zvolení implicitního jazyka se tlačítkem <strong>Next step</strong> posuneme na&nbsp;stránku s&nbsp;kontrolou minimálních požadavků.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1794" height="1122" src="https://www.initmax.cz/wp-content/uploads/2025/04/install74.png" alt="" class="wp-image-18221" srcset="https://www.initmax.cz/wp-content/uploads/2025/04/install74.png 1794w, https://www.initmax.cz/wp-content/uploads/2025/04/install74-300x188.png 300w, https://www.initmax.cz/wp-content/uploads/2025/04/install74-1024x640.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/04/install74-768x480.png 768w, https://www.initmax.cz/wp-content/uploads/2025/04/install74-1536x961.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/04/install74-608x380.png 608w, https://www.initmax.cz/wp-content/uploads/2025/04/install74-1216x761.png 1216w" sizes="auto, (max-width: 1794px) 100vw, 1794px" /></figure>



<p>Pokud je kontrola v&nbsp;pořádku, pak se tedy můžeme kliknutím na&nbsp;<strong>Next step</strong> posunout na&nbsp;další stránku s&nbsp;nastavením připojení do&nbsp;databáze.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1794" height="1134" src="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-2.png" alt="" class="wp-image-16593" srcset="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-2.png 1794w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-2-300x190.png 300w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-2-1024x647.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-2-768x485.png 768w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-2-1536x971.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-2-608x384.png 608w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-2-1216x769.png 1216w" sizes="auto, (max-width: 1794px) 100vw, 1794px" /></figure>



<p>Zde vyplňujeme pouze políčko <strong>Password</strong> pro přístup do&nbsp;databáze, nic dalšího není třeba měnit.</p>



<p>Po vyplnění opět klikneme na&nbsp;<strong>Next step</strong>.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1794" height="1134" src="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-3.png" alt="" class="wp-image-16591" srcset="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-3.png 1794w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-3-300x190.png 300w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-3-1024x647.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-3-768x485.png 768w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-3-1536x971.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-3-608x384.png 608w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-3-1216x769.png 1216w" sizes="auto, (max-width: 1794px) 100vw, 1794px" /></figure>



<p>Na následující stránce se základním nastavením vyplníme název serveru, časové pásmo, a&nbsp;kliknutím na&nbsp;<strong>Next step</strong> pokračujeme k&nbsp;souhrnu konfigurace.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1796" height="1124" src="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-4.png" alt="" class="wp-image-16589" srcset="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-4.png 1796w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-4-300x188.png 300w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-4-1024x641.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-4-768x481.png 768w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-4-1536x961.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-4-608x381.png 608w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-4-1216x761.png 1216w" sizes="auto, (max-width: 1796px) 100vw, 1796px" /></figure>



<p>V tomto souhrnu zkontrolumeme všechny zadané hodnoty a&nbsp;kliknutím na&nbsp;<strong>Next step</strong> dokončíme instalaci.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1792" height="1136" src="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-5.png" alt="" class="wp-image-16587" srcset="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-5.png 1792w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-5-300x190.png 300w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-5-1024x649.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-5-768x487.png 768w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-5-1536x974.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-5-608x385.png 608w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-5-1216x771.png 1216w" sizes="auto, (max-width: 1792px) 100vw, 1792px" /></figure>



<p>Nyní již kliknutím na&nbsp;tlačítko <strong>Finish</strong> přejdeme na&nbsp;přihlašovací obrazovku.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1796" height="1130" src="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-6.png" alt="" class="wp-image-16585" srcset="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-6.png 1796w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-6-300x189.png 300w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-6-1024x644.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-6-768x483.png 768w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-6-1536x966.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-6-608x383.png 608w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-6-1216x765.png 1216w" sizes="auto, (max-width: 1796px) 100vw, 1796px" /></figure>



<p>Po úspěšném přihlášení pomocí dříve zadaných údajů můžeme začít používat nejnovější Zabbix verze 7.4 (<code><strong>Admin/zabbix</strong></code>).</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2422" height="1112" src="https://www.initmax.cz/wp-content/uploads/2025/04/login74.png" alt="" class="wp-image-18219" srcset="https://www.initmax.cz/wp-content/uploads/2025/04/login74.png 2422w, https://www.initmax.cz/wp-content/uploads/2025/04/login74-300x138.png 300w, https://www.initmax.cz/wp-content/uploads/2025/04/login74-1024x470.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/04/login74-768x353.png 768w, https://www.initmax.cz/wp-content/uploads/2025/04/login74-1536x705.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/04/login74-2048x940.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/04/login74-608x279.png 608w, https://www.initmax.cz/wp-content/uploads/2025/04/login74-1216x558.png 1216w" sizes="auto, (max-width: 2422px) 100vw, 2422px" /></figure>



<p>A takto vypada úvodní dashboard nového Zabbixu 7.4:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="3024" height="1578" src="https://www.initmax.cz/wp-content/uploads/2025/04/dashboard74.png" alt="" class="wp-image-18217" srcset="https://www.initmax.cz/wp-content/uploads/2025/04/dashboard74.png 3024w, https://www.initmax.cz/wp-content/uploads/2025/04/dashboard74-300x157.png 300w, https://www.initmax.cz/wp-content/uploads/2025/04/dashboard74-1024x534.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/04/dashboard74-768x401.png 768w, https://www.initmax.cz/wp-content/uploads/2025/04/dashboard74-1536x802.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/04/dashboard74-2048x1069.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/04/dashboard74-608x317.png 608w, https://www.initmax.cz/wp-content/uploads/2025/04/dashboard74-1216x635.png 1216w" sizes="auto, (max-width: 3024px) 100vw, 3024px" /></figure>



<h2 class="wp-block-heading">Nastavení Zabbix reportingu</h2>



<p>Proto, aby byl plně funkční reporting se všemi jeho vylepšeními si nejprve musíme nainstalovat Google Chrome.</p>



<p>Následujícím příkazem stáhneme instalační balíček, a&nbsp;ten také nainstalujeme:</p>


<section id="block-code-block_ef19207116bdd9527d1c7d5a42283fb1" data-id="block-code-block_ef19207116bdd9527d1c7d5a42283fb1" class="gt-block block-code">
    <pre><code>curl -fSsL https://dl.google.com/linux/linux_signing_key.pub | sudo gpg --dearmor | sudo tee /usr/share/keyrings/google-chrome.gpg &gt;&gt; /dev/null
echo deb [arch=amd64 signed-by=/usr/share/keyrings/google-chrome.gpg] http://dl.google.com/linux/chrome/deb/ stable main | sudo tee /etc/apt/sources.list.d/google-chrome.list
apt update
apt install google-chrome-stable</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V dalším kroku upravíme v&nbsp;Zabbix frontendu parametr &#8222;<strong>Frontend URL</strong>&#8220; na&nbsp;aktuálně platnou hodnotu, toto nastavení se nachází zde:</p>


<section id="block-code-block_9b5e25e8ab97eeda63b9ccd55314c368" data-id="block-code-block_9b5e25e8ab97eeda63b9ccd55314c368" class="gt-block block-code">
    <pre><code>Administration -&gt; General -&gt; Other</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Příklad této konfigurace pak můžete vidět na&nbsp;obrázku níže.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1652" height="1364" src="https://www.initmax.cz/wp-content/uploads/2025/04/general74.png" alt="" class="wp-image-18227" srcset="https://www.initmax.cz/wp-content/uploads/2025/04/general74.png 1652w, https://www.initmax.cz/wp-content/uploads/2025/04/general74-300x248.png 300w, https://www.initmax.cz/wp-content/uploads/2025/04/general74-1024x845.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/04/general74-768x634.png 768w, https://www.initmax.cz/wp-content/uploads/2025/04/general74-1536x1268.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/04/general74-608x502.png 608w, https://www.initmax.cz/wp-content/uploads/2025/04/general74-1216x1004.png 1216w" sizes="auto, (max-width: 1652px) 100vw, 1652px" /></figure>
</div></div>



<h2 class="wp-block-heading">Dokončovací práce</h2>



<ul class="wp-block-list">
<li>Zkontrolujte, že správně běží Zabbix server, databázový server a&nbsp;mají správnou verzi</li>



<li>Zkontrolujte také, zda při&nbsp;startu serveru nebo proxy v&nbsp;systému neuvidíte následující chybu: ‚<strong>…the user limit of 1024 file descriptors is insufficient. The maximum number of concurrent checks per worker has been reduced…</strong>‘ <a href="https://www.initmax.cz/wiki/zabbix-7-0-a-navyseni-systemovych-limitu/">Návod na&nbsp;odstranění naleznete na&nbsp;naší wiki</a>.</li>
</ul>



<h2 class="wp-block-heading">Podpora pro Item Browser</h2>



<p>Veškeré potřebné kroky naleznete v&nbsp;<a href="https://www.initmax.cz/wiki/instalace-a-zakladni-pouziti-pro-item-browser/">samostatném návodu na&nbsp;naší wiki<strong>.</strong></a></p>


<section id="block-webinar-block_12a6e0aa302c48f95d232923d37c5632" data-id="block-webinar-block_12a6e0aa302c48f95d232923d37c5632" class="gt-block block-webinar">
    <div class="connected-webinars__grid">
        <a href="https://www.initmax.cz/webinar/7-0-workshop-zabbix-7-0-monitorovani-pomoci-browser-item-pomoci-aplikace-selenium/" class="grid-item">
	<article class="webinar-promotion">
		<div class="webinar-promotion__thumbnail-wrap">
			<figure class="webinar-promotion__thumbnail">
					<img decoding="async" src="https://www.initmax.cz/wp-content/uploads/2024/05/ilustrace_webinare_zabbix_7.0_13_thumbnail_web-copy-2.png"
				 width="400"
		 height="250"
		 class=""
		 alt="7.0 Workshop: Zabbix 7.0 &#8211; Monitorování pomocí Browser Item pomocí aplikace Selenium"
		 loading="lazy"	>
									<div class="webinar-promotion__tags">
						<span class="tag tag--small" style="color:#ffffff;background-color:#4caf50;">Nový</span><span class="tag tag--small" style="color:#ffffff;background-color:#d40000;">Zabbix</span>					</div>
							</figure>
		</div>
		<div class="webinar-promotion__text">
			<div>
									<time datetime="2024-06-21">21.&nbsp;6.&nbsp;2024</time>
							</div>
			<h3 class="webinar-promotion__title">7.0 Workshop: Zabbix 7.0 &#8211; Monitorování pomocí Browser Item pomocí aplikace Selenium</h3>
			<div class="icon-link">
				<figure class="icon-wrap icon-wrap--primary"><svg data-name="Group 3411" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 455" d="M0,0H24V24H0Z" fill="none"/><path data-name="Path 456" d="M15,10l4.553-2.276A1,1,0,0,1,21,8.618v6.764a1,1,0,0,1-1.447.894L15,14V10Z" transform="translate(0 0)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><rect data-name="Rectangle 1286" width="12" height="12" rx="2" transform="translate(3.112 6)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</figure>
				<span>Zhlédnout záznam</span>
			</div>
		</div>
	</article>
</a>    </div>
</section>



<h2 class="wp-block-heading">Vlastní rebranding</h2>



<p>Veškeré potřebné kroky naleznete v&nbsp;<a href="https://www.initmax.cz/wiki/rebranding-zabbixu/">samostatném návodu na&nbsp;naší wiki<strong>.</strong></a></p>


<section id="block-newsletter-block_62e4425cd28ed70be33cf83e9739d909" data-id="block-newsletter-block_62e4425cd28ed70be33cf83e9739d909" class="gt-block block-newsletter">
    <section id="newsletter" class="newsletter">
	<div class="gradient basic">
		<div class="newsletter__inner width width--general">
			<div class="col left">
									<h2 class="newsletter__title">Buďte v&nbsp;obraze s&nbsp;naším newsletterem</h2>
													<div class="newsletter__content"><p>Díky initMAX newsletteru Vám neunikne žádná z&nbsp;pozvánek na&nbsp;akce a&nbsp;webináře, žádný z&nbsp;tipů, jak dostat ze svého IT MAXimum, ani ověřené informace o&nbsp;novinkách ze světa Zabbix a&nbsp;dalších technologií.</p>
</div>
							</div>
			<div class="col right form-wrapper">
				<div class="newsletter-form">
	<form method="post" action="/wiki/kapitola/zabbix/feed/" enctype="multipart/form-data">
		<input type="hidden" name="url" value="https://www.initmax.cz/wiki/kapitola/zabbix/feed/">

		<div class="inputs">

			<label for="newsletter-form_contact_email" class="top">Vaše e-mailová adresa:</label>
			<div class="df">

				<div class="input">
					<input type="text" id="newsletter-form_contact_email" name="newsletter_email" placeholder="@" data-format="email" data-required="1">
									</div><!-- /.input -->

				<a href="#" class="btn btn--white sendBtn">Odeslat</a>

			</div>

			<div class="bottom nm">
				<label for="newsletter-form_gdpr" class="checkbox gdpr">
					<input type="checkbox" id="newsletter-form_gdpr" name="newsletter_gdpr">
					<span>Souhlasím se&nbsp;<a href="https://www.initmax.cz/ochrana-osobnich-udaju/" target="_blank">zpracováním osobních údajů</a>.</span>
				</label>
			</div>

		</div><!-- /.inputs -->
		<div class="sent hidden">
			<div class="iconOk"><h3>Děkujeme, že jste se přihlásili k&nbsp;odběru našeho newsletteru.</h3>
</div>
			<button class="sent__close" title="Zavřít" onclick="closeFormMessage(this,event)"><svg data-name="Group 3602" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 3272" d="M0,0H24V24H0Z" fill="none"/><line data-name="Line 98" y2="14" transform="translate(7.05 7.05) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 99" x2="14" transform="translate(7.05 16.95) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</button>
		</div><!-- /.sent -->
	</form>
</div>			</div>
		</div>
	</div>
</section></section>



<section id="social-links-block_6a5156a032db586fa5a8c6584ae45e2c" data-id="social-links-block_6a5156a032db586fa5a8c6584ae45e2c" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>

<p>The post <a href="https://www.initmax.cz/wiki/zabbix-7-4-navod-na-instalaci-v-5-minutach/">Zabbix 7.4 &#8211; návod na&nbsp;instalaci v&nbsp;5 minutách</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>SELinux: integrace se Zabbixem a&#160;dalšími nástroji</title>
		<link>https://www.initmax.cz/wiki/selinux-integrace-se-zabbixem-a-dalsimi-nastroji/</link>
		
		<dc:creator><![CDATA[Tomáš Heřmánek]]></dc:creator>
		<pubDate>Tue, 01 Apr 2025 17:45:09 +0000</pubDate>
				<guid isPermaLink="false">https://www.initmax.cz/?post_type=wiki&#038;p=18075</guid>

					<description><![CDATA[<p>V tomto článku se podrobně seznámíme se základy SELinuxu, jeho správnou integrací se Zabbixem a ukážeme si, jak efektivně vytvářet vlastní ...</p>
<p>The post <a href="https://www.initmax.cz/wiki/selinux-integrace-se-zabbixem-a-dalsimi-nastroji/">SELinux: integrace se Zabbixem a&nbsp;dalšími nástroji</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>V tomto článku se podrobně seznámíme se základy SELinuxu, jeho správnou integrací se Zabbixem a&nbsp;ukážeme si, jak efektivně vytvářet vlastní SELinux politiky pro řešení nejčastějších problémů. Dále si předvedeme, jak SELinux monitorovat přímo v&nbsp;Zabbixu, což vám pomůže zvýšit bezpečnost vašich systémů a&nbsp;zároveň usnadní každodenní administraci.</p>



<p>Návod je určen pro distribuce na&nbsp;bázi RPM. (RHEL, CentOS, Rocky Linux, ALMA, Fedora,&#8230;)</p>


<section id="social-links-block_045958faa643d5576bb3716715f042f3" data-id="social-links-block_045958faa643d5576bb3716715f042f3" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>




<h2 class="wp-block-heading">Co je SELinux a&nbsp;jak funguje?</h2>



<p>SELinux (Security-Enhanced Linux) je bezpečnostní modul Linuxu, který implementuje povinné řízení přístupu (Mandatory Access Control, MAC). Na&nbsp;rozdíl od standardního řízení přístupu (Discretionary Access Control, DAC), kde uživatelé určují práva ke svým souborům, MAC definuje bezpečnostní politiky spravované administrátorem, které omezují akce programů a&nbsp;uživatelů na&nbsp;základě jasně definovaných pravidel.</p>



<p>SELinux pracuje ve třech režimech:</p>



<ul class="wp-block-list">
<li><strong>Enforcing</strong>&nbsp;– politiky jsou vynucovány, přístup je aktivně blokován při&nbsp;porušení pravidel.</li>



<li><strong>Permissive</strong>&nbsp;– SELinux je aktivní, ale neblokuje přístup, pouze loguje porušení pravidel.</li>



<li><strong>Disabled</strong>&nbsp;– SELinux je zcela vypnutý.</li>
</ul>



<p>Stav SELinux zjistíte příkazem:</p>


<section id="block-code-block_27eaebe04fae70a7b1babe5e1fd2016c" data-id="block-code-block_27eaebe04fae70a7b1babe5e1fd2016c" class="gt-block block-code">
    <pre><code>sestatus</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Příklad výstupu:</p>


<section id="block-code-block_f93484d41366ef97e4fb10b5f809d6bd" data-id="block-code-block_f93484d41366ef97e4fb10b5f809d6bd" class="gt-block block-code">
    <pre><code>SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   enforcing
Mode from config file:          enforcing
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Max kernel policy version:      33</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<ul class="wp-block-list">
<li><code>enabled</code>&nbsp;– SELinux je aktivní.</li>



<li><code>enforcing</code>&nbsp;– Politika je vynucována.</li>



<li><code>targeted</code>&nbsp;– Používá se standardní cílená politika.</li>
</ul>



<h2 class="wp-block-heading">Zabbix balíček zabbix-selinux-policy</h2>



<p>Balíček&nbsp;<code>zabbix-selinux-policy</code>&nbsp;obsahuje specifická pravidla SELinuxu potřebná pro hladký běh Zabbix serveru, proxy a&nbsp;agenta, aniž by bylo nutné SELinux vypínat. Balíček je dostupný v&nbsp;oficiálním Zabbix repozitáři.</p>



<p>Instalace balíčku:</p>


<section id="block-code-block_36ba69ed4e771a961204ce250f91746f" data-id="block-code-block_36ba69ed4e771a961204ce250f91746f" class="gt-block block-code">
    <pre><code>dnf install zabbix-selinux-policy</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Dočasné vypnutí SELinuxu</h2>



<p>Pokud potřebujete SELinux rychle deaktivovat, použijte:</p>


<section id="block-code-block_1c1aef073c00d78dbeafcb916abfc4f3" data-id="block-code-block_1c1aef073c00d78dbeafcb916abfc4f3" class="gt-block block-code">
    <pre><code>setenforce 0</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<ul class="wp-block-list">
<li><code>0</code>&nbsp;znamená přepnutí do&nbsp;režimu&nbsp;<strong>Permissive</strong>&nbsp;(vše povoleno, incidenty se pouze logují).</li>



<li><code>1</code>&nbsp;znamená přepnutí zpět do&nbsp;režimu&nbsp;<strong>Enforcing</strong>&nbsp;(incidenty se blokují a&nbsp;logují).</li>
</ul>



<p>Změna je platná jen do&nbsp;restartu systému. Ověřit aktuální režim:</p>


<section id="block-code-block_51bd530936049b939ac9f6a8e74ac1e3" data-id="block-code-block_51bd530936049b939ac9f6a8e74ac1e3" class="gt-block block-code">
    <pre><code>getenforce</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Permanentní vypnutí SELinuxu</h2>



<p>Pro trvalé vypnutí SELinuxu upravte&nbsp;<code>/etc/selinux/config</code>:</p>


<section id="block-code-block_fdb30ba5c83db5b206f46617dee3393d" data-id="block-code-block_fdb30ba5c83db5b206f46617dee3393d" class="gt-block block-code">
    <pre><code>nano /etc/selinux/config</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Změňte:</p>


<section id="block-code-block_23d4410aa2c81ddb1c2398c6ba892793" data-id="block-code-block_23d4410aa2c81ddb1c2398c6ba892793" class="gt-block block-code">
    <pre><code>SELINUX=enforcing</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>na</p>


<section id="block-code-block_b442b249ae4fef97f2a5f9e0760ca33e" data-id="block-code-block_b442b249ae4fef97f2a5f9e0760ca33e" class="gt-block block-code">
    <pre><code>SELINUX=disabled</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Restartujte systém:</p>


<section id="block-code-block_676dda7cfa386ecc255bc06a1dca4a09" data-id="block-code-block_676dda7cfa386ecc255bc06a1dca4a09" class="gt-block block-code">
    <pre><code>reboot</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Opětovné zapnutí SELinuxu a&nbsp;relabel</h2>



<p>Pro opětovné aktivování&nbsp;SELinuxu je doporučeno nejprve nastavit režim&nbsp;<code><strong>permissive</strong></code>, ověřit správnost politik a&nbsp;teprve poté přejít do&nbsp;režimu&nbsp;<code><strong>enforcing</strong></code>. Nastavte tedy nejprve:</p>


<section id="block-code-block_0ec0ad4fb680ed0da81eb11f7ff5ad1c" data-id="block-code-block_0ec0ad4fb680ed0da81eb11f7ff5ad1c" class="gt-block block-code">
    <pre><code>SELINUX=permissive</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Poté nastavte relabel:</p>


<section id="block-code-block_d3e2019bd2489bec0050226e0e74a825" data-id="block-code-block_d3e2019bd2489bec0050226e0e74a825" class="gt-block block-code">
    <pre><code>touch /.autorelabel
reboot</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Soubor&nbsp;<code>.autorelabel</code>&nbsp;vytvořte přímo v&nbsp;<code>/</code>. Tento proces po&nbsp;restartu nastaví správné SELinux kontexty. Kontext souborů označuje metadata, která definují, jaká SELinux pravidla se na&nbsp;daný soubor vztahují. Pokud by relabel neproběhl, soubory (např.&nbsp;<code>/etc/passwd</code>) budou mít nesprávný nebo žádný kontext, což může vést k&nbsp;nemožnosti přihlášení.</p>



<p>Po ověření režimu permissive můžete přejít na&nbsp;enforcing. Nejprve změňte konfiguraci v&nbsp;souboru&nbsp;<code>/etc/selinux/config</code>:</p>


<section id="block-code-block_23d4410aa2c81ddb1c2398c6ba892793" data-id="block-code-block_23d4410aa2c81ddb1c2398c6ba892793" class="gt-block block-code">
    <pre><code>SELINUX=enforcing</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Tato změna se aplikuje po&nbsp;restartu systému. <strong>Pro okamžitou aplikaci změny bez restartu použijte příkaz</strong>:</p>


<section id="block-code-block_78e64d6cfdc926b24efb86814589fa21" data-id="block-code-block_78e64d6cfdc926b24efb86814589fa21" class="gt-block block-code">
    <pre><code>setenforce 1</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Vytváření vlastních politik SELinux</h2>



<p>Pokud SELinux blokuje operaci aplikace&nbsp;<code>zabbix_server</code>, zjistíte to z&nbsp;logů auditd:</p>


<section id="block-code-block_36e37923038cd81b68444b308b598c21" data-id="block-code-block_36e37923038cd81b68444b308b598c21" class="gt-block block-code">
    <pre><code>grep AVC /var/log/audit/audit.log | grep zabbix_server</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Příklad záznamu:</p>


<section id="block-code-block_32551c7432ad2d63f3821a91b6ac46a5" data-id="block-code-block_32551c7432ad2d63f3821a91b6ac46a5" class="gt-block block-code">
    <pre><code>type=AVC msg=audit(1743521737.355:209): avc: denied { name_bind } for pid=1620 comm=&quot;zabbix_server&quot; src=10055 scontext=system_u:system_r:zabbix_t:s0 tcontext=system_u:object_r:unreserved_port_t:s0 tclass=tcp_socket permissive=0</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Tato chyba ukazuje, že SELinux brání Zabbix serveru použít port 10055. K&nbsp;vytvoření pravidla, které tuto akci povolí, nainstalujte nástroj&nbsp;<code>audit2allow</code>:</p>


<section id="block-code-block_ed058fdbcba0385ce65f304a5d55f984" data-id="block-code-block_ed058fdbcba0385ce65f304a5d55f984" class="gt-block block-code">
    <pre><code>dnf install policycoreutils policycoreutils-python-utils -y</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h3 class="wp-block-heading">Vytvořte politiku pro Zabbix server</h3>



<p>Spusťte příkaz:</p>


<section id="block-code-block_94a6f3ceedf7d2fd75fed3e04ba4183b" data-id="block-code-block_94a6f3ceedf7d2fd75fed3e04ba4183b" class="gt-block block-code">
    <pre><code>grep zabbix_server /var/log/audit/audit.log | audit2allow -m zabbix_server_policy &gt; zabbix_server_policy.te</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Co dělají jednotlivé části:</p>



<ul class="wp-block-list">
<li><code>grep zabbix_server /var/log/audit/audit.log</code>: Vybere z&nbsp;audit logu pouze záznamy týkající se Zabbix serveru.</li>



<li><code>audit2allow -m zabbix_server_policy</code>: Analyzuje výstup a&nbsp;vytvoří návrh politiky SELinuxu</li>
</ul>



<p>Ukázka obsahu souboru&nbsp;<code>zabbix_server_policy.te</code>:</p>


<section id="block-code-block_91aab0fcec634f51996f36f65ae9d0d3" data-id="block-code-block_91aab0fcec634f51996f36f65ae9d0d3" class="gt-block block-code">
    <pre><code>module zabbix_server_policy 1.0;

require {
	type krb5_keytab_t;
	type unreserved_port_t;
	type zabbix_t;
	class dir search;
	class tcp_socket name_bind;
}

#============= zabbix_t ==============
allow zabbix_t krb5_keytab_t:dir search;

#!!!! This avc can be allowed using the boolean &#039;nis_enable</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Tento soubor obsahuje pravidla, která povolují Zabbix serveru:</p>



<ul class="wp-block-list">
<li>Používat konkrétní porty (např.&nbsp;nerezervované porty),</li>



<li>Prohledávat adresáře se soubory Kerberos klíčů (<code>krb5_keytab_t</code>).</li>
</ul>



<p><strong><code>module zabbix_server_policy 1.0;</code></strong><br>→ Název a&nbsp;verze modulu.</p>



<p><strong><code>require { ... }</code></strong><br>→ Modul potřebuje přístup k&nbsp;těmto věcem:</p>



<ul class="wp-block-list">
<li><code>krb5_keytab_t</code>&nbsp;→ soubory s&nbsp;Kerberos klíči (např.&nbsp;<code>/etc/krb5.keytab</code>)</li>



<li><code>unreserved_port_t</code>&nbsp;→ běžné síťové porty</li>



<li><code>zabbix_t</code>&nbsp;→ proces Zabbix serveru</li>



<li><code>dir search</code>&nbsp;→ umožňuje procházet adresáře</li>



<li><code>tcp_socket name_bind</code>&nbsp;→ umožňuje bindnout se na&nbsp;TCP port</li>
</ul>



<p><strong><code>allow zabbix_t krb5_keytab_t:dir search;</code></strong><br>→ Zabbix může procházet adresář s&nbsp;Kerberos klíčem.</p>



<p><strong><code>#!!!! This avc can be allowed using the boolean 'nis_enable'</code></strong><br>→ Komentář: něco podobného by šlo povolit pomocí booleanu&nbsp;<code>'nis_enable<code>'</code></code>.</p>



<p><strong>Bezpečnostní poznámka:</strong><br>Tento příklad zároveň ukazuje&nbsp;<strong>potenciální nevýhodu automatizovaného vytváření pravidel pomocí&nbsp;<code>audit2allow</code></strong>.<br>Může dojít k&nbsp;tomu, že se&nbsp;<strong>spolu s&nbsp;potřebnými pravidly omylem povolí i&nbsp;přístupy, které nejsou žádoucí</strong>&nbsp;– například k&nbsp;souborům s&nbsp;Kerberos klíči.<br>Proto je důležité výstup ze&nbsp;<code>audit2allow</code>&nbsp;<strong>pečlivě zkontrolovat a&nbsp;upravit</strong>, než se politika zkompiluje a&nbsp;aplikuje.</p>



<p>Dále pravidlo zkompilujte a&nbsp;aplikujte:</p>


<section id="block-code-block_7eff49b0bbc662bc8f4e944dd98b5238" data-id="block-code-block_7eff49b0bbc662bc8f4e944dd98b5238" class="gt-block block-code">
    <pre><code>checkmodule -M -m -o zabbix_server_policy.mod zabbix_server_policy.te
semodule_package -o zabbix_server_policy.pp -m zabbix_server_policy.mod
semodule -i zabbix_server_policy.pp</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<ul class="wp-block-list">
<li><code>checkmodule -M -m</code>: Zkompiluje&nbsp;<code>.te</code>&nbsp;soubor do&nbsp;<code>.mod</code>&nbsp;modulu.</li>



<li><code>semodule_package</code>: Převede&nbsp;<code>.mod</code>&nbsp;soubor na&nbsp;<code>.pp</code>&nbsp;instalační balíček.</li>



<li><code>semodule -i</code>: Instaluje vytvořený balíček politik do&nbsp;systému SELinux.</li>
</ul>



<p>Ověření aplikace politiky:</p>


<section id="block-code-block_af2fe5c8df04527b427a0813b7a0e841" data-id="block-code-block_af2fe5c8df04527b427a0813b7a0e841" class="gt-block block-code">
    <pre><code>semodule -l | grep zabbix_server_policy</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Výstup by měl ukázat nainstalovanou politiku&nbsp;<code>zabbix_server_policy</code>, což potvrzuje její úspěšnou aplikaci do&nbsp;systému SELinux.</p>



<h3 class="wp-block-heading">Pro vylistování SELinux politik například pro Zabbix použijte</h3>


<section id="block-code-block_44e354fe8274d08f33c6fbaaeaf03c62" data-id="block-code-block_44e354fe8274d08f33c6fbaaeaf03c62" class="gt-block block-code">
    <pre><code>semodule -l | grep zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Tento příkaz zobrazí všechny aktuálně nainstalované SELinux moduly, které mají v&nbsp;názvu „zabbix“.</p>


<section id="block-code-block_b9ae9fbabf94ba6f3ec6d774630a3ddb" data-id="block-code-block_b9ae9fbabf94ba6f3ec6d774630a3ddb" class="gt-block block-code">
    <pre><code>zabbix
zabbix_server_policy</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Chcete-li si zobrazit, jaká pravidla obsahuje konkrétní SELinux modul (např.&nbsp;<code>zabbix_server_policy</code>), můžete použít následující postup:</p>


<section id="block-code-block_81d55f502743190db54138cd0f2b0e1d" data-id="block-code-block_81d55f502743190db54138cd0f2b0e1d" class="gt-block block-code">
    <pre><code>mkdir -p /tmp/policyview &amp;&amp; \
cd /tmp/policyview &amp;&amp; \
semodule --extract zabbix_server_policy &amp;&amp; \
strings zabbix_server_policy.pp</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h3 class="wp-block-heading">Doplnění existující SELinux politiky o&nbsp;nové pravidlo</h3>



<p>Pokud potřebujete později doplnit existující politiku o&nbsp;další pravidlo, <strong>upravte existující&nbsp;<code>.te</code>&nbsp;soubor</strong> (např.&nbsp;přidejte další&nbsp;<code>allow</code>&nbsp;pravidlo) a&nbsp;opakujte celý postup kompilace a&nbsp;aplikace politiky:</p>


<section id="block-code-block_7eff49b0bbc662bc8f4e944dd98b5238" data-id="block-code-block_7eff49b0bbc662bc8f4e944dd98b5238" class="gt-block block-code">
    <pre><code>checkmodule -M -m -o zabbix_server_policy.mod zabbix_server_policy.te
semodule_package -o zabbix_server_policy.pp -m zabbix_server_policy.mod
semodule -i zabbix_server_policy.pp</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>SELinux automaticky aktualizuje existující politiku novými pravidly, aniž by bylo nutné původní politiku odstraňovat.</p>


<section id="block-code-block_94a6f3ceedf7d2fd75fed3e04ba4183b" data-id="block-code-block_94a6f3ceedf7d2fd75fed3e04ba4183b" class="gt-block block-code">
    <pre><code>grep zabbix_server /var/log/audit/audit.log | audit2allow -m zabbix_server_policy &gt; zabbix_server_policy.te</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h3 class="wp-block-heading"><strong>Jak odstraním vlastní SELinux politiku?</strong></h3>



<p>Použijte příkaz&nbsp;<code>semodule</code>:</p>


<section id="block-code-block_5d6fcc4b941bfb83ae86c43c3ddc298f" data-id="block-code-block_5d6fcc4b941bfb83ae86c43c3ddc298f" class="gt-block block-code">
    <pre><code>semodule -r zabbix_server_policy</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Monitoring SELinux AVC denials pomocí Zabbixu</h2>



<p>Abychom mohli SELinux monitorovat, musíme nejdříve získat oprávnění ke čtení příslušného log souboru. Bezpečnou cestou je přesměrovat jeho obsah do&nbsp;samostatného souboru, který bude vytvořen speciálně pro náš účel a&nbsp;dostupný pro Zabbix agenta – nikoliv změnou oprávnění na&nbsp;původních systémových souborech, čímž zachováme bezpečnostní standardy systému.</p>



<p>Zprávy AVC denial vypadají v&nbsp;logu takto:</p>


<section id="block-code-block_80f39e7a842899fe18916759c74b4d70" data-id="block-code-block_80f39e7a842899fe18916759c74b4d70" class="gt-block block-code">
    <pre><code>type=AVC msg=audit(1744268323.007:2345954): avc: denied { search } for pid=2102180 comm=&quot;zabbix_server&quot; name=&quot;krb5&quot; ...</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Tyto zprávy se zapisují do&nbsp;audit logu:<br><strong><code>/var/log/audit/audit.log</code></strong><br>Budeme monitorovat právě tyto zprávy.</p>



<h3 class="wp-block-heading">Nejprve vytvořte skript, který bude průběžně sledovat&nbsp;<code>audit.log</code>&nbsp;a&nbsp;vybírat z&nbsp;něj pouze AVC zprávy:</h3>


<section id="block-code-block_b9ed3d443e301a6a0988ff911c148511" data-id="block-code-block_b9ed3d443e301a6a0988ff911c148511" class="gt-block block-code">
    <pre><code>nano /usr/local/bin/selinux-denial-logger.sh</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Obsah skriptu:</p>


<section id="block-code-block_bdc3011ecfb1d4f26c6b43e4501750c6" data-id="block-code-block_bdc3011ecfb1d4f26c6b43e4501750c6" class="gt-block block-code">
    <pre><code>#!/bin/bash

tail -F /var/log/audit/audit.log | grep --line-buffered -E &quot;avc:\s+denied&quot; &gt;&gt; /var/log/selinux_denials.log</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Poté nastavte spustitelná oprávnění skriptu:</p>


<section id="block-code-block_ed31e14182181279430566a197b5077c" data-id="block-code-block_ed31e14182181279430566a197b5077c" class="gt-block block-code">
    <pre><code>chmod +x /usr/local/bin/selinux-denial-logger.sh</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h3 class="wp-block-heading">Automatické spouštění skriptu pomocí systemd</h3>



<p>Aby byl vytvořený skript spouštěn automaticky po&nbsp;restartu systému a&nbsp;běžel kontinuálně, je nutné vytvořit odpovídající systemd službu.<br>Vytvořte novou systemd službu příkazem:</p>


<section id="block-code-block_587d9b97363e7a7621eea6896eb94785" data-id="block-code-block_587d9b97363e7a7621eea6896eb94785" class="gt-block block-code">
    <pre><code>nano /etc/systemd/system/selinux-denial-logger.service</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Obsah souboru systemd služby:</p>


<section id="block-code-block_aca7e0a9ef130a7d6fc1cf3d0a6e0711" data-id="block-code-block_aca7e0a9ef130a7d6fc1cf3d0a6e0711" class="gt-block block-code">
    <pre><code>[Unit]
Description=SELinux AVC Denial Logger by initMAX s.r.o.
After=auditd.service

[Service]
Type=simple
ExecStart=/usr/local/bin/selinux-denial-logger.sh
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Aktivujte a&nbsp;spusťte nově vytvořenou službu:</p>


<section id="block-code-block_99c8fd9ae74cf8d92c0610bca7dc9c77" data-id="block-code-block_99c8fd9ae74cf8d92c0610bca7dc9c77" class="gt-block block-code">
    <pre><code>systemctl daemon-reload 
systemctl enable selinux-denial-logger.service --now</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Zkontrolujte, zda služba běží bez problémů:</p>


<section id="block-code-block_90ed2db13baa426965593b78b709fc26" data-id="block-code-block_90ed2db13baa426965593b78b709fc26" class="gt-block block-code">
    <pre><code>systemctl status selinux-denial-logger.service</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h3 class="wp-block-heading">Nastavení rotace logů pomocí log rotate</h3>



<p>Aby bylo zajištěno, že logovací soubor nenaroste příliš, je vhodné použít nástroj&nbsp;<code>logrotate</code>&nbsp;k&nbsp;jeho pravidelné rotaci.<br>Vytvořte konfiguraci rotace logu pomocí příkazu:</p>


<section id="block-code-block_4f5bd080c0ee2d8fd3704496eabd9cdd" data-id="block-code-block_4f5bd080c0ee2d8fd3704496eabd9cdd" class="gt-block block-code">
    <pre><code>nano /etc/logrotate.d/selinux_denials</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Obsah konfigurace logrotate:</p>


<section id="block-code-block_ba23e3cf19f298b4754fdfcaa2390dd0" data-id="block-code-block_ba23e3cf19f298b4754fdfcaa2390dd0" class="gt-block block-code">
    <pre><code>/var/log/selinux_denials.log {
    weekly
    rotate 4
    missingok
    notifempty
    compress
    delaycompress
    copytruncate
}</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Tato konfigurace zajistí týdenní rotaci logů, zachová 4 týdny historie, logy budou komprimovány a&nbsp;po&nbsp;každé rotaci bude služba restartována, aby pokračoval zápis do&nbsp;správného logu.</p>



<h3 class="wp-block-heading">Import šablony a&nbsp;požadavky</h3>



<p>Pro monitoring SELinux pomocí Zabbixu jsme připravili vlastní šablonu&nbsp;<code>SELinux</code>, kterou lze snadno importovat do&nbsp;vašeho Zabbix serveru.</p>



<h3 class="wp-block-heading">Požadavky</h3>



<ul class="wp-block-list">
<li><strong>Zabbix verze</strong>: 7.0 a&nbsp;vyšší</li>



<li><strong>Zabbix agent</strong>: doporučeno používat&nbsp;<strong>Zabbix agent 2</strong>&nbsp;(nutné pro&nbsp;<code>systemd.unit.info</code>&nbsp;a&nbsp;jednodušší integraci)</li>



<li><strong>Zabbix agent:</strong>&nbsp;Pro použití klíčů&nbsp;<code>log*</code>&nbsp;je nutné, aby agent běžel v&nbsp;<strong>aktivním režimu (<code>active checks</code>).</strong></li>



<li><strong>Systém s&nbsp;SELinuxem</strong>: např.&nbsp;RHEL, AlmaLinux, CentOS Stream, Fedora apod.</li>



<li><strong>Agent</strong>: musí mít přístup k&nbsp;následujícím souborům (mívá povoleno ve výchozím nastavení):
<ul class="wp-block-list">
<li><code>/sys/fs/selinux/enforce</code></li>



<li><code>/etc/selinux/config</code></li>



<li><code>/var/log/selinux_denials.log</code>&nbsp;– soubor generovaný externím skriptem (viz výše)</li>
</ul>
</li>
</ul>



<p>Šablonu lze stáhnout z&nbsp;našeho repozitáře zde: <a href="https://git.initmax.cz/initMAX-Public/zabbix-templates/-/tree/production/free/SELinux_by_Zabbix_Agent_2" target="_blank" rel="noreferrer noopener">https://git.initmax.cz/initMAX-Public/zabbix-templates/-/tree/production/free/SELinux_by_Zabbix_Agent_2</a></p>



<h3 class="wp-block-heading">Import šablony</h3>



<p>V Zabbix frontend přejděte do&nbsp;části&nbsp;<strong><em>Data collection → Templates</em></strong>.</p>



<p>Klikněte na&nbsp;<strong>Import</strong>.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="3050" height="1084" src="https://www.initmax.cz/wp-content/uploads/2025/04/selinux-import.png" alt="" class="wp-image-18155" srcset="https://www.initmax.cz/wp-content/uploads/2025/04/selinux-import.png 3050w, https://www.initmax.cz/wp-content/uploads/2025/04/selinux-import-300x107.png 300w, https://www.initmax.cz/wp-content/uploads/2025/04/selinux-import-1024x364.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/04/selinux-import-768x273.png 768w, https://www.initmax.cz/wp-content/uploads/2025/04/selinux-import-1536x546.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/04/selinux-import-2048x728.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/04/selinux-import-608x216.png 608w, https://www.initmax.cz/wp-content/uploads/2025/04/selinux-import-1216x432.png 1216w" sizes="auto, (max-width: 3050px) 100vw, 3050px" /></figure>



<p>Vyberte soubor&nbsp;<code><a href="https://git.initmax.cz/initMAX-Public/zabbix-templates/-/raw/production/free/SELinux_by_Zabbix_Agent_2/7.0/template_SELinux_by_Zabbix_Agent_2.yaml" target="_blank" rel="noreferrer noopener">template_SELinux_by_Zabbix_Agent_2.yaml</a></code>&nbsp;z&nbsp;našeho repozitáře a&nbsp;potvrďte import.</p>



<p>Po importu připojte šablonu k&nbsp;hostu s&nbsp;povolenou <strong>aktivní komunikací</strong> – ta je nezbytná pro zpracování logů pomocí&nbsp;<code>log[*]</code>.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="3050" height="1080" src="https://www.initmax.cz/wp-content/uploads/2025/04/selinux-host-items.png" alt="" class="wp-image-18157" srcset="https://www.initmax.cz/wp-content/uploads/2025/04/selinux-host-items.png 3050w, https://www.initmax.cz/wp-content/uploads/2025/04/selinux-host-items-300x106.png 300w, https://www.initmax.cz/wp-content/uploads/2025/04/selinux-host-items-1024x363.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/04/selinux-host-items-768x272.png 768w, https://www.initmax.cz/wp-content/uploads/2025/04/selinux-host-items-1536x544.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/04/selinux-host-items-2048x725.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/04/selinux-host-items-608x215.png 608w, https://www.initmax.cz/wp-content/uploads/2025/04/selinux-host-items-1216x431.png 1216w" sizes="auto, (max-width: 3050px) 100vw, 3050px" /></figure>



<p>Správnost nastavení si můžete zkontrolovat přes Monitoring &gt; Latest data u&nbsp;daného hosta.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="3048" height="1430" src="https://www.initmax.cz/wp-content/uploads/2025/04/selinux-latest-data.png" alt="" class="wp-image-18159" srcset="https://www.initmax.cz/wp-content/uploads/2025/04/selinux-latest-data.png 3048w, https://www.initmax.cz/wp-content/uploads/2025/04/selinux-latest-data-300x141.png 300w, https://www.initmax.cz/wp-content/uploads/2025/04/selinux-latest-data-1024x480.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/04/selinux-latest-data-768x360.png 768w, https://www.initmax.cz/wp-content/uploads/2025/04/selinux-latest-data-1536x721.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/04/selinux-latest-data-2048x961.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/04/selinux-latest-data-608x285.png 608w, https://www.initmax.cz/wp-content/uploads/2025/04/selinux-latest-data-1216x570.png 1216w" sizes="auto, (max-width: 3048px) 100vw, 3048px" /></figure>



<p>Pokud dojde k&nbsp;detekci blokace, Zabbix vytvoří problémovou událost. Ta se automaticky uzavře, pokud po&nbsp;dobu 30 minut nedojde k&nbsp;žádné další blokaci.</p>



<p>Tento časový interval lze upravit pomocí uživatelského makra&nbsp;<code>{$TRIGGER.CLOSE.TIME}</code>, a&nbsp;to buď přímo v&nbsp;šabloně, nebo individuálně na&nbsp;úrovni konkrétního hosta.</p>



<p>Každý záznam problému obsahuje v&nbsp;názvu informace o&nbsp;PIDu, názvu procesu (<code>Comm</code>) a&nbsp;typu objektu (<code>Class</code>), který byl blokován. Díky tomu lze problém snadno identifikovat už na&nbsp;první pohled.</p>



<p>Zároveň jsou k&nbsp;události přiřazeny tagy jako&nbsp;<code>comm</code>,&nbsp;<code>class</code>,&nbsp;<code>pid</code>&nbsp;a&nbsp;<code>source</code>, které umožňují efektivní filtrování událostí, směrování notifikací a&nbsp;zobrazení v&nbsp;přehledných dashboardech.</p>



<p><em>Na obrázku níže je vidět, jak se SELinux události zobrazují v&nbsp;sekci „Monitoring → Problems“.</em></p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="3184" height="1418" src="https://www.initmax.cz/wp-content/uploads/2025/04/selinux-problems.png" alt="" class="wp-image-18161" srcset="https://www.initmax.cz/wp-content/uploads/2025/04/selinux-problems.png 3184w, https://www.initmax.cz/wp-content/uploads/2025/04/selinux-problems-300x134.png 300w, https://www.initmax.cz/wp-content/uploads/2025/04/selinux-problems-1024x456.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/04/selinux-problems-768x342.png 768w, https://www.initmax.cz/wp-content/uploads/2025/04/selinux-problems-1536x684.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/04/selinux-problems-2048x912.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/04/selinux-problems-608x271.png 608w, https://www.initmax.cz/wp-content/uploads/2025/04/selinux-problems-1216x542.png 1216w" sizes="auto, (max-width: 3184px) 100vw, 3184px" /></figure>



<p><strong>Doporučení:</strong> SELinux je důležitou součástí zabezpečení systému a&nbsp;obecně není doporučeno jej vypínat. Balíček&nbsp;<code>zabbix-selinux-policy</code>&nbsp;řeší většinu běžných problémů se Zabbixem, ale nestandardní operace (např.&nbsp;specifické porty nebo přístup k&nbsp;nestandardním souborům) musí administrátor řešit vlastními politikami, jak je popsáno výše. Doporučujeme investovat čas do&nbsp;pochopení fungování SELinuxu, abyste mohli bezpečnostní politiky efektivně spravovat.</p>


<section id="block-newsletter-block_5a77233be1ea620505de49dc053d59f2" data-id="block-newsletter-block_5a77233be1ea620505de49dc053d59f2" class="gt-block block-newsletter">
    <section id="newsletter" class="newsletter">
	<div class="gradient basic">
		<div class="newsletter__inner width width--general">
			<div class="col left">
									<h2 class="newsletter__title">Buďte v&nbsp;obraze s&nbsp;naším newsletterem</h2>
													<div class="newsletter__content"><p>Díky initMAX newsletteru Vám neunikne žádná z&nbsp;pozvánek na&nbsp;akce a&nbsp;webináře, žádný z&nbsp;tipů, jak dostat ze svého IT MAXimum, ani ověřené informace o&nbsp;novinkách ze světa Zabbix a&nbsp;dalších technologií.</p>
</div>
							</div>
			<div class="col right form-wrapper">
				<div class="newsletter-form">
	<form method="post" action="/wiki/kapitola/zabbix/feed/" enctype="multipart/form-data">
		<input type="hidden" name="url" value="https://www.initmax.cz/wiki/kapitola/zabbix/feed/">

		<div class="inputs">

			<label for="newsletter-form_contact_email" class="top">Vaše e-mailová adresa:</label>
			<div class="df">

				<div class="input">
					<input type="text" id="newsletter-form_contact_email" name="newsletter_email" placeholder="@" data-format="email" data-required="1">
									</div><!-- /.input -->

				<a href="#" class="btn btn--white sendBtn">Odeslat</a>

			</div>

			<div class="bottom nm">
				<label for="newsletter-form_gdpr" class="checkbox gdpr">
					<input type="checkbox" id="newsletter-form_gdpr" name="newsletter_gdpr">
					<span>Souhlasím se&nbsp;<a href="https://www.initmax.cz/ochrana-osobnich-udaju/" target="_blank">zpracováním osobních údajů</a>.</span>
				</label>
			</div>

		</div><!-- /.inputs -->
		<div class="sent hidden">
			<div class="iconOk"><h3>Děkujeme, že jste se přihlásili k&nbsp;odběru našeho newsletteru.</h3>
</div>
			<button class="sent__close" title="Zavřít" onclick="closeFormMessage(this,event)"><svg data-name="Group 3602" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 3272" d="M0,0H24V24H0Z" fill="none"/><line data-name="Line 98" y2="14" transform="translate(7.05 7.05) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 99" x2="14" transform="translate(7.05 16.95) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</button>
		</div><!-- /.sent -->
	</form>
</div>			</div>
		</div>
	</div>
</section></section>



<section id="social-links-block_045958faa643d5576bb3716715f042f3" data-id="social-links-block_045958faa643d5576bb3716715f042f3" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>

<p>The post <a href="https://www.initmax.cz/wiki/selinux-integrace-se-zabbixem-a-dalsimi-nastroji/">SELinux: integrace se Zabbixem a&nbsp;dalšími nástroji</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Frontend scripty a&#160;sudo v&#160;Zabbixu</title>
		<link>https://www.initmax.cz/wiki/frontend-scripty-a-sudo-v-zabbixu/</link>
		
		<dc:creator><![CDATA[Tomáš Heřmánek]]></dc:creator>
		<pubDate>Tue, 18 Mar 2025 00:20:05 +0000</pubDate>
				<guid isPermaLink="false">https://www.initmax.cz/?post_type=wiki&#038;p=17975</guid>

					<description><![CDATA[<p>V tomto článku si ukážeme, jak jednoduše aktivovat globální frontend skripty v Zabbixu a předvedeme tři efektivní a snadno použitelné příklady. Výběr operačního ...</p>
<p>The post <a href="https://www.initmax.cz/wiki/frontend-scripty-a-sudo-v-zabbixu/">Frontend scripty a&nbsp;sudo v&nbsp;Zabbixu</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>V tomto článku si ukážeme, jak jednoduše aktivovat globální frontend skripty v&nbsp;Zabbixu a&nbsp;předvedeme tři efektivní a&nbsp;snadno použitelné příklady.</p>


<section id="block-webinar-block_17ff5d80fcea9d19584aac259586be44" data-id="block-webinar-block_17ff5d80fcea9d19584aac259586be44" class="gt-block block-webinar">
    <div class="connected-webinars__grid">
        <a href="https://www.initmax.cz/webinar/skriptovani-v-zabbixu-7-0/" class="grid-item">
	<article class="webinar-promotion">
		<div class="webinar-promotion__thumbnail-wrap">
			<figure class="webinar-promotion__thumbnail">
					<img decoding="async" src="https://www.initmax.cz/wp-content/uploads/2023/09/ilustrace_webinare_zabbix_7.0_03_thumbnail_web-62.png"
				 width="400"
		 height="250"
		 class=""
		 alt="Skriptování v&nbsp;Zabbixu 7.0"
		 loading="lazy"	>
									<div class="webinar-promotion__tags">
						<span class="tag tag--small" style="color:#ffffff;background-color:#d40000;">Zabbix</span>					</div>
							</figure>
		</div>
		<div class="webinar-promotion__text">
			<div>
									<time datetime="2024-01-18">18.&nbsp;1.&nbsp;2024</time>
							</div>
			<h3 class="webinar-promotion__title">Skriptování v&nbsp;Zabbixu 7.0</h3>
			<div class="icon-link">
				<figure class="icon-wrap icon-wrap--primary"><svg data-name="Group 3411" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 455" d="M0,0H24V24H0Z" fill="none"/><path data-name="Path 456" d="M15,10l4.553-2.276A1,1,0,0,1,21,8.618v6.764a1,1,0,0,1-1.447.894L15,14V10Z" transform="translate(0 0)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><rect data-name="Rectangle 1286" width="12" height="12" rx="2" transform="translate(3.112 6)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</figure>
				<span>Zhlédnout záznam</span>
			</div>
		</div>
	</article>
</a>    </div>
</section>



<h2 class="wp-block-heading" id="vyber-operacniho-systemu">Výběr operačního systému</h2>



<p>Návod obsahuje postup pro RHEL platformy na&nbsp;verzi 9, kde stačí případně jen poupravit repozitáře. Návod pro Debian je připraven pro verzi 12, která je aktuálně poslední podporovanou verzí.</p>


<section id="os-switcher-block_1b0c4888bc1ea151e2e84a75e3f6eb1b" data-id="os-switcher-block_1b0c4888bc1ea151e2e84a75e3f6eb1b" class="gt-block os-switcher">
                    <a class="os-switcher__item is-active" onclick="osSwitch(this,'#rhel')">
                            <figure>
                     <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="800px" height="800px" viewBox="0 -31 256 256" version="1.1" preserveAspectRatio="xMidYMid"><g><path d="M170.758031,111.610687 C187.582343,111.610687 211.924474,108.140925 211.924474,88.1292728 C211.974775,86.5848226 211.834752,85.0400539 211.507565,83.5298204 L201.48829,40.009856 C199.175115,30.434388 197.144363,26.0904607 180.333499,17.6850288 C167.288269,11.014478 138.871184,0 130.465752,0 C122.638614,0 120.365785,10.0865183 111.032394,10.0865183 C102.048668,10.0865183 95.3781173,2.55525131 86.9726853,2.55525131 C78.9034707,2.55525131 73.6450325,8.05576597 69.5835277,19.3661152 C69.5835277,19.3661152 58.2731785,51.2664105 56.8207199,55.8927602 C56.5898643,56.7423115 56.4900906,57.6221338 56.5248487,58.5018063 C56.5248487,70.9014995 105.343597,111.556893 170.758031,111.556893 M214.506623,96.2522822 C216.833247,107.26676 216.833247,108.423348 216.833247,109.875806 C216.833247,128.703974 195.665007,139.153607 167.839665,139.153607 C104.953585,139.193953 49.8677466,102.344539 49.8677466,77.9889597 C49.8641113,74.5987697 50.555245,71.2437963 51.898499,68.1310691 C29.2778005,69.2607592 0,73.2953665 0,99.1437508 C0,141.48023 100.313787,193.661152 179.741757,193.661152 C240.63743,193.661152 255.995835,166.118232 255.995835,144.371699 C255.995835,127.264964 241.202275,107.845054 214.53352,96.2522822" fill="#EE0000"></path><path d="M214.506623,96.2522822 C216.833247,107.26676 216.833247,108.423348 216.833247,109.875806 C216.833247,128.703974 195.665007,139.15364 167.839665,139.15364 C104.953585,139.193953 49.8677323,102.344539 49.8677323,77.9889597 C49.8641113,74.5987697 50.555245,71.2437963 51.898499,68.1310691 L56.8207199,55.946555 C56.5952566,56.7787916 56.4955298,57.6400686 56.5248487,58.5018063 C56.5248487,70.9014995 105.343597,111.556893 170.758031,111.556893 C187.582343,111.556893 211.924474,108.08713 211.924474,88.075478 C211.974775,86.5310279 211.834752,84.9862591 211.507565,83.4760257 L214.506623,96.2522822 Z" fill="#000000"></path></g></svg>                 </figure>
                        <span>Alma/CentOS/RHEL/Rocky 9</span>
        </a>
                    <a class="os-switcher__item" onclick="osSwitch(this,'#debian')">
                            <figure>
                     <svg xmlns="http://www.w3.org/2000/svg" width="30.412" height="37.855" viewBox="0 0 30.412 37.855"><g data-name="Group 4978" transform="translate(0)"><path data-name="Path 3295" d="M51.55,57.148c-.627.009.119.323.938.449.226-.177.431-.355.614-.529a4.68,4.68,0,0,1-1.552.08" transform="translate(-33.375 -37.148)" fill="#a80030"></path><path data-name="Path 3296" d="M60.9,51.791a3.984,3.984,0,0,0,.742-1.664,4.059,4.059,0,0,1-.522,1.154c-1.172.738-.11-.438,0-.886-1.261,1.587-.173.952-.219,1.395" transform="translate(-39.357 -32.63)" fill="#a80030"></path><path data-name="Path 3297" d="M64.59,44.219c.076-1.13-.222-.772-.323-.341.117.061.209.8.323.341" transform="translate(-41.805 -28.292)" fill="#a80030"></path><path data-name="Path 3298" d="M45.172,1.4c.335.06.723.106.669.186.366-.08.449-.154-.669-.186" transform="translate(-29.376 -0.911)" fill="#a80030"></path><path data-name="Path 3299" d="M46.647,1.932l-.237.049.22-.02.016-.029" transform="translate(-30.181 -1.258)" fill="#a80030"></path><path data-name="Path 3300" d="M27.224,16.859a5.583,5.583,0,0,1-.6,2.378l-.542.271c-.444.861.043.547-.275,1.232a14.973,14.973,0,0,1-2.553,2.047c-.329-.007.223-.389.3-.538-.927.637-.744.956-2.162,1.342l-.042-.092c-3.5,1.645-8.354-1.615-8.291-6.064-.037.282-.106.212-.184.326a5.6,5.6,0,0,1,3.144-5.526,5.3,5.3,0,0,1,5.9.767,5.257,5.257,0,0,0-4.3-2.063,4.856,4.856,0,0,0-4.172,2.489c-.951.6-1.061,2.308-1.475,2.62-.557,4.1,1.049,5.867,3.765,7.949.428.288.12.332.178.552a7.372,7.372,0,0,1-2.409-1.842,6.473,6.473,0,0,0,1.253,1.444c-.851-.288-1.988-2.062-2.32-2.135,1.467,2.627,5.952,4.607,8.3,3.624a9.8,9.8,0,0,1-3.688-.429c-.513-.264-1.21-.811-1.086-.913a9.158,9.158,0,0,0,9.289-1.316c.705-.549,1.476-1.484,1.7-1.5-.335.5.057.243-.2.688.7-1.134-.305-.461.727-1.958l.381.525c-.142-.941,1.169-2.084,1.036-3.572.3-.455.335.49.016,1.537.443-1.162.117-1.348.23-2.307a8.71,8.71,0,0,1,.367,1,4.423,4.423,0,0,1,.441-2.543c-.142-.063-.445.5-.514-.83.01-.576.16-.3.218-.444a2.546,2.546,0,0,1-.59-1.353c.131-.2.35.516.528.545a13.163,13.163,0,0,1-.32-1.7c-.52-1.087-.184.145-.606-.467-.554-1.727.459-.4.528-1.185A13.868,13.868,0,0,1,30.732,13.3a15.9,15.9,0,0,0-.769-2.765c.255.107-.41-1.958.331-.59A12.326,12.326,0,0,0,24.513,3.03c.293.268.662.6.529.657-1.189-.708-.98-.763-1.15-1.062-.969-.394-1.032.032-1.674,0A19.878,19.878,0,0,0,18.36,1.153l.076.357c-1.209-.4-1.409.153-2.716,0-.08-.062.419-.225.829-.284-1.169.154-1.115-.23-2.259.043a9.724,9.724,0,0,1,.881-.5c-.954.058-2.277.555-1.868.1C11.748,1.57,8.986,2.544,7.436,4l-.049-.326c-.71.853-3.1,2.547-3.288,3.651l-.19.044a20.47,20.47,0,0,0-.9,1.979c-.483.824-.709.317-.64.446A30.106,30.106,0,0,0,.536,14.669c.291.435.007,2.616.117,4.362-.478,8.623,6.052,17,13.189,18.929a14.369,14.369,0,0,0,3.925.4c-1.561-.446-1.763-.237-3.284-.767-1.1-.517-1.338-1.107-2.115-1.781l.308.543c-1.524-.539-.886-.667-2.126-1.06l.328-.429a2.824,2.824,0,0,1-1.531-1.273l-.54.021c-.649-.8-1-1.378-.97-1.826l-.175.311c-.2-.34-2.389-3-1.252-2.384a2.563,2.563,0,0,1-.8-.867l.231-.265a4.4,4.4,0,0,1-.972-1.906,1.236,1.236,0,0,0,.695.535c-1.381-3.427-1.459-.189-2.5-3.489l.221-.018a7.327,7.327,0,0,1-.409-.805l.1-.96c-.994-1.15-.278-4.889-.135-6.94.1-.834.83-1.722,1.386-3.114l-.339-.058C4.532,10.7,7.58,7.3,8.992,7.471c.684-.859-.136,0-.269-.22,1.5-1.554,1.974-1.1,2.988-1.378,1.093-.649-.938.253-.42-.247,1.89-.483,1.339-1.1,3.8-1.342.26.148-.6.229-.82.421,1.575-.77,4.983-.6,7.2.428,2.569,1.2,5.455,4.749,5.569,8.088l.13.035c-.066,1.327.2,2.862-.262,4.272l.317-.667" transform="translate(-0.32 -0.503)" fill="#a80030"></path><path data-name="Path 3301" d="M32.208,59.764l-.088.44a8.451,8.451,0,0,0,1.266,1.6c-.379-.739-.66-1.045-1.178-2.044" transform="translate(-20.88 -38.903)" fill="#a80030"></path><path data-name="Path 3302" d="M34.247,58.123a3.488,3.488,0,0,1-.492-.821,5.711,5.711,0,0,0,.685,1.39l-.193-.569" transform="translate(-21.944 -37.3)" fill="#a80030"></path><path data-name="Path 3303" d="M82.358,48.916l-.092.231a11.156,11.156,0,0,1-1.093,3.489,10.961,10.961,0,0,0,1.185-3.72" transform="translate(-52.81 -31.841)" fill="#a80030"></path><path data-name="Path 3304" d="M45.054.187A13.512,13.512,0,0,1,46.546,0c-.586.049-1.17.079-1.746.153l.254.035" transform="translate(-29.133)" fill="#a80030"></path><path data-name="Path 3305" d="M2.44,23.219c.1.9-.681,1.256.172.659.457-1.03-.179-.284-.172-.659" transform="translate(-1.409 -15.114)" fill="#a80030"></path><path data-name="Path 3306" d="M-.053,32.764a9.824,9.824,0,0,0,.307-1.315c-.543.694-.25.842-.307,1.315" transform="translate(0.082 -20.471)" fill="#a80030"></path></g></svg>                 </figure>
                        <span>Debian 12</span>
        </a>
    </section>





<section id="social-links-block_1abcf7e2670e386335b1e2815d119b2b" data-id="social-links-block_1abcf7e2670e386335b1e2815d119b2b" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>




<h2 class="wp-block-heading">Povolení globálních skriptů</h2>



<p>Od Zabbix verze 7.0 jsou globální frontend skripty standardně zakázány z&nbsp;bezpečnostních důvodů. Tato restrikce je součástí snahy o&nbsp;vyšší bezpečnost prostředí Zabbix serveru. Globální skripty však mohou výrazně usnadnit správu, proto pokud chcete využívat jejich výhody, musíte je explicitně povolit.</p>



<p>Defaultně je v&nbsp;konfiguraci Zabbix serveru nastavena hodnota&nbsp;EnableGlobalScripts=0, což znamená, že je tato funkce vypnutá. Pokud se pokusíte spustit skript bez povolení, objeví se chyba:</p>



<p>&#8222;Global script execution on Zabbix server is disabled by server configuration.&#8220;</p>



<p>Zda jsou globální skripty povolené, můžete také jednoduše zkontrolovat přímo v&nbsp;GUI v&nbsp;sekci&nbsp;<strong>Reports → System information</strong>&nbsp;v&nbsp;položce „Global scripts on Zabbix server“. Pokud je toto nastavení již povoleno, řádek s&nbsp;touto položkou se ve výpisu nezobrazuje.&nbsp;</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2560" height="953" src="https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts-scaled.jpg" alt="" class="wp-image-17992" srcset="https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts-scaled.jpg 2560w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts-300x112.jpg 300w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts-1024x381.jpg 1024w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts-768x286.jpg 768w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts-1536x572.jpg 1536w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts-2048x762.jpg 2048w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts-608x226.jpg 608w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts-1216x453.jpg 1216w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></figure>



<p>Pro povolení globálních skriptů postupujte následovně:</p>



<p>Upravte konfigurační soubor Zabbix serveru příkazem:</p>


<section id="block-code-block_308729b8a664b0d1bfc14156284f7bd1" data-id="block-code-block_308729b8a664b0d1bfc14156284f7bd1" class="gt-block block-code">
    <pre><code>nano /etc/zabbix/zabbix_server.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V souboru vyhledejte řádek s&nbsp;hodnotou&nbsp;<strong>EnableGlobalScripts=0</strong>&nbsp;a&nbsp;změňte ho na:</p>


<section id="block-code-block_10e8dd5367c6a9e615b5438973d4e887" data-id="block-code-block_10e8dd5367c6a9e615b5438973d4e887" class="gt-block block-code">
    <pre><code>EnableGlobalScripts=1</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Tato změna povoluje provádění globálních skriptů.</p>



<p>Restartujte službu Zabbix serveru:</p>


<section id="block-code-block_306e69f0330e18a5febd384c5aac28c7" data-id="block-code-block_306e69f0330e18a5febd384c5aac28c7" class="gt-block block-code">
    <pre><code>systemctl restart zabbix-server</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Po tomto kroku můžete v&nbsp;Zabbixu globální skripty využívat.</p>



<h2 class="wp-block-heading"><strong>Zprovoznění předdefinovaných frontend skriptů (nmap a&nbsp;traceroute)</strong></h2>



<p>Zabbix obsahuje několik užitečných frontend skriptů již ve výchozím stavu, ovšem často nejsou ihned funkční kvůli chybějícím systémovým balíčkům nebo nedostatečným oprávněním. Ukážeme si, jak zprovoznit dva z&nbsp;těchto předdefinovaných skriptů – konkrétně&nbsp;nmap&nbsp;a&nbsp;<code>traceroute</code>.</p>



<p><strong>Instalace potřebných balíčků</strong></p>



<p>Na Zabbix serveru nebo proxy nainstalujte balíčky:</p>



<div id="rhel" class="wp-block-group"><div class="wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained"><section id="block-code-block_7fdaa81cf24775b38f4a6094e61b7ec4" data-id="block-code-block_7fdaa81cf24775b38f4a6094e61b7ec4" class="gt-block block-code">
    <pre><code>dnf install nmap traceroute</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>

</div></div>



<div id="debian" class="wp-block-group"><div class="wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained"><section id="block-code-block_ac4796d0039c92adf2ea944a66c2b137" data-id="block-code-block_ac4796d0039c92adf2ea944a66c2b137" class="gt-block block-code">
    <pre><code>apt install nmap traceroute</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>

</div></div>



<p><strong>Nastavení sudo pravidla</strong></p>



<p>Aby Zabbix mohl spouštět příkazy s&nbsp;vyššími oprávněními (v&nbsp;tomto případě pro nástroj&nbsp;<code>nmap</code>), vytvořte speciální sudoers soubor, například&nbsp;<strong><code>/etc/sudoers.d/zabbix_scripts</code></strong>, a&nbsp;vložte do&nbsp;něj následující obsah:</p>


<section id="block-code-block_be2133d346906efa5c91b4c8ec2b342e" data-id="block-code-block_be2133d346906efa5c91b4c8ec2b342e" class="gt-block block-code">
    <pre><code>nano /etc/sudoers.d/zabbix_scripts</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A vložte následující obsah:</p>


<section id="block-code-block_e669d1d6598b4ca736cee3d81d0cca70" data-id="block-code-block_e669d1d6598b4ca736cee3d81d0cca70" class="gt-block block-code">
    <pre><code>zabbix ALL=(ALL) NOPASSWD: /usr/bin/nmap</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Toto pravidlo umožní uživateli&nbsp;<code>zabbix</code>&nbsp;spouštět příkaz&nbsp;<code>nmap</code>&nbsp;bez nutnosti zadávat heslo, což zajistí správnou funkčnost skriptu ve frontendovém rozhraní.<br>Pravidla v&nbsp;souboru&nbsp;<strong>sudoers</strong>&nbsp;definují, jaké příkazy mohou uživatelé spouštět s&nbsp;oprávněními&nbsp;<strong>root</strong>&nbsp;bez nutnosti autentizace. Další příkazy lze přidávat na&nbsp;samostatné řádky stejným způsobem.</p>



<p>Uložte soubor a&nbsp;ověřte správnou syntaxi příkazem:</p>


<section id="block-code-block_452f923b766bca57f2cf3b9fa08fefaf" data-id="block-code-block_452f923b766bca57f2cf3b9fa08fefaf" class="gt-block block-code">
    <pre><code>visudo -cf /etc/sudoers.d/zabbix_scripts</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1396" height="224" src="https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_sudo.png" alt="" class="wp-image-17994" srcset="https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_sudo.png 1396w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_sudo-300x48.png 300w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_sudo-1024x164.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_sudo-768x123.png 768w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_sudo-608x98.png 608w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_sudo-1216x195.png 1216w" sizes="auto, (max-width: 1396px) 100vw, 1396px" /></figure>



<p>Pokud kontrola projde bez chyb, můžete nyní používat frontend skripty&nbsp;<code>nmap</code>&nbsp;a&nbsp;<code>traceroute</code>&nbsp;přímo ze Zabbix rozhraní.</p>



<h2 class="wp-block-heading"><strong>Příklad 1 &#8211; Vypsání konfiguračního souboru Zabbix agenta</strong></h2>



<p>Nyní si ukážeme, jak vytvořit vlastní frontend skript v&nbsp;Zabbix GUI, který načítá konfiguraci Zabbix agenta s&nbsp;rozlišením verze agenta. Nejdříve je potřeba povolit spouštění vlastních skriptů na&nbsp;straně Zabbix agenta.</p>



<p><strong>Povolení skriptů v&nbsp;konfiguraci Zabbix agenta (Agent i&nbsp;Agent 2)</strong></p>



<p>Na vzdáleném hostovi upravte konfiguraci Zabbix agenta příkazem podle typu agenta:</p>



<ul class="wp-block-list">
<li>Pro klasický Zabbix agent:</li>
</ul>


<section id="block-code-block_f918522b1366f58d26fb112e3ab437f8" data-id="block-code-block_f918522b1366f58d26fb112e3ab437f8" class="gt-block block-code">
    <pre><code>nano /etc/zabbix/zabbix_agentd.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<ul class="wp-block-list">
<li>Pro Zabbix agent 2:</li>
</ul>


<section id="block-code-block_418329190d603f39760476dab0171f40" data-id="block-code-block_418329190d603f39760476dab0171f40" class="gt-block block-code">
    <pre><code>nano /etc/zabbix/zabbix_agent2.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p><strong>Povolení DenyKey</strong></p>



<p>Pokud ještě nemáte povolenou tuto možnost, je potřeba ji nejprve aktivovat.</p>



<p>V konfiguraci nejprve najděte a&nbsp;odkomentujte řádek s&nbsp;<code>DenyKey</code>:</p>


<section id="block-code-block_96e6ff16f285f09df59924b79c48672a" data-id="block-code-block_96e6ff16f285f09df59924b79c48672a" class="gt-block block-code">
    <pre><code>DenyKey=system.run[*]</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p><strong>Před řádek s&nbsp;pravidlem&nbsp;<code>DenyKey</code>&nbsp;vložte pravidlo&nbsp;<code>AllowKey</code>.</strong>, které povolí spuštění pouze konkrétního skriptu (nikdy nepoužívejte obecné pravidlo s&nbsp;*, které může být bezpečnostním rizikem):</p>


<section id="block-code-block_4d9ff950ce353df9b2c69a91d93dbf84" data-id="block-code-block_4d9ff950ce353df9b2c69a91d93dbf84" class="gt-block block-code">
    <pre><code>AllowKey=system.run[pgrep -a &#039;zabbix_agent2&#039; &gt;/dev/null &amp;&amp; { echo &quot;==== Zabbix Agent 2 Configuration ====&quot;; grep -Ev &#039;^#|^$&#039; /etc/zabbix/zabbix_agent2.conf; } ; pgrep -a &#039;zabbix_agentd&#039; &gt;/dev/null &amp;&amp; { echo &quot;==== Zabbix Agent (Classic) Configuration ====&quot;; grep -Ev &#039;^#|^$&#039; /etc/zabbix/zabbix_agentd.conf; }]</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2576" height="806" src="https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_config_1.png" alt="" class="wp-image-18002" srcset="https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_config_1.png 2576w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_config_1-300x94.png 300w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_config_1-1024x320.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_config_1-768x240.png 768w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_config_1-1536x481.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_config_1-2048x641.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_config_1-608x190.png 608w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_config_1-1216x380.png 1216w" sizes="auto, (max-width: 2576px) 100vw, 2576px" /></figure>



<p>Poté restartujte službu agenta podle typu:</p>



<ul class="wp-block-list">
<li>Zabbix agent:</li>
</ul>


<section id="block-code-block_c8f65206b765adb2b0bee1eb353f6954" data-id="block-code-block_c8f65206b765adb2b0bee1eb353f6954" class="gt-block block-code">
    <pre><code>systemctl restart zabbix-agent</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<ul class="wp-block-list">
<li>Zabbix agent 2:</li>
</ul>


<section id="block-code-block_207b054d5e37f11442893abdafe2ab58" data-id="block-code-block_207b054d5e37f11442893abdafe2ab58" class="gt-block block-code">
    <pre><code>systemctl restart zabbix-agent2</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p><strong>Vytvoření skriptu ve frontendu</strong></p>



<p>Postupujte následovně:</p>



<ul start="1" class="wp-block-list">
<li>Přejděte do&nbsp;sekce&nbsp;<strong>Alerts → Scripts</strong>.</li>



<li>Klikněte na&nbsp;tlačítko&nbsp;<strong>Create script</strong>.</li>



<li>Vyplňte pole:
<ul class="wp-block-list">
<li><strong>Name</strong>: Například „Zabbix Agent Config“.</li>



<li><strong>Scope</strong>: Vyberte „Manual host action“.</li>



<li><strong>Type</strong>: Vyberte „Script“.</li>



<li><strong>Execute on</strong>: Vyberte „Zabbix agent“.</li>



<li><strong>Commands</strong>: Vložte následující příkaz:</li>
</ul>
</li>
</ul>


<section id="block-code-block_a5d5820289def61a47283f75cf2a43e9" data-id="block-code-block_a5d5820289def61a47283f75cf2a43e9" class="gt-block block-code">
    <pre><code>pgrep -a &#039;zabbix_agent2&#039; &gt;/dev/null &amp;&amp; { echo &quot;==== Zabbix Agent 2 Configuration ====&quot;; grep -Ev &#039;^#|^$&#039; /etc/zabbix/zabbix_agent2.conf; } ; pgrep -a &#039;zabbix_agentd&#039; &gt;/dev/null &amp;&amp; { echo &quot;==== Zabbix Agent (Classic) Configuration ====&quot;; grep -Ev &#039;^#|^$&#039; /etc/zabbix/zabbix_agentd.conf; }</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2090" height="1274" src="https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_example_1.png" alt="" class="wp-image-17997" srcset="https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_example_1.png 2090w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_example_1-300x183.png 300w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_example_1-1024x624.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_example_1-768x468.png 768w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_example_1-1536x936.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_example_1-2048x1248.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_example_1-608x371.png 608w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_example_1-1216x741.png 1216w" sizes="auto, (max-width: 2090px) 100vw, 2090px" /></figure>



<p>Dále je možné (volitelně) vyplnit následující nastavení:</p>



<ul class="wp-block-list">
<li><strong>Description</strong>&nbsp;– popis účelu skriptu</li>



<li><strong>Host group</strong>&nbsp;– omezení použití pouze pro určité skupiny hostů</li>



<li><strong>User group</strong>&nbsp;– omezení použití pouze pro určité uživatelské skupiny</li>



<li>Možnosti nastavení&nbsp;<strong>Required host permissions</strong>:
<ul class="wp-block-list">
<li><strong>Read</strong>&nbsp;– Uživatelé s&nbsp;oprávněním „Read“ k&nbsp;hostovi mohou skript spustit.</li>



<li><strong>Write</strong>&nbsp;– Skript lze spustit pouze s&nbsp;oprávněním „Write“ k&nbsp;hostovi.</li>
</ul>
</li>
</ul>



<ul start="4" class="wp-block-list">
<li>Klikněte na&nbsp;tlačítko&nbsp;<strong>Add</strong>.</li>
</ul>



<h2 class="wp-block-heading"><strong>Příklad 2 &#8211; Zobrazení posledních 10 řádků Zabbix agent logu</strong></h2>



<p>Pokud chcete mít možnost zobrazit posledních 10 řádků ze Zabbix agent logu přímo přes frontend, můžete vytvořit tento skript:</p>



<p>Na vzdáleném hostovi upravte konfiguraci Zabbix agenta příkazem podle typu agenta:</p>



<ul class="wp-block-list">
<li>Pro klasický Zabbix agent:</li>
</ul>


<section id="block-code-block_f918522b1366f58d26fb112e3ab437f8" data-id="block-code-block_f918522b1366f58d26fb112e3ab437f8" class="gt-block block-code">
    <pre><code>nano /etc/zabbix/zabbix_agentd.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<ul class="wp-block-list">
<li>Pro Zabbix agent 2:</li>
</ul>


<section id="block-code-block_418329190d603f39760476dab0171f40" data-id="block-code-block_418329190d603f39760476dab0171f40" class="gt-block block-code">
    <pre><code>nano /etc/zabbix/zabbix_agent2.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p><strong>Povolení DenyKey</strong></p>



<p>Pokud ještě nemáte povolenou tuto možnost, je potřeba ji nejprve aktivovat.</p>



<p>V konfiguraci nejprve najděte a&nbsp;odkomentujte řádek s&nbsp;<code>DenyKey</code>:</p>


<section id="block-code-block_96e6ff16f285f09df59924b79c48672a" data-id="block-code-block_96e6ff16f285f09df59924b79c48672a" class="gt-block block-code">
    <pre><code>DenyKey=system.run[*]</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p><strong>Před řádek s&nbsp;pravidlem&nbsp;<code>DenyKey</code>&nbsp;vložte pravidlo&nbsp;<code>AllowKey</code></strong>, které povolí spuštění pouze konkrétního skriptu (nikdy nepoužívejte obecné pravidlo s&nbsp;*, které může být bezpečnostním rizikem):</p>


<section id="block-code-block_886e811ff33804140aad87b833935df7" data-id="block-code-block_886e811ff33804140aad87b833935df7" class="gt-block block-code">
    <pre><code>AllowKey=system.run[echo &#039;Last 10 lines from Zabbix agent log on server *:&#039;; tail -n 10 /var/log/zabbix/zabbix_agent*.log]</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2576" height="850" src="https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_config_2-1.png" alt="" class="wp-image-18035" srcset="https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_config_2-1.png 2576w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_config_2-1-300x99.png 300w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_config_2-1-1024x338.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_config_2-1-768x253.png 768w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_config_2-1-1536x507.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_config_2-1-2048x676.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_config_2-1-608x201.png 608w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_config_2-1-1216x401.png 1216w" sizes="auto, (max-width: 2576px) 100vw, 2576px" /></figure>



<p>Poté restartujte službu agenta podle typu:</p>



<ul class="wp-block-list">
<li>Zabbix agent:</li>
</ul>


<section id="block-code-block_c8f65206b765adb2b0bee1eb353f6954" data-id="block-code-block_c8f65206b765adb2b0bee1eb353f6954" class="gt-block block-code">
    <pre><code>systemctl restart zabbix-agent</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<ul class="wp-block-list">
<li>Zabbix agent 2:</li>
</ul>


<section id="block-code-block_207b054d5e37f11442893abdafe2ab58" data-id="block-code-block_207b054d5e37f11442893abdafe2ab58" class="gt-block block-code">
    <pre><code>systemctl restart zabbix-agent2</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Ve frontendu vytvořte skript s&nbsp;nastavením:</p>



<ul class="wp-block-list">
<li><strong>Name</strong>: Například „Show agent log“.</li>



<li><strong>Scope</strong>: Vyberte „Manual host action“.</li>



<li><strong>Type</strong>: Vyberte „Script“.</li>



<li><strong>Execute on</strong>: Vyberte „Zabbix agent“.</li>



<li><strong>Commands</strong>: Vložte následující příkaz:</li>
</ul>


<section id="block-code-block_32b410574aa13889ccb7be40a7390141" data-id="block-code-block_32b410574aa13889ccb7be40a7390141" class="gt-block block-code">
    <pre><code>echo &#039;Last 10 lines from Zabbix agent log on server {HOST.HOST}:&#039;; tail -n 10 /var/log/zabbix/zabbix_agent*.log</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Opět volitelně nastavte popis, host group nebo user group dle potřeb.</p>



<p>Nakonec klikněte na&nbsp;tlačítko&nbsp;<strong>Add</strong>.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2084" height="1268" src="https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_example_2.png" alt="" class="wp-image-18040" srcset="https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_example_2.png 2084w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_example_2-300x183.png 300w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_example_2-1024x623.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_example_2-768x467.png 768w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_example_2-1536x935.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_example_2-2048x1246.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_example_2-608x370.png 608w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_example_2-1216x740.png 1216w" sizes="auto, (max-width: 2084px) 100vw, 2084px" /></figure>



<h2 class="wp-block-heading"><strong>Příklad 3 &#8211; Povolení restartu aplikace pomoci Zabbix agenta</strong></h2>



<p><strong>Nastavení sudo pravidla</strong></p>



<p>Aby Zabbix mohl spouštět příkazy s&nbsp;vyššími oprávněními (v&nbsp;tomto případě restart aplikace &nbsp;<code>crond</code> a&nbsp;<code>rsyslog</code>), vytvořte speciální sudoers soubor, například&nbsp;<strong><code>/etc/sudoers.d/zabbix_scripts</code></strong>, a&nbsp;vložte do&nbsp;něj následující obsah:</p>


<section id="block-code-block_be2133d346906efa5c91b4c8ec2b342e" data-id="block-code-block_be2133d346906efa5c91b4c8ec2b342e" class="gt-block block-code">
    <pre><code>nano /etc/sudoers.d/zabbix_scripts</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A vložte následující obsah:</p>


<section id="block-code-block_82b4bf0a1fa90fba4707a93df7a203ce" data-id="block-code-block_82b4bf0a1fa90fba4707a93df7a203ce" class="gt-block block-code">
    <pre><code>zabbix ALL=(ALL) NOPASSWD: /usr/bin/systemctl restart rsyslog
zabbix ALL=(ALL) NOPASSWD: /usr/bin/systemctl restart crond</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1000" height="128" src="https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_sudo_2.png" alt="" class="wp-image-18011" srcset="https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_sudo_2.png 1000w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_sudo_2-300x38.png 300w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_sudo_2-768x98.png 768w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_sudo_2-608x78.png 608w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /></figure>



<p>Tyto pravidla umožní uživateli&nbsp;<code>zabbix</code>&nbsp;spouštět příkazy pro restart&nbsp;bez nutnosti zadávat heslo.</p>



<p>Uložte soubor a&nbsp;ověřte správnou syntaxi příkazem:</p>


<section id="block-code-block_452f923b766bca57f2cf3b9fa08fefaf" data-id="block-code-block_452f923b766bca57f2cf3b9fa08fefaf" class="gt-block block-code">
    <pre><code>visudo -cf /etc/sudoers.d/zabbix_scripts</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Na vzdáleném hostovi upravte konfiguraci Zabbix agenta příkazem podle typu agenta:</p>



<ul class="wp-block-list">
<li>Pro klasický Zabbix agent:</li>
</ul>


<section id="block-code-block_f918522b1366f58d26fb112e3ab437f8" data-id="block-code-block_f918522b1366f58d26fb112e3ab437f8" class="gt-block block-code">
    <pre><code>nano /etc/zabbix/zabbix_agentd.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<ul class="wp-block-list">
<li>Pro Zabbix agent 2:</li>
</ul>


<section id="block-code-block_418329190d603f39760476dab0171f40" data-id="block-code-block_418329190d603f39760476dab0171f40" class="gt-block block-code">
    <pre><code>nano /etc/zabbix/zabbix_agent2.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p><strong>Povolení DenyKey</strong></p>



<p>Pokud ještě nemáte povolenou tuto možnost, je potřeba ji nejprve aktivovat.</p>



<p>V konfiguraci nejprve najděte a&nbsp;odkomentujte řádek s&nbsp;<code>DenyKey</code>:</p>


<section id="block-code-block_96e6ff16f285f09df59924b79c48672a" data-id="block-code-block_96e6ff16f285f09df59924b79c48672a" class="gt-block block-code">
    <pre><code>DenyKey=system.run[*]</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p><strong>Před řádek s&nbsp;pravidlem&nbsp;<code>DenyKey</code>&nbsp;vložte pravidlo&nbsp;<code>AllowKey</code></strong>, které povolí spuštění pouze konkrétního skriptu (nikdy nepoužívejte obecné pravidlo s&nbsp;*, které může být bezpečnostním rizikem):</p>


<section id="block-code-block_be07ce814ae46caf57b1b540bc86c300" data-id="block-code-block_be07ce814ae46caf57b1b540bc86c300" class="gt-block block-code">
    <pre><code>AllowKey=system.run[sudo systemctl restart rsyslog &amp;&amp; echo &quot;Service * restarted successfully.&quot; || echo &quot;Restart of service * failed.&quot;]
AllowKey=system.run[sudo systemctl restart crond &amp;&amp; echo &quot;Service * restarted successfully.&quot; || echo &quot;Restart of service * failed.&quot;]</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2576" height="918" src="https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_config_3.png" alt="" class="wp-image-18009" srcset="https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_config_3.png 2576w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_config_3-300x107.png 300w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_config_3-1024x365.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_config_3-768x274.png 768w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_config_3-1536x547.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_config_3-2048x730.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_config_3-608x217.png 608w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_config_3-1216x433.png 1216w" sizes="auto, (max-width: 2576px) 100vw, 2576px" /></figure>



<p>Poté restartujte službu agenta podle typu:</p>



<ul class="wp-block-list">
<li>Zabbix agent:</li>
</ul>


<section id="block-code-block_c8f65206b765adb2b0bee1eb353f6954" data-id="block-code-block_c8f65206b765adb2b0bee1eb353f6954" class="gt-block block-code">
    <pre><code>systemctl restart zabbix-agent</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<ul class="wp-block-list">
<li>Zabbix agent 2:</li>
</ul>


<section id="block-code-block_207b054d5e37f11442893abdafe2ab58" data-id="block-code-block_207b054d5e37f11442893abdafe2ab58" class="gt-block block-code">
    <pre><code>systemctl restart zabbix-agent2</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p><strong>Vytvoření skriptu pro restart služby s&nbsp;výběrem z&nbsp;menu</strong></p>



<p>Nová funkcionalita v&nbsp;Zabbix 7.0 umožňuje použití uživatelského vstupu s&nbsp;dropdown menu. Tímto způsobem umožníme uživatelům vybrat, kterou službu chtějí restartovat (například&nbsp;rsyslog nebo&nbsp;crond).</p>



<ul start="1" class="wp-block-list">
<li>Přejděte do&nbsp;sekce&nbsp;<strong><strong>Alerts → Scripts</strong></strong>.</li>



<li>Klikněte na&nbsp;tlačítko&nbsp;<strong>Create script</strong>.</li>



<li>Vyplňte pole:
<ul class="wp-block-list">
<li><strong>Name</strong>: „Restart service“.</li>



<li><strong>Scope</strong>: „Manual host action“.</li>



<li><strong>Type</strong>: „Script“.</li>



<li><strong>Execute on</strong>: „Zabbix agent“.</li>



<li><strong>Commands</strong>: Vložte následující příkaz:</li>
</ul>
</li>
</ul>


<section id="block-code-block_10dabb53e0a772b44284a4a1e4a402c8" data-id="block-code-block_10dabb53e0a772b44284a4a1e4a402c8" class="gt-block block-code">
    <pre><code>sudo systemctl restart {MANUALINPUT} &amp;&amp; echo &quot;Service {MANUALINPUT} restarted successfully.&quot; || echo &quot;Restart of service {MANUALINPUT} failed.&quot;</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h3 class="wp-block-heading">Přidání dropdown menu</h3>



<ul start="1" class="wp-block-list">
<li>Klikněte na&nbsp;<strong>Advanced configuration</strong>.</li>



<li>Zaškrtněte&nbsp;<strong>Enable user input</strong>.</li>



<li>Do pole&nbsp;<strong>Input prompt</strong>&nbsp;zadejte:&nbsp;<code>Service name</code>.</li>



<li>V&nbsp;<strong>Input type</strong>&nbsp;vyberte:&nbsp;<code>Dropdown</code>.</li>



<li>Do&nbsp;<strong>Dropdown options</strong>&nbsp;zadejte:
<ul class="wp-block-list">
<li><strong>Enable user input</strong>: Zaškrtněte.</li>



<li><strong>Input prompt</strong>: „Service name“.</li>



<li><strong>Input type</strong>: Vyberte&nbsp;<strong>Dropdown</strong>.</li>



<li><strong>Dropdown options</strong>: Zadejte&nbsp;<code>rsyslog,crond</code>.</li>
</ul>
</li>



<li>Klikněte na&nbsp;tlačítko&nbsp;<strong>Add</strong>&nbsp;a&nbsp;můžete používat nový skript přímo z&nbsp;GUI.</li>
</ul>


<section id="block-code-block_dfa2d62694def9cde14f1b91f3ace797" data-id="block-code-block_dfa2d62694def9cde14f1b91f3ace797" class="gt-block block-code">
    <pre><code>rsyslog,crond</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1564" height="1248" src="https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_example_3.png" alt="" class="wp-image-18017" srcset="https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_example_3.png 1564w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_example_3-300x239.png 300w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_example_3-1024x817.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_example_3-768x613.png 768w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_example_3-1536x1226.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_example_3-608x485.png 608w, https://www.initmax.cz/wp-content/uploads/2025/03/global_scripts_example_3-1216x970.png 1216w" sizes="auto, (max-width: 1564px) 100vw, 1564px" /></figure>



<ul class="wp-block-list">
<li>Uložte změny.</li>
</ul>



<h2 class="wp-block-heading">Příklad spuštění skriptu</h2>



<p>Jakmile jsou skripty vytvořené (v&nbsp;<strong>Alerts → Scripts</strong>&nbsp;a&nbsp;nastavené jako&nbsp;<em>Manual host action</em>), zobrazí se při&nbsp;levém kliknutí na&nbsp;host v&nbsp;sekci&nbsp;<strong>Monitoring → Hosts</strong>&nbsp;v&nbsp;kontextové nabídce (viz obrázky). Tam pak stačí vybrat konkrétní skript (například&nbsp;<em>Restart service</em>&nbsp;nebo&nbsp;<em>Show agent log</em>). Stejné skripty lze obdobným způsobem spustit i&nbsp;v&nbsp;mapách – kliknutím na&nbsp;ikonu hosta se otevře nabídka s&nbsp;dostupnými akcemi. Tímto způsobem máš rychlý přístup k&nbsp;ovládání hostů přímo z&nbsp;přehledu nebo z&nbsp;mapy.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2798" height="1074" src="https://www.initmax.cz/wp-content/uploads/2025/03/frontend_scripts_1.png" alt="" class="wp-image-18028" srcset="https://www.initmax.cz/wp-content/uploads/2025/03/frontend_scripts_1.png 2798w, https://www.initmax.cz/wp-content/uploads/2025/03/frontend_scripts_1-300x115.png 300w, https://www.initmax.cz/wp-content/uploads/2025/03/frontend_scripts_1-1024x393.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/03/frontend_scripts_1-768x295.png 768w, https://www.initmax.cz/wp-content/uploads/2025/03/frontend_scripts_1-1536x590.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/03/frontend_scripts_1-2048x786.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/03/frontend_scripts_1-608x233.png 608w, https://www.initmax.cz/wp-content/uploads/2025/03/frontend_scripts_1-1216x467.png 1216w" sizes="auto, (max-width: 2798px) 100vw, 2798px" /></figure>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2800" height="1078" src="https://www.initmax.cz/wp-content/uploads/2025/03/frontend_scripts_2.png" alt="" class="wp-image-18030" srcset="https://www.initmax.cz/wp-content/uploads/2025/03/frontend_scripts_2.png 2800w, https://www.initmax.cz/wp-content/uploads/2025/03/frontend_scripts_2-300x116.png 300w, https://www.initmax.cz/wp-content/uploads/2025/03/frontend_scripts_2-1024x394.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/03/frontend_scripts_2-768x296.png 768w, https://www.initmax.cz/wp-content/uploads/2025/03/frontend_scripts_2-1536x591.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/03/frontend_scripts_2-2048x788.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/03/frontend_scripts_2-608x234.png 608w, https://www.initmax.cz/wp-content/uploads/2025/03/frontend_scripts_2-1216x468.png 1216w" sizes="auto, (max-width: 2800px) 100vw, 2800px" /></figure>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2798" height="1082" src="https://www.initmax.cz/wp-content/uploads/2025/03/frontend_scripts_3.png" alt="" class="wp-image-18032" srcset="https://www.initmax.cz/wp-content/uploads/2025/03/frontend_scripts_3.png 2798w, https://www.initmax.cz/wp-content/uploads/2025/03/frontend_scripts_3-300x116.png 300w, https://www.initmax.cz/wp-content/uploads/2025/03/frontend_scripts_3-1024x396.png 1024w, https://www.initmax.cz/wp-content/uploads/2025/03/frontend_scripts_3-768x297.png 768w, https://www.initmax.cz/wp-content/uploads/2025/03/frontend_scripts_3-1536x594.png 1536w, https://www.initmax.cz/wp-content/uploads/2025/03/frontend_scripts_3-2048x792.png 2048w, https://www.initmax.cz/wp-content/uploads/2025/03/frontend_scripts_3-608x235.png 608w, https://www.initmax.cz/wp-content/uploads/2025/03/frontend_scripts_3-1216x470.png 1216w" sizes="auto, (max-width: 2798px) 100vw, 2798px" /></figure>



<h2 class="wp-block-heading">Frontend scripts timeout</h2>



<ul class="wp-block-list">
<li><strong>Před verzí 7.0</strong>: Timeout byl řízen parametrem&nbsp;<code>Timeout=</code>&nbsp;v&nbsp;konfiguračních souborech Zabbix serveru (<code>zabbix_server.conf</code>) a&nbsp;Zabbix agenta (<code>zabbix_agentd.conf</code>&nbsp;nebo&nbsp;<code>zabbix_agent2.conf</code>) s&nbsp;rozsahem&nbsp;<strong>1-30 sekund</strong>&nbsp;a&nbsp;vztahoval se pouze na&nbsp;<strong>pasivní</strong>&nbsp;kontroly.</li>



<li><strong>Od verze 7.0</strong>: Timeout se nastavuje&nbsp;<strong>přímo ve frontendu</strong>&nbsp;a&nbsp;vztahuje se&nbsp;<strong>i na&nbsp;aktivní kontroly</strong>. Výchozí hodnota je&nbsp;<strong>60 sekund</strong>, rozsah lze nastavit v&nbsp;<strong>rozmezí 1-300 sekund</strong>. U&nbsp;aktivních kontrol je potřeba brát v&nbsp;úvahu také nastavení&nbsp;<strong>refresh intervalu</strong>, který definuje, jak často agent načítá novou konfiguraci a&nbsp;tím i&nbsp;frekvenci dotazů na&nbsp;nové hodnoty. Výchozí hodnota tohoto intervalu je&nbsp;<strong>5 sekund</strong>, což může ovlivnit chování timeoutu. Pokud je timeout kratší než refresh interval, požadavek na&nbsp;kontrolu se nemusí nikdy provést, proto je potřeba zvolit hodnoty v&nbsp;souladu s&nbsp;tímto nastavením.</li>
</ul>



<p>Jak změnit timeout ve frontendu</p>



<ul start="1" class="wp-block-list">
<li>Přejděte do&nbsp;<strong>Administration → General → Timeouts</strong>.</li>



<li>Najděte možnost&nbsp;<strong>Script execution</strong>.</li>



<li>Změňte hodnotu podle potřeby (rozsah&nbsp;<strong>1-300 sekund</strong>).</li>



<li>Klikněte na&nbsp;<strong>Update</strong>.</li>
</ul>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1156" height="1472" src="https://www.initmax.cz/wp-content/uploads/2025/03/timeout.png" alt="" class="wp-image-18026" srcset="https://www.initmax.cz/wp-content/uploads/2025/03/timeout.png 1156w, https://www.initmax.cz/wp-content/uploads/2025/03/timeout-236x300.png 236w, https://www.initmax.cz/wp-content/uploads/2025/03/timeout-804x1024.png 804w, https://www.initmax.cz/wp-content/uploads/2025/03/timeout-768x978.png 768w, https://www.initmax.cz/wp-content/uploads/2025/03/timeout-608x774.png 608w" sizes="auto, (max-width: 1156px) 100vw, 1156px" /></figure>



<h2 class="wp-block-heading"><strong>Wait vs. Nowait u <code>system.run</code> v action operations</strong></h2>



<p>Zabbix umožňuje při&nbsp;použití <code>system.run</code> v <strong>action skriptech</strong> definovat, zda má příkaz běžet v&nbsp;režimu <strong>Wait</strong> (výchozí) nebo <strong>Nowait</strong>.<br><strong>Rozdíl mezi Wait a&nbsp;Nowait</strong></p>



<ul class="wp-block-list">
<li><strong>Wait (výchozí chování)</strong> – Skript se spustí a <strong>Zabbix čeká na&nbsp;jeho dokončení</strong>, než provede další kroky v&nbsp;rámci akce.</li>



<li><strong>Nowait</strong> – Skript se spustí, ale <strong>Zabbix nečeká na&nbsp;jeho dokončení</strong> – okamžitě pokračuje dál.</li>
</ul>



<p><strong>Kde lze použít Nowait?</strong></p>



<ul class="wp-block-list">
<li><strong>Nowait je možné použít pouze v&nbsp;action skriptech</strong> (např.&nbsp;v&nbsp;sekci <em>Action operations</em> v Zabbixu).</li>



<li><strong>Nelze jej použít v&nbsp;běžných frontend skriptech</strong>, kde Zabbix vždy čeká na&nbsp;výsledek.</li>
</ul>



<p><strong>Jak správně nastavit AllowKey pro Nowait?</strong><br>Pokud je v <code>AllowKey</code> povolen konkrétní příkaz, např.:</p>


<section id="block-code-block_a65b6a3b4d528666d35145d8c74d2751" data-id="block-code-block_a65b6a3b4d528666d35145d8c74d2751" class="gt-block block-code">
    <pre><code>AllowKey=system.run[myscript.sh]</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>…pak varianta s <code>nowait</code> nebude fungovat (<code>system.run[myscript.sh,nowait]</code>).<br><strong>Správné řešení:</strong><br>Aby bylo možné použít <code>nowait</code>, je nutné povolit hvězdičkový zápis:</p>


<section id="block-code-block_c35eb283fdb70c7933b625de7abb5e38" data-id="block-code-block_c35eb283fdb70c7933b625de7abb5e38" class="gt-block block-code">
    <pre><code>AllowKey=system.run[myscript.sh,*]</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p><strong>Pozor:</strong> Pokud v&nbsp;konfiguraci není povolen <code>nowait</code>, může Zabbix odmítnout provedení skriptu s&nbsp;touto volbou.<br><strong>Kdy použít Wait a&nbsp;kdy Nowait?</strong></p>



<ul class="wp-block-list">
<li><strong>Wait (synchronní provedení)</strong> – Hodí se pro krátké skripty, kde je nutné znát výsledek příkazu před provedením dalších operací.</li>



<li><strong>Nowait (asynchronní provedení)</strong> – Vhodné pro dlouhotrvající úlohy, kde není potřeba čekat na&nbsp;výsledek (např.&nbsp;restart služby, spuštění skriptu na&nbsp;pozadí).</li>
</ul>



<h2 class="wp-block-heading">Krátké tipy</h2>



<ul class="wp-block-list">
<li><strong>Bezpečnost a&nbsp;oprávnění</strong><br>Ujisti se, že máš správně nastavené uživatelské a&nbsp;host groupy, které mohou skripty spouštět. Příliš široké nastavení oprávnění může vést k&nbsp;bezpečnostním rizikům.</li>



<li><strong>SELinux / firewall</strong><br>Pokud máš aktivní SELinux či&nbsp;firewall, může být nutné provést další kroky (např.&nbsp;povolit potřebné porty nebo upravit SELinux pravidla), aby skripty fungovaly bez omezení.</li>



<li><strong>Záloha a&nbsp;logování</strong><br>Než provedeš změny v&nbsp;konfiguračních souborech Zabbixu, vytvoř si zálohu. Pokud se objeví chyby, zkontroluj log Zabbix serveru či&nbsp;agenta (typicky v&nbsp;<code>/var/log/zabbix/</code>), abys mohl rychle odhalit případné problémy.</li>



<li><strong>Ověření funkčnosti</strong><br>Po úpravách a&nbsp;restartu služeb vždy proveď testovací spuštění skriptů, abys ověřil, že veškeré změny proběhly správně a&nbsp;skripty se dají spustit bez chyb.</li>



<li><strong>Doba běhu skriptů (timeout)</strong><br>Pokud se skript nespustí nebo se ukončí s&nbsp;chybou, může být problém s&nbsp;nastaveným timeoutem. Ten můžeš upravit v&nbsp;<strong>Administration → General → Timeouts</strong>&nbsp;(položka „Script execution“). Pro běžné operace obvykle stačí výchozích 60 sekund, ale při&nbsp;rozsáhlejších skriptech může být potřeba hodnotu zvýšit.</li>
</ul>


<section id="block-newsletter-block_a43adc1ce7da2edb225f7cdd0ccad903" data-id="block-newsletter-block_a43adc1ce7da2edb225f7cdd0ccad903" class="gt-block block-newsletter">
    <section id="newsletter" class="newsletter">
	<div class="gradient basic">
		<div class="newsletter__inner width width--general">
			<div class="col left">
									<h2 class="newsletter__title">Buďte v&nbsp;obraze s&nbsp;naším newsletterem</h2>
													<div class="newsletter__content"><p>Díky initMAX newsletteru Vám neunikne žádná z&nbsp;pozvánek na&nbsp;akce a&nbsp;webináře, žádný z&nbsp;tipů, jak dostat ze svého IT MAXimum, ani ověřené informace o&nbsp;novinkách ze světa Zabbix a&nbsp;dalších technologií.</p>
</div>
							</div>
			<div class="col right form-wrapper">
				<div class="newsletter-form">
	<form method="post" action="/wiki/kapitola/zabbix/feed/" enctype="multipart/form-data">
		<input type="hidden" name="url" value="https://www.initmax.cz/wiki/kapitola/zabbix/feed/">

		<div class="inputs">

			<label for="newsletter-form_contact_email" class="top">Vaše e-mailová adresa:</label>
			<div class="df">

				<div class="input">
					<input type="text" id="newsletter-form_contact_email" name="newsletter_email" placeholder="@" data-format="email" data-required="1">
									</div><!-- /.input -->

				<a href="#" class="btn btn--white sendBtn">Odeslat</a>

			</div>

			<div class="bottom nm">
				<label for="newsletter-form_gdpr" class="checkbox gdpr">
					<input type="checkbox" id="newsletter-form_gdpr" name="newsletter_gdpr">
					<span>Souhlasím se&nbsp;<a href="https://www.initmax.cz/ochrana-osobnich-udaju/" target="_blank">zpracováním osobních údajů</a>.</span>
				</label>
			</div>

		</div><!-- /.inputs -->
		<div class="sent hidden">
			<div class="iconOk"><h3>Děkujeme, že jste se přihlásili k&nbsp;odběru našeho newsletteru.</h3>
</div>
			<button class="sent__close" title="Zavřít" onclick="closeFormMessage(this,event)"><svg data-name="Group 3602" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 3272" d="M0,0H24V24H0Z" fill="none"/><line data-name="Line 98" y2="14" transform="translate(7.05 7.05) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 99" x2="14" transform="translate(7.05 16.95) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</button>
		</div><!-- /.sent -->
	</form>
</div>			</div>
		</div>
	</div>
</section></section>



<section id="social-links-block_1abcf7e2670e386335b1e2815d119b2b" data-id="social-links-block_1abcf7e2670e386335b1e2815d119b2b" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>

<p>The post <a href="https://www.initmax.cz/wiki/frontend-scripty-a-sudo-v-zabbixu/">Frontend scripty a&nbsp;sudo v&nbsp;Zabbixu</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Zabbix 7.2 &#8211; návod na&#160;instalaci v&#160;5 minutách</title>
		<link>https://www.initmax.cz/wiki/zabbix-7-2-navod-na-instalaci-v-5-minutach/</link>
		
		<dc:creator><![CDATA[Tomáš Heřmánek]]></dc:creator>
		<pubDate>Sat, 07 Dec 2024 01:15:08 +0000</pubDate>
				<guid isPermaLink="false">https://www.initmax.cz/?post_type=wiki&#038;p=17088</guid>

					<description><![CDATA[<p>V tomto návodu si ukážeme, jak během pěti minut nainstalovat a nakonfigurovat nejnovější Zabbix verze 7.2 s databází PostgreSQL 17 a TimescaleDB. Výběr ...</p>
<p>The post <a href="https://www.initmax.cz/wiki/zabbix-7-2-navod-na-instalaci-v-5-minutach/">Zabbix 7.2 &#8211; návod na&nbsp;instalaci v&nbsp;5 minutách</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>V tomto návodu si ukážeme, jak během pěti minut nainstalovat a&nbsp;nakonfigurovat nejnovější Zabbix verze 7.2 s&nbsp;databází PostgreSQL 17 a&nbsp;TimescaleDB.</p>



<h2 class="wp-block-heading" id="vyber-operacniho-systemu">Výběr operačního systému</h2>



<p>Návod obsahuje postup pro RHEL platformy na&nbsp;verzi 9, kde stačí případně jen poupravit repozitáře. Návod pro Debian je připraven pro verzi 12, která je aktuálně poslední podporovanou verzí.</p>


<section id="os-switcher-block_4c6cbe17c747fb27eef484e685111433" data-id="os-switcher-block_4c6cbe17c747fb27eef484e685111433" class="gt-block os-switcher">
                    <a class="os-switcher__item is-active" onclick="osSwitch(this,'#rhel')">
                            <figure>
                     <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="800px" height="800px" viewBox="0 -31 256 256" version="1.1" preserveAspectRatio="xMidYMid"><g><path d="M170.758031,111.610687 C187.582343,111.610687 211.924474,108.140925 211.924474,88.1292728 C211.974775,86.5848226 211.834752,85.0400539 211.507565,83.5298204 L201.48829,40.009856 C199.175115,30.434388 197.144363,26.0904607 180.333499,17.6850288 C167.288269,11.014478 138.871184,0 130.465752,0 C122.638614,0 120.365785,10.0865183 111.032394,10.0865183 C102.048668,10.0865183 95.3781173,2.55525131 86.9726853,2.55525131 C78.9034707,2.55525131 73.6450325,8.05576597 69.5835277,19.3661152 C69.5835277,19.3661152 58.2731785,51.2664105 56.8207199,55.8927602 C56.5898643,56.7423115 56.4900906,57.6221338 56.5248487,58.5018063 C56.5248487,70.9014995 105.343597,111.556893 170.758031,111.556893 M214.506623,96.2522822 C216.833247,107.26676 216.833247,108.423348 216.833247,109.875806 C216.833247,128.703974 195.665007,139.153607 167.839665,139.153607 C104.953585,139.193953 49.8677466,102.344539 49.8677466,77.9889597 C49.8641113,74.5987697 50.555245,71.2437963 51.898499,68.1310691 C29.2778005,69.2607592 0,73.2953665 0,99.1437508 C0,141.48023 100.313787,193.661152 179.741757,193.661152 C240.63743,193.661152 255.995835,166.118232 255.995835,144.371699 C255.995835,127.264964 241.202275,107.845054 214.53352,96.2522822" fill="#EE0000"></path><path d="M214.506623,96.2522822 C216.833247,107.26676 216.833247,108.423348 216.833247,109.875806 C216.833247,128.703974 195.665007,139.15364 167.839665,139.15364 C104.953585,139.193953 49.8677323,102.344539 49.8677323,77.9889597 C49.8641113,74.5987697 50.555245,71.2437963 51.898499,68.1310691 L56.8207199,55.946555 C56.5952566,56.7787916 56.4955298,57.6400686 56.5248487,58.5018063 C56.5248487,70.9014995 105.343597,111.556893 170.758031,111.556893 C187.582343,111.556893 211.924474,108.08713 211.924474,88.075478 C211.974775,86.5310279 211.834752,84.9862591 211.507565,83.4760257 L214.506623,96.2522822 Z" fill="#000000"></path></g></svg>                 </figure>
                        <span>Alma/CentOS/RHEL/Rocky 9</span>
        </a>
                    <a class="os-switcher__item" onclick="osSwitch(this,'#debian')">
                            <figure>
                     <svg xmlns="http://www.w3.org/2000/svg" width="30.412" height="37.855" viewBox="0 0 30.412 37.855"><g data-name="Group 4978" transform="translate(0)"><path data-name="Path 3295" d="M51.55,57.148c-.627.009.119.323.938.449.226-.177.431-.355.614-.529a4.68,4.68,0,0,1-1.552.08" transform="translate(-33.375 -37.148)" fill="#a80030"></path><path data-name="Path 3296" d="M60.9,51.791a3.984,3.984,0,0,0,.742-1.664,4.059,4.059,0,0,1-.522,1.154c-1.172.738-.11-.438,0-.886-1.261,1.587-.173.952-.219,1.395" transform="translate(-39.357 -32.63)" fill="#a80030"></path><path data-name="Path 3297" d="M64.59,44.219c.076-1.13-.222-.772-.323-.341.117.061.209.8.323.341" transform="translate(-41.805 -28.292)" fill="#a80030"></path><path data-name="Path 3298" d="M45.172,1.4c.335.06.723.106.669.186.366-.08.449-.154-.669-.186" transform="translate(-29.376 -0.911)" fill="#a80030"></path><path data-name="Path 3299" d="M46.647,1.932l-.237.049.22-.02.016-.029" transform="translate(-30.181 -1.258)" fill="#a80030"></path><path data-name="Path 3300" d="M27.224,16.859a5.583,5.583,0,0,1-.6,2.378l-.542.271c-.444.861.043.547-.275,1.232a14.973,14.973,0,0,1-2.553,2.047c-.329-.007.223-.389.3-.538-.927.637-.744.956-2.162,1.342l-.042-.092c-3.5,1.645-8.354-1.615-8.291-6.064-.037.282-.106.212-.184.326a5.6,5.6,0,0,1,3.144-5.526,5.3,5.3,0,0,1,5.9.767,5.257,5.257,0,0,0-4.3-2.063,4.856,4.856,0,0,0-4.172,2.489c-.951.6-1.061,2.308-1.475,2.62-.557,4.1,1.049,5.867,3.765,7.949.428.288.12.332.178.552a7.372,7.372,0,0,1-2.409-1.842,6.473,6.473,0,0,0,1.253,1.444c-.851-.288-1.988-2.062-2.32-2.135,1.467,2.627,5.952,4.607,8.3,3.624a9.8,9.8,0,0,1-3.688-.429c-.513-.264-1.21-.811-1.086-.913a9.158,9.158,0,0,0,9.289-1.316c.705-.549,1.476-1.484,1.7-1.5-.335.5.057.243-.2.688.7-1.134-.305-.461.727-1.958l.381.525c-.142-.941,1.169-2.084,1.036-3.572.3-.455.335.49.016,1.537.443-1.162.117-1.348.23-2.307a8.71,8.71,0,0,1,.367,1,4.423,4.423,0,0,1,.441-2.543c-.142-.063-.445.5-.514-.83.01-.576.16-.3.218-.444a2.546,2.546,0,0,1-.59-1.353c.131-.2.35.516.528.545a13.163,13.163,0,0,1-.32-1.7c-.52-1.087-.184.145-.606-.467-.554-1.727.459-.4.528-1.185A13.868,13.868,0,0,1,30.732,13.3a15.9,15.9,0,0,0-.769-2.765c.255.107-.41-1.958.331-.59A12.326,12.326,0,0,0,24.513,3.03c.293.268.662.6.529.657-1.189-.708-.98-.763-1.15-1.062-.969-.394-1.032.032-1.674,0A19.878,19.878,0,0,0,18.36,1.153l.076.357c-1.209-.4-1.409.153-2.716,0-.08-.062.419-.225.829-.284-1.169.154-1.115-.23-2.259.043a9.724,9.724,0,0,1,.881-.5c-.954.058-2.277.555-1.868.1C11.748,1.57,8.986,2.544,7.436,4l-.049-.326c-.71.853-3.1,2.547-3.288,3.651l-.19.044a20.47,20.47,0,0,0-.9,1.979c-.483.824-.709.317-.64.446A30.106,30.106,0,0,0,.536,14.669c.291.435.007,2.616.117,4.362-.478,8.623,6.052,17,13.189,18.929a14.369,14.369,0,0,0,3.925.4c-1.561-.446-1.763-.237-3.284-.767-1.1-.517-1.338-1.107-2.115-1.781l.308.543c-1.524-.539-.886-.667-2.126-1.06l.328-.429a2.824,2.824,0,0,1-1.531-1.273l-.54.021c-.649-.8-1-1.378-.97-1.826l-.175.311c-.2-.34-2.389-3-1.252-2.384a2.563,2.563,0,0,1-.8-.867l.231-.265a4.4,4.4,0,0,1-.972-1.906,1.236,1.236,0,0,0,.695.535c-1.381-3.427-1.459-.189-2.5-3.489l.221-.018a7.327,7.327,0,0,1-.409-.805l.1-.96c-.994-1.15-.278-4.889-.135-6.94.1-.834.83-1.722,1.386-3.114l-.339-.058C4.532,10.7,7.58,7.3,8.992,7.471c.684-.859-.136,0-.269-.22,1.5-1.554,1.974-1.1,2.988-1.378,1.093-.649-.938.253-.42-.247,1.89-.483,1.339-1.1,3.8-1.342.26.148-.6.229-.82.421,1.575-.77,4.983-.6,7.2.428,2.569,1.2,5.455,4.749,5.569,8.088l.13.035c-.066,1.327.2,2.862-.262,4.272l.317-.667" transform="translate(-0.32 -0.503)" fill="#a80030"></path><path data-name="Path 3301" d="M32.208,59.764l-.088.44a8.451,8.451,0,0,0,1.266,1.6c-.379-.739-.66-1.045-1.178-2.044" transform="translate(-20.88 -38.903)" fill="#a80030"></path><path data-name="Path 3302" d="M34.247,58.123a3.488,3.488,0,0,1-.492-.821,5.711,5.711,0,0,0,.685,1.39l-.193-.569" transform="translate(-21.944 -37.3)" fill="#a80030"></path><path data-name="Path 3303" d="M82.358,48.916l-.092.231a11.156,11.156,0,0,1-1.093,3.489,10.961,10.961,0,0,0,1.185-3.72" transform="translate(-52.81 -31.841)" fill="#a80030"></path><path data-name="Path 3304" d="M45.054.187A13.512,13.512,0,0,1,46.546,0c-.586.049-1.17.079-1.746.153l.254.035" transform="translate(-29.133)" fill="#a80030"></path><path data-name="Path 3305" d="M2.44,23.219c.1.9-.681,1.256.172.659.457-1.03-.179-.284-.172-.659" transform="translate(-1.409 -15.114)" fill="#a80030"></path><path data-name="Path 3306" d="M-.053,32.764a9.824,9.824,0,0,0,.307-1.315c-.543.694-.25.842-.307,1.315" transform="translate(0.082 -20.471)" fill="#a80030"></path></g></svg>                 </figure>
                        <span>Debian 12</span>
        </a>
    </section>



<section id="block-webinar-block_1fad10b045f0f885476b7c6a81663d7e" data-id="block-webinar-block_1fad10b045f0f885476b7c6a81663d7e" class="gt-block block-webinar">
    <div class="connected-webinars__grid">
        <a href="https://www.initmax.cz/webinar/instalace-zabbixu-7-2-v-peti-minutach/" class="grid-item">
	<article class="webinar-promotion">
		<div class="webinar-promotion__thumbnail-wrap">
			<figure class="webinar-promotion__thumbnail">
					<img decoding="async" src="https://www.initmax.cz/wp-content/uploads/2024/12/03_thumbnail_web.png"
				 width="400"
		 height="250"
		 class=""
		 alt="Instalace Zabbixu 7.2 v&nbsp;pěti minutách"
		 loading="lazy"	>
									<div class="webinar-promotion__tags">
						<span class="tag tag--small" style="color:#ffffff;background-color:#4caf50;">Nový</span><span class="tag tag--small" style="color:#ffffff;background-color:#d40000;">Zabbix</span>					</div>
							</figure>
		</div>
		<div class="webinar-promotion__text">
			<div>
									<time datetime="2024-12-19">19.&nbsp;12.&nbsp;2024</time>
							</div>
			<h3 class="webinar-promotion__title">Instalace Zabbixu 7.2 v&nbsp;pěti minutách</h3>
			<div class="icon-link">
				<figure class="icon-wrap icon-wrap--primary"><svg data-name="Group 3411" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 455" d="M0,0H24V24H0Z" fill="none"/><path data-name="Path 456" d="M15,10l4.553-2.276A1,1,0,0,1,21,8.618v6.764a1,1,0,0,1-1.447.894L15,14V10Z" transform="translate(0 0)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><rect data-name="Rectangle 1286" width="12" height="12" rx="2" transform="translate(3.112 6)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</figure>
				<span>Zhlédnout záznam</span>
			</div>
		</div>
	</article>
</a>    </div>
</section>


<section id="social-links-block_e69d04f3891993c353798cff14419e78" data-id="social-links-block_e69d04f3891993c353798cff14419e78" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>




<div id="rhel" class="wp-block-group"><div class="wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained">
<h2 class="wp-block-heading">Než začneme</h2>



<p>Pro účely této <strong>ukázky</strong> si nejdříve přepneme SELinux do&nbsp;Permissive módu.</p>



<p>Pokud plánujete SELinux trvale deaktivovat, můžete tak učinit úpravou konfiguračního souboru.&nbsp;Nicméně, doporučujeme zvážit možnost naučit se s&nbsp;SELinuxem pracovat a&nbsp;využít jeho bezpečnostní výhody.&nbsp;Podrobné informace o&nbsp;správném nastavení a&nbsp;monitorování SELinuxu naleznete <a href="https://www.initmax.cz/wiki/selinux-integrace-se-zabbixem-a-dalsimi-nastroji/">v našem samostatném článku.​</a></p>


<section id="block-code-block_26fe88d14fec2234cc8a18b59f25c83a" data-id="block-code-block_26fe88d14fec2234cc8a18b59f25c83a" class="gt-block block-code">
    <pre><code>setenforce 0</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Instalace PostgreSQL</h2>



<p>V prvním kroku si naistalujeme repozitáře pro PostgreSQL a&nbsp;zakážeme výchozí, systémové PostgreSQL repozitáře.</p>


<section id="block-code-block_f5dec08571efcca325da9f1cbc4a6cb0" data-id="block-code-block_f5dec08571efcca325da9f1cbc4a6cb0" class="gt-block block-code">
    <pre><code>dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm
dnf -qy module disable postgresql</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Následně pak nainstalujeme PostgreSQL, v&nbsp;tomto případě to bude aktuálně podporovaná verze 17.</p>


<section id="block-code-block_6de26a950d1cb38dbbcf9f9d79427e2f" data-id="block-code-block_6de26a950d1cb38dbbcf9f9d79427e2f" class="gt-block block-code">
    <pre><code>dnf install -y postgresql17-server</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Inicializujeme databázi a&nbsp;nastavíme její automatické spouštění.</p>


<section id="block-code-block_83a9f9c7e1d111f8513e912485e42870" data-id="block-code-block_83a9f9c7e1d111f8513e912485e42870" class="gt-block block-code">
    <pre><code>/usr/pgsql-17/bin/postgresql-17-setup initdb
systemctl enable postgresql-17 --now</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Instalace Zabbix serveru a&nbsp;jeho součástí</h2>



<p>Databáze je nyní nainstalovaná, a&nbsp;můžeme tedy přikročit k&nbsp;instalaci Zabbix serveru a&nbsp;všech jeho součástí.</p>



<p>Nejprve si z&nbsp;repozitáře EPEL vyloučíme jakékoliv instalační balíčky týkající se Zabbixu. Za předpokladu, že je nainstalován.</p>



<p>To provedeme tak, že na&nbsp;konec souboru <code>/etc/yum.repos.d/epel.repo</code> vložíme následující řádek:</p>


<section id="block-code-block_432f0117d50c66be4f44b32b2e0d6ae4" data-id="block-code-block_432f0117d50c66be4f44b32b2e0d6ae4" class="gt-block block-code">
    <pre><code>[epel]
...
excludepkgs=zabbix*</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Přidáme si repozitáře Zabbixu a&nbsp;vyčistíme instalační cache.</p>


<section id="block-code-block_5675a6ea2783935d72d1349c1c8d2a07" data-id="block-code-block_5675a6ea2783935d72d1349c1c8d2a07" class="gt-block block-code">
    <pre><code>rpm -Uvh https://repo.zabbix.com/zabbix/7.2/release/rocky/9/noarch/zabbix-release-latest-7.2.el9.noarch.rpm
dnf clean all</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A nainstalujeme všechny potřebné součásti Zabbixu.</p>



<p>V tomto případě použijeme jako primárního monitorovacího agenta Zabbix Agent 2, který vám doporučujeme používat, jelikož přináší daleko více funkcionalit.</p>


<section id="block-code-block_3b2ae4d2991a545913893279fdf13999" data-id="block-code-block_3b2ae4d2991a545913893279fdf13999" class="gt-block block-code">
    <pre><code>dnf install zabbix-server-pgsql zabbix-web-pgsql zabbix-apache-conf zabbix-sql-scripts zabbix-agent2 zabbix-web-service</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Inicializace databáze</h2>



<p>Nejprve vytvoříme databázového uživatele pro Zabbix, budeme vyzváni k&nbsp;zadání jeho přístupového hesla.</p>


<section id="block-code-block_5ef87050dcbe91a09b2ac142872ae293" data-id="block-code-block_5ef87050dcbe91a09b2ac142872ae293" class="gt-block block-code">
    <pre><code>cd /tmp
sudo -u postgres createuser --pwprompt zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V tuto chvíli jsme schopni naimportovat výchozí schéma a&nbsp;data. Opět budeme vyzváni k&nbsp;zadání hesla. <br>Zde použijeme heslo z&nbsp;předchozího kroku.</p>


<section id="block-code-block_188846ca1afab77af94505aec9c23bed" data-id="block-code-block_188846ca1afab77af94505aec9c23bed" class="gt-block block-code">
    <pre><code>sudo -u postgres createdb -O zabbix zabbix
zcat /usr/share/zabbix/sql-scripts/postgresql/server.sql.gz | sudo -u zabbix psql zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Nastavení firewallu</h2>



<p>Nazávěr na&nbsp;firewallu povolíme porty, které jsou nezbytné pro běh Zabbix serveru.</p>


<section id="block-code-block_b287b9b6a4cb5baf54fa11e92b1a2622" data-id="block-code-block_b287b9b6a4cb5baf54fa11e92b1a2622" class="gt-block block-code">
    <pre><code>firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-port=10051/tcp
firewall-cmd --reload</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Instalace TimescaleDB</h2>



<p>Nyní se pustíme do&nbsp;instalace TimescaleDB a&nbsp;začneme tím, že přidáme její oficiální repozitář.</p>


<section id="block-code-block_c94b867696d74f4621828513077cf383" data-id="block-code-block_c94b867696d74f4621828513077cf383" class="gt-block block-code">
    <pre><code>tee /etc/yum.repos.d/timescale_timescaledb.repo &lt;&lt;EOL
[timescale_timescaledb]
name=timescale_timescaledb
baseurl=https://packagecloud.io/timescale/timescaledb/el/$(rpm -E %{rhel})/\$basearch
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/timescale/timescaledb/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
EOL</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nainstalujme TimescaleDB.</p>


<section id="block-code-block_4df5d2f8011575288a20a77c94857aa4" data-id="block-code-block_4df5d2f8011575288a20a77c94857aa4" class="gt-block block-code">
    <pre><code>dnf install timescaledb-2-postgresql-17 timescaledb-2-loader-postgresql-17</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Spustíme utilitu <code>timescaledb-tune</code> a&nbsp;jako parametr jí předáme vyšší hodnotu maximálního množství připojení (<code>--max-conns</code>), které pro tyto testovací účely nastavíme na&nbsp;<code>125</code>.</p>



<p>Tato utilita slouží k&nbsp;přizpůsobení výchozího nastavení PostgreSQL vůčihledně výkonu a&nbsp;adekvátnímu nastavení parametrů PostgreSQL pro fungování s&nbsp;TimescaleDB.</p>



<p>Zároveň nám tato utilit pomocí instalačního průvodce pomůže vybrat aktuální a&nbsp;platný konfigurační soubor PostgreSQL a&nbsp;nastaví i&nbsp;automatické načítání knihoven TimescaleDB.</p>



<p>Prosím, odpovídejte &#8222;ano&#8220; (y) na&nbsp;všechny otázky. Pozor, automatický tuner předpokládá, že PostgreSQL běží na&nbsp;samostatném serveru, a&nbsp;proto může být potřeba případně upravit parametry.</p>


<section id="block-code-block_110245a0411174e0fe19b3c2d8445d43" data-id="block-code-block_110245a0411174e0fe19b3c2d8445d43" class="gt-block block-code">
    <pre><code>timescaledb-tune --pg-config /usr/pgsql-17/bin --max-conns=125</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1530" height="584" src="https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72-tune.png" alt="" class="wp-image-17150" srcset="https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72-tune.png 1530w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72-tune-300x115.png 300w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72-tune-1024x391.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72-tune-768x293.png 768w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72-tune-608x232.png 608w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72-tune-1216x464.png 1216w" sizes="auto, (max-width: 1530px) 100vw, 1530px" /></figure>



<p>Následně restartujeme systémovou službu pro PostgreSQL:</p>


<section id="block-code-block_9062496a826a223a453a4a4c8e76e4c8" data-id="block-code-block_9062496a826a223a453a4a4c8e76e4c8" class="gt-block block-code">
    <pre><code>systemctl restart postgresql-17.service</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Zbývá již jen vytvořit a&nbsp;aktivovat samotnou TimescaleDB:</p>



<p>Pozor, během vývoje došlo ke změně cesty z&nbsp;původní /usr/share/zabbix-sql-scripts/postgresql/timescaledb/schema.sql na&nbsp;novou /usr/share/zabbix/sql-scripts/postgresql/timescaledb/schema.sql.</p>


<section id="block-code-block_c99bb70c87e30421ce22bd3c1021ccd4" data-id="block-code-block_c99bb70c87e30421ce22bd3c1021ccd4" class="gt-block block-code">
    <pre><code>echo &quot;CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;&quot; | sudo -u postgres psql zabbix
cat /usr/share/zabbix/sql-scripts/postgresql/timescaledb/schema.sql | sudo -u zabbix psql zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Nastavení Zabbix serveru</h2>



<p>Otevřeme konfigurační soubor Zabbix serveru v&nbsp;cestě:</p>


<section id="block-code-block_a3201247259c3cd7930790772b083724" data-id="block-code-block_a3201247259c3cd7930790772b083724" class="gt-block block-code">
    <pre><code>nano /etc/zabbix/zabbix_server.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V tomto konfiguračním souboru upravíme následující parametry tak, jak vídíte na&nbsp;předloze níže:</p>


<section id="block-code-block_600af19b33b347d60e67f614dc9cf571" data-id="block-code-block_600af19b33b347d60e67f614dc9cf571" class="gt-block block-code">
    <pre><code>...
DBPassword=password
StartReportWriters=1
WebServiceURL=http://localhost:10053/report
...</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V dalším kroku doinstalujeme všechny jazykové balíčky pro Zabbix frontend:</p>


<section id="block-code-block_7ff7c6f6c4e84f489087255613d6c55c" data-id="block-code-block_7ff7c6f6c4e84f489087255613d6c55c" class="gt-block block-code">
    <pre><code>dnf install glibc-langpack-en glibc-langpack-cs glibc-langpack-sk glibc-langpack-fr glibc-langpack-de glibc-langpack-es glibc-langpack-it glibc-langpack-zh glibc-langpack-pt glibc-langpack-da glibc-langpack-nb glibc-langpack-pl glibc-langpack-tr glibc-langpack-he glibc-langpack-ja glibc-langpack-ko glibc-langpack-ru glibc-langpack-uk glibc-langpack-ca glibc-langpack-ka glibc-langpack-vi</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A nakonec restartujeme všechny související služby a&nbsp;nastavíme je tak, aby se spouštěly automaticky po&nbsp;startu:</p>


<section id="block-code-block_322a519fb54ec7ee7f12b66a6689372b" data-id="block-code-block_322a519fb54ec7ee7f12b66a6689372b" class="gt-block block-code">
    <pre><code>systemctl restart zabbix-server zabbix-web-service zabbix-agent2 httpd php-fpm
systemctl enable zabbix-server zabbix-web-service zabbix-agent2 httpd php-fpm</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Pro ověření stavu, že nám Zabbix server nastartoval v&nbsp;pořádku můžeme kromě jiného zkontrolovat i&nbsp;jeho log soubor:</p>


<section id="block-code-block_e2beb37c0f09e4ec71ccff0956237002" data-id="block-code-block_e2beb37c0f09e4ec71ccff0956237002" class="gt-block block-code">
    <pre><code>less /var/log/zabbix/zabbix_server.log</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V případě, že uvidíte v&nbsp;log souboru zprávu o&nbsp;tom, že je verze TimescaleDB příliš nová, pak to není žádný velký problém. Zabbix nedokáže dostatečně rychle reagovat na&nbsp;nejnovější verze TimescaleDB tak, aby ji ve svém kódu nastavil jako podporovanou, ovšem kompatibilita je Zabbixem zaručena a&nbsp;námi ověřena.</p>



<p>V případě této chyby stačí otevřít konfigurační soubor Zabbix serveru v&nbsp;cestě <code>/etc/zabbix/zabbix_server.conf</code> a&nbsp;zde upravte následující konfigurační parametr:</p>


<section id="block-code-block_2494d96aefa4c80691ce0c8120f44271" data-id="block-code-block_2494d96aefa4c80691ce0c8120f44271" class="gt-block block-code">
    <pre><code>AllowUnsupportedDBVersions=1</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Soubor s&nbsp;tímto nastavením uložte a&nbsp;zrestartujte systémovou službu Zabbix serveru.</p>


<section id="block-code-block_62d17dffccdff2db9e9329733e65cf7f" data-id="block-code-block_62d17dffccdff2db9e9329733e65cf7f" class="gt-block block-code">
    <pre><code>systemctl restart zabbix-server</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Nastavení Zabbix frontendu</h2>



<p>V prohlížeči si otevřeme cílové URL, na&nbsp;kterém Zabbix běží. Například tedy <code>http://192.168.0.50/zabbix</code>, kde nás uvítá průvodce prvotní instalací.</p>



<p>Po zvolení implicitního jazyka se tlačítkem <code>Next step</code> posuneme na&nbsp;stránku s&nbsp;kontrolou minimálních požadavků.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1786" height="1132" src="https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72install1.png" alt="" class="wp-image-17155" srcset="https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72install1.png 1786w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72install1-300x190.png 300w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72install1-1024x649.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72install1-768x487.png 768w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72install1-1536x974.png 1536w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72install1-608x385.png 608w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72install1-1216x771.png 1216w" sizes="auto, (max-width: 1786px) 100vw, 1786px" /></figure>



<p>Pokud je kontrola v&nbsp;pořádku, pak se tedy můžeme kliknutím na&nbsp;<code>Next step</code> posunout na&nbsp;další stránku s&nbsp;nastavením připojení do&nbsp;databáze.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1794" height="1134" src="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-2.png" alt="" class="wp-image-16593" srcset="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-2.png 1794w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-2-300x190.png 300w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-2-1024x647.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-2-768x485.png 768w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-2-1536x971.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-2-608x384.png 608w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-2-1216x769.png 1216w" sizes="auto, (max-width: 1794px) 100vw, 1794px" /></figure>



<p>Zde vyplňujeme pouze políčko <strong>Password</strong> pro přístup do&nbsp;databáze, nic dalšího není třeba měnit.</p>



<p>Po vyplnění opět klikneme na&nbsp;<code>Next step</code>.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1794" height="1134" src="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-3.png" alt="" class="wp-image-16591" srcset="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-3.png 1794w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-3-300x190.png 300w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-3-1024x647.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-3-768x485.png 768w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-3-1536x971.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-3-608x384.png 608w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-3-1216x769.png 1216w" sizes="auto, (max-width: 1794px) 100vw, 1794px" /></figure>



<p>Na následující stránce se základním nastavením vyplníme název serveru, časové pásmo, a&nbsp;kliknutím na&nbsp;<code>Next step</code> pokračujeme k&nbsp;souhrnu konfigurace.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1796" height="1124" src="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-4.png" alt="" class="wp-image-16589" srcset="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-4.png 1796w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-4-300x188.png 300w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-4-1024x641.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-4-768x481.png 768w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-4-1536x961.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-4-608x381.png 608w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-4-1216x761.png 1216w" sizes="auto, (max-width: 1796px) 100vw, 1796px" /></figure>



<p>V tomto souhrnu zkontrolumeme všechny zadané hodnoty a&nbsp;kliknutím na&nbsp;<code>Next step</code> dokončíme instalaci.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1792" height="1136" src="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-5.png" alt="" class="wp-image-16587" srcset="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-5.png 1792w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-5-300x190.png 300w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-5-1024x649.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-5-768x487.png 768w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-5-1536x974.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-5-608x385.png 608w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-5-1216x771.png 1216w" sizes="auto, (max-width: 1792px) 100vw, 1792px" /></figure>



<p>Nyní již kliknutím na&nbsp;tlačítko <code>Finish</code> přejdeme na&nbsp;přihlašovací obrazovku.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1796" height="1130" src="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-6.png" alt="" class="wp-image-16585" srcset="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-6.png 1796w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-6-300x189.png 300w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-6-1024x644.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-6-768x483.png 768w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-6-1536x966.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-6-608x383.png 608w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-6-1216x765.png 1216w" sizes="auto, (max-width: 1796px) 100vw, 1796px" /></figure>



<p>Po úspěšném přihlášení pomocí dříve zadaných údajů můžeme začít používat nejnovější Zabbix verze 7.2 (<code>Admin/zabbix</code>).</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2440" height="1116" src="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-7.png" alt="" class="wp-image-16583" srcset="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-7.png 2440w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-7-300x137.png 300w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-7-1024x468.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-7-768x351.png 768w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-7-1536x703.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-7-2048x937.png 2048w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-7-608x278.png 608w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-7-1216x556.png 1216w" sizes="auto, (max-width: 2440px) 100vw, 2440px" /></figure>



<p>A takto vypada úvodní dashboard nového Zabbixu 7.2:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="3024" height="1564" src="https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72dashboard.png" alt="" class="wp-image-17158" srcset="https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72dashboard.png 3024w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72dashboard-300x155.png 300w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72dashboard-1024x530.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72dashboard-768x397.png 768w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72dashboard-1536x794.png 1536w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72dashboard-2048x1059.png 2048w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72dashboard-608x314.png 608w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72dashboard-1216x629.png 1216w" sizes="auto, (max-width: 3024px) 100vw, 3024px" /></figure>



<h2 class="wp-block-heading">Nastavení Zabbix reportingu</h2>



<p>Proto, aby byl plně funkční reporting se všemi jeho vylepšeními si nejprve musíme nainstalovat Google Chrome.</p>



<p>Následujícím příkazem stáhneme instalační balíček, a&nbsp;ten také nainstalujeme:</p>


<section id="block-code-block_90dcba780aab3ac7ec83b79f0963faf3" data-id="block-code-block_90dcba780aab3ac7ec83b79f0963faf3" class="gt-block block-code">
    <pre><code>wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
dnf localinstall google-chrome-stable_current_x86_64.rpm</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V dalším kroku upravíme v&nbsp;Zabbix frontendu parametr &#8222;Frontend URL&#8220; na&nbsp;aktuálně platnou hodnotu, toto nastavení se nachází zde:</p>


<section id="block-code-block_4db7b6756e3a55e3735dfeaa898df0ef" data-id="block-code-block_4db7b6756e3a55e3735dfeaa898df0ef" class="gt-block block-code">
    <pre><code>Administration -&gt; General -&gt; Other</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Příklad této konfigurace pak můžete vidět na&nbsp;obrázku níže.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2798" height="1364" src="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-9.png" alt="" class="wp-image-16598" srcset="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-9.png 2798w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-9-300x146.png 300w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-9-1024x499.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-9-768x374.png 768w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-9-1536x749.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-9-2048x998.png 2048w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-9-608x296.png 608w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-9-1216x593.png 1216w" sizes="auto, (max-width: 2798px) 100vw, 2798px" /></figure>



<hr class="wp-block-separator has-alpha-channel-opacity"/>
</div></div>



<p></p>



<div id="debian" class="wp-block-group"><div class="wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained">
<h2 class="wp-block-heading">Instalace závislostí</h2>


<section id="block-code-block_a43f27534fbbd05dba267348f070f40f" data-id="block-code-block_a43f27534fbbd05dba267348f070f40f" class="gt-block block-code">
    <pre><code>apt install sudo gpg curl wget</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Instalace PostgreSQL</h2>



<p>V prvním kroku si nainstalujeme repozitáře pro PostgreSQL a&nbsp;zakážeme výchozí systémové repozitáře PostgreSQL. Na&nbsp;otázku &#8218;This script will enable the PostgreSQL APT repository on apt.postgresql.org on your system. The distribution codename used will be bookworm-pgdg.&#8216; stiskněte Enter pro pokračování a&nbsp;potvrzení instalace z&nbsp;oficiálního repozitáře.</p>


<section id="block-code-block_2565c78f4b50c17ca3555dbb55b7d4d4" data-id="block-code-block_2565c78f4b50c17ca3555dbb55b7d4d4" class="gt-block block-code">
    <pre><code>apt install -y postgresql-common
/usr/share/postgresql-common/pgdg/apt.postgresql.org.sh</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Následně pak nainstalujeme PostgreSQL, v&nbsp;tomto případě to bude aktuálně podporovaná verze 17.</p>


<section id="block-code-block_50309929994c980fb08482bfda3b8afe" data-id="block-code-block_50309929994c980fb08482bfda3b8afe" class="gt-block block-code">
    <pre><code>apt -y install postgresql-17</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nastartování PostgreSQL a&nbsp;nastavení automatického spuštění při&nbsp;startu systému</p>


<section id="block-code-block_2f8c9e33a2306c8731d984181f26e56b" data-id="block-code-block_2f8c9e33a2306c8731d984181f26e56b" class="gt-block block-code">
    <pre><code>systemctl enable postgresql --now</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Instalace Zabbix serveru a&nbsp;jeho součástí</h2>



<p>Databáze je nyní nainstalovaná, a&nbsp;můžeme tedy přikročit k&nbsp;instalaci Zabbix serveru a&nbsp;všech jeho součástí.</p>



<p>Přidáme si repozitáře Zabbixu a&nbsp;vyčistíme instalační cache.</p>


<section id="block-code-block_99c59dfa5c8f742d1fc26c43b6cb1b2d" data-id="block-code-block_99c59dfa5c8f742d1fc26c43b6cb1b2d" class="gt-block block-code">
    <pre><code>wget https://repo.zabbix.com/zabbix/7.2/release/debian/pool/main/z/zabbix-release/zabbix-release_latest_7.2+debian12_all.deb
dpkg -i zabbix-release_latest_7.2+debian12_all.deb
apt update</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A nainstalujeme všechny potřebné součásti Zabbixu.</p>



<p>V tomto případě použijeme jako primárního monitorovacího agenta Zabbix Agent 2, který vám doporučujeme používat, jelikož přináší daleko více funkcionalit.</p>


<section id="block-code-block_351b10e25f376d1ecd0606a0b192f055" data-id="block-code-block_351b10e25f376d1ecd0606a0b192f055" class="gt-block block-code">
    <pre><code>apt install zabbix-server-pgsql zabbix-frontend-php php8.2-pgsql zabbix-apache-conf zabbix-sql-scripts zabbix-agent2 zabbix-web-service</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Inicializace databáze</h2>



<p>Nejprve vytvoříme databázového uživatele pro Zabbix. Během procesu budeme vyzváni k&nbsp;zadání jeho přístupového hesla. Dále vytvoříme prázdnou databázi a&nbsp;nastavíme jí příslušná oprávnění.</p>


<section id="block-code-block_68628499af0b92c199b6073ca767deda" data-id="block-code-block_68628499af0b92c199b6073ca767deda" class="gt-block block-code">
    <pre><code>sudo -u postgres createuser --pwprompt zabbix
sudo -u postgres createdb -O zabbix zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V tuto chvíli jsme schopni naimportovat výchozí schéma a&nbsp;data. Opět budeme vyzváni k&nbsp;zadání hesla. <br>Zde použijeme heslo z&nbsp;předchozího kroku.</p>


<section id="block-code-block_9d87de702a7f0e7739fd2f910e78d609" data-id="block-code-block_9d87de702a7f0e7739fd2f910e78d609" class="gt-block block-code">
    <pre><code>zcat /usr/share/zabbix/sql-scripts/postgresql/server.sql.gz | sudo -u zabbix psql zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Instalace TimescaleDB</h2>



<p>Nyní se pustíme do&nbsp;instalace TimescaleDB a&nbsp;začneme tím, že přidáme její oficiální repozitář.</p>


<section id="block-code-block_8264c12440f2d446fc4f11534ca64759" data-id="block-code-block_8264c12440f2d446fc4f11534ca64759" class="gt-block block-code">
    <pre><code>echo &quot;deb https://packagecloud.io/timescale/timescaledb/debian/ $(lsb_release -c -s) main&quot; | sudo tee /etc/apt/sources.list.d/timescaledb.list
wget --quiet -O - https://packagecloud.io/timescale/timescaledb/gpgkey | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/timescaledb.gpg</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nainstalujme TimescaleDB.</p>


<section id="block-code-block_f9fb5b70cdb0549c53d686eaff7e959b" data-id="block-code-block_f9fb5b70cdb0549c53d686eaff7e959b" class="gt-block block-code">
    <pre><code>apt update
apt install timescaledb-2-postgresql-17 timescaledb-2-loader-postgresql-17</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Spustíme utilitu <code>timescaledb-tune</code> a&nbsp;jako parametr jí předáme vyšší hodnotu maximálního množství připojení (<code>--max-conns</code>), které pro tyto testovací účely nastavíme na&nbsp;<code>125</code>.</p>



<p>Tato utilita slouží k&nbsp;přizpůsobení výchozího nastavení PostgreSQL vůčihledně výkonu a&nbsp;adekvátnímu nastavení parametrů PostgreSQL pro fungování s&nbsp;TimescaleDB.</p>



<p>Zároveň nám tato utilit pomocí instalačního průvodce pomůže vybrat aktuální a&nbsp;platný konfigurační soubor PostgreSQL a&nbsp;nastaví i&nbsp;automatické načítání knihoven TimescaleDB.</p>



<p>Prosím, odpovídejte &#8222;ano&#8220; (y) na&nbsp;všechny otázky. Pozor, automatický tuner předpokládá, že PostgreSQL běží na&nbsp;samostatném serveru, a&nbsp;proto může být potřeba případně upravit parametry.</p>


<section id="block-code-block_9ea1dcc5bdafab7635ca51bb6a8f3d98" data-id="block-code-block_9ea1dcc5bdafab7635ca51bb6a8f3d98" class="gt-block block-code">
    <pre><code>timescaledb-tune --pg-config /usr/bin --max-conns=125</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1158" height="582" src="https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72-tune-debian.png" alt="" class="wp-image-17171" srcset="https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72-tune-debian.png 1158w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72-tune-debian-300x151.png 300w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72-tune-debian-1024x515.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72-tune-debian-768x386.png 768w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72-tune-debian-608x306.png 608w" sizes="auto, (max-width: 1158px) 100vw, 1158px" /></figure>



<p>Následně restartujeme systémovou službu pro PostgreSQL:</p>


<section id="block-code-block_c1731892cf76d73f373228deb2deaa3a" data-id="block-code-block_c1731892cf76d73f373228deb2deaa3a" class="gt-block block-code">
    <pre><code>systemctl restart postgresql</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Zbývá již jen vytvořit a&nbsp;aktivovat samotnou TimescaleDB:</p>



<p>Pozor, během vývoje došlo ke změně cesty z&nbsp;původní /usr/share/zabbix-sql-scripts/postgresql/timescaledb/schema.sql na&nbsp;novou /usr/share/zabbix/sql-scripts/postgresql/timescaledb/schema.sql.</p>


<section id="block-code-block_c99bb70c87e30421ce22bd3c1021ccd4" data-id="block-code-block_c99bb70c87e30421ce22bd3c1021ccd4" class="gt-block block-code">
    <pre><code>echo &quot;CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;&quot; | sudo -u postgres psql zabbix
cat /usr/share/zabbix/sql-scripts/postgresql/timescaledb/schema.sql | sudo -u zabbix psql zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Nastavení Zabbix serveru</h2>



<p>Otevřeme konfigurační soubor Zabbix serveru v&nbsp;cestě:</p>


<section id="block-code-block_a3201247259c3cd7930790772b083724" data-id="block-code-block_a3201247259c3cd7930790772b083724" class="gt-block block-code">
    <pre><code>nano /etc/zabbix/zabbix_server.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V tomto konfiguračním souboru upravíme následující parametry tak, jak vídíte na&nbsp;předloze níže:</p>


<section id="block-code-block_600af19b33b347d60e67f614dc9cf571" data-id="block-code-block_600af19b33b347d60e67f614dc9cf571" class="gt-block block-code">
    <pre><code>...
DBPassword=password
StartReportWriters=1
WebServiceURL=http://localhost:10053/report
...</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V dalším kroku nastavíme jazykové balíčky pro Zabbix frontend. Můžete zvolit pouze ty, které potřebujete, nebo povolit všechny.</p>


<section id="block-code-block_167fe298acbe8628384da1e88d78b50c" data-id="block-code-block_167fe298acbe8628384da1e88d78b50c" class="gt-block block-code">
    <pre><code>sed -i &#039;/# en_US.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# en_GB.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# cs_CZ.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# sk_SK.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# fr_FR.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# de_DE.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# es_ES.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# it_IT.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# zh_CN.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# pt_PT.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# pt_BR.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# da_DK.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# nb_NO.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# pl_PL.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# tr_TR.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# he_IL.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# ja_JP.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# ko_KR.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# ru_RU.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# uk_UA.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# ca_ES.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# ka_GE.UTF-8 UTF-8/s/^# //&#039; /etc/locale.gen
sed -i &#039;/# vi_VN UTF-8/s/^# //&#039; /etc/locale.gen
locale-gen</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A nakonec restartujeme všechny související služby a&nbsp;nastavíme je tak, aby se spouštěly automaticky po&nbsp;startu:</p>


<section id="block-code-block_2dc85e8f1dbd02e1947ea961d4992865" data-id="block-code-block_2dc85e8f1dbd02e1947ea961d4992865" class="gt-block block-code">
    <pre><code>systemctl restart zabbix-server zabbix-web-service zabbix-agent2 apache2
systemctl enable zabbix-server zabbix-web-service zabbix-agent2 apache2</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Pro ověření stavu, že nám Zabbix server nastartoval v&nbsp;pořádku můžeme kromě jiného zkontrolovat i&nbsp;jeho log soubor:</p>


<section id="block-code-block_e2beb37c0f09e4ec71ccff0956237002" data-id="block-code-block_e2beb37c0f09e4ec71ccff0956237002" class="gt-block block-code">
    <pre><code>less /var/log/zabbix/zabbix_server.log</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V případě, že uvidíte v&nbsp;log souboru zprávu o&nbsp;tom, že je verze TimescaleDB příliš nová, pak to není žádný velký problém. Zabbix nedokáže dostatečně rychle reagovat na&nbsp;nejnovější verze TimescaleDB tak, aby ji ve svém kódu nastavil jako podporovanou, ovšem kompatibilita je Zabbixem zaručena a&nbsp;námi ověřena.</p>



<p>V případě této chyby stačí otevřít konfigurační soubor Zabbix serveru v&nbsp;cestě <code>/etc/zabbix/zabbix_server.conf</code> a&nbsp;zde upravte následující konfigurační parametr:</p>


<section id="block-code-block_2494d96aefa4c80691ce0c8120f44271" data-id="block-code-block_2494d96aefa4c80691ce0c8120f44271" class="gt-block block-code">
    <pre><code>AllowUnsupportedDBVersions=1</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Soubor s&nbsp;tímto nastavením uložte a&nbsp;zrestartujte systémovou službu Zabbix serveru.</p>


<section id="block-code-block_62d17dffccdff2db9e9329733e65cf7f" data-id="block-code-block_62d17dffccdff2db9e9329733e65cf7f" class="gt-block block-code">
    <pre><code>systemctl restart zabbix-server</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Nastavení Zabbix frontendu</h2>



<p>V prohlížeči si otevřeme cílové URL, na&nbsp;kterém Zabbix běží. Například tedy <code>http://192.168.0.50/zabbix</code>, kde nás uvítá průvodce prvotní instalací.</p>



<p>Po zvolení implicitního jazyka se tlačítkem <code>Next step</code> posuneme na&nbsp;stránku s&nbsp;kontrolou minimálních požadavků.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1786" height="1132" src="https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72install1.png" alt="" class="wp-image-17155" srcset="https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72install1.png 1786w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72install1-300x190.png 300w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72install1-1024x649.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72install1-768x487.png 768w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72install1-1536x974.png 1536w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72install1-608x385.png 608w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72install1-1216x771.png 1216w" sizes="auto, (max-width: 1786px) 100vw, 1786px" /></figure>



<p>Pokud je kontrola v&nbsp;pořádku, pak se tedy můžeme kliknutím na&nbsp;<code>Next step</code> posunout na&nbsp;další stránku s&nbsp;nastavením připojení do&nbsp;databáze.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1794" height="1134" src="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-2.png" alt="" class="wp-image-16593" srcset="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-2.png 1794w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-2-300x190.png 300w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-2-1024x647.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-2-768x485.png 768w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-2-1536x971.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-2-608x384.png 608w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-2-1216x769.png 1216w" sizes="auto, (max-width: 1794px) 100vw, 1794px" /></figure>



<p>Zde vyplňujeme pouze políčko <strong>Password</strong> pro přístup do&nbsp;databáze, nic dalšího není třeba měnit.</p>



<p>Po vyplnění opět klikneme na&nbsp;<code>Next step</code>.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1794" height="1134" src="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-3.png" alt="" class="wp-image-16591" srcset="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-3.png 1794w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-3-300x190.png 300w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-3-1024x647.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-3-768x485.png 768w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-3-1536x971.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-3-608x384.png 608w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-3-1216x769.png 1216w" sizes="auto, (max-width: 1794px) 100vw, 1794px" /></figure>



<p>Na následující stránce se základním nastavením vyplníme název serveru, časové pásmo, a&nbsp;kliknutím na&nbsp;<code>Next step</code> pokračujeme k&nbsp;souhrnu konfigurace.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1796" height="1124" src="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-4.png" alt="" class="wp-image-16589" srcset="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-4.png 1796w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-4-300x188.png 300w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-4-1024x641.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-4-768x481.png 768w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-4-1536x961.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-4-608x381.png 608w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-4-1216x761.png 1216w" sizes="auto, (max-width: 1796px) 100vw, 1796px" /></figure>



<p>V tomto souhrnu zkontrolumeme všechny zadané hodnoty a&nbsp;kliknutím na&nbsp;<code>Next step</code> dokončíme instalaci.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1792" height="1136" src="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-5.png" alt="" class="wp-image-16587" srcset="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-5.png 1792w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-5-300x190.png 300w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-5-1024x649.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-5-768x487.png 768w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-5-1536x974.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-5-608x385.png 608w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-5-1216x771.png 1216w" sizes="auto, (max-width: 1792px) 100vw, 1792px" /></figure>



<p>Nyní již kliknutím na&nbsp;tlačítko <code>Finish</code> přejdeme na&nbsp;přihlašovací obrazovku.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1796" height="1130" src="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-6.png" alt="" class="wp-image-16585" srcset="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-6.png 1796w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-6-300x189.png 300w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-6-1024x644.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-6-768x483.png 768w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-6-1536x966.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-6-608x383.png 608w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-6-1216x765.png 1216w" sizes="auto, (max-width: 1796px) 100vw, 1796px" /></figure>



<p>Po úspěšném přihlášení pomocí dříve zadaných údajů můžeme začít používat nejnovější Zabbix verze 7.2 (<code>Admin/zabbix</code>).</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2440" height="1116" src="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-7.png" alt="" class="wp-image-16583" srcset="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-7.png 2440w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-7-300x137.png 300w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-7-1024x468.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-7-768x351.png 768w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-7-1536x703.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-7-2048x937.png 2048w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-7-608x278.png 608w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-7-1216x556.png 1216w" sizes="auto, (max-width: 2440px) 100vw, 2440px" /></figure>



<p>A takto vypada úvodní dashboard nového Zabbixu 7.2:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="3024" height="1564" src="https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72dashboard.png" alt="" class="wp-image-17158" srcset="https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72dashboard.png 3024w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72dashboard-300x155.png 300w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72dashboard-1024x530.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72dashboard-768x397.png 768w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72dashboard-1536x794.png 1536w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72dashboard-2048x1059.png 2048w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72dashboard-608x314.png 608w, https://www.initmax.cz/wp-content/uploads/2024/12/zabbix72dashboard-1216x629.png 1216w" sizes="auto, (max-width: 3024px) 100vw, 3024px" /></figure>



<h2 class="wp-block-heading">Nastavení Zabbix reportingu</h2>



<p>Proto, aby byl plně funkční reporting se všemi jeho vylepšeními si nejprve musíme nainstalovat Google Chrome.</p>



<p>Následujícím příkazem stáhneme instalační balíček, a&nbsp;ten také nainstalujeme:</p>


<section id="block-code-block_8237a397f88b14110251a8612ccabdbc" data-id="block-code-block_8237a397f88b14110251a8612ccabdbc" class="gt-block block-code">
    <pre><code>curl -fSsL https://dl.google.com/linux/linux_signing_key.pub | sudo gpg --dearmor | sudo tee /usr/share/keyrings/google-chrome.gpg &gt;&gt; /dev/null
echo deb [arch=amd64 signed-by=/usr/share/keyrings/google-chrome.gpg] http://dl.google.com/linux/chrome/deb/ stable main | sudo tee /etc/apt/sources.list.d/google-chrome.list
apt update
apt install google-chrome-stable</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V dalším kroku upravíme v&nbsp;Zabbix frontendu parametr &#8222;Frontend URL&#8220; na&nbsp;aktuálně platnou hodnotu, toto nastavení se nachází zde:</p>


<section id="block-code-block_4db7b6756e3a55e3735dfeaa898df0ef" data-id="block-code-block_4db7b6756e3a55e3735dfeaa898df0ef" class="gt-block block-code">
    <pre><code>Administration -&gt; General -&gt; Other</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Příklad této konfigurace pak můžete vidět na&nbsp;obrázku níže.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2798" height="1364" src="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-9.png" alt="" class="wp-image-16598" srcset="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-9.png 2798w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-9-300x146.png 300w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-9-1024x499.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-9-768x374.png 768w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-9-1536x749.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-9-2048x998.png 2048w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-9-608x296.png 608w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-9-1216x593.png 1216w" sizes="auto, (max-width: 2798px) 100vw, 2798px" /></figure>
</div></div>



<h2 class="wp-block-heading">Dokončovací práce</h2>



<ul class="wp-block-list">
<li>Zkontrolujte, že správně běží Zabbix server, databázový server a&nbsp;mají správnou verzi</li>



<li>Zkontrolujte také, zda při&nbsp;startu serveru nebo proxy v&nbsp;systému neuvidíte následující chybu: ‚…the user limit of 1024 file descriptors is insufficient. The maximum number of concurrent checks per worker has been reduced…‘ <a href="https://www.initmax.cz/wiki/zabbix-7-0-a-navyseni-systemovych-limitu/">Návod na&nbsp;odstranění naleznete na&nbsp;naší wiki</a>.</li>
</ul>



<h2 class="wp-block-heading">Podpora pro Item Browser</h2>



<p>Veškeré potřebné kroky naleznete v&nbsp;<a href="https://www.initmax.cz/wiki/instalace-a-zakladni-pouziti-pro-item-browser/">samostatném návodu na&nbsp;naší wiki<strong>.</strong></a></p>


<section id="block-webinar-block_113437590e223edb53b906dbd78af22a" data-id="block-webinar-block_113437590e223edb53b906dbd78af22a" class="gt-block block-webinar">
    <div class="connected-webinars__grid">
        <a href="https://www.initmax.cz/webinar/7-0-workshop-zabbix-7-0-monitorovani-pomoci-browser-item-pomoci-aplikace-selenium/" class="grid-item">
	<article class="webinar-promotion">
		<div class="webinar-promotion__thumbnail-wrap">
			<figure class="webinar-promotion__thumbnail">
					<img decoding="async" src="https://www.initmax.cz/wp-content/uploads/2024/05/ilustrace_webinare_zabbix_7.0_13_thumbnail_web-copy-2.png"
				 width="400"
		 height="250"
		 class=""
		 alt="7.0 Workshop: Zabbix 7.0 &#8211; Monitorování pomocí Browser Item pomocí aplikace Selenium"
		 loading="lazy"	>
									<div class="webinar-promotion__tags">
						<span class="tag tag--small" style="color:#ffffff;background-color:#4caf50;">Nový</span><span class="tag tag--small" style="color:#ffffff;background-color:#d40000;">Zabbix</span>					</div>
							</figure>
		</div>
		<div class="webinar-promotion__text">
			<div>
									<time datetime="2024-06-21">21.&nbsp;6.&nbsp;2024</time>
							</div>
			<h3 class="webinar-promotion__title">7.0 Workshop: Zabbix 7.0 &#8211; Monitorování pomocí Browser Item pomocí aplikace Selenium</h3>
			<div class="icon-link">
				<figure class="icon-wrap icon-wrap--primary"><svg data-name="Group 3411" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 455" d="M0,0H24V24H0Z" fill="none"/><path data-name="Path 456" d="M15,10l4.553-2.276A1,1,0,0,1,21,8.618v6.764a1,1,0,0,1-1.447.894L15,14V10Z" transform="translate(0 0)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><rect data-name="Rectangle 1286" width="12" height="12" rx="2" transform="translate(3.112 6)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</figure>
				<span>Zhlédnout záznam</span>
			</div>
		</div>
	</article>
</a>    </div>
</section>



<h2 class="wp-block-heading">Vlastní rebranding</h2>



<p>Veškeré potřebné kroky naleznete v&nbsp;<a href="https://www.initmax.cz/wiki/rebranding-zabbixu/">samostatném návodu na&nbsp;naší wiki<strong>.</strong></a></p>


<section id="block-newsletter-block_361638f88b05c1182de0c7cd9eed4bfa" data-id="block-newsletter-block_361638f88b05c1182de0c7cd9eed4bfa" class="gt-block block-newsletter">
    <section id="newsletter" class="newsletter">
	<div class="gradient basic">
		<div class="newsletter__inner width width--general">
			<div class="col left">
									<h2 class="newsletter__title">Buďte v&nbsp;obraze s&nbsp;naším newsletterem</h2>
													<div class="newsletter__content"><p>Díky initMAX newsletteru Vám neunikne žádná z&nbsp;pozvánek na&nbsp;akce a&nbsp;webináře, žádný z&nbsp;tipů, jak dostat ze svého IT MAXimum, ani ověřené informace o&nbsp;novinkách ze světa Zabbix a&nbsp;dalších technologií.</p>
</div>
							</div>
			<div class="col right form-wrapper">
				<div class="newsletter-form">
	<form method="post" action="/wiki/kapitola/zabbix/feed/" enctype="multipart/form-data">
		<input type="hidden" name="url" value="https://www.initmax.cz/wiki/kapitola/zabbix/feed/">

		<div class="inputs">

			<label for="newsletter-form_contact_email" class="top">Vaše e-mailová adresa:</label>
			<div class="df">

				<div class="input">
					<input type="text" id="newsletter-form_contact_email" name="newsletter_email" placeholder="@" data-format="email" data-required="1">
									</div><!-- /.input -->

				<a href="#" class="btn btn--white sendBtn">Odeslat</a>

			</div>

			<div class="bottom nm">
				<label for="newsletter-form_gdpr" class="checkbox gdpr">
					<input type="checkbox" id="newsletter-form_gdpr" name="newsletter_gdpr">
					<span>Souhlasím se&nbsp;<a href="https://www.initmax.cz/ochrana-osobnich-udaju/" target="_blank">zpracováním osobních údajů</a>.</span>
				</label>
			</div>

		</div><!-- /.inputs -->
		<div class="sent hidden">
			<div class="iconOk"><h3>Děkujeme, že jste se přihlásili k&nbsp;odběru našeho newsletteru.</h3>
</div>
			<button class="sent__close" title="Zavřít" onclick="closeFormMessage(this,event)"><svg data-name="Group 3602" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 3272" d="M0,0H24V24H0Z" fill="none"/><line data-name="Line 98" y2="14" transform="translate(7.05 7.05) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 99" x2="14" transform="translate(7.05 16.95) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</button>
		</div><!-- /.sent -->
	</form>
</div>			</div>
		</div>
	</div>
</section></section>



<section id="social-links-block_e69d04f3891993c353798cff14419e78" data-id="social-links-block_e69d04f3891993c353798cff14419e78" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>

<p>The post <a href="https://www.initmax.cz/wiki/zabbix-7-2-navod-na-instalaci-v-5-minutach/">Zabbix 7.2 &#8211; návod na&nbsp;instalaci v&nbsp;5 minutách</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Zabbix &#8211; aktualizace na&#160;poslední verzi 7.2</title>
		<link>https://www.initmax.cz/wiki/zabbix-aktualizace-na-posledni-verzi-7-2/</link>
		
		<dc:creator><![CDATA[Marek Ryšavý]]></dc:creator>
		<pubDate>Fri, 06 Dec 2024 16:23:50 +0000</pubDate>
				<guid isPermaLink="false">https://www.initmax.cz/?post_type=wiki&#038;p=17086</guid>

					<description><![CDATA[<p>Tentokrát si ukážeme, jak zaktualizovat Zabbix na nejnovější verzi 7.2. Budeme vycházet při aktualizaci z verze Zabbixu 7.0, PHP verze 8.0 a PostgreSQL 16 ...</p>
<p>The post <a href="https://www.initmax.cz/wiki/zabbix-aktualizace-na-posledni-verzi-7-2/">Zabbix &#8211; aktualizace na&nbsp;poslední verzi 7.2</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Tentokrát si ukážeme, jak zaktualizovat Zabbix na&nbsp;nejnovější verzi 7.2. Budeme vycházet při&nbsp;aktualizaci z&nbsp;verze Zabbixu 7.0, PHP verze 8.0 a&nbsp;PostgreSQL 16 s&nbsp;jeho extenzí TimescaleDB.</p>



<p>Návod, jak aktualizovat PostgreSQL, <a href="https://www.initmax.cz/wiki/jak-aktualizovat-postgresql-na-nejnovejsi-verzi/">naleznete v&nbsp;našem wiki článku</a>. Dále zde najdete i&nbsp;návod na&nbsp;<a href="https://www.initmax.cz/wiki/jak-na-aktualizaci-timescaledb/">aktualizaci TimescaleDB</a>.</p>



<h2 class="wp-block-heading">Výběr operačního systému</h2>



<p>Návod obsahuje postup pro RHEL platformy na&nbsp;verzi 9, kde stačí případně jen poupravit repozitáře. Návod pro Debian je připraven pro verzi 12, která je aktuálně poslední podporovanou verzí.</p>


<section id="os-switcher-block_7e85e41349023c8b6c59bb731ba71a92" data-id="os-switcher-block_7e85e41349023c8b6c59bb731ba71a92" class="gt-block os-switcher">
                    <a class="os-switcher__item is-active" onclick="osSwitch(this,'#rhel')">
                            <figure>
                     <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="800px" height="800px" viewBox="0 -31 256 256" version="1.1" preserveAspectRatio="xMidYMid"><g><path d="M170.758031,111.610687 C187.582343,111.610687 211.924474,108.140925 211.924474,88.1292728 C211.974775,86.5848226 211.834752,85.0400539 211.507565,83.5298204 L201.48829,40.009856 C199.175115,30.434388 197.144363,26.0904607 180.333499,17.6850288 C167.288269,11.014478 138.871184,0 130.465752,0 C122.638614,0 120.365785,10.0865183 111.032394,10.0865183 C102.048668,10.0865183 95.3781173,2.55525131 86.9726853,2.55525131 C78.9034707,2.55525131 73.6450325,8.05576597 69.5835277,19.3661152 C69.5835277,19.3661152 58.2731785,51.2664105 56.8207199,55.8927602 C56.5898643,56.7423115 56.4900906,57.6221338 56.5248487,58.5018063 C56.5248487,70.9014995 105.343597,111.556893 170.758031,111.556893 M214.506623,96.2522822 C216.833247,107.26676 216.833247,108.423348 216.833247,109.875806 C216.833247,128.703974 195.665007,139.153607 167.839665,139.153607 C104.953585,139.193953 49.8677466,102.344539 49.8677466,77.9889597 C49.8641113,74.5987697 50.555245,71.2437963 51.898499,68.1310691 C29.2778005,69.2607592 0,73.2953665 0,99.1437508 C0,141.48023 100.313787,193.661152 179.741757,193.661152 C240.63743,193.661152 255.995835,166.118232 255.995835,144.371699 C255.995835,127.264964 241.202275,107.845054 214.53352,96.2522822" fill="#EE0000"></path><path d="M214.506623,96.2522822 C216.833247,107.26676 216.833247,108.423348 216.833247,109.875806 C216.833247,128.703974 195.665007,139.15364 167.839665,139.15364 C104.953585,139.193953 49.8677323,102.344539 49.8677323,77.9889597 C49.8641113,74.5987697 50.555245,71.2437963 51.898499,68.1310691 L56.8207199,55.946555 C56.5952566,56.7787916 56.4955298,57.6400686 56.5248487,58.5018063 C56.5248487,70.9014995 105.343597,111.556893 170.758031,111.556893 C187.582343,111.556893 211.924474,108.08713 211.924474,88.075478 C211.974775,86.5310279 211.834752,84.9862591 211.507565,83.4760257 L214.506623,96.2522822 Z" fill="#000000"></path></g></svg>                 </figure>
                        <span>Alma/CentOS/RHEL/Rocky 9</span>
        </a>
                    <a class="os-switcher__item" onclick="osSwitch(this,'#debian')">
                            <figure>
                     <svg xmlns="http://www.w3.org/2000/svg" width="30.412" height="37.855" viewBox="0 0 30.412 37.855"><g data-name="Group 4978" transform="translate(0)"><path data-name="Path 3295" d="M51.55,57.148c-.627.009.119.323.938.449.226-.177.431-.355.614-.529a4.68,4.68,0,0,1-1.552.08" transform="translate(-33.375 -37.148)" fill="#a80030"></path><path data-name="Path 3296" d="M60.9,51.791a3.984,3.984,0,0,0,.742-1.664,4.059,4.059,0,0,1-.522,1.154c-1.172.738-.11-.438,0-.886-1.261,1.587-.173.952-.219,1.395" transform="translate(-39.357 -32.63)" fill="#a80030"></path><path data-name="Path 3297" d="M64.59,44.219c.076-1.13-.222-.772-.323-.341.117.061.209.8.323.341" transform="translate(-41.805 -28.292)" fill="#a80030"></path><path data-name="Path 3298" d="M45.172,1.4c.335.06.723.106.669.186.366-.08.449-.154-.669-.186" transform="translate(-29.376 -0.911)" fill="#a80030"></path><path data-name="Path 3299" d="M46.647,1.932l-.237.049.22-.02.016-.029" transform="translate(-30.181 -1.258)" fill="#a80030"></path><path data-name="Path 3300" d="M27.224,16.859a5.583,5.583,0,0,1-.6,2.378l-.542.271c-.444.861.043.547-.275,1.232a14.973,14.973,0,0,1-2.553,2.047c-.329-.007.223-.389.3-.538-.927.637-.744.956-2.162,1.342l-.042-.092c-3.5,1.645-8.354-1.615-8.291-6.064-.037.282-.106.212-.184.326a5.6,5.6,0,0,1,3.144-5.526,5.3,5.3,0,0,1,5.9.767,5.257,5.257,0,0,0-4.3-2.063,4.856,4.856,0,0,0-4.172,2.489c-.951.6-1.061,2.308-1.475,2.62-.557,4.1,1.049,5.867,3.765,7.949.428.288.12.332.178.552a7.372,7.372,0,0,1-2.409-1.842,6.473,6.473,0,0,0,1.253,1.444c-.851-.288-1.988-2.062-2.32-2.135,1.467,2.627,5.952,4.607,8.3,3.624a9.8,9.8,0,0,1-3.688-.429c-.513-.264-1.21-.811-1.086-.913a9.158,9.158,0,0,0,9.289-1.316c.705-.549,1.476-1.484,1.7-1.5-.335.5.057.243-.2.688.7-1.134-.305-.461.727-1.958l.381.525c-.142-.941,1.169-2.084,1.036-3.572.3-.455.335.49.016,1.537.443-1.162.117-1.348.23-2.307a8.71,8.71,0,0,1,.367,1,4.423,4.423,0,0,1,.441-2.543c-.142-.063-.445.5-.514-.83.01-.576.16-.3.218-.444a2.546,2.546,0,0,1-.59-1.353c.131-.2.35.516.528.545a13.163,13.163,0,0,1-.32-1.7c-.52-1.087-.184.145-.606-.467-.554-1.727.459-.4.528-1.185A13.868,13.868,0,0,1,30.732,13.3a15.9,15.9,0,0,0-.769-2.765c.255.107-.41-1.958.331-.59A12.326,12.326,0,0,0,24.513,3.03c.293.268.662.6.529.657-1.189-.708-.98-.763-1.15-1.062-.969-.394-1.032.032-1.674,0A19.878,19.878,0,0,0,18.36,1.153l.076.357c-1.209-.4-1.409.153-2.716,0-.08-.062.419-.225.829-.284-1.169.154-1.115-.23-2.259.043a9.724,9.724,0,0,1,.881-.5c-.954.058-2.277.555-1.868.1C11.748,1.57,8.986,2.544,7.436,4l-.049-.326c-.71.853-3.1,2.547-3.288,3.651l-.19.044a20.47,20.47,0,0,0-.9,1.979c-.483.824-.709.317-.64.446A30.106,30.106,0,0,0,.536,14.669c.291.435.007,2.616.117,4.362-.478,8.623,6.052,17,13.189,18.929a14.369,14.369,0,0,0,3.925.4c-1.561-.446-1.763-.237-3.284-.767-1.1-.517-1.338-1.107-2.115-1.781l.308.543c-1.524-.539-.886-.667-2.126-1.06l.328-.429a2.824,2.824,0,0,1-1.531-1.273l-.54.021c-.649-.8-1-1.378-.97-1.826l-.175.311c-.2-.34-2.389-3-1.252-2.384a2.563,2.563,0,0,1-.8-.867l.231-.265a4.4,4.4,0,0,1-.972-1.906,1.236,1.236,0,0,0,.695.535c-1.381-3.427-1.459-.189-2.5-3.489l.221-.018a7.327,7.327,0,0,1-.409-.805l.1-.96c-.994-1.15-.278-4.889-.135-6.94.1-.834.83-1.722,1.386-3.114l-.339-.058C4.532,10.7,7.58,7.3,8.992,7.471c.684-.859-.136,0-.269-.22,1.5-1.554,1.974-1.1,2.988-1.378,1.093-.649-.938.253-.42-.247,1.89-.483,1.339-1.1,3.8-1.342.26.148-.6.229-.82.421,1.575-.77,4.983-.6,7.2.428,2.569,1.2,5.455,4.749,5.569,8.088l.13.035c-.066,1.327.2,2.862-.262,4.272l.317-.667" transform="translate(-0.32 -0.503)" fill="#a80030"></path><path data-name="Path 3301" d="M32.208,59.764l-.088.44a8.451,8.451,0,0,0,1.266,1.6c-.379-.739-.66-1.045-1.178-2.044" transform="translate(-20.88 -38.903)" fill="#a80030"></path><path data-name="Path 3302" d="M34.247,58.123a3.488,3.488,0,0,1-.492-.821,5.711,5.711,0,0,0,.685,1.39l-.193-.569" transform="translate(-21.944 -37.3)" fill="#a80030"></path><path data-name="Path 3303" d="M82.358,48.916l-.092.231a11.156,11.156,0,0,1-1.093,3.489,10.961,10.961,0,0,0,1.185-3.72" transform="translate(-52.81 -31.841)" fill="#a80030"></path><path data-name="Path 3304" d="M45.054.187A13.512,13.512,0,0,1,46.546,0c-.586.049-1.17.079-1.746.153l.254.035" transform="translate(-29.133)" fill="#a80030"></path><path data-name="Path 3305" d="M2.44,23.219c.1.9-.681,1.256.172.659.457-1.03-.179-.284-.172-.659" transform="translate(-1.409 -15.114)" fill="#a80030"></path><path data-name="Path 3306" d="M-.053,32.764a9.824,9.824,0,0,0,.307-1.315c-.543.694-.25.842-.307,1.315" transform="translate(0.082 -20.471)" fill="#a80030"></path></g></svg>                 </figure>
                        <span>Debian 12</span>
        </a>
    </section>



<section id="block-webinar-block_4043ea87e312cef2cab321f4c4dc1c04" data-id="block-webinar-block_4043ea87e312cef2cab321f4c4dc1c04" class="gt-block block-webinar">
    <div class="connected-webinars__grid">
        <a href="https://www.initmax.cz/webinar/aktualizace-na-posledni-verzi-zabbix-7-2/" class="grid-item">
	<article class="webinar-promotion">
		<div class="webinar-promotion__thumbnail-wrap">
			<figure class="webinar-promotion__thumbnail">
					<img decoding="async" src="https://www.initmax.cz/wp-content/uploads/2024/12/07_thumbnail_web_1.png"
				 width="401"
		 height="251"
		 class=""
		 alt="Aktualizace na&nbsp;poslední verzi Zabbix 7.2"
		 loading="lazy"	>
									<div class="webinar-promotion__tags">
						<span class="tag tag--small" style="color:#ffffff;background-color:#4caf50;">Nový</span><span class="tag tag--small" style="color:#ffffff;background-color:#d40000;">Zabbix</span>					</div>
							</figure>
		</div>
		<div class="webinar-promotion__text">
			<div>
									<time datetime="2024-12-18">18.&nbsp;12.&nbsp;2024</time>
							</div>
			<h3 class="webinar-promotion__title">Aktualizace na&nbsp;poslední verzi Zabbix 7.2</h3>
			<div class="icon-link">
				<figure class="icon-wrap icon-wrap--primary"><svg data-name="Group 3411" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 455" d="M0,0H24V24H0Z" fill="none"/><path data-name="Path 456" d="M15,10l4.553-2.276A1,1,0,0,1,21,8.618v6.764a1,1,0,0,1-1.447.894L15,14V10Z" transform="translate(0 0)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><rect data-name="Rectangle 1286" width="12" height="12" rx="2" transform="translate(3.112 6)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</figure>
				<span>Zhlédnout záznam</span>
			</div>
		</div>
	</article>
</a>    </div>
</section>


<section id="social-links-block_01df5a1f68dc3769d090fc7adefb6df8" data-id="social-links-block_01df5a1f68dc3769d090fc7adefb6df8" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>




<h2 class="wp-block-heading">Přípravné kroky</h2>



<ul class="wp-block-list">
<li>Přečtěte si &#8222;poznámky k&nbsp;vydané verzi&#8220; (release notes) [ <a href="https://www.zabbix.com/rn/rn7.2.0rc2" target="_blank" rel="noreferrer noopener nofollow">Official release notes for Zabbix 7.2</a> ]</li>



<li>Přečtěte si důkladně dokument &#8222;poznámky k&nbsp;aktualizaci&#8220; (upgrade notes) [ <a href="https://www.zabbix.com/documentation/7.2/en/manual/installation/upgrade_notes_720" target="_blank" rel="noreferrer noopener nofollow">Official upgrade notes for Zabbix 7.2</a> ]</li>



<li>Zkontrolujte a&nbsp;případně optimalizujte výkon současné databáze dle doporučení vendora a&nbsp;s&nbsp;ohledem na&nbsp;požadavky Zabbix instance</li>



<li>Zkontrolujte, zda verze veškerých komponent odpovídají matici kompatiblity nové verze Zabbix</li>



<li>Zazálohujte konfigurační soubory Zabbix serveru a&nbsp;Zabbix proxy</li>



<li>Zázálohujte databáze Zabbix serveru, případně Zabbix proxy</li>



<li>Zazálohujte veškeré možné úpravy &#8222;na&nbsp;míru&#8220;, které byly na&nbsp;úrovni Zabbix ručně provedeny</li>



<li>Musíte vypnout HA na&nbsp;straně Zabbix serveru.</li>
</ul>



<h2 class="wp-block-heading">Kontrola verzí</h2>



<p>Nejprve zkontrolujeme verze všech komponent, na&nbsp;kterých je běh Zabbixu a&nbsp;jeho součástí závislý, tak aby přesně odpovídaly oficiální matici kompatibility pro Zabbix 7.2.</p>


<section id="block-code-block_c1487cd6309b1e892aa0e1dc8ae11c53" data-id="block-code-block_c1487cd6309b1e892aa0e1dc8ae11c53" class="gt-block block-code">
    <pre><code>php-fpm -v
psql -V</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<div id="rhel" class="wp-block-group"><div class="wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained">
<h2 class="wp-block-heading">Záloha konfiguračních souborů Zabbix</h2>



<p>Než se pustíme do&nbsp;dalších kroků, zazálohujeme veškeré konfigurační soubory Zabbix serveru a&nbsp;Zabbix Proxy.</p>


<section id="block-code-block_059bfdde6b1e2493f3ede1853559ec04" data-id="block-code-block_059bfdde6b1e2493f3ede1853559ec04" class="gt-block block-code">
    <pre><code>cp -R /etc/zabbix/ /&lt;backup directory&gt;/
cp -R /usr/lib/zabbix/alertscripts/ /&lt;backup directory&gt;/
cp -R /usr/lib/zabbix/externalscripts/ /&lt;backup directory&gt;/
cp -R /usr/share/zabbix/ /&lt;backup directory&gt;/
cp /etc/httpd/conf/httpd.conf /&lt;backup directory&gt;/
cp /etc/httpd/conf.d/zabbix.conf /&lt;backup directory&gt;/</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Zastavení služeb</h2>



<p>Nejprve zastavíme Zabbix server a&nbsp;webserver, aby do&nbsp;databáze již nic nezapisovaly.</p>


<section id="block-code-block_2f205eb03c63e1b805a55ca32bf719f1" data-id="block-code-block_2f205eb03c63e1b805a55ca32bf719f1" class="gt-block block-code">
    <pre><code>systemctl stop zabbix-server
systemctl stop httpd</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Aktualizace databáze (Volitelně)</h2>



<p>Dejte si prosím pozor na&nbsp;kombinaci <strong>PostgreSQL 17 a&nbsp;TimescaleDB 2.17.</strong> Tato verze má problém s&nbsp;načítáním starších dat. V&nbsp;případě potíží doporučujeme provést jednu z&nbsp;následujících akcí:</p>



<ul class="wp-block-list">
<li><strong>Downgrade extenze</strong>&nbsp;– přejděte na&nbsp;verzi TimescaleDB 2.16.2.</li>



<li><strong>Aktualizace na&nbsp;TimescaleDB 2.18</strong> – tento problém řeší.</li>



<li><strong>Použití workaroundu</strong>&nbsp;– do&nbsp;souboru&nbsp;<code>postgresql.conf</code>&nbsp;přidejte parametr pro vypnutí vektorizace a&nbsp;restartuje DB.</li>
</ul>


<section id="block-code-block_4f5fc209a1a263a84f6ca1b412538fc1" data-id="block-code-block_4f5fc209a1a263a84f6ca1b412538fc1" class="gt-block block-code">
    <pre><code>timescaledb.enable_vectorized_aggregation = off</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p><a href="https://www.initmax.cz/wiki/jak-aktualizovat-postgresql-na-nejnovejsi-verzi/">Detailní návod na&nbsp;aktualizaci PostgreSQL naleznete na&nbsp;naší wiki</a>.</p>



<h2 class="wp-block-heading">Aktualizace Zabbix</h2>



<p>Vše jsme úspěšně zazálohovali a&nbsp;zaktualizovali všechny verze návazných komponent dle oficiální matice kompatibility nové verze Zabbixu.</p>



<p>Nyní přejdeme k&nbsp;aktualizaci samotného Zabbixu a&nbsp;všech jeho součástí.</p>



<p>Nejprve si stáhneme instalační balíčky pro repozitáře nové verze Zabbixu a&nbsp;smažeme instalační cache:</p>


<section id="block-code-block_8a18e7cc76fad3772bf6ddaa88d361dc" data-id="block-code-block_8a18e7cc76fad3772bf6ddaa88d361dc" class="gt-block block-code">
    <pre><code>rpm -Uvh https://repo.zabbix.com/zabbix/7.2/release/rocky/9/noarch/zabbix-release-latest-7.2.el9.noarch.rpm
dnf clean all</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Po tomto úkonu máme dostupné repozitáře nové verze a&nbsp;můžeme tedy zaktualizovat veškeré další komponenty Zabbix, a&nbsp;to postupně i&nbsp;na&nbsp;všech Zabbix Proxy:</p>


<section id="block-code-block_54181813d2be80c5020deb5bb16469bc" data-id="block-code-block_54181813d2be80c5020deb5bb16469bc" class="gt-block block-code">
    <pre><code>dnf update zabbix-* -y</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Po úspěšném dokončení aktualizace balíčků Zabbix serveru a&nbsp;všech jeho součástí můžeme Zabbix znovu spustit, aby se dokončil upgrade databázové struktury.</p>


<section id="block-code-block_37acaaf1eec55dae6e97a758ac6c49f8" data-id="block-code-block_37acaaf1eec55dae6e97a758ac6c49f8" class="gt-block block-code">
    <pre><code>systemctl start zabbix-server.service</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Postupné činnosti i&nbsp;celý proces aktualizace, včetně případných zásahů do&nbsp;struktury databázového schématu, lze sledovat v&nbsp;log souboru Zabbix serveru:</p>


<section id="block-code-block_3d983e25d55ea06b1f3428c8c3e81007" data-id="block-code-block_3d983e25d55ea06b1f3428c8c3e81007" class="gt-block block-code">
    <pre><code>tail -f /var/log/zabbix/zabbix_server.log</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1150" height="730" src="https://www.initmax.cz/wp-content/uploads/2024/06/upgrade70.png" alt="" class="wp-image-16610" srcset="https://www.initmax.cz/wp-content/uploads/2024/06/upgrade70.png 1150w, https://www.initmax.cz/wp-content/uploads/2024/06/upgrade70-300x190.png 300w, https://www.initmax.cz/wp-content/uploads/2024/06/upgrade70-1024x650.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/06/upgrade70-768x488.png 768w, https://www.initmax.cz/wp-content/uploads/2024/06/upgrade70-608x386.png 608w" sizes="auto, (max-width: 1150px) 100vw, 1150px" /></figure>



<p>Po úspěšném dokončení aktualizace databázové struktury můžeme znovu spustit náš webový server. To provedeme následujícím příkazem:</p>


<section id="block-code-block_1db430e9fb77db1e57228e705932a44b" data-id="block-code-block_1db430e9fb77db1e57228e705932a44b" class="gt-block block-code">
    <pre><code>systemctl start httpd</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>

</div></div>



<div id="debian" class="wp-block-group"><div class="wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained">
<h2 class="wp-block-heading">Záloha konfiguračních souborů Zabbix</h2>



<p>Než se pustíme do&nbsp;dalších kroků, zazálohujeme veškeré konfigurační soubory Zabbix serveru a&nbsp;Zabbix Proxy.</p>


<section id="block-code-block_8267071380ba3d5611c38bd525d89272" data-id="block-code-block_8267071380ba3d5611c38bd525d89272" class="gt-block block-code">
    <pre><code>cp -R /etc/zabbix/ /&lt;backup directory&gt;/
cp -R /usr/lib/zabbix/alertscripts/ /&lt;backup directory&gt;/
cp -R /usr/lib/zabbix/externalscripts/ /&lt;backup directory&gt;/
cp -R /usr/share/zabbix/ /&lt;backup directory&gt;/
cp -R /etc/apache2/ /&lt;backup directory&gt;/</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Zastavení služeb</h2>



<p>Nejprve zastavíme Zabbix server a&nbsp;webserver, aby do&nbsp;databáze již nic nezapisovaly.</p>


<section id="block-code-block_ad2586c9e0fb5a71c55cf77ccd760d39" data-id="block-code-block_ad2586c9e0fb5a71c55cf77ccd760d39" class="gt-block block-code">
    <pre><code>systemctl stop zabbix-server
systemctl stop apache2</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Aktualizace databáze (Volitelně)</h2>



<p>Dejte si prosím pozor na&nbsp;kombinaci PostgreSQL 17 a&nbsp;TimescaleDB 2.7. Tato verze má problém s&nbsp;načítáním starších dat. V&nbsp;případě potíží doporučujeme provést jednu z&nbsp;následujících akcí:</p>



<ul class="wp-block-list">
<li><strong>Downgrade extenze</strong>&nbsp;– přejděte na&nbsp;verzi TimescaleDB 2.16.2.</li>



<li><strong>Aktualizace na&nbsp;TimescaleDB 2.8</strong>&nbsp;– tento problém řeší.</li>



<li><strong>Použití workaroundu</strong>&nbsp;– do&nbsp;souboru&nbsp;<code>postgresql.conf</code>&nbsp;přidejte parametr pro vypnutí vektorizace a&nbsp;restartuje DB.</li>
</ul>


<section id="block-code-block_4f5fc209a1a263a84f6ca1b412538fc1" data-id="block-code-block_4f5fc209a1a263a84f6ca1b412538fc1" class="gt-block block-code">
    <pre><code>timescaledb.enable_vectorized_aggregation = off</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p><a href="https://www.initmax.cz/wiki/jak-aktualizovat-postgresql-na-nejnovejsi-verzi/">Detailní návod na&nbsp;aktualizaci PostgreSQL naleznete na&nbsp;naší wiki</a>.</p>



<h2 class="wp-block-heading">Aktualizace Zabbix</h2>



<p>Vše jsme úspěšně zazálohovali a&nbsp;zaktualizovali všechny verze návazných komponent dle oficiální matice kompatibility nové verze Zabbixu.</p>



<p>Nyní přejdeme k&nbsp;aktualizaci samotného Zabbixu a&nbsp;všech jeho součástí.</p>



<p>Nejprve si stáhneme instalační balíčky pro repozitáře nové verze Zabbixu a&nbsp;nainstalujeme je:</p>


<section id="block-code-block_448ed11490cc7053bb3d3f5ab916611b" data-id="block-code-block_448ed11490cc7053bb3d3f5ab916611b" class="gt-block block-code">
    <pre><code>wget https://repo.zabbix.com/zabbix/7.2/release/debian/pool/main/z/zabbix-release/zabbix-release_latest_7.2+debian12_all.deb
dpkg -i zabbix-release_latest_7.2+debian12_all.deb</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Po tomto úkonu máme dostupné repozitáře nové verze a&nbsp;můžeme tedy zaktualizovat veškeré další komponenty Zabbix, a&nbsp;to postupně i&nbsp;na&nbsp;všech Zabbix Proxy:</p>


<section id="block-code-block_94d48c68c498833fd05a5b88aee38edd" data-id="block-code-block_94d48c68c498833fd05a5b88aee38edd" class="gt-block block-code">
    <pre><code>apt update
apt install --only-upgrade $(dpkg -l | grep zabbix | awk &#039;{print $2}&#039;)</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Po úspěšném dokončení aktualizace balíčků Zabbix serveru a&nbsp;všech jeho součástí můžeme Zabbix znovu spustit, aby se dokončil upgrade databázové struktury.</p>


<section id="block-code-block_37acaaf1eec55dae6e97a758ac6c49f8" data-id="block-code-block_37acaaf1eec55dae6e97a758ac6c49f8" class="gt-block block-code">
    <pre><code>systemctl start zabbix-server.service</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Postupné činnosti i&nbsp;celý proces aktualizace, včetně případných zásahů do&nbsp;struktury databázového schématu, lze sledovat v&nbsp;log souboru Zabbix serveru:</p>


<section id="block-code-block_3d983e25d55ea06b1f3428c8c3e81007" data-id="block-code-block_3d983e25d55ea06b1f3428c8c3e81007" class="gt-block block-code">
    <pre><code>tail -f /var/log/zabbix/zabbix_server.log</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1150" height="730" src="https://www.initmax.cz/wp-content/uploads/2024/06/upgrade70.png" alt="" class="wp-image-16610" srcset="https://www.initmax.cz/wp-content/uploads/2024/06/upgrade70.png 1150w, https://www.initmax.cz/wp-content/uploads/2024/06/upgrade70-300x190.png 300w, https://www.initmax.cz/wp-content/uploads/2024/06/upgrade70-1024x650.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/06/upgrade70-768x488.png 768w, https://www.initmax.cz/wp-content/uploads/2024/06/upgrade70-608x386.png 608w" sizes="auto, (max-width: 1150px) 100vw, 1150px" /></figure>



<p>Po úspěšném dokončení aktualizace databázové struktury můžeme znovu spustit náš webový server. To provedeme následujícím příkazem:</p>


<section id="block-code-block_5910c9d7b7fd67aa3b191c422d5b8928" data-id="block-code-block_5910c9d7b7fd67aa3b191c422d5b8928" class="gt-block block-code">
    <pre><code>systemctl start apache2</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>

</div></div>



<h2 class="wp-block-heading">Dokončovací práce</h2>



<ul class="wp-block-list">
<li>Zkontrolujte, že správně běží Zabbix server, databázový server a&nbsp;mají správnou verzi</li>



<li>Zkontrolujte také, zda při&nbsp;startu serveru nebo proxy v&nbsp;systému neuvidíte následující chybu: ‚…the user limit of 1024 file descriptors is insufficient. The maximum number of concurrent checks per worker has been reduced…‘ <a href="https://www.initmax.cz/wiki/zabbix-7-0-a-navyseni-systemovych-limitu/">Návod na&nbsp;odstranění naleznete na&nbsp;naší wiki</a>.</li>



<li>Zkontrolujte, že běží všechny Zabbix proxy a&nbsp;mají správnou verzi. Je zajištěna zpětná kompatibilita (částečná) pro verzi 7.0. Nicméně i&nbsp;tak důrazně doporučujeme používat stejnou verzi, jakou má Zabbix server. Starší verze nejsou podporovány.</li>



<li>Zkontrolujte stav Zabbix serveru a&nbsp;Zabbix proxy (log soubory, nepodporované položky, fronty, monitorovací skripty, atd.).</li>



<li>Zkontrolujte, zda vaše servery mají přiděleny poslední verze oficiálních šablon od Zabbixu. [ <a href="https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates" target="_blank" rel="noreferrer noopener">Zabbix GIT</a> ]</li>
</ul>



<h2 class="wp-block-heading">Co je nového v&nbsp;Zabbixu 7.2</h2>



<p>Informace o&nbsp;novinkách v&nbsp;Zabbixu 7.2 <a href="https://www.initmax.cz/novy-zabbix-7-2/">naleznete v&nbsp;našem článku</a>, nebo se můžete podívat na&nbsp;náš webinář, který je zaměřen právě na&nbsp;tyto novinky.</p>


<section id="block-webinar-block_bf46c3715d51c5bb34c0cb283d3b88b5" data-id="block-webinar-block_bf46c3715d51c5bb34c0cb283d3b88b5" class="gt-block block-webinar">
    <div class="connected-webinars__grid">
        <a href="https://www.initmax.cz/webinar/co-je-noveho-v-zabbixu-7-2/" class="grid-item">
	<article class="webinar-promotion">
		<div class="webinar-promotion__thumbnail-wrap">
			<figure class="webinar-promotion__thumbnail">
					<img decoding="async" src="https://www.initmax.cz/wp-content/uploads/2024/12/06_thumbnail_web.png"
				 width="400"
		 height="250"
		 class=""
		 alt="Co je nového v&nbsp;Zabbixu 7.2"
		 loading="lazy"	>
									<div class="webinar-promotion__tags">
						<span class="tag tag--small" style="color:#ffffff;background-color:#4caf50;">Nový</span><span class="tag tag--small" style="color:#ffffff;background-color:#d40000;">Zabbix</span>					</div>
							</figure>
		</div>
		<div class="webinar-promotion__text">
			<div>
									<time datetime="2024-12-12">12.&nbsp;12.&nbsp;2024</time>
							</div>
			<h3 class="webinar-promotion__title">Co je nového v&nbsp;Zabbixu 7.2</h3>
			<div class="icon-link">
				<figure class="icon-wrap icon-wrap--primary"><svg data-name="Group 3411" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 455" d="M0,0H24V24H0Z" fill="none"/><path data-name="Path 456" d="M15,10l4.553-2.276A1,1,0,0,1,21,8.618v6.764a1,1,0,0,1-1.447.894L15,14V10Z" transform="translate(0 0)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><rect data-name="Rectangle 1286" width="12" height="12" rx="2" transform="translate(3.112 6)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</figure>
				<span>Zhlédnout záznam</span>
			</div>
		</div>
	</article>
</a>    </div>
</section>



<p>A to je vše! Nyní můžete začít využívat váš nově zaktualizovaný Zabbix ve verzi 7.2 se všemi jeho opravami i&nbsp;novinkami. </p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>


<section id="block-newsletter-block_d9153563777d9d1ba842f5a764daae39" data-id="block-newsletter-block_d9153563777d9d1ba842f5a764daae39" class="gt-block block-newsletter">
    <section id="newsletter" class="newsletter">
	<div class="gradient basic">
		<div class="newsletter__inner width width--general">
			<div class="col left">
									<h2 class="newsletter__title">Buďte v&nbsp;obraze s&nbsp;naším newsletterem</h2>
													<div class="newsletter__content"><p>Díky initMAX newsletteru Vám neunikne žádná z&nbsp;pozvánek na&nbsp;akce a&nbsp;webináře, žádný z&nbsp;tipů, jak dostat ze svého IT MAXimum, ani ověřené informace o&nbsp;novinkách ze světa Zabbix a&nbsp;dalších technologií.</p>
</div>
							</div>
			<div class="col right form-wrapper">
				<div class="newsletter-form">
	<form method="post" action="/wiki/kapitola/zabbix/feed/" enctype="multipart/form-data">
		<input type="hidden" name="url" value="https://www.initmax.cz/wiki/kapitola/zabbix/feed/">

		<div class="inputs">

			<label for="newsletter-form_contact_email" class="top">Vaše e-mailová adresa:</label>
			<div class="df">

				<div class="input">
					<input type="text" id="newsletter-form_contact_email" name="newsletter_email" placeholder="@" data-format="email" data-required="1">
									</div><!-- /.input -->

				<a href="#" class="btn btn--white sendBtn">Odeslat</a>

			</div>

			<div class="bottom nm">
				<label for="newsletter-form_gdpr" class="checkbox gdpr">
					<input type="checkbox" id="newsletter-form_gdpr" name="newsletter_gdpr">
					<span>Souhlasím se&nbsp;<a href="https://www.initmax.cz/ochrana-osobnich-udaju/" target="_blank">zpracováním osobních údajů</a>.</span>
				</label>
			</div>

		</div><!-- /.inputs -->
		<div class="sent hidden">
			<div class="iconOk"><h3>Děkujeme, že jste se přihlásili k&nbsp;odběru našeho newsletteru.</h3>
</div>
			<button class="sent__close" title="Zavřít" onclick="closeFormMessage(this,event)"><svg data-name="Group 3602" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 3272" d="M0,0H24V24H0Z" fill="none"/><line data-name="Line 98" y2="14" transform="translate(7.05 7.05) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 99" x2="14" transform="translate(7.05 16.95) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</button>
		</div><!-- /.sent -->
	</form>
</div>			</div>
		</div>
	</div>
</section></section>



<section id="social-links-block_01df5a1f68dc3769d090fc7adefb6df8" data-id="social-links-block_01df5a1f68dc3769d090fc7adefb6df8" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>

<p>The post <a href="https://www.initmax.cz/wiki/zabbix-aktualizace-na-posledni-verzi-7-2/">Zabbix &#8211; aktualizace na&nbsp;poslední verzi 7.2</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Integrace Microsoft Teams v&#160;pěti krocích</title>
		<link>https://www.initmax.cz/wiki/integrace-microsoft-teams-v-peti-krocich/</link>
		
		<dc:creator><![CDATA[Tomáš Heřmánek]]></dc:creator>
		<pubDate>Sun, 10 Nov 2024 13:27:56 +0000</pubDate>
				<guid isPermaLink="false">https://www.initmax.cz/?post_type=wiki&#038;p=16849</guid>

					<description><![CDATA[<p>Tento návod vás provede pěti základními kroky k propojení Zabbixu s Microsoft Teams. Naučíte se vytvořit příchozí webhook v Teams, nastavit media type ...</p>
<p>The post <a href="https://www.initmax.cz/wiki/integrace-microsoft-teams-v-peti-krocich/">Integrace Microsoft Teams v&nbsp;pěti krocích</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Tento návod vás provede pěti základními kroky k&nbsp;propojení Zabbixu s&nbsp;Microsoft Teams. Naučíte se vytvořit příchozí webhook v&nbsp;Teams, nastavit media type v&nbsp;Zabbixu a&nbsp;přizpůsobit notifikace vašim potřebám. Krátce se zaměříme také na&nbsp;aktualizaci zastaralých webhooků, aby vaše notifikace do&nbsp;Teams fungovaly bez přerušení.</p>



<p><strong>Upozorňujeme</strong>, že bezplatný plán Teams nepodporuje funkci MS Teams Workflow.</p>



<p>Pokud ve svém MS Teams vidíte hlášku:&nbsp;<em>&#8218;</em><strong>Important: You must update your Webhook URL for this connection in order for your notifications to keep posting into Microsoft Teams</strong>.<em>&#8218;</em>&nbsp;tento návod vás provede novou možností integrace, která nahrazuje starou verzi konektoru za MS Teams Workflow.</p>


<section id="social-links-block_b0fd589e014c6a1155f34c3ce6a1779b" data-id="social-links-block_b0fd589e014c6a1155f34c3ce6a1779b" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>




<h2 class="wp-block-heading">Kontrola hlášky v&nbsp;MS Teams</h2>



<p>Tato část je pouze pro uživatele Zabbixu, kteří již mají integraci s&nbsp;MS Teams nastavenou. Pokud ji nemáte, tento krok ignorujte a&nbsp;pokračujte na&nbsp;další.</p>



<ul class="wp-block-list">
<li>Ověřte, zda v&nbsp;MS Teams vidíte hlášku:&nbsp;<em>&#8222;Important: You must update your Webhook URL for this connection in order for your notifications to keep posting into Microsoft Teams.&#8220;</em></li>



<li>Tato hláška znamená, že je třeba aktualizovat webhook URL pro zachování funkčnosti notifikací.</li>
</ul>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1246" height="1072" src="https://www.initmax.cz/wp-content/uploads/2024/11/webhook.png" alt="" class="wp-image-16864" srcset="https://www.initmax.cz/wp-content/uploads/2024/11/webhook.png 1246w, https://www.initmax.cz/wp-content/uploads/2024/11/webhook-300x258.png 300w, https://www.initmax.cz/wp-content/uploads/2024/11/webhook-1024x881.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/11/webhook-768x661.png 768w, https://www.initmax.cz/wp-content/uploads/2024/11/webhook-608x523.png 608w, https://www.initmax.cz/wp-content/uploads/2024/11/webhook-1216x1046.png 1216w" sizes="auto, (max-width: 1246px) 100vw, 1246px" /></figure>



<h2 class="wp-block-heading">Nastavení v&nbsp;MS Teams</h2>



<ul class="wp-block-list">
<li>Klikněte na&nbsp;menu v&nbsp;levé části obrazovky označené třemi tečkami.</li>



<li>Do vyhledávacího pole napište &#8222;Workflows&#8220;.</li>



<li>Ze seznamu vyberte oficiální verzi (poznáte ji podle obrázku) a&nbsp;klikněte na&nbsp;tlačítko &#8222;Add&#8220;.</li>
</ul>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="807" height="964" src="https://www.initmax.cz/wp-content/uploads/2024/11/workflows1.png" alt="" class="wp-image-16875" srcset="https://www.initmax.cz/wp-content/uploads/2024/11/workflows1.png 807w, https://www.initmax.cz/wp-content/uploads/2024/11/workflows1-251x300.png 251w, https://www.initmax.cz/wp-content/uploads/2024/11/workflows1-768x917.png 768w, https://www.initmax.cz/wp-content/uploads/2024/11/workflows1-608x726.png 608w" sizes="auto, (max-width: 807px) 100vw, 807px" /></figure>



<ul class="wp-block-list">
<li>V levé části se nám v&nbsp;menu objeví nové tlačítko s&nbsp;názvem &#8222;Workflows&#8220; a&nbsp;klikneme na&nbsp;něj.</li>



<li>V okně Workflows klikneme na&nbsp;&#8222;+ New flow&#8220;.</li>
</ul>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2200" height="1240" src="https://www.initmax.cz/wp-content/uploads/2024/11/workflows2-2.png" alt="" class="wp-image-16890" srcset="https://www.initmax.cz/wp-content/uploads/2024/11/workflows2-2.png 2200w, https://www.initmax.cz/wp-content/uploads/2024/11/workflows2-2-300x169.png 300w, https://www.initmax.cz/wp-content/uploads/2024/11/workflows2-2-1024x577.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/11/workflows2-2-768x433.png 768w, https://www.initmax.cz/wp-content/uploads/2024/11/workflows2-2-1536x866.png 1536w, https://www.initmax.cz/wp-content/uploads/2024/11/workflows2-2-2048x1154.png 2048w, https://www.initmax.cz/wp-content/uploads/2024/11/workflows2-2-608x343.png 608w, https://www.initmax.cz/wp-content/uploads/2024/11/workflows2-2-1216x685.png 1216w" sizes="auto, (max-width: 2200px) 100vw, 2200px" /></figure>



<ul class="wp-block-list">
<li>V okně Workflows klikneme na&nbsp;vyhledávání a&nbsp;zadáme: &#8222;Post a&nbsp;channel when a&nbsp;webhook request is received&#8220;.</li>



<li>Ve výsledcích vyhledávání klikneme na&nbsp;první výsledek, který není svázán s&nbsp;žádným uživatelem, jak je zobrazeno na&nbsp;obrázku.</li>
</ul>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2202" height="1236" src="https://www.initmax.cz/wp-content/uploads/2024/11/workflows2-1.png" alt="" class="wp-image-16887" srcset="https://www.initmax.cz/wp-content/uploads/2024/11/workflows2-1.png 2202w, https://www.initmax.cz/wp-content/uploads/2024/11/workflows2-1-300x168.png 300w, https://www.initmax.cz/wp-content/uploads/2024/11/workflows2-1-1024x575.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/11/workflows2-1-768x431.png 768w, https://www.initmax.cz/wp-content/uploads/2024/11/workflows2-1-1536x862.png 1536w, https://www.initmax.cz/wp-content/uploads/2024/11/workflows2-1-2048x1150.png 2048w, https://www.initmax.cz/wp-content/uploads/2024/11/workflows2-1-608x341.png 608w, https://www.initmax.cz/wp-content/uploads/2024/11/workflows2-1-1216x683.png 1216w" sizes="auto, (max-width: 2202px) 100vw, 2202px" /></figure>



<ul class="wp-block-list">
<li>V nově otevřeném pop-up okně zadáme název naší aplikace, abychom ji v&nbsp;budoucnu snadno identifikovali.</li>



<li>Po zadání názvu můžeme pokračovat tlačítkem &#8222;Next&#8220;.</li>
</ul>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2198" height="1612" src="https://www.initmax.cz/wp-content/uploads/2024/11/workflows4-1.png" alt="" class="wp-image-16892" srcset="https://www.initmax.cz/wp-content/uploads/2024/11/workflows4-1.png 2198w, https://www.initmax.cz/wp-content/uploads/2024/11/workflows4-1-300x220.png 300w, https://www.initmax.cz/wp-content/uploads/2024/11/workflows4-1-1024x751.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/11/workflows4-1-768x563.png 768w, https://www.initmax.cz/wp-content/uploads/2024/11/workflows4-1-1536x1126.png 1536w, https://www.initmax.cz/wp-content/uploads/2024/11/workflows4-1-2048x1502.png 2048w, https://www.initmax.cz/wp-content/uploads/2024/11/workflows4-1-608x446.png 608w, https://www.initmax.cz/wp-content/uploads/2024/11/workflows4-1-1216x892.png 1216w" sizes="auto, (max-width: 2198px) 100vw, 2198px" /></figure>



<ul class="wp-block-list">
<li>Na další stránce vybereme naši Teams skupinu, kam budeme chtít posílat notifikace, případně zvolíme stejnou skupinu, kterou již používáme pro staré nastavení webhooku.</li>



<li>Uvnitř naší Teams skupiny si vybereme konkrétní kanál.</li>
</ul>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2200" height="1612" src="https://www.initmax.cz/wp-content/uploads/2024/11/workflows5-1.png" alt="" class="wp-image-16894" srcset="https://www.initmax.cz/wp-content/uploads/2024/11/workflows5-1.png 2200w, https://www.initmax.cz/wp-content/uploads/2024/11/workflows5-1-300x220.png 300w, https://www.initmax.cz/wp-content/uploads/2024/11/workflows5-1-1024x750.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/11/workflows5-1-768x563.png 768w, https://www.initmax.cz/wp-content/uploads/2024/11/workflows5-1-1536x1125.png 1536w, https://www.initmax.cz/wp-content/uploads/2024/11/workflows5-1-2048x1501.png 2048w, https://www.initmax.cz/wp-content/uploads/2024/11/workflows5-1-608x445.png 608w, https://www.initmax.cz/wp-content/uploads/2024/11/workflows5-1-1216x891.png 1216w" sizes="auto, (max-width: 2200px) 100vw, 2200px" /></figure>



<ul class="wp-block-list">
<li>Na finální stránce si zkopírujeme naši vygenerovanou URL, která bude používána v&nbsp;Zabbixu.</li>



<li>Doporučujeme zatím stránku v&nbsp;Teams nezavírat a&nbsp;pro jistotu si URL poznamenat mimo Zabbix a&nbsp;Teams.</li>
</ul>



<figure class="wp-block-image size-full" id="workflow_url"><img loading="lazy" decoding="async" width="2200" height="1614" src="https://www.initmax.cz/wp-content/uploads/2024/11/workflows6-1.png" alt="" class="wp-image-16896" srcset="https://www.initmax.cz/wp-content/uploads/2024/11/workflows6-1.png 2200w, https://www.initmax.cz/wp-content/uploads/2024/11/workflows6-1-300x220.png 300w, https://www.initmax.cz/wp-content/uploads/2024/11/workflows6-1-1024x751.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/11/workflows6-1-768x563.png 768w, https://www.initmax.cz/wp-content/uploads/2024/11/workflows6-1-1536x1127.png 1536w, https://www.initmax.cz/wp-content/uploads/2024/11/workflows6-1-2048x1502.png 2048w, https://www.initmax.cz/wp-content/uploads/2024/11/workflows6-1-608x446.png 608w, https://www.initmax.cz/wp-content/uploads/2024/11/workflows6-1-1216x892.png 1216w" sizes="auto, (max-width: 2200px) 100vw, 2200px" /></figure>



<h2 class="wp-block-heading">Nastavení URL Zabbixu</h2>



<p>V Zabbix webovém rozhraní přejděte na&nbsp;<em>Administration → Macros</em>.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2808" height="1262" src="https://www.initmax.cz/wp-content/uploads/2024/11/zabbix_url_macro.png" alt="" class="wp-image-16858" srcset="https://www.initmax.cz/wp-content/uploads/2024/11/zabbix_url_macro.png 2808w, https://www.initmax.cz/wp-content/uploads/2024/11/zabbix_url_macro-300x135.png 300w, https://www.initmax.cz/wp-content/uploads/2024/11/zabbix_url_macro-1024x460.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/11/zabbix_url_macro-768x345.png 768w, https://www.initmax.cz/wp-content/uploads/2024/11/zabbix_url_macro-1536x690.png 1536w, https://www.initmax.cz/wp-content/uploads/2024/11/zabbix_url_macro-2048x920.png 2048w, https://www.initmax.cz/wp-content/uploads/2024/11/zabbix_url_macro-608x273.png 608w, https://www.initmax.cz/wp-content/uploads/2024/11/zabbix_url_macro-1216x547.png 1216w" sizes="auto, (max-width: 2808px) 100vw, 2808px" /></figure>



<p>Nastavte globální proměnnou&nbsp;<code>{$ZABBIX.URL}</code>&nbsp;s&nbsp;URL Zabbix frontend rozhraní. Ujistěte se, že URL obsahuje protokol (http nebo https). Tato URL adresa bude součástí vaší události jako odkaz na&nbsp;problém.</p>



<h2 class="wp-block-heading">Import media typu</h2>



<p>Přejděte do&nbsp;<em>Alerts → Media types</em> a&nbsp;naimportujte soubor <em>media_msteams_workflow.yaml</em>. Je možné, že šablonu již ve vašem Zabbixu máte, ale pro jistotu ji znovu importujte, může obsahovat aktualizace. Je potřeba přepnout se na&nbsp;konkrétní verzi v&nbsp;levém horním rohu, kde si zvolíte vaši verzi Zabbixu.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2806" height="1262" src="https://www.initmax.cz/wp-content/uploads/2024/11/ms_teams.png" alt="" class="wp-image-16872" srcset="https://www.initmax.cz/wp-content/uploads/2024/11/ms_teams.png 2806w, https://www.initmax.cz/wp-content/uploads/2024/11/ms_teams-300x135.png 300w, https://www.initmax.cz/wp-content/uploads/2024/11/ms_teams-1024x461.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/11/ms_teams-768x345.png 768w, https://www.initmax.cz/wp-content/uploads/2024/11/ms_teams-1536x691.png 1536w, https://www.initmax.cz/wp-content/uploads/2024/11/ms_teams-2048x921.png 2048w, https://www.initmax.cz/wp-content/uploads/2024/11/ms_teams-608x273.png 608w, https://www.initmax.cz/wp-content/uploads/2024/11/ms_teams-1216x547.png 1216w" sizes="auto, (max-width: 2806px) 100vw, 2806px" /></figure>



<h2 class="wp-block-heading">Konfigurace media typu MS Teams Workflow</h2>



<p>Otevřete nastavení pro nový media type <em>MS Teams Workflow</em> a&nbsp;nahraďte zástupný text <code>&lt;PLACE WEBHOOK URL HERE&gt;</code> URL adresou workflow endpointu získanou v&nbsp;posledním kroku v&nbsp;části &#8222;<a href="#workflow_url">Nastavení v&nbsp;MS Teams</a>&#8222;.</p>



<p>Nezapomeňte nastavení uložit.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1124" height="1020" src="https://www.initmax.cz/wp-content/uploads/2024/11/webhook-setting.png" alt="" class="wp-image-16869" srcset="https://www.initmax.cz/wp-content/uploads/2024/11/webhook-setting.png 1124w, https://www.initmax.cz/wp-content/uploads/2024/11/webhook-setting-300x272.png 300w, https://www.initmax.cz/wp-content/uploads/2024/11/webhook-setting-1024x929.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/11/webhook-setting-768x697.png 768w, https://www.initmax.cz/wp-content/uploads/2024/11/webhook-setting-608x552.png 608w" sizes="auto, (max-width: 1124px) 100vw, 1124px" /></figure>



<h2 class="wp-block-heading">Otestování našeho nastavení</h2>



<p>Pro otestování našeho nastavení využijeme vestavěnou funkci tlačítka <em>Test</em> na&nbsp;úrovni Media.</p>



<p>Je potřeba vyplnit základní parametry (jedná se o&nbsp;testovací data), část <code>teams_endpoint</code> se vyplní automaticky.</p>



<ul class="wp-block-list">
<li>alert_message = TEST Message</li>



<li>alert_subject = TEST Subject</li>



<li>event_severity = 3 (Zde lze napsat cokoliv; zde je číslo 3 pro příklad, protože do&nbsp;části event_severity lze zadávat čísla podle úrovní závažnosti. Možné hodnoty: 0 &#8211; Not classified, 1 &#8211; Information, 2 &#8211; Warning, 3 &#8211; Average, 4 &#8211; High, 5 &#8211; Disaster.)</li>



<li>event_source = 1 (Možné hodnoty: 0 &#8211; Trigger, 1 &#8211; Discovery, 2 &#8211; Autoregistration, 3 &#8211; Internal, 4 &#8211; Service.)</li>



<li>zabbix_url = https://www.initmax.cz/zabbix (Zde vyplňte stejnou URL adresu, kterou jste zadali do&nbsp;makra; bohužel v&nbsp;této části si Zabbix neumí makro přeložit, proto ji vyplníme ručně.)</li>
</ul>



<p>Po vyplnění parametrů odešlete formulář kliknutím na&nbsp;tlačítko <em>Test</em>.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2809" height="1577" src="https://www.initmax.cz/wp-content/uploads/2024/11/teams-test-form.png" alt="" class="wp-image-16904" srcset="https://www.initmax.cz/wp-content/uploads/2024/11/teams-test-form.png 2809w, https://www.initmax.cz/wp-content/uploads/2024/11/teams-test-form-300x168.png 300w, https://www.initmax.cz/wp-content/uploads/2024/11/teams-test-form-1024x575.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/11/teams-test-form-768x431.png 768w, https://www.initmax.cz/wp-content/uploads/2024/11/teams-test-form-1536x862.png 1536w, https://www.initmax.cz/wp-content/uploads/2024/11/teams-test-form-2048x1150.png 2048w, https://www.initmax.cz/wp-content/uploads/2024/11/teams-test-form-608x341.png 608w, https://www.initmax.cz/wp-content/uploads/2024/11/teams-test-form-1216x683.png 1216w" sizes="auto, (max-width: 2809px) 100vw, 2809px" /></figure>



<p>Po odeslání uvidíte ověřovací zprávu a&nbsp;v&nbsp;části <em>Response</em> uvidíte výsledek. Mělo by se vám vrátit &#8222;OK&#8220;.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2808" height="1577" src="https://www.initmax.cz/wp-content/uploads/2024/11/teams-test-ok.png" alt="" class="wp-image-16906" srcset="https://www.initmax.cz/wp-content/uploads/2024/11/teams-test-ok.png 2808w, https://www.initmax.cz/wp-content/uploads/2024/11/teams-test-ok-300x168.png 300w, https://www.initmax.cz/wp-content/uploads/2024/11/teams-test-ok-1024x575.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/11/teams-test-ok-768x431.png 768w, https://www.initmax.cz/wp-content/uploads/2024/11/teams-test-ok-1536x863.png 1536w, https://www.initmax.cz/wp-content/uploads/2024/11/teams-test-ok-2048x1150.png 2048w, https://www.initmax.cz/wp-content/uploads/2024/11/teams-test-ok-608x341.png 608w, https://www.initmax.cz/wp-content/uploads/2024/11/teams-test-ok-1216x683.png 1216w" sizes="auto, (max-width: 2808px) 100vw, 2808px" /></figure>



<p>Pokud se vám vrátila zpráva &#8222;OK,&#8220; je vše v&nbsp;pořádku. Pokud se nevrátí, v&nbsp;této části nebo v&nbsp;horní části pop-up okna uvidíte, co konkrétně nefunguje. K&nbsp;dispozici je také velmi užitečná sekce pod tlačítkem <em>Open log</em>.</p>



<p>Nyní se můžeme podívat do&nbsp;naší Teams skupiny na&nbsp;novou zprávu, která byla vytvořena pomocí Zabbixu přes funkcionalitu Microsoft Teams &#8211; Workflows.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1192" height="658" src="https://www.initmax.cz/wp-content/uploads/2024/11/teams_test.png" alt="" class="wp-image-16908" srcset="https://www.initmax.cz/wp-content/uploads/2024/11/teams_test.png 1192w, https://www.initmax.cz/wp-content/uploads/2024/11/teams_test-300x166.png 300w, https://www.initmax.cz/wp-content/uploads/2024/11/teams_test-1024x565.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/11/teams_test-768x424.png 768w, https://www.initmax.cz/wp-content/uploads/2024/11/teams_test-608x336.png 608w" sizes="auto, (max-width: 1192px) 100vw, 1192px" /></figure>



<h2 class="wp-block-heading">Finalizace a&nbsp;rady na&nbsp;závěr</h2>



<p><strong>Pro použití nastavení si musíte vytvořit odpovídající akci nebo ji upravit.</strong> Nezapomeňte uživatelům, kterým se zasílá notifikace, doplnit adresu v&nbsp;médiích – obvykle se jedná o&nbsp;sběrný účet. Toto není součástí tohoto návodu, protože se jedná o&nbsp;běžné nastavení notifikací a&nbsp;není zde potřeba nic speciálního.</p>



<p>Do části <em>Send to</em> je jedno, co zadáte. Na&nbsp;obrázku vidíte původní a&nbsp;nové nastavení pro našeho uživatele používaného pro notifikace. Nezapomeňte také upravit odpovídající akce.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1522" height="378" src="https://www.initmax.cz/wp-content/uploads/2024/11/teams_user.png" alt="" class="wp-image-16901" srcset="https://www.initmax.cz/wp-content/uploads/2024/11/teams_user.png 1522w, https://www.initmax.cz/wp-content/uploads/2024/11/teams_user-300x75.png 300w, https://www.initmax.cz/wp-content/uploads/2024/11/teams_user-1024x254.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/11/teams_user-768x191.png 768w, https://www.initmax.cz/wp-content/uploads/2024/11/teams_user-608x151.png 608w, https://www.initmax.cz/wp-content/uploads/2024/11/teams_user-1216x302.png 1216w" sizes="auto, (max-width: 1522px) 100vw, 1522px" /></figure>



<p><strong>Použití parametru <code>http_proxy</code></strong> pro media type v&nbsp;Zabbixu umožňuje přesměrovat požadavky přes proxy server. Tento parametr je užitečný, pokud váš Zabbix server nemá přímý přístup k&nbsp;internetu (např.&nbsp;kvůli bezpečnostním omezením) a&nbsp;připojuje se k&nbsp;externím službám (např.&nbsp;webhooky pro Microsoft Teams) přes proxy server.</p>



<p><strong>Obsah zprávy a&nbsp;vzhled zprávy</strong> v&nbsp;Microsoft Teams si můžete upravit na&nbsp;úrovni šablony zprávy (<em>message template</em>) v&nbsp;části nastavení media typu v&nbsp;Zabbixu nebo přímou úpravou JavaScriptového kódu. Můžete například nastavit různé barvy pro odlišné úrovně závažnosti (<em>severity</em>). Podrobnější dokumentaci naleznete na&nbsp;<a href="https://learn.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook?tabs=newteams%2Cdotnet" target="_blank" rel="noreferrer noopener nofollow">webu Microsoftu.</a></p>


<section id="social-links-block_b0fd589e014c6a1155f34c3ce6a1779b" data-id="social-links-block_b0fd589e014c6a1155f34c3ce6a1779b" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>



<section id="block-newsletter-block_de9918ae6f2fb7defcc21f3e7418110a" data-id="block-newsletter-block_de9918ae6f2fb7defcc21f3e7418110a" class="gt-block block-newsletter">
    <section id="newsletter" class="newsletter">
	<div class="gradient basic">
		<div class="newsletter__inner width width--general">
			<div class="col left">
									<h2 class="newsletter__title">Buďte v&nbsp;obraze s&nbsp;naším newsletterem</h2>
													<div class="newsletter__content"><p>Díky initMAX newsletteru Vám neunikne žádná z&nbsp;pozvánek na&nbsp;akce a&nbsp;webináře, žádný z&nbsp;tipů, jak dostat ze svého IT MAXimum, ani ověřené informace o&nbsp;novinkách ze světa Zabbix a&nbsp;dalších technologií.</p>
</div>
							</div>
			<div class="col right form-wrapper">
				<div class="newsletter-form">
	<form method="post" action="/wiki/kapitola/zabbix/feed/" enctype="multipart/form-data">
		<input type="hidden" name="url" value="https://www.initmax.cz/wiki/kapitola/zabbix/feed/">

		<div class="inputs">

			<label for="newsletter-form_contact_email" class="top">Vaše e-mailová adresa:</label>
			<div class="df">

				<div class="input">
					<input type="text" id="newsletter-form_contact_email" name="newsletter_email" placeholder="@" data-format="email" data-required="1">
									</div><!-- /.input -->

				<a href="#" class="btn btn--white sendBtn">Odeslat</a>

			</div>

			<div class="bottom nm">
				<label for="newsletter-form_gdpr" class="checkbox gdpr">
					<input type="checkbox" id="newsletter-form_gdpr" name="newsletter_gdpr">
					<span>Souhlasím se&nbsp;<a href="https://www.initmax.cz/ochrana-osobnich-udaju/" target="_blank">zpracováním osobních údajů</a>.</span>
				</label>
			</div>

		</div><!-- /.inputs -->
		<div class="sent hidden">
			<div class="iconOk"><h3>Děkujeme, že jste se přihlásili k&nbsp;odběru našeho newsletteru.</h3>
</div>
			<button class="sent__close" title="Zavřít" onclick="closeFormMessage(this,event)"><svg data-name="Group 3602" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 3272" d="M0,0H24V24H0Z" fill="none"/><line data-name="Line 98" y2="14" transform="translate(7.05 7.05) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 99" x2="14" transform="translate(7.05 16.95) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</button>
		</div><!-- /.sent -->
	</form>
</div>			</div>
		</div>
	</div>
</section></section>

<p>The post <a href="https://www.initmax.cz/wiki/integrace-microsoft-teams-v-peti-krocich/">Integrace Microsoft Teams v&nbsp;pěti krocích</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Rebranding Zabbixu</title>
		<link>https://www.initmax.cz/wiki/rebranding-zabbixu/</link>
		
		<dc:creator><![CDATA[Tomáš Heřmánek]]></dc:creator>
		<pubDate>Tue, 29 Oct 2024 10:02:36 +0000</pubDate>
				<guid isPermaLink="false">https://www.initmax.cz/?post_type=wiki&#038;p=16368</guid>

					<description><![CDATA[<p>Jak si změnit v Zabbixu logo na své vlastní a přizpůsobit si tak celý systém? Přesně tím se bude zabývat tento článek. Zabbix ...</p>
<p>The post <a href="https://www.initmax.cz/wiki/rebranding-zabbixu/">Rebranding Zabbixu</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p><strong>Jak si změnit v&nbsp;Zabbixu logo na&nbsp;své vlastní a&nbsp;přizpůsobit si tak celý systém?</strong></p>



<p>Přesně tím se bude zabývat tento článek. Zabbix umožňuje nativně změnit logo pro přihlašovací obrazovku a&nbsp;obě loga v&nbsp;menu. Tento rebranding lze jednoduše provést pomocí skrytého nastavení v&nbsp;souboru&nbsp;<code>brand.conf.php</code>.</p>


<section id="social-links-block_c0d3f22c0403b4899baaa58327918227" data-id="social-links-block_c0d3f22c0403b4899baaa58327918227" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>




<p>Pokud chcete v&nbsp;Zabbixu provést rebranding, postupujte podle následujících kroků:</p>



<h2 class="wp-block-heading">Vytvoření adresářové struktury a&nbsp;souborů</h2>



<p>Nejprve zajistěte, že máte požadovanou strukturu adresářů<strong>.</strong>&nbsp;Vytvořte adresáře&nbsp;<code>conf</code>&nbsp;a&nbsp;<code>rebranding</code>:</p>



<p><strong>Pro verzi 7.0 a&nbsp;starší</strong></p>


<section id="block-code-block_23eb290aa4aefced68bd6f3743068a31" data-id="block-code-block_23eb290aa4aefced68bd6f3743068a31" class="gt-block block-code">
    <pre><code>sudo mkdir -p /usr/share/zabbix/local/conf
sudo mkdir -p /usr/share/zabbix/rebranding
</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p><strong>Pro verzi 7.2 a&nbsp;novější</strong></p>


<section id="block-code-block_6ef32f4c5d44df4dee039b7874d20e57" data-id="block-code-block_6ef32f4c5d44df4dee039b7874d20e57" class="gt-block block-code">
    <pre><code>sudo mkdir -p /usr/share/zabbix/ui/local/conf
sudo mkdir -p /usr/share/zabbix/ui/rebranding
</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Nahrání vlastních log</h2>



<p><strong>Připravte si loga s&nbsp;následujícími rozměry:</strong></p>



<ul class="wp-block-list">
<li><strong>Hlavní logo</strong>: 114&#215;30 px</li>



<li><strong>Logo pro postranní panel</strong>: 91&#215;24 px</li>



<li><strong>Kompaktní logo pro postranní panel</strong>: 24&#215;24 px</li>
</ul>



<p>Doporučené formáty souborů jsou SVG&nbsp;nebo PNG s&nbsp;transparentním pozadím. Ostatní formáty budou fungovat také, ale mohou mít okraje.</p>



<p>Případně můžete pro testování využít naše <a href="https://git.initmax.cz/initMAX-Public/Zabbix-UI-Rebranding-skeleton" target="_blank" rel="noreferrer noopener nofollow">testovací data (obrázky a&nbsp;konfiguraci).</a></p>



<p>Nahrajte své obrázky do&nbsp;adresáře&nbsp;<code>/usr/share/zabbix/rebranding</code>. Můžete použít příkaz&nbsp;<code>scp</code>&nbsp;nebo&nbsp;<code>rsync</code>, pokud nahráváte z&nbsp;jiného serveru, nebo jednoduše zkopírujte soubory přímo:</p>



<p><strong>Pro verzi 7.0 a&nbsp;starší</strong></p>


<section id="block-code-block_23bc1eb7e59411a5331bd78b0b70aafd" data-id="block-code-block_23bc1eb7e59411a5331bd78b0b70aafd" class="gt-block block-code">
    <pre><code>sudo cp /cesta/k/vašim/obrázkům/*.svg /usr/share/zabbix/rebranding/</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p><strong>Pro verzi 7.2 a&nbsp;novější</strong></p>


<section id="block-code-block_04377341e8d5f348ee61a5f011d3ff47" data-id="block-code-block_04377341e8d5f348ee61a5f011d3ff47" class="gt-block block-code">
    <pre><code>sudo cp /cesta/k/vašim/obrázkům/*.svg /usr/share/zabbix/ui/rebranding/</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Oprávnění k&nbsp;souborům vyřešíme později.</p>



<h2 class="wp-block-heading">Nastavení brand.conf.php</h2>



<p>Vytvořte nebo upravte soubor&nbsp;<code>brand.conf.php</code>:</p>



<p><strong>Pro verzi 7.0 a&nbsp;starší</strong></p>


<section id="block-code-block_ea5b231d7e32e3760ed26af371961ba0" data-id="block-code-block_ea5b231d7e32e3760ed26af371961ba0" class="gt-block block-code">
    <pre><code>sudo nano /usr/share/zabbix/local/conf/brand.conf.php</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p><strong>Pro verzi 7.2 a&nbsp;novější</strong></p>


<section id="block-code-block_2157988cdcf07acf4f5d21ce7b54d2f2" data-id="block-code-block_2157988cdcf07acf4f5d21ce7b54d2f2" class="gt-block block-code">
    <pre><code>sudo nano /usr/share/zabbix/ui/local/conf/brand.conf.php</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Příklad obsahu souboru:</p>


<section id="block-code-block_ea00cddefff4cc61c36f17e7f0263c46" data-id="block-code-block_ea00cddefff4cc61c36f17e7f0263c46" class="gt-block block-code">
    <pre><code>&lt;?php
return [
    &#039;BRAND_LOGO&#039; =&gt; &#039;./rebranding/initMAX_Zabbix_Logo_Colors_114x30.svg&#039;,
    &#039;BRAND_LOGO_SIDEBAR&#039; =&gt; &#039;./rebranding/initMAX_Zabbix_Logo_White_91x24.svg&#039;,
    &#039;BRAND_LOGO_SIDEBAR_COMPACT&#039; =&gt; &#039;./rebranding/initMAX_Zabbix_Symbol_White_24x24.svg&#039;,
    &#039;BRAND_FOOTER&#039; =&gt; &#039;initMAX s.r.o.&#039;,
    &#039;BRAND_HELP_URL&#039; =&gt; &#039;https://www.initmax.com/&#039;
];</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p><strong>Ujistěte se, že názvy souborů odpovídají nastavení v&nbsp;<code>brand.conf.php</code>.</strong></p>



<p>V případě potřeby můžete jednotlivé části zakomentovat pomocí dvou obrácených lomítek&nbsp;<code>//</code>.</p>



<p><strong>Co znamenají jednotlivé části v&nbsp;PHP kódu?</strong></p>



<ul class="wp-block-list">
<li><strong>BRAND_LOGO</strong>&nbsp;– Hlavní logo, které se zobrazí na&nbsp;přihlašovací obrazovce.</li>



<li><strong>BRAND_LOGO_SIDEBAR</strong>&nbsp;– Logo, které se objeví v&nbsp;levém menu.</li>



<li><strong>BRAND_LOGO_SIDEBAR_COMPACT</strong>&nbsp;– Logo pro levé menu v&nbsp;kompaktním režimu (symbol).</li>



<li><strong>BRAND_FOOTER</strong>&nbsp;– Možnost přidat vlastní text do&nbsp;patičky.</li>



<li><strong>BRAND_HELP_URL</strong>&nbsp;– URL, která se otevře po&nbsp;kliknutí na&nbsp;tlačítko &#8222;Help&#8220;.</li>
</ul>



<h2 class="wp-block-heading">Nastavení oprávnění</h2>



<p>Ujistěte se, že soubory a&nbsp;složky mají správná oprávnění a&nbsp;vlastníka (obvykle&nbsp;<code>www-data</code>&nbsp;nebo&nbsp;<code>apache</code>, v&nbsp;závislosti na&nbsp;konfiguraci webového serveru):</p>



<p><strong>Pro verzi 7.0 a&nbsp;starší</strong></p>


<section id="block-code-block_7ac9e7d645d50a185e8ab4f0b3a03414" data-id="block-code-block_7ac9e7d645d50a185e8ab4f0b3a03414" class="gt-block block-code">
    <pre><code>sudo chown -R www-data:www-data /usr/share/zabbix/local/conf
sudo chmod 755 /usr/share/zabbix/local/conf
sudo chmod 644 /usr/share/zabbix/local/conf/brand.conf.php
sudo chown -R www-data:www-data /usr/share/zabbix/rebranding
sudo chmod 755 /usr/share/zabbix/rebranding
sudo chmod 644 /usr/share/zabbix/rebranding/*</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p><strong>Pro verzi 7.2 a&nbsp;novější</strong></p>


<section id="block-code-block_21ba35a25e2f88445985f628ca2ba2a3" data-id="block-code-block_21ba35a25e2f88445985f628ca2ba2a3" class="gt-block block-code">
    <pre><code>sudo chown -R www-data:www-data /usr/share/zabbix/ui/local/conf
sudo chmod 755 /usr/share/zabbix/ui/local/conf
sudo chmod 644 /usr/share/zabbix/ui/local/conf/brand.conf.php
sudo chown -R www-data:www-data /usr/share/zabbix/ui/rebranding
sudo chmod 755 /usr/share/zabbix/ui/rebranding
sudo chmod 644 /usr/share/zabbix/ui/rebranding/*</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Kontrola rebrandingu</h2>



<p>Otevřete Zabbix webové rozhraní a&nbsp;zkontrolujte, zda se nové logo a&nbsp;další prvky rebrandingu zobrazují správně. Pravděpodobně bude potřeba vymazat cache prohlížeče, aby se změny plně projevily.</p>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="832" height="1246" src="https://www.initmax.cz/wp-content/uploads/2024/10/login-branded-1.png" alt="" class="wp-image-16392" srcset="https://www.initmax.cz/wp-content/uploads/2024/10/login-branded-1.png 832w, https://www.initmax.cz/wp-content/uploads/2024/10/login-branded-1-200x300.png 200w, https://www.initmax.cz/wp-content/uploads/2024/10/login-branded-1-684x1024.png 684w, https://www.initmax.cz/wp-content/uploads/2024/10/login-branded-1-768x1150.png 768w, https://www.initmax.cz/wp-content/uploads/2024/10/login-branded-1-608x911.png 608w" sizes="auto, (max-width: 832px) 100vw, 832px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="612" height="1460" src="https://www.initmax.cz/wp-content/uploads/2024/10/branding_menu.jpg" alt="" class="wp-image-16396" srcset="https://www.initmax.cz/wp-content/uploads/2024/10/branding_menu.jpg 612w, https://www.initmax.cz/wp-content/uploads/2024/10/branding_menu-126x300.jpg 126w, https://www.initmax.cz/wp-content/uploads/2024/10/branding_menu-429x1024.jpg 429w, https://www.initmax.cz/wp-content/uploads/2024/10/branding_menu-608x1450.jpg 608w" sizes="auto, (max-width: 612px) 100vw, 612px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="167" height="1461" src="https://www.initmax.cz/wp-content/uploads/2024/10/branding_menu_compact.png" alt="" class="wp-image-16398" srcset="https://www.initmax.cz/wp-content/uploads/2024/10/branding_menu_compact.png 167w, https://www.initmax.cz/wp-content/uploads/2024/10/branding_menu_compact-117x1024.png 117w" sizes="auto, (max-width: 167px) 100vw, 167px" /></figure>
</div>
</div>



<p><strong>Dodatečný tip:</strong>&nbsp;Pokud se v&nbsp;kompaktním režimu ikona zobrazuje dvakrát, jedná se o&nbsp;známý bug (viz&nbsp;<a href="https://support.zabbix.com/browse/ZBX-23676?jql=text%20~%20%22rebranding%22" target="_blank" rel="noreferrer noopener nofollow">ZBX-23676</a>), který je vyřešen ve verzích od:</p>



<p><strong>pre-7.2.0alpha2 (master)</strong>&nbsp;– commit&nbsp;<code>6f04c309093</code></p>



<p><strong>pre-7.0.6rc1</strong>&nbsp;– commit&nbsp;<code>0026d10fee4</code></p>



<h2 class="wp-block-heading"><strong>Další nápady na&nbsp;vylepšení rebrandingu</strong></h2>



<p>Pro lepší přizpůsobení Zabbixu můžete přidat vlastní ikony a&nbsp;favicon, což zajistí konzistentní vzhled v&nbsp;záložkách prohlížeče i&nbsp;na&nbsp;mobilních zařízeních. Ikony stačí nahrát do&nbsp;adresáře, kde jsou umístěny webové soubory Zabbixu.</p>



<p>Pokud potřebujete ikony rychle vygenerovat, můžete použít <a href="https://realfavicongenerator.net" target="_blank" rel="noreferrer noopener nofollow">RealFaviconGenerator</a> – stačí nahrát vaše logo a&nbsp;stáhnout si balíček hotových ikon.</p>



<p><strong>Tip:</strong> Doporučujeme nahrát ikony do&nbsp;adresáře s&nbsp;rebrandingem. Pokud je ale chcete přidat trvale, bude nutné upravit konfiguraci Apache nebo Nginx, aby se např.&nbsp;<code>favicon.ico</code> nepřepsalo po&nbsp;aktualizaci. V&nbsp;případě potřeby nás neváhejte kontaktovat o&nbsp;radu.</p>


<section id="social-links-block_c0d3f22c0403b4899baaa58327918227" data-id="social-links-block_c0d3f22c0403b4899baaa58327918227" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>



<section id="block-newsletter-block_10b0acf950ed276756db1e22363828b3" data-id="block-newsletter-block_10b0acf950ed276756db1e22363828b3" class="gt-block block-newsletter">
    <section id="newsletter" class="newsletter">
	<div class="gradient basic">
		<div class="newsletter__inner width width--general">
			<div class="col left">
									<h2 class="newsletter__title">Buďte v&nbsp;obraze s&nbsp;naším newsletterem</h2>
													<div class="newsletter__content"><p>Díky initMAX newsletteru Vám neunikne žádná z&nbsp;pozvánek na&nbsp;akce a&nbsp;webináře, žádný z&nbsp;tipů, jak dostat ze svého IT MAXimum, ani ověřené informace o&nbsp;novinkách ze světa Zabbix a&nbsp;dalších technologií.</p>
</div>
							</div>
			<div class="col right form-wrapper">
				<div class="newsletter-form">
	<form method="post" action="/wiki/kapitola/zabbix/feed/" enctype="multipart/form-data">
		<input type="hidden" name="url" value="https://www.initmax.cz/wiki/kapitola/zabbix/feed/">

		<div class="inputs">

			<label for="newsletter-form_contact_email" class="top">Vaše e-mailová adresa:</label>
			<div class="df">

				<div class="input">
					<input type="text" id="newsletter-form_contact_email" name="newsletter_email" placeholder="@" data-format="email" data-required="1">
									</div><!-- /.input -->

				<a href="#" class="btn btn--white sendBtn">Odeslat</a>

			</div>

			<div class="bottom nm">
				<label for="newsletter-form_gdpr" class="checkbox gdpr">
					<input type="checkbox" id="newsletter-form_gdpr" name="newsletter_gdpr">
					<span>Souhlasím se&nbsp;<a href="https://www.initmax.cz/ochrana-osobnich-udaju/" target="_blank">zpracováním osobních údajů</a>.</span>
				</label>
			</div>

		</div><!-- /.inputs -->
		<div class="sent hidden">
			<div class="iconOk"><h3>Děkujeme, že jste se přihlásili k&nbsp;odběru našeho newsletteru.</h3>
</div>
			<button class="sent__close" title="Zavřít" onclick="closeFormMessage(this,event)"><svg data-name="Group 3602" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 3272" d="M0,0H24V24H0Z" fill="none"/><line data-name="Line 98" y2="14" transform="translate(7.05 7.05) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 99" x2="14" transform="translate(7.05 16.95) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</button>
		</div><!-- /.sent -->
	</form>
</div>			</div>
		</div>
	</div>
</section></section>

<p>The post <a href="https://www.initmax.cz/wiki/rebranding-zabbixu/">Rebranding Zabbixu</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Implementace TimescaleDB v&#160;Zabbixu: Výhody, Klíčové Tabulky a&#160;Instalace</title>
		<link>https://www.initmax.cz/wiki/implementace-timescaledb-v-zabbixu/</link>
		
		<dc:creator><![CDATA[Tomáš Heřmánek]]></dc:creator>
		<pubDate>Wed, 31 Jul 2024 19:44:21 +0000</pubDate>
				<guid isPermaLink="false">https://www.initmax.cz/?post_type=wiki&#038;p=14718</guid>

					<description><![CDATA[<p>Zabbix je robustní open-source řešení pro monitorování IT infrastruktury, které umožňuje sledování a analýzu výkonu sítě, serverů, aplikací a dalších komponent. S narůstajícím ...</p>
<p>The post <a href="https://www.initmax.cz/wiki/implementace-timescaledb-v-zabbixu/">Implementace TimescaleDB v&nbsp;Zabbixu: Výhody, Klíčové Tabulky a&nbsp;Instalace</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Zabbix je robustní open-source řešení pro monitorování IT infrastruktury, které umožňuje sledování a&nbsp;analýzu výkonu sítě, serverů, aplikací a&nbsp;dalších komponent. S&nbsp;narůstajícím množstvím dat se stává klíčovým faktorem efektivní správa časových dat. Proto Zabbix od verze 5.0 začal podporovat TimescaleDB, což je rozšíření PostgreSQL optimalizované pro časové série. Tento článek se zaměřuje na&nbsp;výhody použití TimescaleDB v&nbsp;Zabbixu, klíčové tabulky a&nbsp;postup instalace.</p>



<p><strong>POZOR</strong>: Současná verze TimescaleDB <strong>NEFUNGUJE </strong>s nejnovější verzí PostgreSQL (18)</p>


<section id="social-links-block_e0d756d575c4fa026aaf04e7ac88466f" data-id="social-links-block_e0d756d575c4fa026aaf04e7ac88466f" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>




<h2 class="wp-block-heading">Výhody TimescaleDB v&nbsp;Zabbixu</h2>



<p>TimescaleDB přináší do&nbsp;Zabbixu několik zásadních výhod, které zvyšují výkon a&nbsp;efektivitu při&nbsp;práci s&nbsp;velkými objemy časových dat:</p>



<ul class="wp-block-list">
<li><strong>Škálovatelnost a&nbsp;Výkon</strong>: TimescaleDB je navrženo tak, aby efektivně spravovalo velké množství časových dat. Díky architektuře&nbsp;<em>hypertables</em>&nbsp;umožňuje rychlé zápisy a&nbsp;čtení dat, což je klíčové pro systémy monitorování, jako je Zabbix, které generují obrovské množství metrik.</li>



<li><strong>Komprese dat</strong>: TimescaleDB nabízí schopnost komprese historických dat, což snižuje nároky na&nbsp;úložiště a&nbsp;může vést až k&nbsp;90% úspoře místa na&nbsp;disku. Komprese však znemožňuje změnu již zkomprimovaných dat; pro případnou úpravu je nutné data nejprve dekomprimovat, provést změnu a&nbsp;poté opět komprimovat.</li>



<li><strong>Snadná správa</strong>: TimescaleDB je plně kompatibilní s&nbsp;PostgreSQL, což znamená, že správci, kteří jsou obeznámeni s&nbsp;PostgreSQL, se snadno zorientují i&nbsp;v&nbsp;TimescaleDB. Implementace je jednoduchá a&nbsp;přidává jen minimální režijní náklady na&nbsp;správu databáze. Dále je možné některá nastavení TimescaleDB upravovat přímo v&nbsp;administraci Zabbixu, konkrétně v&nbsp;sekci&nbsp;<strong>Administration &gt; Housekeeping</strong>.</li>
</ul>



<h2 class="wp-block-heading">Tabulky v&nbsp;Zabbixu využívající TimescaleDB</h2>



<p>Zabbix používá TimescaleDB k&nbsp;ukládání velkého množství časových dat, která jsou rozdělena do&nbsp;několika klíčových tabulek. Aby byl tento proces efektivní a&nbsp;dobře spravovaný, využívá se speciální struktura zvaná&nbsp;<em>hypertable</em>, která je navržena pro práci s&nbsp;časovými daty v&nbsp;TimescaleDB. Pro usnadnění konverze existujících tabulek na&nbsp;<em>hypertables</em>&nbsp;a&nbsp;optimalizaci správy těchto dat obsahuje soubor&nbsp;<code>/usr/share/zabbix-sql-scripts/postgresql/timescaledb/schema.sql</code>&nbsp;skript s&nbsp;potřebnými příkazy. Tento skript automatizuje převod klíčových tabulek Zabbixu na&nbsp;<em>hypertables</em>, což zajišťuje efektivní práci s&nbsp;velkými objemy dat.</p>



<p><strong>Poznámka</strong>: Od verze <strong>Zabbixu 7.2</strong> se skript&nbsp;<code>schema.sql</code>&nbsp;pro TimescaleDB nachází v&nbsp;následující cestě:<br><code>/usr/share/zabbix/sql-scripts/postgresql/timescaledb/schema.sql</code>.</p>



<p>Každý příkaz ve skriptu využívá funkci&nbsp;<code>create_hypertable</code>, která je klíčová pro převod běžných tabulek PostgreSQL na&nbsp;<em>hypertables</em>.&nbsp;<em>Hypertable</em>&nbsp;funguje tak, že data automaticky spravuje v&nbsp;menších podtabulkách, zvaných&nbsp;<em>chunky</em>. Toto dělení umožňuje efektivní dotazování a&nbsp;ukládání dat, což je nezbytné pro rychlý přístup k&nbsp;velkým množstvím časových sérií. Proces konverze tabulek na&nbsp;<em>hypertables</em>&nbsp;zahrnuje několik důležitých parametrů:</p>



<ul class="wp-block-list">
<li><strong>Název tabulky</strong>&nbsp;(např.&nbsp;<code>'history_text'</code>): Určuje, která konkrétní tabulka bude převedena na&nbsp;<em>hypertable</em>. V&nbsp;případě tabulky&nbsp;<code>history_text</code>&nbsp;se jedná o&nbsp;textová data, jako jsou zprávy a&nbsp;logy, která jsou v&nbsp;Zabbixu monitorována.</li>



<li><strong>Časový sloupec</strong>&nbsp;(např.&nbsp;<code>'clock'</code>): Tento parametr definuje sloupec obsahující časové značky (timestamp), které jsou klíčové pro rozdělení dat do&nbsp;jednotlivých&nbsp;<em>chunků</em>. Sloupec&nbsp;<code>'clock'</code>&nbsp;specifikuje čas, kdy byla data zaznamenána, což umožňuje jejich správné rozdělení a&nbsp;třídění.</li>



<li><strong><code>chunk_time_interval</code></strong>&nbsp;(např.&nbsp;<code>86400</code>): Tento parametr určuje časový interval v&nbsp;sekundách pro jednotlivé&nbsp;<em>chunky</em>. Hodnota&nbsp;<code>86400</code>&nbsp;sekund odpovídá jednomu dni. To znamená, že veškerá data shromážděná během jednoho dne budou uložena v&nbsp;jednom&nbsp;<em>chunku</em>. Tento interval lze přizpůsobit podle požadavků na&nbsp;výkon a&nbsp;množství dat, které je třeba zpracovat.</li>



<li><strong><code>migrate_data</code></strong>&nbsp;(např.&nbsp;<code>true</code>): Když je tento parametr nastaven na&nbsp;<code>true</code>, všechna existující data v&nbsp;tabulce jsou automaticky migrována do&nbsp;nové struktury&nbsp;<em>chunků</em>. Tato funkce je důležitá při&nbsp;konverzi již existujících tabulek na&nbsp;<em>hypertables</em>, aby nedošlo ke ztrátě dat.</li>



<li><strong><code>if_not_exists</code></strong>&nbsp;(např.&nbsp;<code>true</code>): Tento parametr zajišťuje, že pokud&nbsp;<em>hypertable</em>&nbsp;již existuje, příkaz ji nebude znovu vytvářet, což zabraňuje možným chybám a&nbsp;ztrátám dat. Pokud&nbsp;<em>hypertable</em>&nbsp;ještě neexistuje, bude nově vytvořena.</li>
</ul>



<p>Použitím těchto nastavení TimescaleDB zajišťuje efektivní správu a&nbsp;přístup k&nbsp;velkým objemům časových dat, což je nezbytné pro systémy jako Zabbix, které generují a&nbsp;analyzují velké množství metrik. Níže jsou uvedeny klíčové tabulky, které byly přeměněny na&nbsp;<em>hypertables</em>&nbsp;pro zajištění lepšího výkonu a&nbsp;efektivity:</p>



<ul class="wp-block-list">
<li><strong><code>history</code></strong>: Uchovává numerická data s&nbsp;plovoucí desetinnou čárkou.</li>
</ul>


<section id="block-code-block_f4252daccb3938e8a12625cd63ad499f" data-id="block-code-block_f4252daccb3938e8a12625cd63ad499f" class="gt-block block-code">
    <pre><code>PERFORM create_hypertable(&#039;history&#039;, &#039;clock&#039;, chunk_time_interval =&gt; 86400, migrate_data =&gt; true, if_not_exists =&gt; true);</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<ul class="wp-block-list">
<li><strong><code>history_uint</code></strong>: Ukládá celá čísla.</li>
</ul>


<section id="block-code-block_55e95bd4611eaff6bd3fe68f493511d5" data-id="block-code-block_55e95bd4611eaff6bd3fe68f493511d5" class="gt-block block-code">
    <pre><code>PERFORM create_hypertable(&#039;history_uint&#039;, &#039;clock&#039;, chunk_time_interval =&gt; 86400, migrate_data =&gt; true, if_not_exists =&gt; true);</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<ul class="wp-block-list">
<li><strong><code>history_log</code></strong>: Obsahuje logovací informace.</li>
</ul>


<section id="block-code-block_442479c1b5c2b435952f16ebdb747597" data-id="block-code-block_442479c1b5c2b435952f16ebdb747597" class="gt-block block-code">
    <pre><code>PERFORM create_hypertable(&#039;history_log&#039;, &#039;clock&#039;, chunk_time_interval =&gt; 86400, migrate_data =&gt; true, if_not_exists =&gt; true);</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<ul class="wp-block-list">
<li><strong><code>history_text</code></strong>: Ukládá textová data, jako jsou zprávy a&nbsp;logy.</li>
</ul>


<section id="block-code-block_91d828d0ae177ed1b0c2ee65a2b57a7d" data-id="block-code-block_91d828d0ae177ed1b0c2ee65a2b57a7d" class="gt-block block-code">
    <pre><code>PERFORM create_hypertable(&#039;history_text&#039;, &#039;clock&#039;, chunk_time_interval =&gt; 86400, migrate_data =&gt; true, if_not_exists =&gt; true);</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<ul class="wp-block-list">
<li><strong><code>history_str</code></strong>: Uchovává krátké textové řetězce.</li>
</ul>


<section id="block-code-block_7071ff657190a90e5b41ede4f2daca4f" data-id="block-code-block_7071ff657190a90e5b41ede4f2daca4f" class="gt-block block-code">
    <pre><code>PERFORM create_hypertable(&#039;history_str&#039;, &#039;clock&#039;, chunk_time_interval =&gt; 86400, migrate_data =&gt; true, if_not_exists =&gt; true);</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<ul class="wp-block-list">
<li><strong><code>history_bin</code></strong>: Uchovává binární data. (Od verze 7.0.2)</li>
</ul>


<section id="block-code-block_3caf5d064be6e711f600e9b8ffabf504" data-id="block-code-block_3caf5d064be6e711f600e9b8ffabf504" class="gt-block block-code">
    <pre><code>PERFORM create_hypertable(&#039;history_bin&#039;, &#039;clock&#039;, chunk_time_interval =&gt; 86400, migrate_data =&gt; true, if_not_exists =&gt; true);</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<ul class="wp-block-list">
<li><strong><code>auditlog</code></strong>: Obsahuje logovací informace o&nbsp;aktivitách uživatelů. (Od verze 7.0)</li>
</ul>


<section id="block-code-block_58400b9f177bef68d05e9a1d478babfa" data-id="block-code-block_58400b9f177bef68d05e9a1d478babfa" class="gt-block block-code">
    <pre><code>PERFORM create_hypertable(&#039;auditlog&#039;, &#039;auditid&#039;, chunk_time_interval =&gt; 604800, time_partitioning_func =&gt; &#039;cuid_timestamp&#039;, migrate_data =&gt; true, if_not_exists =&gt; true);</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<ul class="wp-block-list">
<li><strong><code>trends</code></strong>: Ukládá agregované historické údaje o&nbsp;metrikách.</li>
</ul>


<section id="block-code-block_3f1234f46baf8624c7ff3793bd09bb85" data-id="block-code-block_3f1234f46baf8624c7ff3793bd09bb85" class="gt-block block-code">
    <pre><code>PERFORM create_hypertable(&#039;trends&#039;, &#039;clock&#039;, chunk_time_interval =&gt; 2592000, migrate_data =&gt; true, if_not_exists =&gt; true);</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<ul class="wp-block-list">
<li><strong><code>trends_uint</code></strong>: Ukládá agregovaná historická data pro metriky celých čísel.</li>
</ul>


<section id="block-code-block_75ce8e8f4faa98f341b87df79777a5b6" data-id="block-code-block_75ce8e8f4faa98f341b87df79777a5b6" class="gt-block block-code">
    <pre><code>PERFORM create_hypertable(&#039;trends_uint&#039;, &#039;clock&#039;, chunk_time_interval =&gt; 2592000, migrate_data =&gt; true, if_not_exists =&gt; true);</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Instalace TimescaleDB v&nbsp;Zabbixu</h2>



<h4 class="wp-block-heading">Příprava na&nbsp;instalaci</h4>



<p>Před zahájením instalace TimescaleDB je nutné mít nainstalovaný PostgreSQL a&nbsp;také balíček&nbsp;<code><strong>zabbix-sql-scripts</strong></code>&nbsp;z&nbsp;oficiálního repozitáře pro konkrétní používanou verzi Zabbixu. Zatímco Zabbix jako takový nemusí být nutně nainstalován, zmíněný balíček&nbsp;<code><strong>zabbix-sql-scripts</strong></code>&nbsp;je nezbytný, protože obsahuje potřebné SQL skripty pro konfiguraci databáze. U&nbsp;PostgreSQL se doporučuje instalace z&nbsp;oficiálního repozitáře PostgreSQL, spíše než použití systémového repozitáře, aby byla zajištěna kompatibilita a&nbsp;přístup k&nbsp;nejnovějším funkcím a&nbsp;opravám zabezpečení.</p>



<p>Je důležité poznamenat, že všechny následující příkazy a&nbsp;nastavení se provádějí pouze na&nbsp;serveru PostgreSQL. Instalace TimescaleDB z&nbsp;oficiálního repozitáře TimescaleDB, který podporuje komunitní verzi licence, umožňuje přístup k&nbsp;pokročilým funkcím, jako je komprese dat. Díky komunitní licenci mají uživatelé možnost využívat kompresi, což může výrazně snížit nároky na&nbsp;úložiště a&nbsp;zlepšit výkon dotazů na&nbsp;historická data.</p>



<h4 class="wp-block-heading">Přidání oficiálního repozitáře TimescaleDB</h4>



<p>Pro instalaci TimescaleDB z&nbsp;oficiálního repozitáře je třeba přidat repozitář do&nbsp;systému. Na&nbsp;distribucích založených na&nbsp;RHEL, jako je Rocky Linux, postupujte následovně:</p>


<section id="block-code-block_891deaa333096ceb19e6ae128891e6c2" data-id="block-code-block_891deaa333096ceb19e6ae128891e6c2" class="gt-block block-code">
    <pre><code>tee /etc/yum.repos.d/timescale_timescaledb.repo &lt;&lt;EOL
[timescale_timescaledb]
name=timescale_timescaledb
baseurl=https://packagecloud.io/timescale/timescaledb/el/$(rpm -E %{rhel})/\$basearch
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/timescale/timescaledb/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
EOL</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nainstalujme TimescaleDB.</p>



<p>Nahraďte číslo verze (<code>1</code>6) odpovídající verzí PostgreSQL, kterou používáte.</p>


<section id="block-code-block_5edee2c51c1166aa04dd64e2bbd59d75" data-id="block-code-block_5edee2c51c1166aa04dd64e2bbd59d75" class="gt-block block-code">
    <pre><code>dnf install timescaledb-2-postgresql-16 timescaledb-2-loader-postgresql-16</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Spustíme utility <code>timescaledb-tune</code> a&nbsp;jako parametr jí předáme vyšší hodnotu maximálního množství připojení (<code>--max-conns</code>), které pro tyto testovací účely nastavíme na&nbsp;<code>125</code>.</p>



<p>Tato utility slouží k&nbsp;přizpůsobení výchozího nastavení PostgreSQL relativně výkonu a&nbsp;adekvátnímu nastavení parametrů PostgreSQL pro fungování s&nbsp;TimescaleDB.</p>



<p>Zároveň nám tato utility pomocí instalačního průvodce pomůže vybrat aktuální a&nbsp;platný konfigurační soubor PostgreSQL a&nbsp;nastaví i&nbsp;automatické načítání knihoven TimescaleDB.</p>



<p>Prosím, odpovídejte &#8222;ano&#8220; (y) na&nbsp;všechny otázky. Pozor, automatický tuner předpokládá, že PostgreSQL běží na&nbsp;samostatném serveru, a&nbsp;proto může být potřeba případně upravit parametry.</p>



<p>Nahraďte číslo verze (<code>1</code>6) odpovídající verzí PostgreSQL, kterou používáte.</p>


<section id="block-code-block_452f172a221610c27d1365659b2b5c1f" data-id="block-code-block_452f172a221610c27d1365659b2b5c1f" class="gt-block block-code">
    <pre><code>timescaledb-tune --pg-config /usr/pgsql-16/bin --max-conns=125</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="850" height="2244" src="https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.38.29.png" alt="" class="wp-image-14293" srcset="https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.38.29.png 850w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.38.29-114x300.png 114w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.38.29-388x1024.png 388w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.38.29-768x2028.png 768w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.38.29-582x1536.png 582w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.38.29-776x2048.png 776w" sizes="auto, (max-width: 850px) 100vw, 850px" /></figure>



<p>Následně restartujeme systémovou službu pro PostgreSQL:</p>



<p>Nahraďte číslo verze (<code>1</code>6) odpovídající verzí PostgreSQL, kterou používáte.</p>


<section id="block-code-block_eb613b4382bbe68965b036e388f1ee7a" data-id="block-code-block_eb613b4382bbe68965b036e388f1ee7a" class="gt-block block-code">
    <pre><code>systemctl restart postgresql-16.service</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Zbývá již jen vytvořit a&nbsp;aktivovat samotnou TimescaleDB:</p>



<p>Pozor, během vývoje došlo ke změně cesty z&nbsp;původní /usr/share/zabbix-sql-scripts/postgresql/timescaledb.sql na&nbsp;novou /usr/share/zabbix-sql-scripts/postgresql/timescaledb/schema.sql.</p>



<p><strong>Poznámka</strong>: Od verze <strong>Zabbixu 7.2 </strong>se skript&nbsp;<code>schema.sql</code>&nbsp;pro TimescaleDB nachází v&nbsp;následující cestě:<br><code>/usr/share/zabbix/sql-scripts/postgresql/timescaledb/schema.sql</code>.</p>



<p><strong>Ignorování varování</strong>: Při&nbsp;spuštění skriptu&nbsp;<code>schema.sql</code>&nbsp;na&nbsp;verzi TimescaleDB 2.9.0 a&nbsp;vyšší mohou být zobrazena varování o&nbsp;nedodržení osvědčených postupů. Tato varování lze ignorovat, protože konfigurace bude úspěšně dokončena i&nbsp;přes ně.</p>



<p><strong>Dlouhá doba migrace</strong>: Migrace existujících historických dat, trendů a&nbsp;audit logů může trvat dlouho. !!! <strong>Během této doby musí být <strong>Zabbix</strong></strong> <strong>server a&nbsp;frontend vypnutý</strong> !!!, aby byla zajištěna konzistence dat.</p>



<p>Pro verzi Zabbixu 7.0 a&nbsp;starší:</p>


<section id="block-code-block_4f8c2407ef71c2a961b64e1e5c33e744" data-id="block-code-block_4f8c2407ef71c2a961b64e1e5c33e744" class="gt-block block-code">
    <pre><code>echo &quot;CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;&quot; | sudo -u postgres psql zabbix
cat /usr/share/zabbix-sql-scripts/postgresql/timescaledb/schema.sql | sudo -u zabbix psql zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Od verze Zabbixu 7.2:</p>


<section id="block-code-block_bd160439d3fb236c02874d2f79795717" data-id="block-code-block_bd160439d3fb236c02874d2f79795717" class="gt-block block-code">
    <pre><code>echo &quot;CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;&quot; | sudo -u postgres psql zabbix
cat /usr/share/zabbix/sql-scripts/postgresql/timescaledb/schema.sql | sudo -u zabbix psql zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2844" height="1510" src="https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.48.17.png" alt="" class="wp-image-14291" srcset="https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.48.17.png 2844w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.48.17-300x159.png 300w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.48.17-1024x544.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.48.17-768x408.png 768w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.48.17-1536x816.png 1536w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.48.17-2048x1087.png 2048w" sizes="auto, (max-width: 2844px) 100vw, 2844px" /></figure>



<h2 class="wp-block-heading">Dodatečné informace</h2>



<p><strong>Nastavení parametrů čištění (Administration &gt; Housekeeping)</strong>: Skript&nbsp;<code>schema.sql</code>&nbsp;nastavuje následující parametry čištění:</p>



<ul class="wp-block-list">
<li><strong>Override item history period</strong>: Povolit přepsání období uchování historie položek.</li>



<li><strong>Override item trend period</strong>: Povolit přepsání období uchování trendů.</li>
</ul>



<p>Aby bylo možné použít partitioned housekeeping pro historii a&nbsp;trendy, musí být obě tyto možnosti povoleny. Je také možné povolit přepsání pouze pro historii nebo pouze pro trendy. Pokud bude nastavení aplikováno bude nastavení pro historii a&nbsp;trendy na&nbsp;úrovni itemu ignorovano.</p>



<p><strong>Další parametry ve skriptu&nbsp;<code>schema.sql</code></strong>: Tento skript nastavuje také dva další parametry:</p>



<ul class="wp-block-list">
<li><strong>Enable compression</strong>: Povolit kompresi.</li>



<li><strong>Compress records older than 7 days</strong>: Komprimovat záznamy starší než 7 dnů.</li>
</ul>



<p>Pro úspěšné odstranění komprimovaných dat pomoci housekeeper musí být povoleny jak možnosti&nbsp;<strong>Override item history period</strong>, tak&nbsp;<strong>Override item trend period</strong>. Pokud je přepsání deaktivováno a&nbsp;tabulky mají komprimované&nbsp;<em>chunky</em>, správce údržby nebude odstraňovat data z&nbsp;těchto tabulek a&nbsp;v&nbsp;sekcích Housekeeping a&nbsp;System information se zobrazí varování o&nbsp;nesprávné konfiguraci​</p>



<p>V případě, že uvidíte v&nbsp;Zabbix Server log souboru zprávu o&nbsp;tom, že je verze TimescaleDB příliš nová, pak to není žádný velký problém. Zabbix nedokáže dostatečně rychle reagovat na&nbsp;nejnovější verze TimescaleDB tak, aby ji ve svém kódu nastavil jako podporovanou, ovšem kompatibilita je Zabbixem zaručena a&nbsp;námi ověřena.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1740" height="74" src="https://www.initmax.cz/wp-content/uploads/2023/10/timescaledb-too-new.png" alt="" class="wp-image-13936" style="object-fit:cover" srcset="https://www.initmax.cz/wp-content/uploads/2023/10/timescaledb-too-new.png 1740w, https://www.initmax.cz/wp-content/uploads/2023/10/timescaledb-too-new-300x13.png 300w, https://www.initmax.cz/wp-content/uploads/2023/10/timescaledb-too-new-1024x44.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/10/timescaledb-too-new-768x33.png 768w, https://www.initmax.cz/wp-content/uploads/2023/10/timescaledb-too-new-1536x65.png 1536w" sizes="auto, (max-width: 1740px) 100vw, 1740px" /></figure>



<p>Pokud se chceme vyhnout zprávám o&nbsp;nekompatibilitě v&nbsp;log souboru Zabbixu, pak stačí otevřít konfigurační soubor Zabbix serveru v&nbsp;cestě <code>/etc/zabbix/zabbix_server.conf</code> a&nbsp;zde upravte následující konfigurační parametr:</p>


<section id="block-code-block_b4c5df6872e2e9ce945f137bbaf79d86" data-id="block-code-block_b4c5df6872e2e9ce945f137bbaf79d86" class="gt-block block-code">
    <pre><code>AllowUnsupportedDBVersions=1</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Soubor s&nbsp;tímto nastavením uložte a&nbsp;znovu nastartujte systémovou službu Zabbix serveru.</p>


<section id="block-code-block_41a8da8e3ba176c5c150c64a202d582a" data-id="block-code-block_41a8da8e3ba176c5c150c64a202d582a" class="gt-block block-code">
    <pre><code>systemctl restart zabbix-server</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A to je vše!  Podařilo se Vám zprovoznit rozšíření pro TimescaleDB a&nbsp;máte základní databázový performance tuning. Následující kroky by měly smeřovat k&nbsp;zálohování a&nbsp;monitoringu DB.</p>


<section id="block-newsletter-block_d6bf22ec5c6928779196ea0c427e2d71" data-id="block-newsletter-block_d6bf22ec5c6928779196ea0c427e2d71" class="gt-block block-newsletter">
    <section id="newsletter" class="newsletter">
	<div class="gradient basic">
		<div class="newsletter__inner width width--general">
			<div class="col left">
									<h2 class="newsletter__title">Buďte v&nbsp;obraze s&nbsp;naším newsletterem</h2>
													<div class="newsletter__content"><p>Díky initMAX newsletteru Vám neunikne žádná z&nbsp;pozvánek na&nbsp;akce a&nbsp;webináře, žádný z&nbsp;tipů, jak dostat ze svého IT MAXimum, ani ověřené informace o&nbsp;novinkách ze světa Zabbix a&nbsp;dalších technologií.</p>
</div>
							</div>
			<div class="col right form-wrapper">
				<div class="newsletter-form">
	<form method="post" action="/wiki/kapitola/zabbix/feed/" enctype="multipart/form-data">
		<input type="hidden" name="url" value="https://www.initmax.cz/wiki/kapitola/zabbix/feed/">

		<div class="inputs">

			<label for="newsletter-form_contact_email" class="top">Vaše e-mailová adresa:</label>
			<div class="df">

				<div class="input">
					<input type="text" id="newsletter-form_contact_email" name="newsletter_email" placeholder="@" data-format="email" data-required="1">
									</div><!-- /.input -->

				<a href="#" class="btn btn--white sendBtn">Odeslat</a>

			</div>

			<div class="bottom nm">
				<label for="newsletter-form_gdpr" class="checkbox gdpr">
					<input type="checkbox" id="newsletter-form_gdpr" name="newsletter_gdpr">
					<span>Souhlasím se&nbsp;<a href="https://www.initmax.cz/ochrana-osobnich-udaju/" target="_blank">zpracováním osobních údajů</a>.</span>
				</label>
			</div>

		</div><!-- /.inputs -->
		<div class="sent hidden">
			<div class="iconOk"><h3>Děkujeme, že jste se přihlásili k&nbsp;odběru našeho newsletteru.</h3>
</div>
			<button class="sent__close" title="Zavřít" onclick="closeFormMessage(this,event)"><svg data-name="Group 3602" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 3272" d="M0,0H24V24H0Z" fill="none"/><line data-name="Line 98" y2="14" transform="translate(7.05 7.05) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 99" x2="14" transform="translate(7.05 16.95) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</button>
		</div><!-- /.sent -->
	</form>
</div>			</div>
		</div>
	</div>
</section></section>



<section id="social-links-block_e0d756d575c4fa026aaf04e7ac88466f" data-id="social-links-block_e0d756d575c4fa026aaf04e7ac88466f" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>

<p>The post <a href="https://www.initmax.cz/wiki/implementace-timescaledb-v-zabbixu/">Implementace TimescaleDB v&nbsp;Zabbixu: Výhody, Klíčové Tabulky a&nbsp;Instalace</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Zabbix 7.0 a&#160;navýšení systémových limitů</title>
		<link>https://www.initmax.cz/wiki/zabbix-7-0-a-navyseni-systemovych-limitu/</link>
		
		<dc:creator><![CDATA[Tomáš Heřmánek]]></dc:creator>
		<pubDate>Fri, 07 Jun 2024 21:35:17 +0000</pubDate>
				<guid isPermaLink="false">https://www.initmax.cz/?post_type=wiki&#038;p=14507</guid>

					<description><![CDATA[<p>Co znamená hlášení „&#8230;the user limit of 1024 file descriptors is insufficient. The maximum number of concurrent checks per worker ...</p>
<p>The post <a href="https://www.initmax.cz/wiki/zabbix-7-0-a-navyseni-systemovych-limitu/">Zabbix 7.0 a&nbsp;navýšení systémových limitů</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Co znamená hlášení <strong>„&#8230;the user limit of 1024 file descriptors is insufficient. The maximum number of concurrent checks per worker has been reduced…“</strong>?</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="2806" height="108" src="https://www.initmax.cz/wp-content/uploads/2024/06/ulimit_zabbix.png" alt="" class="wp-image-14509" srcset="https://www.initmax.cz/wp-content/uploads/2024/06/ulimit_zabbix.png 2806w, https://www.initmax.cz/wp-content/uploads/2024/06/ulimit_zabbix-300x12.png 300w, https://www.initmax.cz/wp-content/uploads/2024/06/ulimit_zabbix-1024x39.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/06/ulimit_zabbix-768x30.png 768w, https://www.initmax.cz/wp-content/uploads/2024/06/ulimit_zabbix-1536x59.png 1536w, https://www.initmax.cz/wp-content/uploads/2024/06/ulimit_zabbix-2048x79.png 2048w" sizes="auto, (max-width: 2806px) 100vw, 2806px" /></figure>
</div>


<p>Toto hlášení indikuje, že aktuální limit souborových deskriptorů pro uživatele (v&nbsp;tomto případě uživatele, pod kterým běží Zabbix server nebo proxy) je nastaven na&nbsp;1024. Tento limit je nedostatečný pro množství operací, které Zabbix provádí, což vede k&nbsp;automatickému snížení maximálního počtu současně probíhajících kontrol na&nbsp;worker. V&nbsp;praxi to znamená, že systém nemůže otevřít dostatek souborů nebo síťových připojení současně, což omezuje efektivitu a&nbsp;výkon Zabbixu při&nbsp;zpracování dat.</p>


<section id="social-links-block_bbbe11a5fc53391a9c8889e45d816024" data-id="social-links-block_bbbe11a5fc53391a9c8889e45d816024" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>




<h2 class="wp-block-heading">Co jsou souborové deskriptory?</h2>



<p>Souborové deskriptory jsou identifikátory používané operačním systémem k&nbsp;přístupu k&nbsp;souborům a&nbsp;síťovým zdrojům. Každý proces v&nbsp;systému má svůj limit souborových deskriptorů, což omezuje počet současně otevřených souborů nebo socketů.</p>



<h2 class="wp-block-heading">Proč zvyšovat limit souborových deskriptorů?</h2>



<p>S rostoucím počtem zařízení a&nbsp;dat, které Zabbix monitoruje, může být zapotřebí více souborových deskriptorů. Pokud Zabbix instance potřebuje více deskriptorů, než je aktuální limit, může dojít k&nbsp;chybám nebo omezení výkonu, což může vést ke snížení počtu současných kontrol na&nbsp;worker a&nbsp;zpomalit zpracování dat.</p>



<h2 class="wp-block-heading">Postup navýšení limitu souborových deskriptorů</h2>



<h3 class="wp-block-heading">Zjištění aktuálního limitu</h3>



<p>Nejprve zjistěte aktuální limit souborových deskriptorů pro běžící proces&nbsp;<code>zabbix_server</code>&nbsp;jedním příkazem:</p>


<section id="block-code-block_822f5dc5f77d4373675188d441d2293e" data-id="block-code-block_822f5dc5f77d4373675188d441d2293e" class="gt-block block-code">
    <pre><code>cat /proc/$(pgrep -o zabbix_server)/limits | grep &quot;Max open files&quot;</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Tento příkaz vrátí aktuální měkký a&nbsp;tvrdý limit souborových deskriptorů pro proces&nbsp;<code>zabbix_server</code>. Například:</p>


<section id="block-code-block_3892ddc5a2dee73e342dfc5d0662264b" data-id="block-code-block_3892ddc5a2dee73e342dfc5d0662264b" class="gt-block block-code">
    <pre><code>Max open files   1024   524288   files</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<ul class="wp-block-list">
<li>První hodnota je měkký limit (soft limit).</li>



<li>Druhá hodnota je tvrdý limit (hard limit).</li>
</ul>



<p>Právě soft limit potřebujeme navýšit z&nbsp;1024 na&nbsp;10000. Hodnota se musí nastavit podle vašich konkrétních potřeb a&nbsp;může být i&nbsp;vyšší než tento příklad. Zabbix vás případně upozorní v&nbsp;logu, pokud nastavení není dostatečné.</p>



<h3 class="wp-block-heading">Vytvoření adresáře pro override konfiguraci</h3>



<p>Vytvořte adresář pro uložení nové konfigurace systému:</p>


<section id="block-code-block_cb9b9e2af33763db3ac945d3ea3b7e14" data-id="block-code-block_cb9b9e2af33763db3ac945d3ea3b7e14" class="gt-block block-code">
    <pre><code>mkdir /etc/systemd/system/zabbix-server.service.d</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h3 class="wp-block-heading">Nastavení oprávnění</h3>



<p>Nastavte správná oprávnění pro tento adresář:</p>


<section id="block-code-block_f2fc4af102c2ad0de9229d998114b557" data-id="block-code-block_f2fc4af102c2ad0de9229d998114b557" class="gt-block block-code">
    <pre><code>chmod 755 /etc/systemd/system/zabbix-server.service.d</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h3 class="wp-block-heading">Vytvoření override konfigurace</h3>



<p>Vytvořte soubor s&nbsp;override konfigurací pro zvýšení limitu souborových deskriptorů. V&nbsp;tomto příkladu nastavujeme limit na&nbsp;10000:</p>


<section id="block-code-block_eebf8c7638ef616d52dbc4de76b6dea0" data-id="block-code-block_eebf8c7638ef616d52dbc4de76b6dea0" class="gt-block block-code">
    <pre><code>echo -e &quot;[Service]\nLimitAS=infinity\nLimitRSS=infinity\nLimitNOFILE=10000\nLimitNPROC=1024&quot; \
| sudo tee /etc/systemd/system/zabbix-server.service.d/override.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h3 class="wp-block-heading">Nastavení oprávnění pro override konfiguraci</h3>



<p>Nastavte správná oprávnění pro tento soubor:</p>


<section id="block-code-block_a95e5a9a5ea3a36e23226cbf8927da28" data-id="block-code-block_a95e5a9a5ea3a36e23226cbf8927da28" class="gt-block block-code">
    <pre><code>chmod 644 /etc/systemd/system/zabbix-server.service.d/override.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h3 class="wp-block-heading">Ověření obsahu override konfigurace</h3>



<p>Ověřte, že obsah souboru byl správně uložen:</p>


<section id="block-code-block_b31168fea00749ce28cefd92ffa6f426" data-id="block-code-block_b31168fea00749ce28cefd92ffa6f426" class="gt-block block-code">
    <pre><code>cat /etc/systemd/system/zabbix-server.service.d/override.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>



<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="2122" height="402" src="https://www.initmax.cz/wp-content/uploads/2024/06/nofile_nproc.png" alt="" class="wp-image-14587" srcset="https://www.initmax.cz/wp-content/uploads/2024/06/nofile_nproc.png 2122w, https://www.initmax.cz/wp-content/uploads/2024/06/nofile_nproc-300x57.png 300w, https://www.initmax.cz/wp-content/uploads/2024/06/nofile_nproc-1024x194.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/06/nofile_nproc-768x145.png 768w, https://www.initmax.cz/wp-content/uploads/2024/06/nofile_nproc-1536x291.png 1536w, https://www.initmax.cz/wp-content/uploads/2024/06/nofile_nproc-2048x388.png 2048w" sizes="auto, (max-width: 2122px) 100vw, 2122px" /></figure>
</div>


<h3 class="wp-block-heading">Aktivace změn</h3>



<p>Načtěte nové nastavení systemd:</p>


<section id="block-code-block_481e1e01c322d36949f3aa64c9ec4963" data-id="block-code-block_481e1e01c322d36949f3aa64c9ec4963" class="gt-block block-code">
    <pre><code>systemctl daemon-reload</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h3 class="wp-block-heading">Ověření stavu služby</h3>



<p>Zkontrolujte stav služby Zabbix serveru:</p>


<section id="block-code-block_d5b94595212e4dde81cf7cb8dad4d483" data-id="block-code-block_d5b94595212e4dde81cf7cb8dad4d483" class="gt-block block-code">
    <pre><code>systemctl status zabbix-server.service</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Na obrázku je vidět, že Zabbix server služba využívá dodatečnou konfiguraci, která je uložena v&nbsp;adresáři&nbsp;<code>/etc/systemd/system/zabbix-server.service.d/</code>&nbsp;jako soubor&nbsp;<code>override.conf</code>. Tato dodatečná konfigurace obsahuje změny potřebné pro zvýšení limitu souborových deskriptorů.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img loading="lazy" decoding="async" width="1372" height="208" src="https://www.initmax.cz/wp-content/uploads/2024/06/ulimit_zabbix_service.png" alt="" class="wp-image-14516" style="width:1215px;height:auto" srcset="https://www.initmax.cz/wp-content/uploads/2024/06/ulimit_zabbix_service.png 1372w, https://www.initmax.cz/wp-content/uploads/2024/06/ulimit_zabbix_service-300x45.png 300w, https://www.initmax.cz/wp-content/uploads/2024/06/ulimit_zabbix_service-1024x155.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/06/ulimit_zabbix_service-768x116.png 768w" sizes="auto, (max-width: 1372px) 100vw, 1372px" /></figure>
</div>


<h3 class="wp-block-heading">Restart aplikace</h3>



<p>Pro aplikaci nových limitů restartujte službu Zabbix serveru:</p>


<section id="block-code-block_6a59e30118003862b54d5fcd136527ce" data-id="block-code-block_6a59e30118003862b54d5fcd136527ce" class="gt-block block-code">
    <pre><code>systemctl restart zabbix-server.service</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Ověření konfigurace po&nbsp;restartu Zabbix serveru</h2>



<p>Znovu zkontrolujte aktuální limit souborových deskriptorů pro běžící proces&nbsp;<code>zabbix_server</code>:</p>


<section id="block-code-block_822f5dc5f77d4373675188d441d2293e" data-id="block-code-block_822f5dc5f77d4373675188d441d2293e" class="gt-block block-code">
    <pre><code>cat /proc/$(pgrep -o zabbix_server)/limits | grep &quot;Max open files&quot;</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Měli byste vidět, že proces aktuálně běží s&nbsp;novým limitem:</p>


<section id="block-code-block_3ca12aeaa6ced453658e1e91fc6a209e" data-id="block-code-block_3ca12aeaa6ced453658e1e91fc6a209e" class="gt-block block-code">
    <pre><code>Max open files   10000   10000   files</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Závěr</h2>



<p>Zvýšení limitu souborových deskriptorů pro konkrétního uživatele může pomoci zabránit problémům spojeným s&nbsp;výkonem a&nbsp;stabilitou Zabbix serveru nebo proxy od verze 7.0. Dodržováním výše uvedených kroků můžete zvýšit limity souborových deskriptorů pro specifického uživatele a&nbsp;zajistit, že vaše Zabbix instance bude moci efektivně zpracovávat více současných požadavků.</p>


<section id="block-newsletter-block_74d997f3d4bdb9fc52d2a4d3f2428690" data-id="block-newsletter-block_74d997f3d4bdb9fc52d2a4d3f2428690" class="gt-block block-newsletter">
    <section id="newsletter" class="newsletter">
	<div class="gradient basic">
		<div class="newsletter__inner width width--general">
			<div class="col left">
									<h2 class="newsletter__title">Buďte v&nbsp;obraze s&nbsp;naším newsletterem</h2>
													<div class="newsletter__content"><p>Díky initMAX newsletteru Vám neunikne žádná z&nbsp;pozvánek na&nbsp;akce a&nbsp;webináře, žádný z&nbsp;tipů, jak dostat ze svého IT MAXimum, ani ověřené informace o&nbsp;novinkách ze světa Zabbix a&nbsp;dalších technologií.</p>
</div>
							</div>
			<div class="col right form-wrapper">
				<div class="newsletter-form">
	<form method="post" action="/wiki/kapitola/zabbix/feed/" enctype="multipart/form-data">
		<input type="hidden" name="url" value="https://www.initmax.cz/wiki/kapitola/zabbix/feed/">

		<div class="inputs">

			<label for="newsletter-form_contact_email" class="top">Vaše e-mailová adresa:</label>
			<div class="df">

				<div class="input">
					<input type="text" id="newsletter-form_contact_email" name="newsletter_email" placeholder="@" data-format="email" data-required="1">
									</div><!-- /.input -->

				<a href="#" class="btn btn--white sendBtn">Odeslat</a>

			</div>

			<div class="bottom nm">
				<label for="newsletter-form_gdpr" class="checkbox gdpr">
					<input type="checkbox" id="newsletter-form_gdpr" name="newsletter_gdpr">
					<span>Souhlasím se&nbsp;<a href="https://www.initmax.cz/ochrana-osobnich-udaju/" target="_blank">zpracováním osobních údajů</a>.</span>
				</label>
			</div>

		</div><!-- /.inputs -->
		<div class="sent hidden">
			<div class="iconOk"><h3>Děkujeme, že jste se přihlásili k&nbsp;odběru našeho newsletteru.</h3>
</div>
			<button class="sent__close" title="Zavřít" onclick="closeFormMessage(this,event)"><svg data-name="Group 3602" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 3272" d="M0,0H24V24H0Z" fill="none"/><line data-name="Line 98" y2="14" transform="translate(7.05 7.05) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 99" x2="14" transform="translate(7.05 16.95) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</button>
		</div><!-- /.sent -->
	</form>
</div>			</div>
		</div>
	</div>
</section></section>



<section id="social-links-block_bbbe11a5fc53391a9c8889e45d816024" data-id="social-links-block_bbbe11a5fc53391a9c8889e45d816024" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>

<p>The post <a href="https://www.initmax.cz/wiki/zabbix-7-0-a-navyseni-systemovych-limitu/">Zabbix 7.0 a&nbsp;navýšení systémových limitů</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Zabbix &#8211; aktualizace na&#160;poslední verzi 7.0 LTS</title>
		<link>https://www.initmax.cz/wiki/zabbix-aktualizace-na-posledni-verzi-7-0-lts/</link>
		
		<dc:creator><![CDATA[Tomáš Heřmánek]]></dc:creator>
		<pubDate>Mon, 03 Jun 2024 19:03:59 +0000</pubDate>
				<guid isPermaLink="false">https://www.initmax.cz/?post_type=wiki&#038;p=14477</guid>

					<description><![CDATA[<p>Tentokrát si ukážeme, jak zaktualizovat Zabbix na nejnovější verzi 7.0 LTS. Budeme vycházet při aktualizaci z verze Zabbixu 6.0, PHP verze 8.0 a PostgreSQL ...</p>
<p>The post <a href="https://www.initmax.cz/wiki/zabbix-aktualizace-na-posledni-verzi-7-0-lts/">Zabbix &#8211; aktualizace na&nbsp;poslední verzi 7.0 LTS</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Tentokrát si ukážeme, jak zaktualizovat Zabbix na&nbsp;nejnovější verzi 7.0 LTS. Budeme vycházet při&nbsp;aktualizaci z&nbsp;verze Zabbixu 6.0, PHP verze 8.0 a&nbsp;PostgreSQL 13 s&nbsp;jeho extenzí TimescaleDB.</p>


<section id="block-webinar-block_efc834110f968db94371ccbad671cef0" data-id="block-webinar-block_efc834110f968db94371ccbad671cef0" class="gt-block block-webinar">
    <div class="connected-webinars__grid">
        <a href="https://www.initmax.cz/webinar/aktualizace-na-posledni-verzi-zabbix-7-0/" class="grid-item">
	<article class="webinar-promotion">
		<div class="webinar-promotion__thumbnail-wrap">
			<figure class="webinar-promotion__thumbnail">
					<img decoding="async" src="https://www.initmax.cz/wp-content/uploads/2024/05/07_thumbnail_web.png"
				 width="401"
		 height="251"
		 class=""
		 alt="Aktualizace na&nbsp;poslední verzi Zabbix 7.0"
		 loading="lazy"	>
									<div class="webinar-promotion__tags">
						<span class="tag tag--small" style="color:#ffffff;background-color:#4caf50;">Nový</span><span class="tag tag--small" style="color:#ffffff;background-color:#d40000;">Zabbix</span>					</div>
							</figure>
		</div>
		<div class="webinar-promotion__text">
			<div>
									<time datetime="2024-06-13">13.&nbsp;6.&nbsp;2024</time>
							</div>
			<h3 class="webinar-promotion__title">Aktualizace na&nbsp;poslední verzi Zabbix 7.0</h3>
			<div class="icon-link">
				<figure class="icon-wrap icon-wrap--primary"><svg data-name="Group 3411" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 455" d="M0,0H24V24H0Z" fill="none"/><path data-name="Path 456" d="M15,10l4.553-2.276A1,1,0,0,1,21,8.618v6.764a1,1,0,0,1-1.447.894L15,14V10Z" transform="translate(0 0)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><rect data-name="Rectangle 1286" width="12" height="12" rx="2" transform="translate(3.112 6)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</figure>
				<span>Zhlédnout záznam</span>
			</div>
		</div>
	</article>
</a>    </div>
</section>


<section id="social-links-block_ac633d0362bbb695b6b5502b6616700d" data-id="social-links-block_ac633d0362bbb695b6b5502b6616700d" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>




<h2 class="wp-block-heading">Přípravné kroky</h2>



<ul class="wp-block-list">
<li>Přečtěte si &#8222;poznámky k&nbsp;vydané verzi&#8220; (release notes) [ <a href="https://www.zabbix.com/rn/rn7.0.0" target="_blank" rel="noreferrer noopener nofollow">Official release notes for Zabbix 7.0 LTS</a> ]</li>



<li>Přečtěte si důkladně dokument &#8222;poznámky k&nbsp;aktualizaci&#8220; (upgrade notes) [ <a href="https://www.zabbix.com/documentation/7.0/en/manual/installation/upgrade_notes_700" target="_blank" rel="noreferrer noopener nofollow">Official upgrade notes for Zabbix 7.0 LTS</a> ]</li>



<li>Zkontrolujte a&nbsp;případně optimalizujte výkon současné databáze dle doporučení vendora a&nbsp;s&nbsp;ohledem na&nbsp;požadavky Zabbix instance</li>



<li>Zkontrolujte, zda verze veškerých komponent odpovídají matici kompatiblity nové verze Zabbix</li>



<li>Zazálohujte konfigurační soubory Zabbix serveru a&nbsp;Zabbix proxy</li>



<li>Zázálohujte databáze Zabbix serveru, případně Zabbix proxy</li>



<li>Zazálohujte veškeré možné úpravy &#8222;na&nbsp;míru&#8220;, které byly na&nbsp;úrovni Zabbix ručně provedeny</li>



<li>Musíte vypnout HA na&nbsp;straně Zabbix serveru.</li>
</ul>



<h3 class="wp-block-heading">Kontrola verzí</h3>



<p>Nejprve zkontrolujeme verze všech komponent, na&nbsp;kterých je běh Zabbixu a&nbsp;jeho součástí závislý, tak aby přesně odpovídaly oficiální matici kompatibility pro Zabbix 7.0.</p>


<section id="block-code-block_bfeeab862046f57e80366dff2eea7cbb" data-id="block-code-block_bfeeab862046f57e80366dff2eea7cbb" class="gt-block block-code">
    <pre><code>php-fpm -v
psql -V</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h3 class="wp-block-heading">Záloha konfiguračních souborů Zabbix</h3>



<p>Než se pustíme do&nbsp;dalších kroků, zazálohujeme veškeré konfigurační soubory Zabbix serveru a&nbsp;Zabbix Proxy.</p>


<section id="block-code-block_758a81acd360bdafb378a3c0bd39525b" data-id="block-code-block_758a81acd360bdafb378a3c0bd39525b" class="gt-block block-code">
    <pre><code>cp -R /etc/zabbix/ /&lt;backup directory&gt;/
cp -R /usr/lib/zabbix/alertscripts/ /&lt;backup directory&gt;/
cp -R /usr/lib/zabbix/externalscripts/ /&lt;backup directory&gt;/
cp -R /usr/share/zabbix/ /&lt;backup directory&gt;/
cp /etc/httpd/conf/httpd.conf /&lt;backup directory&gt;/
cp /etc/httpd/conf.d/zabbix.conf /&lt;backup directory&gt;/</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h3 class="wp-block-heading">Zastavení služeb</h3>



<p>Nejprve zastavíme Zabbix server a&nbsp;webserver, aby do&nbsp;databáze již nic nezapisovaly.</p>


<section id="block-code-block_1268530ea0c5d760bc2993983731c65a" data-id="block-code-block_1268530ea0c5d760bc2993983731c65a" class="gt-block block-code">
    <pre><code>systemctl stop zabbix-server
systemctl stop httpd</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Aktualizace PHP</h2>



<p>Nová verze Zabbix 7.0 vyžaduje pro svůj chod PHP v&nbsp;rozmezí verzí 8.0.0 až 8.3.x. Aktuálně máme na&nbsp;serveru verzi 8.0, ale i&nbsp;tak si provedeme aktualizaci.</p>



<p>Případnou aktualizaci provedeme změnou nastavení balíčkovacího systému dnf na&nbsp;úrovni OS. Máme dobré zkušenosti s&nbsp;předposlední verzí, při&nbsp;použití nejnovější verze se může objevit chyba přímo v&nbsp;PHP, která může způsobit problém v&nbsp;používání.</p>


<section id="block-code-block_6675b42ea4e1387351efed7c18633844" data-id="block-code-block_6675b42ea4e1387351efed7c18633844" class="gt-block block-code">
    <pre><code>dnf module switch-to php:8.2 -y</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Aktualizace databáze</h2>



<p>Nejprve zastavíme aktuálně běžící službu PostgreSQL:</p>



<p>(<a href="https://www.initmax.cz/wiki/jak-aktualizovat-postgresql-na-nejnovejsi-verzi/">Detailní návod na&nbsp;aktualizaci PostgreSQL naleznete na&nbsp;naší wiki.</a>)</p>


<section id="block-code-block_b4919a43bdbfe85f677fbb9650e4d645" data-id="block-code-block_b4919a43bdbfe85f677fbb9650e4d645" class="gt-block block-code">
    <pre><code>systemctl stop postgresql-13</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Následně nainstalujeme konkrétně podporovanou verzi, v&nbsp;našem případě PostgreSQL verze 16:</p>


<section id="block-code-block_9d7be5aa35efbe982a8e923f761ca047" data-id="block-code-block_9d7be5aa35efbe982a8e923f761ca047" class="gt-block block-code">
    <pre><code>dnf install -y postgresql16-server</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p><strong>Dále si nainstalujeme rozšíření TimescaleDB, musíme ho však nainstalovat ve stejné verzi, jakou používá vaše stará verze databáze!</strong> Pokud nebude ve stejné verzi, nebude nám fungovat příkaz pro upgrade. Pomocí následujícího příkazu si porovnáte aktuálně nainstalovanou verzi pro PostgreSQL 13 a&nbsp;nainstalujete stejné verze balíčků pro PostgreSQL 16:</p>


<section id="block-code-block_c713b14714e9e57f2d8e7793f8a22bf3" data-id="block-code-block_c713b14714e9e57f2d8e7793f8a22bf3" class="gt-block block-code">
    <pre><code>VERSION=$(rpm -qa | grep timescaledb-2-postgresql-13 | head -1 | sed -n &#039;s/.*-\([0-9]\+\.[0-9]\+\.[0-9]\+\)-.*/\1/p&#039;) &amp;&amp; dnf install -y timescaledb-2-loader-postgresql-16-$VERSION-0.el9.x86_64 timescaledb-2-postgresql-16-$VERSION-0.el9.x86_64</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p><strong>Poznámka:</strong> Pokud verze rozšíření TimescaleDB nebude stejná, uvidíte při&nbsp;upgradu následující chybu:</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="1816" height="462" src="https://www.initmax.cz/wp-content/uploads/2024/06/missing_libraries_timescale.png" alt="" class="wp-image-14529" srcset="https://www.initmax.cz/wp-content/uploads/2024/06/missing_libraries_timescale.png 1816w, https://www.initmax.cz/wp-content/uploads/2024/06/missing_libraries_timescale-300x76.png 300w, https://www.initmax.cz/wp-content/uploads/2024/06/missing_libraries_timescale-1024x261.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/06/missing_libraries_timescale-768x195.png 768w, https://www.initmax.cz/wp-content/uploads/2024/06/missing_libraries_timescale-1536x391.png 1536w" sizes="auto, (max-width: 1816px) 100vw, 1816px" /></figure>
</div>


<p>Nyní můžeme přistoupit k&nbsp;inicializaci databáze nové verze PostgreSQL:</p>


<section id="block-code-block_4ef6957d445056c0d191cf7e66638461" data-id="block-code-block_4ef6957d445056c0d191cf7e66638461" class="gt-block block-code">
    <pre><code>/usr/pgsql-16/bin/postgresql-16-setup initdb</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Po úspěšné instalaci všech závislostí spustíme dodaný aktualizační skript, který kvůli kompatibilitě zkontroluje a&nbsp;případně i&nbsp;opraví interní tabulky a&nbsp;schémata oproti změnám mezi verzemi (pod uživatelem postgres):</p>


<section id="block-code-block_bbebdde019794b95dcabd1b249e297ed" data-id="block-code-block_bbebdde019794b95dcabd1b249e297ed" class="gt-block block-code">
    <pre><code>su - postgres</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Přeneseme konfiguraci oprávnění (pg_hba.conf) ze staré verze na&nbsp;novou:</p>


<section id="block-code-block_97db4dee7bbc91293e514be84355f893" data-id="block-code-block_97db4dee7bbc91293e514be84355f893" class="gt-block block-code">
    <pre><code>cat /var/lib/pgsql/13/data/pg_hba.conf &gt; /var/lib/pgsql/16/data/pg_hba.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Případně i&nbsp;konfiguraci samotného databázového serveru (kompatibilitu jednotlivých konfiguračních direktiv mezi verzemi si předem ověřte):</p>


<section id="block-code-block_d78d1afff58ce6ab3d6967fc00af361b" data-id="block-code-block_d78d1afff58ce6ab3d6967fc00af361b" class="gt-block block-code">
    <pre><code>cat /var/lib/pgsql/13/data/postgresql.conf &gt; /var/lib/pgsql/16/data/postgresql.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Spustíme migraci databáze</p>


<section id="block-code-block_619210d29dd02c5ce1631553580cd27a" data-id="block-code-block_619210d29dd02c5ce1631553580cd27a" class="gt-block block-code">
    <pre><code>/usr/pgsql-16/bin/pg_upgrade -b /usr/pgsql-13/bin -B /usr/pgsql-16/bin -d /var/lib/pgsql/13/data -D /var/lib/pgsql/16/data -k</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Odhlásíme se od uživatele postgres:</p>


<section id="block-code-block_a5fa995030a6b44cbbc6a0b5dc3df602" data-id="block-code-block_a5fa995030a6b44cbbc6a0b5dc3df602" class="gt-block block-code">
    <pre><code>logout</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nyní lze zakázat automatické spouštění staré služby po&nbsp;startu:</p>


<section id="block-code-block_ab1a9856bce50a7c3f2b40d959fd918e" data-id="block-code-block_ab1a9856bce50a7c3f2b40d959fd918e" class="gt-block block-code">
    <pre><code>systemctl disable postgresql-13.service</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A nastartovat novou verzi databázového serveru PostgreSQL, včetně jejího automatického spouštění po&nbsp;startu systému:</p>


<section id="block-code-block_9b9f5d1b4b30fe409f3d3399c43fae67" data-id="block-code-block_9b9f5d1b4b30fe409f3d3399c43fae67" class="gt-block block-code">
    <pre><code>systemctl enable postgresql-16.service --now</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Po úspěšném spuštění PostgreSQL serveru jako první krok musíme zkontrolovat a&nbsp;případně aktualizovat naši TimescaleDB uvnitř Zabbix databáze:</p>


<section id="block-code-block_b68061198944e002e99e2f816a8361f4" data-id="block-code-block_b68061198944e002e99e2f816a8361f4" class="gt-block block-code">
    <pre><code>su - postgres
</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>



<section id="block-code-block_8fbcf5497a2e5b0a933b6154cd87c03a" data-id="block-code-block_8fbcf5497a2e5b0a933b6154cd87c03a" class="gt-block block-code">
    <pre><code>psql -X</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>



<section id="block-code-block_98bedb39f178d34f881ce7270f076fd0" data-id="block-code-block_98bedb39f178d34f881ce7270f076fd0" class="gt-block block-code">
    <pre><code>\c zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V dalším kroku aktualizujeme stav i&nbsp;v&nbsp;rámci samotné databáze v&nbsp;PostgreSQL:</p>


<section id="block-code-block_d1c703f6bc3f2811a5c85f9d2131ffb8" data-id="block-code-block_d1c703f6bc3f2811a5c85f9d2131ffb8" class="gt-block block-code">
    <pre><code>ALTER EXTENSION timescaledb UPDATE;</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Po úspěšné aktualizaci bezpečně opustíme psql konzoli:</p>


<section id="block-code-block_bf93d6917b98117edfe03199370a3264" data-id="block-code-block_bf93d6917b98117edfe03199370a3264" class="gt-block block-code">
    <pre><code>exit</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Po úspěšné aktualizaci doporučujeme provést <code>VACUUM</code> a&nbsp;reindexaci databází, toto provedeme následujícími příkazy:</p>


<section id="block-code-block_90de7e5e8231c6a0a3c1db94ef559ff7" data-id="block-code-block_90de7e5e8231c6a0a3c1db94ef559ff7" class="gt-block block-code">
    <pre><code>/usr/pgsql-16/bin/vacuumdb --all --analyze-in-stages
reindexdb</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Dalším krokem je smazání starého PostgreSQL clusteru:</p>


<section id="block-code-block_961329c543a2423d3cbc90a5c1611bc3" data-id="block-code-block_961329c543a2423d3cbc90a5c1611bc3" class="gt-block block-code">
    <pre><code>./delete_old_cluster.sh
rm -rf 13 delete_old_cluster.sh</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nyní můžeme odebrat staré verze balíčků. Odhlásíme se od uživatele postgres a&nbsp;odstraníme nepotřebné balíčky. TimescaleDB balíčky jsou nahrazeny, proto již na&nbsp;systému nejsou a&nbsp;není tedy potřeba je mazat:</p>


<section id="block-code-block_a5fa995030a6b44cbbc6a0b5dc3df602" data-id="block-code-block_a5fa995030a6b44cbbc6a0b5dc3df602" class="gt-block block-code">
    <pre><code>logout</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>



<section id="block-code-block_25158d9c28411f7f0b16758fc7234f54" data-id="block-code-block_25158d9c28411f7f0b16758fc7234f54" class="gt-block block-code">
    <pre><code>dnf remove postgresql13-*</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V posledním kroku lze smazat složku obsahující konfigurační soubory staré verze:</p>


<section id="block-code-block_ad9fdd758a10fa41cf3dbbd075567fd7" data-id="block-code-block_ad9fdd758a10fa41cf3dbbd075567fd7" class="gt-block block-code">
    <pre><code>rm -rf /usr/pgsql-13/</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Aktualizace Zabbix</h2>



<p>Vše jsme úspěšně zazálohovali a&nbsp;zaktualizovali všechny verze návazných komponent dle oficiální matice kompatibility nové verze Zabbixu.</p>



<p>Nyní přejdeme k&nbsp;aktualizaci samotného Zabbixu a&nbsp;všech jeho součástí.</p>



<p>Nejprve si stáhneme instalační balíčky pro repozitáře nové verze Zabbixu a&nbsp;smažeme instalační cache:</p>


<section id="block-code-block_f2410d9b40dc3e59aa0aa4cfe700d7b6" data-id="block-code-block_f2410d9b40dc3e59aa0aa4cfe700d7b6" class="gt-block block-code">
    <pre><code>rpm -Uvh https://repo.zabbix.com/zabbix/7.0/rocky/9/x86_64/zabbix-release-latest.el9.noarch.rpm
dnf clean all</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Po tomto úkonu máme dostupné repozitáře nové verze a&nbsp;můžeme tedy zaktualizovat veškeré další komponenty Zabbix, a&nbsp;to postupně i&nbsp;na&nbsp;všech Zabbix Proxy:</p>


<section id="block-code-block_482aa9d98b4c76abf41a1fe59e668cd2" data-id="block-code-block_482aa9d98b4c76abf41a1fe59e668cd2" class="gt-block block-code">
    <pre><code>dnf update zabbix-* -y</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Po úspěšném dokončení aktualizace balíčků Zabbix serveru a&nbsp;všech jeho součástí můžeme Zabbix znovu spustit, aby se dokončil upgrade databázové struktury, který je nezbytný pro další kroky, protože součástí upgradu je i&nbsp;vytvoření tabulky <code>history_bin</code>. Existence této tabulky je nutná pro následující kroky aktualizující funkce TimescaleDB.</p>


<section id="block-code-block_6bc660198bcc395305e73ccb33a1473b" data-id="block-code-block_6bc660198bcc395305e73ccb33a1473b" class="gt-block block-code">
    <pre><code>systemctl start zabbix-server.service</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Po úspěšné aktualizaci je nutné Zabbix znovu zastavit, aby bylo možné přejít k&nbsp;dalším krokům aktualizujícím TimescaleDB.</p>



<p><strong>Poznámka</strong>: V&nbsp;případě, že se po&nbsp;opětovném spuštění Zabbix serveru objeví chyba ohledně kompatibility databáze, stačí v&nbsp;konfiguračním souboru Zabbix serveru upravit následující direktivu.</p>



<p>V této verzi Zabbix toto není chyba kompatibility, ale pouze chybějící číslo TimescaleDB v&nbsp;samotném zdrojovém kódu Zabbixu!</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1740" height="74" src="https://www.initmax.cz/wp-content/uploads/2023/10/timescaledb-too-new.png" alt="" class="wp-image-13936" srcset="https://www.initmax.cz/wp-content/uploads/2023/10/timescaledb-too-new.png 1740w, https://www.initmax.cz/wp-content/uploads/2023/10/timescaledb-too-new-300x13.png 300w, https://www.initmax.cz/wp-content/uploads/2023/10/timescaledb-too-new-1024x44.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/10/timescaledb-too-new-768x33.png 768w, https://www.initmax.cz/wp-content/uploads/2023/10/timescaledb-too-new-1536x65.png 1536w" sizes="auto, (max-width: 1740px) 100vw, 1740px" /></figure>



<p>Odpovídající verze databáze a&nbsp;doplňku pak vždy hledejte v&nbsp;matici kompatibility v&nbsp;oficiální dokumentaci Zabbixu pro vaši konkrétní verzi.</p>



<p>Otevřeme si konfigurační soubor Zabbix serveru:</p>


<section id="block-code-block_8e37ae6271d368f536f9dd69665e9ba1" data-id="block-code-block_8e37ae6271d368f536f9dd69665e9ba1" class="gt-block block-code">
    <pre><code>nano /etc/zabbix/zabbix_server.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Zde upravíme následující parametr:</p>


<section id="block-code-block_c770fa980248fc1dd98581a90d072c13" data-id="block-code-block_c770fa980248fc1dd98581a90d072c13" class="gt-block block-code">
    <pre><code>AllowUnsupportedDBVersions=1</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A nakonec restartujeme službu Zabbix serveru:</p>


<section id="block-code-block_904f111037d90f7082f1622419bb55b8" data-id="block-code-block_904f111037d90f7082f1622419bb55b8" class="gt-block block-code">
    <pre><code>systemctl restart zabbix-server.service</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Postupné činnosti i&nbsp;celý proces aktualizace, včetně případných zásahů do&nbsp;struktury databázového schématu, lze sledovat v&nbsp;log souboru Zabbix serveru:</p>


<section id="block-code-block_dd2029c0923a72292dc2bb135dd5e18c" data-id="block-code-block_dd2029c0923a72292dc2bb135dd5e18c" class="gt-block block-code">
    <pre><code>tail -f /var/log/zabbix/zabbix_server.log</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1150" height="730" src="https://www.initmax.cz/wp-content/uploads/2024/06/upgrade70.png" alt="" class="wp-image-16610" srcset="https://www.initmax.cz/wp-content/uploads/2024/06/upgrade70.png 1150w, https://www.initmax.cz/wp-content/uploads/2024/06/upgrade70-300x190.png 300w, https://www.initmax.cz/wp-content/uploads/2024/06/upgrade70-1024x650.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/06/upgrade70-768x488.png 768w, https://www.initmax.cz/wp-content/uploads/2024/06/upgrade70-608x386.png 608w" sizes="auto, (max-width: 1150px) 100vw, 1150px" /></figure>



<p>Jakmile uvidíme, že upgrade proběhl a&nbsp;Zabbix se začal spouštět, vypneme ho a&nbsp;můžeme pokračovat dalším krokem.</p>



<p>Chybu ohledně <code>history_bin</code> a&nbsp;tabulky <code>auditlog</code> můžete ignorovat, protože ji vyřešíme v&nbsp;následujícím kroku. To je také důvod, proč musíme Zabbix ihned po&nbsp;upgradu struktury vypnout.</p>


<section id="block-code-block_f4b4731ea0e568e4763fc1b76b170878" data-id="block-code-block_f4b4731ea0e568e4763fc1b76b170878" class="gt-block block-code">
    <pre><code> 69771:20241104:132134.582 [Z3005] query failed: [0] PGRES_FATAL_ERROR:ERROR:  table &quot;history_bin&quot; is not a&amp;nbsp;hypertable
 [select set_integer_now_func(&#039;history_bin&#039;, &#039;zbx_ts_unix_now&#039;, true)]
 69771:20241104:132134.582 Table &quot;history_bin&quot; is not a&amp;nbsp;hypertable. Execute TimescaleDB configuration step as described in Zabbix documentation to upgrade schema.
 69802:20241104:132134.585 server #29 started [unreachable poller #1]
 69771:20241104:132134.589 [Z3005] query failed: [0] PGRES_FATAL_ERROR:ERROR:  unrecognized parameter namespace &quot;timescaledb&quot;
 [alter table auditlog set (timescaledb.compress,timescaledb.compress_segmentby=&#039;auditid&#039;,timescaledb.compress_orderby=&#039;clock&#039;)]
 69771:20241104:132134.590 [Z3005] query failed: [0] PGRES_FATAL_ERROR:ERROR:  &quot;auditlog&quot; is not a&amp;nbsp;hypertable or a&amp;nbsp;continuous aggregate
 [select add_compression_policy(&#039;auditlog&#039;, compress_created_before =&gt; interval &#039;612000&#039;)]
 69771:20241104:132134.590 failed to add compression policy to table &#039;auditlog&#039;</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>



<section id="block-code-block_766a4c4ad436b7fd72ee051a335a3fc0" data-id="block-code-block_766a4c4ad436b7fd72ee051a335a3fc0" class="gt-block block-code">
    <pre><code>systemctl stop zabbix-server.service</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Protože naše Zabbix databáze používá extenzi TimescaleDB, musíme povinně ještě spustit znovu SQL skript obsahující inicializaci hypertabulek. Novinkou ve verzi 7.0 je také hypertabulkovaná tabulka <code>auditlog</code> a&nbsp;<code>history_bin.</code> <strong>Pozor, tento krok lze provést až po&nbsp;automatické aktualizaci Zabbix databáze po&nbsp;prvním spuštění Zabbix serveru.</strong></p>



<ul class="wp-block-list">
<li><strong>VOLITELNĚ:</strong> Tabulka <code>auditlog</code> může obsahovat velké množství dat, což může zpomalit proces aktualizace. Zvažte, zda ji nechcete vyprázdnit pomocí příkazu <code>TRUNCATE TABLE auditlog;</code>, čímž si výrazně zrychlíte proces migrace na&nbsp;tabulky <code>timescaledb</code>. Příkaz se spouští nad databází Zabbixu. </li>
</ul>


<section id="block-code-block_6d7a7a1f8e0f98bacb1464d66adf053b" data-id="block-code-block_6d7a7a1f8e0f98bacb1464d66adf053b" class="gt-block block-code">
    <pre><code>cat /usr/share/zabbix-sql-scripts/postgresql/timescaledb/schema.sql | sudo -u zabbix psql zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Po úspěšném dokončení aktualizace balíčků Zabbix serveru a&nbsp;všech jeho součástí můžeme službu znovu spustit:</p>


<section id="block-code-block_2c7bb07de27077e44a64b67892101193" data-id="block-code-block_2c7bb07de27077e44a64b67892101193" class="gt-block block-code">
    <pre><code>systemctl start zabbix-server.service
systemctl start httpd</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nastartování serveru si ověřím přes Zabbix server log:</p>


<section id="block-code-block_dd2029c0923a72292dc2bb135dd5e18c" data-id="block-code-block_dd2029c0923a72292dc2bb135dd5e18c" class="gt-block block-code">
    <pre><code>tail -f /var/log/zabbix/zabbix_server.log</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Performance tuning po&nbsp;upgrade PostgreSQL</h2>



<p>Po úspěšném spuštění Zabbix serveru můžeme udělat ještě další volitelný krok a&nbsp;to je po&nbsp;upgrade DB spustit znovu script timescaledb-tune na&nbsp;její případné doladění.</p>



<p>Jako parametry tohoto příkazu zvolíme cestu ke konfiguračnímu souboru PostgreSQL a&nbsp;zároveň zvýšíme omezení na&nbsp;maximální počet příchozích spojení do&nbsp;databáze, který je implicitně pro potřeby monitoringu příliš nízký:</p>


<section id="block-code-block_3331985a15f9a54e68261b1cebe30f2f" data-id="block-code-block_3331985a15f9a54e68261b1cebe30f2f" class="gt-block block-code">
    <pre><code>timescaledb-tune --pg-config=/usr/pgsql-16/bin/pg_config --max-conns=100</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Pro aplikaci nově nastavených konfiguračních parametrů zrestartujeme službu PostgreSQL (ideálně vypněte Zabbix server během tohoto procesu, ale není to nutné):</p>


<section id="block-code-block_9805730b55a0d5ac5b6e9faa93bddd63" data-id="block-code-block_9805730b55a0d5ac5b6e9faa93bddd63" class="gt-block block-code">
    <pre><code>systemctl restart postgresql-16.service</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Dokončovací práce</h2>



<ul class="wp-block-list">
<li>Zkontrolujte, že správně běží Zabbix server, databázový server a&nbsp;mají správnou verzi</li>



<li>Zkontrolujte také, zda při&nbsp;startu serveru nebo proxy v&nbsp;systému neuvidíte následující chybu: ‚…the user limit of 1024 file descriptors is insufficient. The maximum number of concurrent checks per worker has been reduced…‘ <a href="https://www.initmax.cz/wiki/zabbix-7-0-a-navyseni-systemovych-limitu/">Návod na&nbsp;odstranění naleznete na&nbsp;naší wiki</a>.</li>



<li>Zkontrolujte, že běží všechny Zabbix proxy a&nbsp;mají správnou verzi (Od verze 6.0 je zde zpětná kompatibilita, ale i&nbsp;tak doporučujeme používat stejnou verzi, jakou má Zabbix server)</li>



<li>Zkontrolujte stav Zabbix serveru a&nbsp;Zabbix proxy (log soubory, nepodporované položky, fronty, monitorovací skripty, atd.).</li>



<li>Zkontrolujte, zda vaše servery mají přiděleny poslední verze oficiálních šablon od Zabbixu. [ <a rel="noreferrer noopener" href="https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates" target="_blank">Zabbix GIT</a> ]</li>
</ul>



<h2 class="wp-block-heading">Podpora pro nový Item Browser</h2>



<p>Veškeré potřebné kroky naleznete v&nbsp;samostatném návodu na&nbsp;naší wiki<strong> <a href="https://www.initmax.cz/wiki/instalace-a-zakladni-pouziti-pro-item-browser/">ZDE</a>.</strong></p>


<section id="block-webinar-block_71e883dd7acb3d2d295aaf0a667cbbf6" data-id="block-webinar-block_71e883dd7acb3d2d295aaf0a667cbbf6" class="gt-block block-webinar">
    <div class="connected-webinars__grid">
        <a href="https://www.initmax.cz/webinar/7-0-workshop-zabbix-7-0-monitorovani-pomoci-browser-item-pomoci-aplikace-selenium/" class="grid-item">
	<article class="webinar-promotion">
		<div class="webinar-promotion__thumbnail-wrap">
			<figure class="webinar-promotion__thumbnail">
					<img decoding="async" src="https://www.initmax.cz/wp-content/uploads/2024/05/ilustrace_webinare_zabbix_7.0_13_thumbnail_web-copy-2.png"
				 width="400"
		 height="250"
		 class=""
		 alt="7.0 Workshop: Zabbix 7.0 &#8211; Monitorování pomocí Browser Item pomocí aplikace Selenium"
		 loading="lazy"	>
									<div class="webinar-promotion__tags">
						<span class="tag tag--small" style="color:#ffffff;background-color:#4caf50;">Nový</span><span class="tag tag--small" style="color:#ffffff;background-color:#d40000;">Zabbix</span>					</div>
							</figure>
		</div>
		<div class="webinar-promotion__text">
			<div>
									<time datetime="2024-06-21">21.&nbsp;6.&nbsp;2024</time>
							</div>
			<h3 class="webinar-promotion__title">7.0 Workshop: Zabbix 7.0 &#8211; Monitorování pomocí Browser Item pomocí aplikace Selenium</h3>
			<div class="icon-link">
				<figure class="icon-wrap icon-wrap--primary"><svg data-name="Group 3411" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 455" d="M0,0H24V24H0Z" fill="none"/><path data-name="Path 456" d="M15,10l4.553-2.276A1,1,0,0,1,21,8.618v6.764a1,1,0,0,1-1.447.894L15,14V10Z" transform="translate(0 0)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><rect data-name="Rectangle 1286" width="12" height="12" rx="2" transform="translate(3.112 6)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</figure>
				<span>Zhlédnout záznam</span>
			</div>
		</div>
	</article>
</a>    </div>
</section>



<h2 class="wp-block-heading">Doinstalace komponent a&nbsp;nastavení pro Reporting</h2>



<p>Veškeré potřebné kroky naleznete v&nbsp;samostatném návodu na&nbsp;naší wiki<strong> <a href="https://www.initmax.cz/wiki/reporting-v-zabbixu-7-0/">ZDE</a>.</strong></p>


<section id="block-webinar-block_e3fbbf6c2f09857a98d47847b97834d1" data-id="block-webinar-block_e3fbbf6c2f09857a98d47847b97834d1" class="gt-block block-webinar">
    <div class="connected-webinars__grid">
        <a href="https://www.initmax.cz/webinar/reporting-v-zabbixu-7-0-2024/" class="grid-item">
	<article class="webinar-promotion">
		<div class="webinar-promotion__thumbnail-wrap">
			<figure class="webinar-promotion__thumbnail">
					<img decoding="async" src="https://www.initmax.cz/wp-content/uploads/2023/09/ilustrace_webinare_zabbix_7.0_02_thumbnail_web-80.png"
				 width="400"
		 height="250"
		 class=""
		 alt="Reporting v&nbsp;Zabbixu 7.0"
		 loading="lazy"	>
									<div class="webinar-promotion__tags">
						<span class="tag tag--small" style="color:#ffffff;background-color:#d40000;">Zabbix</span>					</div>
							</figure>
		</div>
		<div class="webinar-promotion__text">
			<div>
									<time datetime="2024-03-14">14.&nbsp;3.&nbsp;2024</time>
							</div>
			<h3 class="webinar-promotion__title">Reporting v&nbsp;Zabbixu 7.0</h3>
			<div class="icon-link">
				<figure class="icon-wrap icon-wrap--primary"><svg data-name="Group 3411" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 455" d="M0,0H24V24H0Z" fill="none"/><path data-name="Path 456" d="M15,10l4.553-2.276A1,1,0,0,1,21,8.618v6.764a1,1,0,0,1-1.447.894L15,14V10Z" transform="translate(0 0)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><rect data-name="Rectangle 1286" width="12" height="12" rx="2" transform="translate(3.112 6)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</figure>
				<span>Zhlédnout záznam</span>
			</div>
		</div>
	</article>
</a>    </div>
</section>



<p>A to je vše! Nyní můžete začít využívat váš nově zaktualizovaný Zabbix ve verzi 7.0 LTS se všemi jeho opravami i&nbsp;novinkami.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>


<section id="block-newsletter-block_fa18015afab757bba77d58cde86041e2" data-id="block-newsletter-block_fa18015afab757bba77d58cde86041e2" class="gt-block block-newsletter">
    <section id="newsletter" class="newsletter">
	<div class="gradient basic">
		<div class="newsletter__inner width width--general">
			<div class="col left">
									<h2 class="newsletter__title">Buďte v&nbsp;obraze s&nbsp;naším newsletterem</h2>
													<div class="newsletter__content"><p>Díky initMAX newsletteru Vám neunikne žádná z&nbsp;pozvánek na&nbsp;akce a&nbsp;webináře, žádný z&nbsp;tipů, jak dostat ze svého IT MAXimum, ani ověřené informace o&nbsp;novinkách ze světa Zabbix a&nbsp;dalších technologií.</p>
</div>
							</div>
			<div class="col right form-wrapper">
				<div class="newsletter-form">
	<form method="post" action="/wiki/kapitola/zabbix/feed/" enctype="multipart/form-data">
		<input type="hidden" name="url" value="https://www.initmax.cz/wiki/kapitola/zabbix/feed/">

		<div class="inputs">

			<label for="newsletter-form_contact_email" class="top">Vaše e-mailová adresa:</label>
			<div class="df">

				<div class="input">
					<input type="text" id="newsletter-form_contact_email" name="newsletter_email" placeholder="@" data-format="email" data-required="1">
									</div><!-- /.input -->

				<a href="#" class="btn btn--white sendBtn">Odeslat</a>

			</div>

			<div class="bottom nm">
				<label for="newsletter-form_gdpr" class="checkbox gdpr">
					<input type="checkbox" id="newsletter-form_gdpr" name="newsletter_gdpr">
					<span>Souhlasím se&nbsp;<a href="https://www.initmax.cz/ochrana-osobnich-udaju/" target="_blank">zpracováním osobních údajů</a>.</span>
				</label>
			</div>

		</div><!-- /.inputs -->
		<div class="sent hidden">
			<div class="iconOk"><h3>Děkujeme, že jste se přihlásili k&nbsp;odběru našeho newsletteru.</h3>
</div>
			<button class="sent__close" title="Zavřít" onclick="closeFormMessage(this,event)"><svg data-name="Group 3602" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 3272" d="M0,0H24V24H0Z" fill="none"/><line data-name="Line 98" y2="14" transform="translate(7.05 7.05) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 99" x2="14" transform="translate(7.05 16.95) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</button>
		</div><!-- /.sent -->
	</form>
</div>			</div>
		</div>
	</div>
</section></section>



<section id="social-links-block_ac633d0362bbb695b6b5502b6616700d" data-id="social-links-block_ac633d0362bbb695b6b5502b6616700d" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>

<p>The post <a href="https://www.initmax.cz/wiki/zabbix-aktualizace-na-posledni-verzi-7-0-lts/">Zabbix &#8211; aktualizace na&nbsp;poslední verzi 7.0 LTS</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Instalace a&#160;základní použití pro Item Browser</title>
		<link>https://www.initmax.cz/wiki/instalace-a-zakladni-pouziti-pro-item-browser/</link>
		
		<dc:creator><![CDATA[Tomáš Heřmánek]]></dc:creator>
		<pubDate>Fri, 31 May 2024 16:48:37 +0000</pubDate>
				<guid isPermaLink="false">https://www.initmax.cz/?post_type=wiki&#038;p=14421</guid>

					<description><![CDATA[<p>V tomto návodu si ukážeme, jak nainstalovat a nastavit Zabbix tak, aby byl schopen využít potenciálu nového itemu typu &#8222;Browser&#8220;. Browser ...</p>
<p>The post <a href="https://www.initmax.cz/wiki/instalace-a-zakladni-pouziti-pro-item-browser/">Instalace a&nbsp;základní použití pro Item Browser</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>V tomto návodu si ukážeme, jak nainstalovat a&nbsp;nastavit Zabbix tak, aby byl schopen využít potenciálu nového itemu typu &#8222;Browser&#8220;.</p>



<p>Browser item v&nbsp;Zabbixu umožňuje získávat data z&nbsp;webových stránek pomocí prohlížeče. Je to nový typ itemu, který využívá webového prohlížeče k&nbsp;interakci s&nbsp;webovými stránkami, čímž umožňuje monitorovat a&nbsp;sbírat data, která jsou dostupná pouze prostřednictvím webových rozhraní. Tento typ itemu je užitečný pro sledování stavů, které nelze přímo monitorovat prostřednictvím standardních protokolů nebo API. Je zde také možnost přímo získat screenshot z&nbsp;Vámi monitorované stránky.</p>



<p>Položky typu Browser shromažďují data spuštěním uživatelem definovaného JavaScript kódu a&nbsp;získáváním dat přes HTTP/HTTPS. Tento item může simulovat akce v&nbsp;prohlížeči jako je klikání, zadávání textu, navigace po&nbsp;webových stránkách a&nbsp;další interakce uživatele s&nbsp;weby nebo webovými aplikacemi.</p>



<p>Kromě skriptu lze zadat volitelný seznam parametrů (páry name, value) a&nbsp;časový limit.</p>



<p>Podrobnější informace naleznete na&nbsp;stránkách dokumentace Zabbixu:</p>



<ul class="wp-block-list">
<li><a href="https://www.zabbix.com/documentation/7.0/en/manual/config/items/itemtypes/browser?hl=Browser%2Citem%2Cbrowser" target="_blank" rel="noreferrer noopener nofollow">Browser</a><a href="https://www.zabbix.com/documentation/7.0/en/manual/config/items/itemtypes/browser?hl=Browser%2Citem%2Cbrowser"> items</a></li>



<li><a href="https://www.zabbix.com/documentation/7.0/en/manual/config/items/preprocessing/javascript/browser_item_javascript_objects?hl=Browser%2Citem" target="_blank" rel="noreferrer noopener nofollow">Browser item JavaScript objects</a></li>
</ul>


<section id="social-links-block_3420491d0b0e85a208bceb736a07b8b9" data-id="social-links-block_3420491d0b0e85a208bceb736a07b8b9" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>




<h2 class="wp-block-heading">Příprava prostředí</h2>



<p>Nainstalujeme Podman, ve kterém následně budeme provozovat Docker kontejner se Seleniem. </p>



<p>Jedná se o&nbsp;systémově čistší způsob, než by byla instalace plného grafického rozhraní včetně Google Chrome a&nbsp;následně pak i&nbsp;Selenium WebDriveru na&nbsp;samotný Zabbix Server.</p>



<p>Upozorňujeme, že kontejner může pro svůj běh vyžadovat poměrně dost operační paměti RAM (&gt;2GB) a&nbsp;je s&nbsp;tím potřeba dopředu počítat.</p>



<p>Nejprve pro jistotu zaktualizujeme OS, kterým je v&nbsp;tomto případě Rocky Linux 9:</p>


<section id="block-code-block_ab52320ed55282d05b961db813e75cb3" data-id="block-code-block_ab52320ed55282d05b961db813e75cb3" class="gt-block block-code">
    <pre><code>dnf -y update</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p> Nainstalujeme Podman a&nbsp;potřebné závislosti:</p>


<section id="block-code-block_2c4525df20f361e480c03796ff41cb52" data-id="block-code-block_2c4525df20f361e480c03796ff41cb52" class="gt-block block-code">
    <pre><code>dnf -y install podman podman-compose</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Následně stáhneme oficiální Selenium předpis pro docker-compose a&nbsp;uložíme ho s&nbsp;názvem, který podman-compose implicitně očekává.</p>



<p>Tento &#8222;plný&#8220; předpis obsahuje všechny tři nejpoužívanější prohlížeče, které pro základní testování dozajisté nejsou třeba, pro účely naší ukázky to však zatím takto ponecháme.</p>


<section id="block-code-block_44c384465e1dafe148b72ecfc6ed3ba1" data-id="block-code-block_44c384465e1dafe148b72ecfc6ed3ba1" class="gt-block block-code">
    <pre><code>wget https://raw.githubusercontent.com/SeleniumHQ/docker-selenium/trunk/docker-compose-v3-full-grid.yml -O docker-compose.yml</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A s&nbsp;tímto předpisem i&nbsp;spustíme kontejner pomocí podman-compose:</p>


<section id="block-code-block_ab44984da27ed2d5a06b38b137770e1b" data-id="block-code-block_ab44984da27ed2d5a06b38b137770e1b" class="gt-block block-code">
    <pre><code>podman-compose up -d</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Ověřte, že kontejner skutečně běží:</p>


<section id="block-code-block_2fc8d1fbcd078cdeaf987774d3c96fcd" data-id="block-code-block_2fc8d1fbcd078cdeaf987774d3c96fcd" class="gt-block block-code">
    <pre><code>podman ps</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nyní by měl být Selenium server dostupný na&nbsp;adrese <code>http://localhost:4444</code>, tento port jsme si definovali při&nbsp;spuštění kontejneru.</p>



<p><strong>TIP: </strong>Selenium můžete také kontrolovat přímo pomocí URL adresy Selenium serveru, v&nbsp;našem příkladu je to <code>http://localhost:4444</code>. Po&nbsp;načtení se zobrazí stránka Selenium Grid, kde vidíte stav a&nbsp;dostupné prohlížeče nebo nastavení pro souběžná spojení. Můžeme zde také nastavit sledování uživatelského prohlížeče přes VNC, ke kterému však nejprve nastavíme heslo. Implicitně je heslo nastaveno na&nbsp;&#8222;secret&#8220; a&nbsp;tak důrazně doporučujeme tuto hodnotu změnit.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2922" height="1558" src="https://www.initmax.cz/wp-content/uploads/2024/05/selenium_grid.png" alt="" class="wp-image-14456" srcset="https://www.initmax.cz/wp-content/uploads/2024/05/selenium_grid.png 2922w, https://www.initmax.cz/wp-content/uploads/2024/05/selenium_grid-300x160.png 300w, https://www.initmax.cz/wp-content/uploads/2024/05/selenium_grid-1024x546.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/05/selenium_grid-768x409.png 768w, https://www.initmax.cz/wp-content/uploads/2024/05/selenium_grid-1536x819.png 1536w, https://www.initmax.cz/wp-content/uploads/2024/05/selenium_grid-2048x1092.png 2048w" sizes="auto, (max-width: 2922px) 100vw, 2922px" /></figure>



<h2 class="wp-block-heading">Nastavení Zabbix serveru</h2>



<p>Pro funkčnost celého tohoto řešení nejprve povolíme Selenium WebDriver na&nbsp;úrovni samotného Zabbix Serveru.</p>



<p>Otevřte si tedy konfigurační soubor Zabbix serveru:</p>


<section id="block-code-block_13b01c2ba19f0ce9ca560a6a6e97c1e4" data-id="block-code-block_13b01c2ba19f0ce9ca560a6a6e97c1e4" class="gt-block block-code">
    <pre><code>nano /etc/zabbix/zabbix_server.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A zde upravte konfigurační direktivu <code>WebDriverURL</code> tak, aby odpovídala vámi zvolené adrese a&nbsp;portu spuštěného kontejneru. V&nbsp;našem případě je to <code>http://localhost:4444</code>.</p>


<section id="block-code-block_ab05562e7453859e6076e246f3a32a33" data-id="block-code-block_ab05562e7453859e6076e246f3a32a33" class="gt-block block-code">
    <pre><code>### Option: WebDriverURL
#       WebDriver interface HTTP[S] URL. For example http://localhost:4444 used with Selenium WebDriver standalone server.
#
# Mandatory: no
# Default:
# WebDriverURL=
WebDriverURL=http://localhost:4444</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Následně povolíme Browser Pollers, tedy procesy, které samotné hodnoty pro item Browser sbírají. </p>



<p>To uděláme adekvátním nastavením direktivy <code>StartBrowserPollers</code>, kterou pro účely našeho příkladu postačí nechat na&nbsp;hodnotě 5.</p>


<section id="block-code-block_d53ecc961320b0ef3822aa168d043336" data-id="block-code-block_d53ecc961320b0ef3822aa168d043336" class="gt-block block-code">
    <pre><code>### Option: StartBrowserPollers
#       Number of pre-forked instances of browser item pollers.
#
# Mandatory: no
# Range: 0-1000
# Default:
# StartBrowserPollers=1
StartBrowserPollers=5</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Upravený konfigurační soubor uložte a&nbsp;pro aplikování změn zrestartujte Zabbix Server:</p>


<section id="block-code-block_953498e416711b6d2575186be02d0d6b" data-id="block-code-block_953498e416711b6d2575186be02d0d6b" class="gt-block block-code">
    <pre><code>systemctl restart zabbix-server</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Nastavení Zabbix frontendu</h2>



<p>Pro rychlé otestování funkčnosti máme k&nbsp;dispozici Zabbixem dodávanou ukázkovou šablonu, kterou najdete <a href="https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/app/website_browser" target="_blank" rel="noreferrer noopener nofollow">zde</a>. Šablonu si stáhněte a&nbsp;naimportujte ji do&nbsp;svého Zabbixu.</p>



<p>Následně si vytvoříme testovacího hosta a&nbsp;tuto šablonu mu přiřadíme:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2090" height="1142" src="https://www.initmax.cz/wp-content/uploads/2024/05/create_new_host.png" alt="" class="wp-image-14452" srcset="https://www.initmax.cz/wp-content/uploads/2024/05/create_new_host.png 2090w, https://www.initmax.cz/wp-content/uploads/2024/05/create_new_host-300x164.png 300w, https://www.initmax.cz/wp-content/uploads/2024/05/create_new_host-1024x560.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/05/create_new_host-768x420.png 768w, https://www.initmax.cz/wp-content/uploads/2024/05/create_new_host-1536x839.png 1536w, https://www.initmax.cz/wp-content/uploads/2024/05/create_new_host-2048x1119.png 2048w" sizes="auto, (max-width: 2090px) 100vw, 2090px" /></figure>



<p>Pro správnou funkčnost nesmíme zapomenout změnit nastavení maker uvnitř samotné šablony. Nejdůležitější bude samozřejmě cílové URL, které chceme monitorovat, tedy makro <code>{$WEBSITE.DOMAIN}</code> (zvýrazněné na&nbsp;obrázku níže). V&nbsp;makrech šablony ale nalezneme i&nbsp;spoustu dalších užitečných parametrů jako je volba prohlížeče, intervaly kontrol, nebo rozlišení.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1776" height="1808" src="https://www.initmax.cz/wp-content/uploads/2024/05/create_host_macro.jpg" alt="" class="wp-image-14450" srcset="https://www.initmax.cz/wp-content/uploads/2024/05/create_host_macro.jpg 1776w, https://www.initmax.cz/wp-content/uploads/2024/05/create_host_macro-295x300.jpg 295w, https://www.initmax.cz/wp-content/uploads/2024/05/create_host_macro-1006x1024.jpg 1006w, https://www.initmax.cz/wp-content/uploads/2024/05/create_host_macro-768x782.jpg 768w, https://www.initmax.cz/wp-content/uploads/2024/05/create_host_macro-1509x1536.jpg 1509w" sizes="auto, (max-width: 1776px) 100vw, 1776px" /></figure>



<p>S tímto nastavením hosta uložíme a&nbsp;můžeme se přesunout k&nbsp;náhledu dat. Rychlost načtení aktuálních dat se odvíjí od nastaveného intervalu, který je primárně říděn makrem šablony. Pro okamžité spuštění lze ovšem naštěstí využít tlačítko <code>Execute now</code>, a&nbsp;to na&nbsp;položce <code>Website by Browser: Website {$WEBSITE.DOMAIN} Get data</code>.</p>



<p>Vůbec nejlepší náhled na&nbsp;sbíraná data najdeme přímo přes dashboard, který je dodávaný Zabbixem spolu se šablonou.</p>



<p>Tento dashboard najdeme v&nbsp;sekci <code>Monitoring -&gt; Hosts</code>, vyfiltrujeme si našeho nově vytvořeného hosta a&nbsp;následně se na&nbsp;tento dashboard můžeme snadno prokliknout:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2800" height="1520" src="https://www.initmax.cz/wp-content/uploads/2024/05/monitoring_host_dashboard.png" alt="" class="wp-image-14454" srcset="https://www.initmax.cz/wp-content/uploads/2024/05/monitoring_host_dashboard.png 2800w, https://www.initmax.cz/wp-content/uploads/2024/05/monitoring_host_dashboard-300x163.png 300w, https://www.initmax.cz/wp-content/uploads/2024/05/monitoring_host_dashboard-1024x556.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/05/monitoring_host_dashboard-768x417.png 768w, https://www.initmax.cz/wp-content/uploads/2024/05/monitoring_host_dashboard-1536x834.png 1536w, https://www.initmax.cz/wp-content/uploads/2024/05/monitoring_host_dashboard-2048x1112.png 2048w" sizes="auto, (max-width: 2800px) 100vw, 2800px" /></figure>



<p>Po otevření nás čeká předpřipravený dashboard, kde screenshot naší první spuštěné kontroly a&nbsp;spoustu dalších užitečných výkonnostních metrik. </p>



<p>Všimněte si, že součástí screenshotu je také legislativně nezbytné upozornění ohledně cookies. Odstranění tohoto upozornění si najdete v&nbsp;nasledující kapitole, kde si ukážeme jak více přizpůsobit tuto šablonu některým specifickým požadavkům.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2922" height="1564" src="https://www.initmax.cz/wp-content/uploads/2024/05/view_on_monitored_data.png" alt="" class="wp-image-14462" srcset="https://www.initmax.cz/wp-content/uploads/2024/05/view_on_monitored_data.png 2922w, https://www.initmax.cz/wp-content/uploads/2024/05/view_on_monitored_data-300x161.png 300w, https://www.initmax.cz/wp-content/uploads/2024/05/view_on_monitored_data-1024x548.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/05/view_on_monitored_data-768x411.png 768w, https://www.initmax.cz/wp-content/uploads/2024/05/view_on_monitored_data-1536x822.png 1536w, https://www.initmax.cz/wp-content/uploads/2024/05/view_on_monitored_data-2048x1096.png 2048w" sizes="auto, (max-width: 2922px) 100vw, 2922px" /></figure>



<h2 class="wp-block-heading">Úprava šablony a&nbsp;vlastní testy</h2>



<p>Při úpravách budeme vycházet z&nbsp;původní Zabbix šablony, což je pro potřeby naší ukázky dostačující. V&nbsp;případě produkčního provozu je však vždy lepší mít pro každou specifickou kontrolu šablonu vlastní, kde lze definovat vše potřebné a&nbsp;neupravuje se šablona jedna.</p>



<p>Při předchozím testování se nám například na&nbsp;sbíraných screenshotech nelíbí upozornění na&nbsp;cookies. <br>Nejsnazší způsob, jak se této lišty zbavit, je v&nbsp;rámci stránky kliknout na&nbsp;tlačíto <code>I accept all</code>, čímž cookies potvrdíme.</p>



<p>Nyní si tedy ukážeme, jak si toto jednoduché kliknutí přidat jako součást našeho testu.</p>



<p>Otevřeme si naši vzorovou šablonu &#8222;Website by Browser&#8220;, kde najdeme položku s&nbsp;tagem <code>component: raw</code>. <br>Tato položka se jmenuje <code>Website by Browser: Website {$WEBSITE.DOMAIN} Get data</code>, a&nbsp;v&nbsp;jednom z&nbsp;předchozích kroků jsme ji použili pro ruční vynucení kontroly.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2922" height="1080" src="https://www.initmax.cz/wp-content/uploads/2024/05/template_item_edit_raw.png" alt="" class="wp-image-14460" srcset="https://www.initmax.cz/wp-content/uploads/2024/05/template_item_edit_raw.png 2922w, https://www.initmax.cz/wp-content/uploads/2024/05/template_item_edit_raw-300x111.png 300w, https://www.initmax.cz/wp-content/uploads/2024/05/template_item_edit_raw-1024x378.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/05/template_item_edit_raw-768x284.png 768w, https://www.initmax.cz/wp-content/uploads/2024/05/template_item_edit_raw-1536x568.png 1536w, https://www.initmax.cz/wp-content/uploads/2024/05/template_item_edit_raw-2048x757.png 2048w" sizes="auto, (max-width: 2922px) 100vw, 2922px" /></figure>



<p>Součástí nastavení této položky je i&nbsp;skript napsaný v&nbsp;JavaScriptu &#8211; otevřte si ho pomocí tlačítka pro úpravu, zvýrazněného červeně na&nbsp;screenshotu níže.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1566" height="1276" src="https://www.initmax.cz/wp-content/uploads/2024/05/template_item_edit.png" alt="" class="wp-image-14458" srcset="https://www.initmax.cz/wp-content/uploads/2024/05/template_item_edit.png 1566w, https://www.initmax.cz/wp-content/uploads/2024/05/template_item_edit-300x244.png 300w, https://www.initmax.cz/wp-content/uploads/2024/05/template_item_edit-1024x834.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/05/template_item_edit-768x626.png 768w, https://www.initmax.cz/wp-content/uploads/2024/05/template_item_edit-1536x1252.png 1536w" sizes="auto, (max-width: 1566px) 100vw, 1566px" /></figure>



<p>Do skriptu přidáme následující sekci:</p>


<section id="block-code-block_e68d3180bb3599d7a50d2da654a7efd5" data-id="block-code-block_e68d3180bb3599d7a50d2da654a7efd5" class="gt-block block-code">
    <pre><code>// Accept Cookies to hide this element
el = browser.findElement(&quot;xpath&quot;, &quot;//a[contains(text(),&#039;I accept all&#039;)]&quot;);
if (el === null) {
    throw Error(&quot;cannot find Cookie button&quot;);
    }
el.click();</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Tento kus kódu prohledá obsah načtené stránky pomocí <code>xpath</code> a&nbsp;objeví element, který obsahuje text &#8222;<code>I accept all</code>&#8222;, a&nbsp;v&nbsp;posledním kroku na&nbsp;něj klikne.</p>



<p>XPath je standardní technika Selenium pro navigaci ve struktuře HTML stránky a&nbsp;popis procesu lze snadno najít na&nbsp;internetu.</p>



<p>Zde můžete vidět, jak vypadá výsledný skript:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1470" height="1710" src="https://www.initmax.cz/wp-content/uploads/2024/05/added_code.png" alt="" class="wp-image-14448" srcset="https://www.initmax.cz/wp-content/uploads/2024/05/added_code.png 1470w, https://www.initmax.cz/wp-content/uploads/2024/05/added_code-258x300.png 258w, https://www.initmax.cz/wp-content/uploads/2024/05/added_code-880x1024.png 880w, https://www.initmax.cz/wp-content/uploads/2024/05/added_code-768x893.png 768w, https://www.initmax.cz/wp-content/uploads/2024/05/added_code-1320x1536.png 1320w" sizes="auto, (max-width: 1470px) 100vw, 1470px" /></figure>



<p>Skript uložíme pomocí tlačítka <code>Apply</code>, položku uložíme tlačítkem <code>Update</code> a&nbsp;vrátíme se zpět na&nbsp;našeho testovacího hosta, kde si prohlédneme výsledek.<br>Opět nezapomeňte, že nová data přijdou se zpožděním v&nbsp;závislosti na&nbsp;přednastavením intervalu &#8211; pro zrychlení této operace si opět můžeme pomoci kliknutím na&nbsp;tlačítko <code>Execute now</code> tak, jako v&nbsp;předchozím případě.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2906" height="1564" src="https://www.initmax.cz/wp-content/uploads/2024/05/view_on_monitored_data_no_cookie.png" alt="" class="wp-image-14464" srcset="https://www.initmax.cz/wp-content/uploads/2024/05/view_on_monitored_data_no_cookie.png 2906w, https://www.initmax.cz/wp-content/uploads/2024/05/view_on_monitored_data_no_cookie-300x161.png 300w, https://www.initmax.cz/wp-content/uploads/2024/05/view_on_monitored_data_no_cookie-1024x551.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/05/view_on_monitored_data_no_cookie-768x413.png 768w, https://www.initmax.cz/wp-content/uploads/2024/05/view_on_monitored_data_no_cookie-1536x827.png 1536w, https://www.initmax.cz/wp-content/uploads/2024/05/view_on_monitored_data_no_cookie-2048x1102.png 2048w" sizes="auto, (max-width: 2906px) 100vw, 2906px" /></figure>



<p>Ve výše zobrazeném screenshotu pak můžete vidět výsledek, kde nám lišta s&nbsp;upozorněním na&nbsp;cookies zmizela. </p>



<p>Tímto je naše vzorové nastavení položky typu Browser hotové a&nbsp;naš příklad použití je u&nbsp;konce. <br>Nezapomeňte, že všechny schopnosti a&nbsp;možnosti nastavení této položky naleznete v&nbsp;dokumentaci Zabbixu tak, jak jsme zmínili na&nbsp;začátku článku.</p>


<section id="block-newsletter-block_e47705d992ba82ae41842fb8e87bb5e9" data-id="block-newsletter-block_e47705d992ba82ae41842fb8e87bb5e9" class="gt-block block-newsletter">
    <section id="newsletter" class="newsletter">
	<div class="gradient basic">
		<div class="newsletter__inner width width--general">
			<div class="col left">
									<h2 class="newsletter__title">Buďte v&nbsp;obraze s&nbsp;naším newsletterem</h2>
													<div class="newsletter__content"><p>Díky initMAX newsletteru Vám neunikne žádná z&nbsp;pozvánek na&nbsp;akce a&nbsp;webináře, žádný z&nbsp;tipů, jak dostat ze svého IT MAXimum, ani ověřené informace o&nbsp;novinkách ze světa Zabbix a&nbsp;dalších technologií.</p>
</div>
							</div>
			<div class="col right form-wrapper">
				<div class="newsletter-form">
	<form method="post" action="/wiki/kapitola/zabbix/feed/" enctype="multipart/form-data">
		<input type="hidden" name="url" value="https://www.initmax.cz/wiki/kapitola/zabbix/feed/">

		<div class="inputs">

			<label for="newsletter-form_contact_email" class="top">Vaše e-mailová adresa:</label>
			<div class="df">

				<div class="input">
					<input type="text" id="newsletter-form_contact_email" name="newsletter_email" placeholder="@" data-format="email" data-required="1">
									</div><!-- /.input -->

				<a href="#" class="btn btn--white sendBtn">Odeslat</a>

			</div>

			<div class="bottom nm">
				<label for="newsletter-form_gdpr" class="checkbox gdpr">
					<input type="checkbox" id="newsletter-form_gdpr" name="newsletter_gdpr">
					<span>Souhlasím se&nbsp;<a href="https://www.initmax.cz/ochrana-osobnich-udaju/" target="_blank">zpracováním osobních údajů</a>.</span>
				</label>
			</div>

		</div><!-- /.inputs -->
		<div class="sent hidden">
			<div class="iconOk"><h3>Děkujeme, že jste se přihlásili k&nbsp;odběru našeho newsletteru.</h3>
</div>
			<button class="sent__close" title="Zavřít" onclick="closeFormMessage(this,event)"><svg data-name="Group 3602" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 3272" d="M0,0H24V24H0Z" fill="none"/><line data-name="Line 98" y2="14" transform="translate(7.05 7.05) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 99" x2="14" transform="translate(7.05 16.95) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</button>
		</div><!-- /.sent -->
	</form>
</div>			</div>
		</div>
	</div>
</section></section>



<section id="social-links-block_3420491d0b0e85a208bceb736a07b8b9" data-id="social-links-block_3420491d0b0e85a208bceb736a07b8b9" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>

<p>The post <a href="https://www.initmax.cz/wiki/instalace-a-zakladni-pouziti-pro-item-browser/">Instalace a&nbsp;základní použití pro Item Browser</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Zabbix &#8211; Migrace z&#160;MySQL do&#160;PostgreSQL</title>
		<link>https://www.initmax.cz/wiki/zabbix-migrace-z-mysql-do-postgresql/</link>
		
		<dc:creator><![CDATA[Tomáš Heřmánek]]></dc:creator>
		<pubDate>Sun, 19 May 2024 12:35:14 +0000</pubDate>
				<guid isPermaLink="false">https://www.initmax.cz/?post_type=wiki&#038;p=13907</guid>

					<description><![CDATA[<p>V tomto návodu si ukážeme, jak pro databázi Zabbixu provést migraci z MySQL do PostgreSQL na Rocky Linux 9. Zároveň si také ukážeme, ...</p>
<p>The post <a href="https://www.initmax.cz/wiki/zabbix-migrace-z-mysql-do-postgresql/">Zabbix &#8211; Migrace z&nbsp;MySQL do&nbsp;PostgreSQL</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>V tomto návodu si ukážeme, jak pro databázi Zabbixu provést migraci z&nbsp;MySQL do&nbsp;PostgreSQL na&nbsp;Rocky Linux 9. <br>Zároveň si také ukážeme, jak zapnout TimescaleDB spolu se základním performance tuningem.</p>



<p>Článek počítá s&nbsp;tím, že pokud jsou k&nbsp;dispozici volitelné patche (<a href="https://www.zabbix.com/documentation/5.0/en/manual/installation/upgrade_notes_500?hl=double#enabling-extended-range-of-numeric-float-values" rel="nofollow">float</a> a&nbsp;<a href="https://www.zabbix.com/documentation/6.0/en/manual/appendix/install/db_primary_keys" rel="nofollow">primární klíče</a>), pak byly do&nbsp;DB již aplikovány.<br>Pokud si nejste jisti, pak informace o&nbsp;tomto stavu se zobrazuje zároveň i&nbsp;ve frontendu v&nbsp;sekci <code>System information</code>, např.&nbsp;políčko: &#8222;Database history tables upgraded: No&#8220;.</p>



<p><strong>Dopředu upozorňujeme, že migraci děláte pouze na&nbsp;vlastní nebezpečí a&nbsp;neneseme žádnou odpovědnost za případné škody způsobené neodborným zásahem. </strong></p>



<p>Každá verze Zabbixu i&nbsp;databáze má svá konkrétní specifika, která je nutné brát v&nbsp;potaz už při&nbsp;návrhu migračního plánu a&nbsp;jednotlivých činností. Dle našich zkušeností se velká část problémů po&nbsp;migraci (například s&nbsp;promazáváním) může projevit až později. <strong>Doporučujeme tedy, abyste nás před zásahem do&nbsp;produkčního prostředí raději kontaktovali pro případnou konzultaci. Rádi vám s&nbsp;celým procesem bezchybné migrace a&nbsp;následnými kroky pomůžeme. </strong></p>


<section id="block-webinar-block_134a9b649ed807ab663fe757a1a9b170" data-id="block-webinar-block_134a9b649ed807ab663fe757a1a9b170" class="gt-block block-webinar">
    <div class="connected-webinars__grid">
        <a href="https://www.initmax.cz/webinar/migrace-zabbix-databaze-z-mysql-do-postgresql-krok-za-krokem/" class="grid-item">
	<article class="webinar-promotion">
		<div class="webinar-promotion__thumbnail-wrap">
			<figure class="webinar-promotion__thumbnail">
					<img decoding="async" src="https://www.initmax.cz/wp-content/uploads/2024/08/ilustrace_webinare_zabbix_7.0_06_thumbnail_web-copy-2.png"
				 width="400"
		 height="250"
		 class=""
		 alt="Migrace Zabbix databáze z&nbsp;MySQL do&nbsp;PostgreSQL krok za krokem"
		 loading="lazy"	>
									<div class="webinar-promotion__tags">
						<span class="tag tag--small" style="color:#ffffff;background-color:#336791;">PostgreSQL</span><span class="tag tag--small" style="color:#ffffff;background-color:#d40000;">Zabbix</span>					</div>
							</figure>
		</div>
		<div class="webinar-promotion__text">
			<div>
									<time datetime="2024-11-21">21.&nbsp;11.&nbsp;2024</time>
							</div>
			<h3 class="webinar-promotion__title">Migrace Zabbix databáze z&nbsp;MySQL do&nbsp;PostgreSQL krok za krokem</h3>
			<div class="icon-link">
				<figure class="icon-wrap icon-wrap--primary"><svg data-name="Group 3411" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 455" d="M0,0H24V24H0Z" fill="none"/><path data-name="Path 456" d="M15,10l4.553-2.276A1,1,0,0,1,21,8.618v6.764a1,1,0,0,1-1.447.894L15,14V10Z" transform="translate(0 0)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><rect data-name="Rectangle 1286" width="12" height="12" rx="2" transform="translate(3.112 6)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</figure>
				<span>Zhlédnout záznam</span>
			</div>
		</div>
	</article>
</a>    </div>
</section>


<section id="social-links-block_2294b5c81a0b70e3af1dfb4b7a42e22e" data-id="social-links-block_2294b5c81a0b70e3af1dfb4b7a42e22e" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>




<h2 class="wp-block-heading">Kontrola verzí</h2>



<p>Jako vůbec první krok před samotnou migrací je třeba vědět konkrétní aktuálně <strong>BĚŽÍCÍ</strong> verzi Zabbix serveru. Tedy nikoliv to, co nám zobrazuje patička ve webovém frontendu.</p>



<p>Toto nejbezpečněji zjistíme v&nbsp;logu samotného Zabbix serveru při&nbsp;jeho startu:</p>


<section id="block-code-block_38359b4cc0242ed6915996a88453531d" data-id="block-code-block_38359b4cc0242ed6915996a88453531d" class="gt-block block-code">
    <pre><code>cat /var/log/zabbix/zabbix_server.log | grep &quot;Starting Zabbix Server. Zabbix&quot;</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Výstup tohoto příkazu v&nbsp;našem případě vypadá následovně:</p>


<section id="block-code-block_c0d276ca0ee4f27bf47982851f165ad5" data-id="block-code-block_c0d276ca0ee4f27bf47982851f165ad5" class="gt-block block-code">
    <pre><code>1933256:20240510:164211.482 Starting Zabbix Server. Zabbix 7.0.0 (revision 9bc845eca94)</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Jako další možnost je zjištění verze instalačních balíčků podpůrných knihoven Zabbixu pro MySQL, což je ilustrováno příkazem níže.</p>



<p>Toto ale nemusí být skutečná, aktuálně běžící verze!</p>


<section id="block-code-block_1cf68575ed47149cb8294ba0544f513e" data-id="block-code-block_1cf68575ed47149cb8294ba0544f513e" class="gt-block block-code">
    <pre><code>rpm -qa | grep zabbix-server-mysql</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Výstup tohoto příkazu vypadá takto:</p>


<section id="block-code-block_6381f6d47a1fe1245929ebfc83911119" data-id="block-code-block_6381f6d47a1fe1245929ebfc83911119" class="gt-block block-code">
    <pre><code>zabbix-server-mysql-7.0.0.release1.el9.x86_64</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Dalším způsobem zjištění verze Zabbix serveru je pak kontrola verze samotným spouštěcím souborem. Ovšem i&nbsp;tato informace může být za jistých okolností zavádějící a&nbsp;nemusí to být verze aktuálně spuštěná.</p>


<section id="block-code-block_4b44c08c6be447bed528eda895d77235" data-id="block-code-block_4b44c08c6be447bed528eda895d77235" class="gt-block block-code">
    <pre><code>zabbix_server -V</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Výstup pak vypadá následovně:</p>


<section id="block-code-block_9092da4d416f2524bbfe219d646f4797" data-id="block-code-block_9092da4d416f2524bbfe219d646f4797" class="gt-block block-code">
    <pre><code>zabbix_server (Zabbix) 7.0.0
Revision 9bc845eca94 30 January 2024, compilation time: Jan 30 2024 00:00:00</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Přípravné kroky</h2>



<h3 class="wp-block-heading">MySQL triggery</h3>



<p><strong>Zabbix od verze 6.0.11 obsahuje databázové triggery</strong> a&nbsp;s&nbsp;těmi se musí při&nbsp;migraci počítat. Následující sadou příkazů tedy zjistíme, jestli se to naší databázové instance bude také týkat.</p>



<p>Přihlásíme se do&nbsp;mysql konzole:</p>


<section id="block-code-block_93bb84a81e3a4cec20632bcd7489fe8a" data-id="block-code-block_93bb84a81e3a4cec20632bcd7489fe8a" class="gt-block block-code">
    <pre><code>mysql</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Přepneme se do&nbsp;databáze &#8218;zabbix&#8216;:</p>


<section id="block-code-block_6102cc174a2eb7173c0eb4f348a558c0" data-id="block-code-block_6102cc174a2eb7173c0eb4f348a558c0" class="gt-block block-code">
    <pre><code>use zabbix;</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p> Následně zavoláme příkaz <code>SHOW TRIGGERS</code>, který nám případně zobrazí použité databázové triggery:</p>


<section id="block-code-block_7768e84b2781595db9e0f728a4bf3442" data-id="block-code-block_7768e84b2781595db9e0f728a4bf3442" class="gt-block block-code">
    <pre><code>SHOW TRIGGERS\G
</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p><strong>Pokud je výstup tohoto příkazu následující, pak část s&nbsp;instalací triggerů níže v&nbsp;návodu můžete s&nbsp;klidem vynechat.</strong></p>


<section id="block-code-block_5e69284f83e487951a1173417bd6e0e3" data-id="block-code-block_5e69284f83e487951a1173417bd6e0e3" class="gt-block block-code">
    <pre><code>Empty set (0.00 sec)</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Ukázku z&nbsp;výstupu tohoto příkazu v&nbsp;Zabbixu verze 6.0.11 vidíte zde. V&nbsp;tuto chvíli už se níže zmíněné kapitole o&nbsp;migraci triggerů nevyhnete.</p>


<section id="block-code-block_25e9833debe400a92b1d02afbd78b1eb" data-id="block-code-block_25e9833debe400a92b1d02afbd78b1eb" class="gt-block block-code">
    <pre><code>*************************** 1. row ***************************
             Trigger: hosts_name_upper_insert
               Event: INSERT
               Table: hosts
           Statement: set new.name_upper=upper(new.name)
              Timing: BEFORE
             Created: 2024-02-27 09:59:58.09
            sql_mode: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
             Definer: zabbix@localhost
character_set_client: utf8mb4
collation_connection: utf8mb4_0900_ai_ci
  Database Collation: utf8mb4_bin
*************************** 2. row ***************************
             Trigger: hosts_name_upper_update
               Event: UPDATE
               Table: hosts
           Statement: begin
if new.name&lt;&gt;old.name
then
set new.name_upper=upper(new.name);
end if;
end
              Timing: BEFORE
             Created: 2024-02-27 09:59:58.10
            sql_mode: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
             Definer: zabbix@localhost
character_set_client: utf8mb4
collation_connection: utf8mb4_0900_ai_ci
  Database Collation: utf8mb4_bin
*************************** 3. row ***************************
             Trigger: items_name_upper_insert
               Event: INSERT
               Table: items
           Statement: set new.name_upper=upper(new.name)
              Timing: BEFORE
             Created: 2024-02-27 10:00:00.76
            sql_mode: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
             Definer: zabbix@localhost
character_set_client: utf8mb4
collation_connection: utf8mb4_0900_ai_ci
  Database Collation: utf8mb4_bin
*************************** 4. row ***************************
             Trigger: items_name_upper_update
               Event: UPDATE
               Table: items
           Statement: begin
if new.name&lt;&gt;old.name
then
set new.name_upper=upper(new.name);
end if;
end
              Timing: BEFORE
             Created: 2024-02-27 10:00:00.77
            sql_mode: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
             Definer: zabbix@localhost
character_set_client: utf8mb4
collation_connection: utf8mb4_0900_ai_ci
  Database Collation: utf8mb4_bin
4 rows in set (0.01 sec)</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h3 class="wp-block-heading">Instalace závislostí</h3>



<p>Nejprve přidáme oficiální repozitář PostgreSQL, který pro instalaci doporučujeme. Instalační balíčky z&nbsp;repozitářů od RedHat se podstatně liší.</p>



<p>To provedeme následujícím příkazem:</p>


<section id="block-code-block_c813127ebf2cef5e167f75a3a99bf550" data-id="block-code-block_c813127ebf2cef5e167f75a3a99bf550" class="gt-block block-code">
    <pre><code>yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nainstalujeme PostgreSQL v&nbsp;Zabbixem podporované verzi, kterou zjistíme v&nbsp;matici kompatiblity na&nbsp;stránkách <a href="https://www.zabbix.com/documentation/7.0/en/manual/installation/requirements">Zabbixu</a>:</p>


<section id="block-code-block_d43be6d9380ad9b9fff69e91e0e8737c" data-id="block-code-block_d43be6d9380ad9b9fff69e91e0e8737c" class="gt-block block-code">
    <pre><code>yum install postgresql18-server</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Inicializujeme databázový server PostgreSQL následujícím příkazem:</p>


<section id="block-code-block_32822271ef31ee16290604bc291a2e4b" data-id="block-code-block_32822271ef31ee16290604bc291a2e4b" class="gt-block block-code">
    <pre><code>/usr/pgsql-18/bin/postgresql-18-setup initdb</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Spustíme službu PostgreSQL a&nbsp;nastavíme její spouštění po&nbsp;startu:</p>


<section id="block-code-block_de3df1708157e134bc7587ffc98eb9dd" data-id="block-code-block_de3df1708157e134bc7587ffc98eb9dd" class="gt-block block-code">
    <pre><code>systemctl enable postgresql-18
systemctl start postgresql-18</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nainstalujeme utilitu <code>pgloader</code>, kterou použijeme k&nbsp;samotné migraci dat:</p>


<section id="block-code-block_04f6a220c9cfe150e5692160b3d7f067" data-id="block-code-block_04f6a220c9cfe150e5692160b3d7f067" class="gt-block block-code">
    <pre><code>yum install pgloader</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Pomocí následujícího příkazu zkontrolujeme verzi <code>pgloaderu</code>:</p>


<section id="block-code-block_229d8bad1680a0e16f5b2aea868c1ca7" data-id="block-code-block_229d8bad1680a0e16f5b2aea868c1ca7" class="gt-block block-code">
    <pre><code>pgloader -V</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Výstup bude pak vypadat následovně:</p>


<section id="block-code-block_4befec030e03f05a494324d7bb87ce87" data-id="block-code-block_4befec030e03f05a494324d7bb87ce87" class="gt-block block-code">
    <pre><code>pgloader version &quot;3.6.7&quot;</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h3 class="wp-block-heading">Příprava na&nbsp;migraci</h3>



<p>Nyní vytvoříme dočasnou složku, která nám bude sloužit k&nbsp;uchování konfiguračních souborů použitých při&nbsp;následné migraci a&nbsp;otevřeme ji:</p>


<section id="block-code-block_fbb5154c570b2049d9457b289896789e" data-id="block-code-block_fbb5154c570b2049d9457b289896789e" class="gt-block block-code">
    <pre><code>mkdir /tmp/zabbix-db-migration/ &amp;&amp; cd $_</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h3 class="wp-block-heading">Parsování schématu</h3>



<p>Pro samotnou migraci dat budeme potřebovat soubor s&nbsp;databázovým schématem, tento nalezneme v&nbsp;oficiálních zdrojových kódech Zabbixu <strong>pro vaši konkrétní verzi</strong>.</p>



<p><strong>Tento příkaz je nezbytně nutné přizpůsobit přímo vaší verzi Zabbix!</strong></p>



<p>Stále se nacházíme v&nbsp;naší dočasné složce, vytvořené pro migraci a&nbsp;zdrojový kód pro naši verzi 7.0.0 tedy stáhneme sem, a&nbsp;to následujícím příkazem:</p>


<section id="block-code-block_5fa067029dbcc6fdc5fe26e57fabdace" data-id="block-code-block_5fa067029dbcc6fdc5fe26e57fabdace" class="gt-block block-code">
    <pre><code>wget https://cdn.zabbix.com/zabbix/sources/stable/7.0/zabbix-7.0.0.tar.gz</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Stáhnutý archiv se zdrojovým kódem Zabbixu rozbalíme:</p>


<section id="block-code-block_ef5074095d919c17acdce052f3f797a6" data-id="block-code-block_ef5074095d919c17acdce052f3f797a6" class="gt-block block-code">
    <pre><code>tar -zxvf zabbix-7.0.0.tar.gz</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Otevřeme si složku v&nbsp;následující cestě, kde nalezneme databázová schémata:</p>


<section id="block-code-block_529d9df76918399cd7e6fc663f6d2766" data-id="block-code-block_529d9df76918399cd7e6fc663f6d2766" class="gt-block block-code">
    <pre><code>cd /tmp/zabbix-db-migration/zabbix-7.0.0/database/postgresql/</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Z jednotného souboru schématu vybereme pouze operace vytvářející tabulky a&nbsp;triggery, a&nbsp;uložíme je do&nbsp;separátního souboru:</p>


<section id="block-code-block_1987e946d7723b1778f1d498e3b9898f" data-id="block-code-block_1987e946d7723b1778f1d498e3b9898f" class="gt-block block-code">
    <pre><code>grep -v &#039;ALTER TABLE ONLY&#039; schema.sql | grep -v INSERT | grep -v &#039;CREATE INDEX&#039; | grep -v &#039;CREATE UNIQUE INDEX&#039; &gt; /tmp/zabbix-db-migration/create_tables.sql</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Tento soubor nyní obsahuje nejen CREATE TABLE operace, ale i&nbsp;operace a&nbsp;funkce pro triggery, které řešíme individuálně. Část, která triggery vytváří tedy z&nbsp;tohoto souboru odebereme:</p>


<section id="block-code-block_cc8ca8f63568589ee9fd683e55c47dff" data-id="block-code-block_cc8ca8f63568589ee9fd683e55c47dff" class="gt-block block-code">
    <pre><code>sed -i &#039;/create\ or\ replace\ function/,$d&#039; /tmp/zabbix-db-migration/create_tables.sql</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A z&nbsp;tohoto jednotného schématu pak právě vybereme pouze operace související s&nbsp;triggery:</p>


<section id="block-code-block_e24f643a05238d54e95487eb864f9921" data-id="block-code-block_e24f643a05238d54e95487eb864f9921" class="gt-block block-code">
    <pre><code>awk &#039;/INSERT INTO dbversion/{p=1;next} /ALTER TABLE/{p=0} p&#039; schema.sql &gt; /tmp/zabbix-db-migration/triggers.sql</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A nyní můžeme postoupit dále. Ze stejného souboru s&nbsp;databázovým schématem vybreme pouze operace pro vytváření indexů a&nbsp;uložíme je v&nbsp;separátním souboru:</p>


<section id="block-code-block_ef6c26d8fc59c46426db650574aeb3d5" data-id="block-code-block_ef6c26d8fc59c46426db650574aeb3d5" class="gt-block block-code">
    <pre><code>grep -E &#039;CREATE INDEX|CREATE UNIQUE INDEX&#039; schema.sql &gt; /tmp/zabbix-db-migration/create_index.sql</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Opět z&nbsp;tohoto jednotného souboru se schématem vybereme pouze ALTER operace a&nbsp;uložíme je do&nbsp;separátního souboru:</p>


<section id="block-code-block_5c034b01f2c1686c6e14f45a8e8fa413" data-id="block-code-block_5c034b01f2c1686c6e14f45a8e8fa413" class="gt-block block-code">
    <pre><code>grep &#039;ALTER TABLE ONLY&#039; schema.sql &gt; /tmp/zabbix-db-migration/alter_table.sql</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h3 class="wp-block-heading">Příprava PostgreSQL</h3>



<p>Následně vytvoříme databázového uživatele pro Zabbix, budeme vyzváni k&nbsp;zadání hesla:</p>


<section id="block-code-block_82a96bc5e8d236a5412f4664c5fb26c8" data-id="block-code-block_82a96bc5e8d236a5412f4664c5fb26c8" class="gt-block block-code">
    <pre><code>sudo -u postgres createuser --pwprompt zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Vytvoříme zabbix databázi:</p>


<section id="block-code-block_f96c9f47b0fbf8ac2053fa677409dc12" data-id="block-code-block_f96c9f47b0fbf8ac2053fa677409dc12" class="gt-block block-code">
    <pre><code>sudo -u postgres createdb -O zabbix zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Vytvoříme zabbix schéma:</p>


<section id="block-code-block_3b3db1f002fdfa617313218196e8b704" data-id="block-code-block_3b3db1f002fdfa617313218196e8b704" class="gt-block block-code">
    <pre><code>sudo -u postgres psql --host=127.0.0.1 --dbname=zabbix --username=zabbix -f /tmp/zabbix-db-migration/create_tables.sql</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Kvůli kompatibilitě s&nbsp;utilitou <code>pgloader</code> dočasně nastavíme encryption hash na&nbsp;&#8218;md5&#8216; a&nbsp;změníme heslo vytvořenému databázovému uživateli tak, aby se v&nbsp;daném hash algorytmu přegenerovalo. Pro jednoduchost <strong>použijte ideálně stejné heslo</strong>, jako jsme zadávali při&nbsp;vytváření tohoto uživatele.</p>


<section id="block-code-block_b00ae9cb1481d9d3da3bac92093042f6" data-id="block-code-block_b00ae9cb1481d9d3da3bac92093042f6" class="gt-block block-code">
    <pre><code>sudo -u postgres psql -c &quot;SET password_encryption=&#039;md5&#039;;&quot;
sudo -u postgres psql -c &quot;ALTER ROLE zabbix WITH PASSWORD &#039;***********&#039;;&quot;</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h3 class="wp-block-heading">Příprava MySQL</h3>



<p>V případě, že naše MySQL používá již změněný formát přihlašování, pak je stejně jako u&nbsp;PostgreSQL pro potřeby <code>pg</code>loader třeba změnit způsob přihlašování databázového uživatele pro Zabbix a&nbsp;zároveň mu přegenerovat heslo. To uděláme následujícím způsobem.</p>



<p>Nejprve otevřeme konfigurační soubor MySQL serveru. Pokud používáte jinou verzi, např.&nbsp;MariaDB nebo Percona, pak se umístění může lišit.</p>


<section id="block-code-block_02284674d09e7cf559c8ca86b840476c" data-id="block-code-block_02284674d09e7cf559c8ca86b840476c" class="gt-block block-code">
    <pre><code>nano /etc/my.cnf.d/mysql-server.cnf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A zde dočasně upravíme v&nbsp;sekci <code>[mysqld]</code> následující direktivu:</p>


<section id="block-code-block_d8d3fb80f26df5bcce0c4ee1f43e4d97" data-id="block-code-block_d8d3fb80f26df5bcce0c4ee1f43e4d97" class="gt-block block-code">
    <pre><code>[mysqld]
...
default-authentication-plugin=mysql_native_password</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nyní musíme zrestartovat MySQL:</p>


<section id="block-code-block_66dc2ffa945fe712083589b8525987d4" data-id="block-code-block_66dc2ffa945fe712083589b8525987d4" class="gt-block block-code">
    <pre><code>systemctl restart mysqld</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A nyní můžeme změnit způsob přihlašování uživatele pro Zabbix a&nbsp;přegenerovat mu heslo. Nezapomeňte v&nbsp;příkazu níže změnit heslo na&nbsp;své vlastní!</p>


<section id="block-code-block_e3b24e8a0225dd3da63c1104e02030e3" data-id="block-code-block_e3b24e8a0225dd3da63c1104e02030e3" class="gt-block block-code">
    <pre><code>mysql -e &quot;ALTER USER &#039;zabbix&#039;@&#039;localhost&#039; IDENTIFIED WITH mysql_native_password BY &#039;*********&#039;;&quot;</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Připravíme konfiguraci &#8211; SQL skript pro <code>pgloader</code>, tudíž tento soubor vytvořte:</p>


<section id="block-code-block_3c1dcb46ae6bb38406b668ed77aa7758" data-id="block-code-block_3c1dcb46ae6bb38406b668ed77aa7758" class="gt-block block-code">
    <pre><code>nano /tmp/zabbix-db-migration/pgloader.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A tento soubor vyplňte následujícím obsahem. Nezapomeňte si v&nbsp;tomto skriptu změnit hesla (označená pomocí hvězdiček) na&nbsp;vaše vlastní, validní hesla do&nbsp;obou databází:</p>


<section id="block-code-block_71b77f65a7378a21e71cf4eebae7c092" data-id="block-code-block_71b77f65a7378a21e71cf4eebae7c092" class="gt-block block-code">
    <pre><code>LOAD DATABASE
FROM mysql://zabbix:**********@127.0.0.1/zabbix
INTO postgresql://zabbix:**********@127.0.0.1/zabbix
WITH include no drop,
truncate,
create no tables,
create no indexes,
no foreign keys,
reset sequences,
data only,
prefetch rows = 100,
batch rows = 1000,
batch concurrency = 1
ALTER SCHEMA &#039;zabbix&#039; RENAME TO &#039;public&#039;;</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Migrace</h2>



<p>Nyní se můžeme pustit do&nbsp;samotné migrace. V&nbsp;tuto chvíli doporučujeme udělat si zálohu zdrojové MySQL databáze a&nbsp;přesvědčte se, že máte dostatečné volné místo na&nbsp;disku.</p>



<p>Nejprve zastavíme službu Zabbix serveru a&nbsp;Apache web serveru pro Zabbix frontend:</p>


<section id="block-code-block_37cbe46c76c87a22c1ed4df44b02f5c3" data-id="block-code-block_37cbe46c76c87a22c1ed4df44b02f5c3" class="gt-block block-code">
    <pre><code>systemctl stop zabbix-server httpd</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Vytvoříme v&nbsp;naší dočasné složce složku pro migrovaná data z&nbsp;MySQL:</p>


<section id="block-code-block_0251b9c6e8a78b0325fbce3da34948ef" data-id="block-code-block_0251b9c6e8a78b0325fbce3da34948ef" class="gt-block block-code">
    <pre><code>mkdir /tmp/zabbix-db-migration/data</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A následně spustíme pgloader s&nbsp;námi vytvořeným konfiguračním souborem:</p>


<section id="block-code-block_9f4a3dfa3bf18b0e0114805a5b5b7858" data-id="block-code-block_9f4a3dfa3bf18b0e0114805a5b5b7858" class="gt-block block-code">
    <pre><code>pgloader --root-dir=/tmp/zabbix-db-migration/data /tmp/zabbix-db-migration/pgloader.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Pokud <code>pgloader</code> při&nbsp;běhu zahlásí nějaké výstražné zprávy (Warning), pak je můžete směle ignorovat &#8211; ničemu nevadí. Naopak problémy, které jsou závažnější, a&nbsp;se kterými se ale také můžete setkat jsou např.: malý objem dostupného místa na&nbsp;disku, časové prodlevy mezi databázemi (timeouts), příliš nízká rychlost zápisu na&nbsp;disk (nízké iops). I&nbsp;tyto problémy lze vyřešit, ovšem vyžadují další analýzu a&nbsp;následný tuning přímo na&nbsp;míru.</p>



<p>Příklad výstupu tohoto příkazu naleznete zde:</p>


<section id="block-code-block_98c7b67d354fabc59c454018c2ed4857" data-id="block-code-block_98c7b67d354fabc59c454018c2ed4857" class="gt-block block-code">
    <pre><code>2024-05-10T16:55:38.010000+01:00 LOG pgloader version &quot;3.6.7~devel&quot;
2024-05-10T16:55:38.174002+01:00 LOG Migrating from #&lt;MYSQL-CONNECTION mysql://zabbix@127.0.0.1:3306/zabbix {100685C583}&gt;
2024-05-10T16:55:38.175002+01:00 LOG Migrating into #&lt;PGSQL-CONNECTION pgsql://zabbix@127.0.0.1:5432/zabbix {100685C713}&gt;
2024-05-10T16:55:38.684006+01:00 WARNING Source column &quot;public&quot;.&quot;history_uint&quot;.&quot;value&quot; is casted to type &quot;bigint&quot; which is not the same as &quot;numeric&quot;, the type of current target database column &quot;public&quot;.&quot;history_uint&quot;.&quot;value&quot;.
2024-05-10T16:55:38.685006+01:00 WARNING Source column &quot;public&quot;.&quot;item_rtdata&quot;.&quot;lastlogsize&quot; is casted to type &quot;bigint&quot; which is not the same as &quot;numeric&quot;, the type of current target database column &quot;public&quot;.&quot;item_rtdata&quot;.&quot;lastlogsize&quot;.
2024-05-10T16:55:38.686006+01:00 WARNING Source column &quot;public&quot;.&quot;proxy_history&quot;.&quot;lastlogsize&quot; is casted to type &quot;bigint&quot; which is not the same as &quot;numeric&quot;, the type of current target database column &quot;public&quot;.&quot;proxy_history&quot;.&quot;lastlogsize&quot;.
2024-05-10T16:55:38.686006+01:00 WARNING Source column &quot;public&quot;.&quot;trends_uint&quot;.&quot;value_min&quot; is casted to type &quot;bigint&quot; which is not the same as &quot;numeric&quot;, the type of current target database column &quot;public&quot;.&quot;trends_uint&quot;.&quot;value_min&quot;.
2024-05-10T16:55:38.687006+01:00 WARNING Source column &quot;public&quot;.&quot;trends_uint&quot;.&quot;value_avg&quot; is casted to type &quot;bigint&quot; which is not the same as &quot;numeric&quot;, the type of current target database column &quot;public&quot;.&quot;trends_uint&quot;.&quot;value_avg&quot;.
2024-05-10T16:55:38.687006+01:00 WARNING Source column &quot;public&quot;.&quot;trends_uint&quot;.&quot;value_max&quot; is casted to type &quot;bigint&quot; which is not the same as &quot;numeric&quot;, the type of current target database column &quot;public&quot;.&quot;trends_uint&quot;.&quot;value_max&quot;.
2024-05-10T16:56:28.778334+01:00 ERROR Database error 23505: duplicate key value violates unique constraint &quot;changelog_pkey&quot;
DETAIL: Key (changelogid)=(16809) already exists.
CONTEXT: COPY changelog, line 1
2024-05-10T16:56:30.691348+01:00 LOG report summary reset
                       table name     errors       rows      bytes      total time
---------------------------------  ---------  ---------  ---------  --------------
                  fetch meta data          0        198                     0.121s
                         Truncate          0        198                     0.338s
---------------------------------  ---------  ---------  ---------  --------------
                   public.history          0    3899811   133.2 MB         39.021s
              public.history_uint          0    2167293    66.0 MB         26.330s
                    public.trends          0     502182    27.5 MB          8.498s
                     public.items          0      12784     4.4 MB          1.488s
                 public.event_tag          0      13012   326.9 kB          0.942s
               public.trigger_tag          0       7365   198.8 kB          1.411s
                  public.triggers          0       5546     1.4 MB          2.027s
              public.graphs_items          0       4186   138.6 kB          2.082s
               public.history_str          0       2923   233.3 kB          2.316s
            public.item_condition          0       2445   123.0 kB          2.524s
              public.widget_field          0       1875   103.9 kB          2.777s
                    public.graphs          0       1428   154.7 kB          3.150s
               public.item_rtdata          0        957    16.0 kB          3.248s
                  public.host_tag          0        635    17.4 kB          3.486s
                    public.widget          0        467    14.2 kB          3.773s
                public.host_hgset          0        307     2.5 kB          3.991s
                  public.profiles          0        265    13.2 kB          4.305s
            public.dashboard_page          0        158     1.9 kB          4.515s
                 public.dashboard          0        154    10.5 kB          4.839s
                    public.images          0        187     1.9 MB          5.049s
            public.task_check_now          0          0                     5.063s
   public.lld_override_opdiscover          0         98     0.7 kB          5.114s
     public.lld_override_opstatus          0         98     0.7 kB          5.217s
         public.trigger_discovery          0         82     2.0 kB          5.339s
              public.users_groups          0         64     0.5 kB          5.407s
                public.user_ugset          0         61     0.3 kB          5.525s
           public.graph_discovery          0         47     1.1 kB          5.643s
           public.hosts_templates          0         31     0.5 kB          5.809s
                   public.problem          0         34     3.4 kB          6.004s
                    public.hstgrp          0         26     1.5 kB          6.212s
                    public.module          0         27     0.9 kB          6.343s
                     public.hgset          0         19     1.3 kB          6.497s
               public.host_rtdata          0         13     0.1 kB          6.690s
               public.expressions          0         10     0.5 kB          6.691s
               public.escalations          0         15     0.7 kB          6.847s
                public.permission          0          7     0.0 kB          6.810s
                public.conditions          0          6     0.1 kB          6.961s
                    public.usrgrp          0          6     0.2 kB          6.958s
                   public.regexps          0          5     0.2 kB          7.101s
               public.graph_theme          0          4     0.9 kB          7.071s
             public.opmessage_grp          0          4     0.0 kB          7.248s
              public.httpstepitem          0          3     0.0 kB          7.275s
                   public.scripts          0          3     0.3 kB          7.423s
             public.sysmaps_links          0          3     0.4 kB          7.411s
              public.acknowledges          0          1     0.0 kB          7.573s
            public.interface_snmp          0          2     0.1 kB          7.510s
                     public.proxy          0          2     0.1 kB          7.738s
                     public.ugset          0          2     0.1 kB          7.531s
                   public.dchecks          0          1     0.0 kB          7.727s
              public.autoreg_host          0          0                     7.722s
        public.config_autoreg_tls          0          1     0.0 kB          7.899s
             public.connector_tag          0          0                     7.852s
      public.corr_condition_group          0          0                     7.925s
    public.corr_condition_tagpair          0          0                     8.054s
            public.corr_operation          0          0                     8.049s
            public.dashboard_user          0          0                     8.200s
                    public.dhosts          0          1     0.0 kB          8.190s
                 public.dservices          0          1     0.2 kB          8.298s
               public.globalmacro          0          1     0.0 kB          8.291s
           public.group_discovery          0          0                     8.472s
               public.history_log          0          0                     8.467s
                  public.httpstep          0          1     0.1 kB          8.693s
                  public.httptest          0          1     0.1 kB          8.688s
              public.httptest_tag          0          0                     8.849s
              public.icon_mapping          0          0                     8.821s
    public.lld_override_ophistory          0          0                     9.102s
     public.lld_override_opperiod          0          0                     8.981s
        public.lld_override_optag          0          0                     9.132s
     public.lld_override_optrends          0          0                     9.350s
              public.maintenances          0          1     0.0 kB          9.347s
        public.maintenances_hosts          0          1     0.0 kB          9.557s
                 public.opcommand          0          0                     9.548s
             public.opcommand_hst          0          0                     9.736s
                   public.opgroup          0          1     0.0 kB          9.738s
             public.opmessage_usr          0          0                     9.954s
                public.optemplate          0          1     0.0 kB          9.950s
            public.proxy_dhistory          0          0                    10.057s
                    public.report          0          0                    10.101s
               public.report_user          0          0                    10.120s
                public.scim_group          0          0                    10.198s
            public.service_alarms          0          0                    10.219s
       public.service_problem_tag          0          0                    10.271s
               public.service_tag          0          0                    10.329s
            public.services_links          0          0                    10.363s
     public.sla_excluded_downtime          0          0                    10.401s
           public.sla_service_tag          0          0                    10.487s
        public.sysmap_element_url          0          0                    10.484s
                public.sysmap_url          0          0                    10.618s
             public.sysmap_usrgrp          0          0                    10.537s
     public.sysmaps_link_triggers          0          0                    10.622s
                      public.task          0          0                    10.677s
        public.task_close_problem          0          0                    10.752s
       public.task_remote_command          0          0                    10.763s
               public.task_result          0          0                    10.812s
                     public.token          0          0                    10.864s
           public.user_scim_group          0          0                    10.940s
    public.userdirectory_idpgroup          0          0                    10.955s
       public.userdirectory_media          0          0                    11.072s
      public.userdirectory_usrgrp          0          0                    11.029s
          public.valuemap_mapping          0      30621   861.6 kB         11.359s
               public.trends_uint          0     345750    11.3 MB          3.151s
                  public.item_tag          0      19823   598.5 kB          0.772s
              public.item_preproc          0      11373   603.2 kB          0.888s
                 public.functions          0       9445   268.0 kB          1.304s
            public.item_discovery          0       5629   129.7 kB          1.377s
                 public.hostmacro          0       4612   360.1 kB          1.518s
                    public.events          0       3494   252.6 kB          1.644s
                    public.alerts          0       3083   844.7 kB          1.838s
           public.trigger_depends          0       1819    32.0 kB          2.011s
                  public.auditlog          0       5350   642.1 kB          2.329s
            public.event_recovery          0       1362    27.6 kB          2.490s
               public.item_rtname          0        917    60.6 kB          2.691s
          public.media_type_param          0        555    22.0 kB          2.867s
                     public.hosts          0        318   133.3 kB          3.229s
              public.hosts_groups          0        307     3.7 kB          3.413s
              public.history_text          0        211     3.7 MB          3.957s
        public.media_type_message          0        154    41.1 kB          4.150s
            public.event_suppress          0        143     3.5 kB          4.421s
            public.lld_macro_path          0        134     4.5 kB          4.481s
               public.problem_tag          0        150     3.6 kB          4.600s
    public.lld_override_operation          0         98     2.9 kB          4.726s
              public.lld_override          0         95     3.7 kB          4.842s
    public.lld_override_condition          0         85     3.6 kB          4.946s
                     public.users          0         63     7.8 kB          5.092s
                       public.ids          0         51     1.3 kB          5.177s
            public.item_parameter          0         43     1.7 kB          5.288s
           public.group_prototype          0         28     0.9 kB          5.371s
                 public.role_rule          0         27     0.8 kB          5.505s
                 public.interface          0         24     1.1 kB          5.670s
                public.media_type          0         31   256.8 kB          5.707s
               public.hgset_group          0         19     0.1 kB          5.649s
            public.host_discovery          0         11     0.2 kB          5.789s
                public.operations          0         10     0.2 kB          5.792s
                 public.opmessage          0          8     0.1 kB          5.806s
                    public.rights          0          7     0.1 kB          5.872s
                  public.sessions          0          6     0.5 kB          5.985s
                   public.actions          0          5     0.3 kB          5.883s
          public.sysmaps_elements          0          5     0.8 kB          5.978s
               public.housekeeper          0          4     0.1 kB          5.993s
                      public.role          0          4     0.1 kB          5.966s
              public.httptestitem          0          3     0.0 kB          6.161s
                   public.sysmaps          0          3     0.2 kB          6.102s
               public.ugset_group          0          3     0.0 kB          6.098s
          public.dashboard_usrgrp          0          2     0.0 kB          6.088s
                     public.media          0          3     0.1 kB          6.262s
              public.proxy_rtdata          0          2     0.0 kB          6.239s
                    public.config          0          1     0.7 kB          6.237s
                   public.ha_node          0          1     0.1 kB          6.223s
                 public.changelog          1          0                     6.382s
                 public.connector          0          0                     6.371s
            public.corr_condition          0          0                     6.354s
        public.corr_condition_tag          0          0                     6.365s
   public.corr_condition_tagvalue          0          0                     6.487s
               public.correlation          0          0                     6.505s
                 public.dbversion          0          1     0.0 kB          6.513s
                    public.drules          0          1     0.0 kB          6.500s
             public.event_symptom          0          0                     6.610s
                public.globalvars          0          1     0.0 kB          6.631s
               public.history_bin          0          0                     6.634s
            public.host_inventory          0          1     0.3 kB          6.640s
            public.httpstep_field          0          0                     6.735s
            public.httptest_field          0          0                     6.747s
                  public.icon_map          0          0                     6.771s
       public.interface_discovery          0          0                     6.767s
  public.lld_override_opinventory          0          0                     6.868s
   public.lld_override_opseverity          0          0                     6.883s
   public.lld_override_optemplate          0          0                     6.908s
           public.maintenance_tag          0          0                     6.906s
       public.maintenances_groups          0          0                     7.003s
      public.maintenances_windows          0          1     0.0 kB          7.016s
             public.opcommand_grp          0          0                     7.036s
              public.opconditions          0          0                     7.031s
               public.opinventory          0          0                     7.129s
                     public.optag          0          0                     7.147s
        public.proxy_autoreg_host          0          0                     7.178s
             public.proxy_history          0          0                     7.191s
              public.report_param          0          0                     7.224s
             public.report_usrgrp          0          0                     7.305s
              public.script_param          0          0                     7.244s
           public.service_problem          0          0                     7.348s
       public.service_status_rule          0          0                     7.366s
                  public.services          0          0                     7.318s
                       public.sla          0          0                     7.411s
              public.sla_schedule          0          0                     7.473s
    public.sysmap_element_trigger          0          0                     7.455s
              public.sysmap_shape          0          1     0.1 kB          7.407s
               public.sysmap_user          0          0                     7.582s
       public.sysmaps_element_tag          0          0                     7.602s
                public.tag_filter          0          0                     7.517s
          public.task_acknowledge          0          0                     7.653s
                 public.task_data          0          0                     7.574s
public.task_remote_command_result          0          0                     7.725s
               public.timeperiods          0          1     0.0 kB          7.643s
             public.trigger_queue          0          0                     7.726s
             public.userdirectory          0          0                     7.770s
        public.userdirectory_ldap          0          0                     7.744s
        public.userdirectory_saml          0          0                     7.785s
                  public.valuemap          0        944    62.8 kB          7.835s
---------------------------------  ---------  ---------  ---------  --------------
          COPY Threads Completion          0          4                    51.236s
                  Reset Sequences          0          1                     0.110s
                 Install Comments          0          0                     0.000s
---------------------------------  ---------  ---------  ---------  --------------
                Total import time          1    7071507   255.7 MB         51.346s</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Ve chvíli, kdy nám pgloader úspěšně doběhne, nastavení hashovacího algorytmu vrátíme zpět na&nbsp;bezpečnější hodnotu &#8218;SCRAM-SHA-256&#8216; a&nbsp;databázovému uživateli opět přegenerujeme heslo. Hvězdičky v&nbsp;následujícím příkazu nahraďte vámi zvoleným heslem:</p>


<section id="block-code-block_e3f746e9fabfb197acce96ecc8f40e2d" data-id="block-code-block_e3f746e9fabfb197acce96ecc8f40e2d" class="gt-block block-code">
    <pre><code>sudo -u postgres psql -c &quot;SET password_encryption=&#039;SCRAM-SHA-256&#039;;&quot;
sudo -u postgres psql -c &quot;ALTER ROLE zabbix WITH PASSWORD &#039;************&#039;;&quot;</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Následně vytvoříme schéma pro indexy:</p>


<section id="block-code-block_3300c71e304beb048ec293fbc9b8a5c1" data-id="block-code-block_3300c71e304beb048ec293fbc9b8a5c1" class="gt-block block-code">
    <pre><code>sudo -u postgres psql --host=127.0.0.1 --dbname=zabbix --username=zabbix -f /tmp/zabbix-db-migration/create_index.sql</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Následně pak schéma pro alter table:</p>


<section id="block-code-block_98e25e16eab6b853ab0ea560b403d732" data-id="block-code-block_98e25e16eab6b853ab0ea560b403d732" class="gt-block block-code">
    <pre><code>sudo -u postgres psql --host=127.0.0.1 --dbname=zabbix --username=zabbix -f /tmp/zabbix-db-migration/alter_table.sql</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A nakonec i&nbsp;schéma pro triggers:</p>


<section id="block-code-block_801cda81dfbf7e570c404fcccd9e6bf0" data-id="block-code-block_801cda81dfbf7e570c404fcccd9e6bf0" class="gt-block block-code">
    <pre><code>sudo -u postgres psql --host=127.0.0.1 --dbname=zabbix --username=zabbix -f /tmp/zabbix-db-migration/triggers.sql</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Po úspěšné migraci doporučujeme spustit VACUUM:</p>


<section id="block-code-block_e0b3ca4bea84c9810d165f73c0f6a036" data-id="block-code-block_e0b3ca4bea84c9810d165f73c0f6a036" class="gt-block block-code">
    <pre><code>sudo -u postgres vacuumdb --dbname=zabbix --analyze --username=postgres --jobs=$(grep -c processor /proc/cpuinfo)</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Testování funkčnosti</h2>



<p>Nejprve odstraníme podporu MySQL pro Zabbix a&nbsp;MySQL frontend:</p>


<section id="block-code-block_e144e35afae32e53cc6894853f6554e9" data-id="block-code-block_e144e35afae32e53cc6894853f6554e9" class="gt-block block-code">
    <pre><code>yum remove zabbix-server-mysql zabbix-web-mysql</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nainstalujeme závislosti potřebné pro běh Zabbix serveru s&nbsp;PostgreSQL včetně frontendu. </p>



<p><strong>Pozor:</strong> Reinstalací Zabbix serveru se ztratí konfigurace v&nbsp;souboru <code>zabbix_server.conf</code>! Doporučujeme zálohu!</p>


<section id="block-code-block_5d8c776344599c8d83f36ddd6b5452cb" data-id="block-code-block_5d8c776344599c8d83f36ddd6b5452cb" class="gt-block block-code">
    <pre><code>yum install zabbix-server-pgsql zabbix-web-pgsql zabbix-apache-conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Otevřeme konfigurační soubor Zabbix serveru:</p>


<section id="block-code-block_f7d94c58041ea8aff9d9edc00d42e7d0" data-id="block-code-block_f7d94c58041ea8aff9d9edc00d42e7d0" class="gt-block block-code">
    <pre><code>nano /etc/zabbix/zabbix_server.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A zde upravíme direktivu pro přístup do&nbsp;databáze na&nbsp;nové přístupové údaje pro PostgreSQL. Hvězdičky nahraďte aktuálním heslem uživatele &#8218;zabbix&#8216;:</p>


<section id="block-code-block_8c3876880340d6d499db09e097bc8ab5" data-id="block-code-block_8c3876880340d6d499db09e097bc8ab5" class="gt-block block-code">
    <pre><code>DBPassword=*******</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Odebereme starý konfigurační soubor frontendu pro MySQL:</p>


<section id="block-code-block_a6de25a6ea904b2d03c2891b946234e6" data-id="block-code-block_a6de25a6ea904b2d03c2891b946234e6" class="gt-block block-code">
    <pre><code>rm /etc/zabbix/web/zabbix.conf.php</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Zrestartujeme Zabbix server a&nbsp;Apache web server:</p>


<section id="block-code-block_3034df29bf33fb9a5cf42918110f2127" data-id="block-code-block_3034df29bf33fb9a5cf42918110f2127" class="gt-block block-code">
    <pre><code>systemctl restart zabbix-server httpd</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Zkontrolujeme log Zabbixu, abychom se ujistili, že všechno naběhlo v&nbsp;pořádku a&nbsp;bez jakýchkoliv problémů.</p>


<section id="block-code-block_ba31e5325b9e2d4f2ad9fd930c192fc1" data-id="block-code-block_ba31e5325b9e2d4f2ad9fd930c192fc1" class="gt-block block-code">
    <pre><code>nano /var/log/zabbix/zabbix_server.log</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Pomocí prohlížeče se připojíme na&nbsp;URL Zabbix frontendu a&nbsp;znovu frontend nastavíme, tentokrát pro PostgreSQL.</p>



<p>Nejprve nás přivítá úvodní obrazovka s&nbsp;volbou jazyka:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1826" height="1158" src="https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.24.39.png" alt="zabbix install - welcome page" class="wp-image-14306" srcset="https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.24.39.png 1826w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.24.39-300x190.png 300w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.24.39-1024x649.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.24.39-768x487.png 768w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.24.39-1536x974.png 1536w" sizes="auto, (max-width: 1826px) 100vw, 1826px" /></figure>



<p>Následuje kontrola požadovaných verzí a&nbsp;nastavení, kde již můžeme vidět nainstalovanou podporu pro PostgreSQL:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1840" height="1164" src="https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.24.55-1.png" alt="zabbix install - pre-requisites" class="wp-image-14310" srcset="https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.24.55-1.png 1840w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.24.55-1-300x190.png 300w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.24.55-1-1024x648.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.24.55-1-768x486.png 768w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.24.55-1-1536x972.png 1536w" sizes="auto, (max-width: 1840px) 100vw, 1840px" /></figure>



<p>V dalším kroku nás čeká nastavení databáze, kde vyplníme přihlašovací údaje vytvořené v&nbsp;předchozích krocích:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1842" height="1188" src="https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.25.21.png" alt="zabbix install - database config" class="wp-image-14289" srcset="https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.25.21.png 1842w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.25.21-300x193.png 300w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.25.21-1024x660.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.25.21-768x495.png 768w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.25.21-1536x991.png 1536w" sizes="auto, (max-width: 1842px) 100vw, 1842px" /></figure>



<p>Vybereme název Zabbix serveru, časové pásmo a&nbsp;implicitní téma:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1838" height="1190" src="https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.25.52.png" alt="zabbix install - settings" class="wp-image-14312" srcset="https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.25.52.png 1838w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.25.52-300x194.png 300w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.25.52-1024x663.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.25.52-768x497.png 768w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.25.52-1536x994.png 1536w" sizes="auto, (max-width: 1838px) 100vw, 1838px" /></figure>



<p>Pak už zbývá jen zkontrolovat, že máme všechno nastavené správně a&nbsp;tyto volby potvrdit:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1818" height="1176" src="https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.26.02.png" alt="zabbix install - review" class="wp-image-14314" srcset="https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.26.02.png 1818w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.26.02-300x194.png 300w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.26.02-1024x662.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.26.02-768x497.png 768w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.26.02-1536x994.png 1536w" sizes="auto, (max-width: 1818px) 100vw, 1818px" /></figure>



<p>A nyní máme úspěšně napojený Zabbix frontend na&nbsp;PostgreSQL!</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1864" height="1178" src="https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.26.10.png" alt="zabbix install final step" class="wp-image-14316" srcset="https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.26.10.png 1864w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.26.10-300x190.png 300w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.26.10-1024x647.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.26.10-768x485.png 768w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.26.10-1536x971.png 1536w" sizes="auto, (max-width: 1864px) 100vw, 1864px" /></figure>



<p>V tuto chvíli můžeme zastavit MySQL server:</p>


<section id="block-code-block_2d8d0990213eeef64a24a50860a498e8" data-id="block-code-block_2d8d0990213eeef64a24a50860a498e8" class="gt-block block-code">
    <pre><code>systemctl stop mysqld</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A MySQL lze nyní i&nbsp;zcela odinstalovat. Data (ve standardní cestě <code>/var/lib/mysql</code>) nebudou smazána, ale doporučujeme je např.&nbsp;po&nbsp;14 dnech funkčního provozu s&nbsp;PostgreSQL smazat.</p>


<section id="block-code-block_5fe1e08a08ac79aa47fce21d027b405b" data-id="block-code-block_5fe1e08a08ac79aa47fce21d027b405b" class="gt-block block-code">
    <pre><code>yum remove mysql</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">TimescaleDB</h2>



<p>Potom, co jsme úspěšně zmigrovali z&nbsp;MySQL do&nbsp;PostgreSQL se nám zároveň nabízí možnost ještě více zvýšit výkonnost Zabbixu pomocí TimescaleDB.</p>



<p>Vzhledem k&nbsp;tomu, že už máme rozbalený soubor se zdrojovým kódem, který obsahuje i&nbsp;databázová instalační schámata, můžeme rovnou přistoupit instalaci.</p>



<p>Začneme tím, že přidáme oficiální repozitář:</p>


<section id="block-code-block_5a85d6c3a5356577c143cd4a5f53e83c" data-id="block-code-block_5a85d6c3a5356577c143cd4a5f53e83c" class="gt-block block-code">
    <pre><code>tee /etc/yum.repos.d/timescale_timescaledb.repo &lt;&lt;EOL
[timescale_timescaledb]
name=timescale_timescaledb
baseurl=https://packagecloud.io/timescale/timescaledb/el/$(rpm -E %{rhel})/\$basearch
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/timescale/timescaledb/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
EOL</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nainstalujme potřebné balíčky:</p>


<section id="block-code-block_d9a8985c05b40a7b1a85a12ef72ce65f" data-id="block-code-block_d9a8985c05b40a7b1a85a12ef72ce65f" class="gt-block block-code">
    <pre><code>yum install timescaledb-2-postgresql-18 timescaledb-2-loader-postgresql-18</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Spustíme utilitu <code>timescaledb-tune</code> a&nbsp;jako parametr jí předáme vyšší hodnotu maximálního množství připojení (<code>--max-conns</code>), které pro tyto testovací účely nastavíme na&nbsp;<code>125</code>.</p>



<p>Tato utilita slouží k&nbsp;přizpůsobení výchozího nastavení PostgreSQL směrem k&nbsp;výkonu a&nbsp;adekvátnímu nastavení parametrů PostgreSQL pro fungování s&nbsp;TimescaleDB.</p>



<p>Zároveň nám tato utilit pomocí instalačního průvodce pomůže vybrat aktuální a&nbsp;platný konfigurační soubor PostgreSQL a&nbsp;nastaví i&nbsp;automatické načítání knihoven TimescaleDB.</p>



<p>Prosím, odpovídejte &#8222;ano&#8220; (y) na&nbsp;všechny otázky. </p>


<section id="block-code-block_58f13a53501cd127a7448d7c3695ba35" data-id="block-code-block_58f13a53501cd127a7448d7c3695ba35" class="gt-block block-code">
    <pre><code>timescaledb-tune --pg-config /usr/pgsql-18/bin --max-conns=125</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="850" height="2244" src="https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.38.29.png" alt="timescaledb-tune" class="wp-image-14293" srcset="https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.38.29.png 850w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.38.29-114x300.png 114w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.38.29-388x1024.png 388w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.38.29-768x2028.png 768w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.38.29-582x1536.png 582w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.38.29-776x2048.png 776w" sizes="auto, (max-width: 850px) 100vw, 850px" /></figure>



<p>Následně vypneme Zabbix server a&nbsp;restartujeme systémovou službu PostgreSQL:</p>


<section id="block-code-block_dee6012a9533ee210d9e7336ac23aa6f" data-id="block-code-block_dee6012a9533ee210d9e7336ac23aa6f" class="gt-block block-code">
    <pre><code>systemctl stop zabbix-server
systemctl restart postgresql-18</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Aktivujeme TimescaleDB pro databázi Zabbixu:</p>


<section id="block-code-block_e4a29c04f2ffd32961cf4a27633707e2" data-id="block-code-block_e4a29c04f2ffd32961cf4a27633707e2" class="gt-block block-code">
    <pre><code>echo &quot;CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;&quot; | sudo -u postgres psql --dbname=zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A načíst data z&nbsp;rozbaleného souboru databázového schématu:</p>


<section id="block-code-block_483eeb773131a2e0cf06e6159c99ca5a" data-id="block-code-block_483eeb773131a2e0cf06e6159c99ca5a" class="gt-block block-code">
    <pre><code>sudo -u postgres psql --host=127.0.0.1 --dbname=zabbix --username=zabbix -f /tmp/zabbix-db-migration/zabbix-7.0.0/database/postgresql/timescaledb/schema.sql</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2844" height="1510" src="https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.48.17.png" alt="timescaledb installation" class="wp-image-14291" srcset="https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.48.17.png 2844w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.48.17-300x159.png 300w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.48.17-1024x544.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.48.17-768x408.png 768w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.48.17-1536x816.png 1536w, https://www.initmax.cz/wp-content/uploads/2024/05/screenshot-2024-05-10-at-18.48.17-2048x1087.png 2048w" sizes="auto, (max-width: 2844px) 100vw, 2844px" /></figure>



<p>Nyní můžeme opětovně nastartovat službu Zabbix serveru.</p>


<section id="block-code-block_a33029cde17d7d9938f825c30f68ce82" data-id="block-code-block_a33029cde17d7d9938f825c30f68ce82" class="gt-block block-code">
    <pre><code>systemctl start zabbix-server</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V případě, že uvidíte v&nbsp;log souboru zprávu o&nbsp;tom, že je verze TimescaleDB příliš nová, pak to není žádný velký problém. Zabbix nedokáže dostatečně rychle reagovat na&nbsp;nejnovější verze TimescaleDB tak, aby ji ve svém kódu nastavil jako podporovanou, ovšem kompatibilita je Zabbixem zaručena a&nbsp;námi ověřena.</p>



<p>Pokud se chceme vyhnout zprávám o&nbsp;nekompatibilitě v&nbsp;log souboru Zabbixu, pak stačí otevřít konfigurační soubor Zabbix serveru v&nbsp;cestě <code>/etc/zabbix/zabbix_server.conf</code> a&nbsp;zde upravte následující konfigurační parametr:</p>


<section id="block-code-block_d140bb8dba300a7a02093b36bc78880d" data-id="block-code-block_d140bb8dba300a7a02093b36bc78880d" class="gt-block block-code">
    <pre><code>AllowUnsupportedDBVersions=1</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Soubor s&nbsp;tímto nastavením uložte a&nbsp;znovu nastartujte systémovou službu Zabbix serveru.</p>


<section id="block-code-block_a33029cde17d7d9938f825c30f68ce82" data-id="block-code-block_a33029cde17d7d9938f825c30f68ce82" class="gt-block block-code">
    <pre><code>systemctl start zabbix-server</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A to je vše! Nyní jste se naučili, jak zmigrovat Zabbix databázi z&nbsp;MySQL do&nbsp;PostgreSQL, dále se vám podařilo zprovoznit výkonnou TimescaleDB a&nbsp;máte základní performance tuning. Následující kroky by měly smeřovat k&nbsp;zálohování a&nbsp;monitoringu DB.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>


<section id="block-newsletter-block_ddbd7e83dcd76be746e035c11ae238a5" data-id="block-newsletter-block_ddbd7e83dcd76be746e035c11ae238a5" class="gt-block block-newsletter">
    <section id="newsletter" class="newsletter">
	<div class="gradient basic">
		<div class="newsletter__inner width width--general">
			<div class="col left">
									<h2 class="newsletter__title">Buďte v&nbsp;obraze s&nbsp;naším newsletterem</h2>
													<div class="newsletter__content"><p>Díky initMAX newsletteru Vám neunikne žádná z&nbsp;pozvánek na&nbsp;akce a&nbsp;webináře, žádný z&nbsp;tipů, jak dostat ze svého IT MAXimum, ani ověřené informace o&nbsp;novinkách ze světa Zabbix a&nbsp;dalších technologií.</p>
</div>
							</div>
			<div class="col right form-wrapper">
				<div class="newsletter-form">
	<form method="post" action="/wiki/kapitola/zabbix/feed/" enctype="multipart/form-data">
		<input type="hidden" name="url" value="https://www.initmax.cz/wiki/kapitola/zabbix/feed/">

		<div class="inputs">

			<label for="newsletter-form_contact_email" class="top">Vaše e-mailová adresa:</label>
			<div class="df">

				<div class="input">
					<input type="text" id="newsletter-form_contact_email" name="newsletter_email" placeholder="@" data-format="email" data-required="1">
									</div><!-- /.input -->

				<a href="#" class="btn btn--white sendBtn">Odeslat</a>

			</div>

			<div class="bottom nm">
				<label for="newsletter-form_gdpr" class="checkbox gdpr">
					<input type="checkbox" id="newsletter-form_gdpr" name="newsletter_gdpr">
					<span>Souhlasím se&nbsp;<a href="https://www.initmax.cz/ochrana-osobnich-udaju/" target="_blank">zpracováním osobních údajů</a>.</span>
				</label>
			</div>

		</div><!-- /.inputs -->
		<div class="sent hidden">
			<div class="iconOk"><h3>Děkujeme, že jste se přihlásili k&nbsp;odběru našeho newsletteru.</h3>
</div>
			<button class="sent__close" title="Zavřít" onclick="closeFormMessage(this,event)"><svg data-name="Group 3602" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 3272" d="M0,0H24V24H0Z" fill="none"/><line data-name="Line 98" y2="14" transform="translate(7.05 7.05) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 99" x2="14" transform="translate(7.05 16.95) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</button>
		</div><!-- /.sent -->
	</form>
</div>			</div>
		</div>
	</div>
</section></section>



<section id="social-links-block_2294b5c81a0b70e3af1dfb4b7a42e22e" data-id="social-links-block_2294b5c81a0b70e3af1dfb4b7a42e22e" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>

<p>The post <a href="https://www.initmax.cz/wiki/zabbix-migrace-z-mysql-do-postgresql/">Zabbix &#8211; Migrace z&nbsp;MySQL do&nbsp;PostgreSQL</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Použití Google map v&#160;Zabbix Geomap widgetu</title>
		<link>https://www.initmax.cz/wiki/google-mapy-v-zabbix-geomap-widgetu/</link>
		
		<dc:creator><![CDATA[Tomáš Heřmánek]]></dc:creator>
		<pubDate>Fri, 08 Mar 2024 10:39:57 +0000</pubDate>
				<guid isPermaLink="false">https://www.initmax.cz/?post_type=wiki&#038;p=13846</guid>

					<description><![CDATA[<p>V tomto návodu si ukážeme, jak nastavit Google mapy pro použití v Zabbixu a jeho Geomap widgetu, a zároveň si spolu projdeme všechna ...</p>
<p>The post <a href="https://www.initmax.cz/wiki/google-mapy-v-zabbix-geomap-widgetu/">Použití Google map v&nbsp;Zabbix Geomap widgetu</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>V tomto návodu si ukážeme, jak nastavit Google mapy pro použití v&nbsp;Zabbixu a&nbsp;jeho Geomap widgetu, a&nbsp;zároveň si spolu projdeme všechna jednotlivá nastavení.</p>


<section id="social-links-block_e12874d6053280314f39965cd21c0840" data-id="social-links-block_e12874d6053280314f39965cd21c0840" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>




<h2 class="wp-block-heading">Globální nastavení pro geografické mapy</h2>



<p>Nejprve si v&nbsp;nastavte použití Google map v&nbsp;globálním nastavení. </p>



<p><strong>Pozor</strong>: Toto nastavení je pro celou instanci Zabbixu jednotné, a&nbsp;tudíž ovlivní všechny použité mapové podklady!</p>



<p>Nastavení proveďte pod uživatelem s&nbsp;právy &#8222;Superdamin&#8220;, a&nbsp;to v&nbsp;sekci <code>Administration -&gt; General -&gt; Geographical maps</code>.</p>



<p>V časti <code>Tile provider</code> vyberete položku <code>Other</code>.</p>



<p>Do sekce <code>Tile URL</code> vložte následující adresu, a&nbsp;to přesně takto &#8211; i&nbsp;se zástupnými znaky proměnných v&nbsp;parametrech tohoto URL: </p>


<section id="block-code-block_49162ab7013f2db9ab61e8a886699f43" data-id="block-code-block_49162ab7013f2db9ab61e8a886699f43" class="gt-block block-code">
    <pre><code>https://mt0.google.com/vt/lyrs=m&amp;hl=cs&amp;x={x}&amp;y={y}&amp;z={z}</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Parametry <code>x</code> a&nbsp;<code>y</code> slouží k&nbsp;definici souřadnic místa zobrazovaného na&nbsp;mapovém podkladu a&nbsp;parametr <code>z</code> je pak výchozí hodnota přiblížení (zoom level).</p>



<p>Konkrétní hodnoty těchto parametrů se pak budou definovat přímo v&nbsp;dashboardu, na&nbsp;úrovni Geomap widgetu.</p>



<p>Jazyk mapového podkladu lze změnit parametrem <code>hl</code>, tedy <code>hl=en</code> pro angličtinu <code>hl=cs</code> pro čestinu a&nbsp;<code>hl=sk</code> pro slovenštinu.</p>



<p>Můžete si také vybrat jaké podkladové mapy se mají v&nbsp;náhledu zobrazovat. </p>



<p>K tomu slouží parametr <code>lyrs</code> (layers), který má následující možnosti:</p>



<ul class="wp-block-list">
<li>h (pouze cesty)</li>



<li>m (standardní mapa)</li>



<li>p (standardní mapa + terén)</li>



<li>r (upravená standardní mapa)</li>



<li>s (satelitní)</li>



<li>t (pouze terén)</li>



<li>y (hybridní)</li>
</ul>



<p>Do sekce <code>Attribution text</code> vložte copyright společnosti Google:</p>


<section id="block-code-block_48f3f425468a6a92f594ed4535ecf17e" data-id="block-code-block_48f3f425468a6a92f594ed4535ecf17e" class="gt-block block-code">
    <pre><code>Map data ©2025 Google</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V sekci <code>Max zoom level</code> zadejte hodnotu maximálního přiblížení geomapy. V&nbsp;oficiální dokumentaci Google najdeme informaci o&nbsp;rozsahu této hodnoty 0 &#8211; 18, a&nbsp;proto zvolte doporučený maximální limit, tedy hodnotu 18. </p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2024" height="952" src="https://www.initmax.cz/wp-content/uploads/2024/03/administration-geomap.png" alt="" class="wp-image-13951" srcset="https://www.initmax.cz/wp-content/uploads/2024/03/administration-geomap.png 2024w, https://www.initmax.cz/wp-content/uploads/2024/03/administration-geomap-300x141.png 300w, https://www.initmax.cz/wp-content/uploads/2024/03/administration-geomap-1024x482.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/03/administration-geomap-768x361.png 768w, https://www.initmax.cz/wp-content/uploads/2024/03/administration-geomap-1536x722.png 1536w" sizes="auto, (max-width: 2024px) 100vw, 2024px" /></figure>



<p>Tím jste dokončili globální nastavení geografických map pro Google mapy. Nastavení uložte kliknutím na&nbsp;tlačítko <code>Update</code> a&nbsp;můžete se přesunout na&nbsp;tvorbu widgetu.</p>



<h2 class="wp-block-heading">Vytvoření dashboardu s&nbsp;Geomap widgetem</h2>



<p>Geomap widget svá data o&nbsp;poloze může získat buďto z&nbsp;Inventory daného hosta (pole &#8222;Latitude&#8220; a&nbsp;&#8222;Longitude&#8220;), anebo můžete toto nastavení zafixovat ručně &#8211; přímo v&nbsp;nastavení widgetu samotného.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1484" height="312" src="https://www.initmax.cz/wp-content/uploads/2024/03/host-geomap.png" alt="" class="wp-image-13953" srcset="https://www.initmax.cz/wp-content/uploads/2024/03/host-geomap.png 1484w, https://www.initmax.cz/wp-content/uploads/2024/03/host-geomap-300x63.png 300w, https://www.initmax.cz/wp-content/uploads/2024/03/host-geomap-1024x215.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/03/host-geomap-768x161.png 768w" sizes="auto, (max-width: 1484px) 100vw, 1484px" /></figure>



<p>V nastavení widgetu, v&nbsp;sekci <code>Initial view</code> tedy nastavíte souřadnice ve formátu desetinných stupňů, a&nbsp;v&nbsp;pořadí zeměpisná šířka a&nbsp;délka (Latitude, Longitude), oddělených čárkou.</p>



<p>Třetí parametr v&nbsp;této sekci je volitelný a&nbsp;je jím implicitní úroveň přiblížení. V&nbsp;našem případě ji nastavíme na&nbsp;maximální dostupný, tedy hodnotu 18.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1340" height="796" src="https://www.initmax.cz/wp-content/uploads/2024/03/widget-geomap.png" alt="" class="wp-image-13957" srcset="https://www.initmax.cz/wp-content/uploads/2024/03/widget-geomap.png 1340w, https://www.initmax.cz/wp-content/uploads/2024/03/widget-geomap-300x178.png 300w, https://www.initmax.cz/wp-content/uploads/2024/03/widget-geomap-1024x608.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/03/widget-geomap-768x456.png 768w" sizes="auto, (max-width: 1340px) 100vw, 1340px" /></figure>



<p>Zde pak můžete vidět finální dashboard s&nbsp;geomap widgetem.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2008" height="892" src="https://www.initmax.cz/wp-content/uploads/2024/03/geomap-dashboard.png" alt="" class="wp-image-13959" srcset="https://www.initmax.cz/wp-content/uploads/2024/03/geomap-dashboard.png 2008w, https://www.initmax.cz/wp-content/uploads/2024/03/geomap-dashboard-300x133.png 300w, https://www.initmax.cz/wp-content/uploads/2024/03/geomap-dashboard-1024x455.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/03/geomap-dashboard-768x341.png 768w, https://www.initmax.cz/wp-content/uploads/2024/03/geomap-dashboard-1536x682.png 1536w" sizes="auto, (max-width: 2008px) 100vw, 2008px" /></figure>



<p></p>



<p></p>


<section id="block-newsletter-block_39d622984cc6547da8ce203a7e4635f3" data-id="block-newsletter-block_39d622984cc6547da8ce203a7e4635f3" class="gt-block block-newsletter">
    <section id="newsletter" class="newsletter">
	<div class="gradient basic">
		<div class="newsletter__inner width width--general">
			<div class="col left">
									<h2 class="newsletter__title">Buďte v&nbsp;obraze s&nbsp;naším newsletterem</h2>
													<div class="newsletter__content"><p>Díky initMAX newsletteru Vám neunikne žádná z&nbsp;pozvánek na&nbsp;akce a&nbsp;webináře, žádný z&nbsp;tipů, jak dostat ze svého IT MAXimum, ani ověřené informace o&nbsp;novinkách ze světa Zabbix a&nbsp;dalších technologií.</p>
</div>
							</div>
			<div class="col right form-wrapper">
				<div class="newsletter-form">
	<form method="post" action="/wiki/kapitola/zabbix/feed/" enctype="multipart/form-data">
		<input type="hidden" name="url" value="https://www.initmax.cz/wiki/kapitola/zabbix/feed/">

		<div class="inputs">

			<label for="newsletter-form_contact_email" class="top">Vaše e-mailová adresa:</label>
			<div class="df">

				<div class="input">
					<input type="text" id="newsletter-form_contact_email" name="newsletter_email" placeholder="@" data-format="email" data-required="1">
									</div><!-- /.input -->

				<a href="#" class="btn btn--white sendBtn">Odeslat</a>

			</div>

			<div class="bottom nm">
				<label for="newsletter-form_gdpr" class="checkbox gdpr">
					<input type="checkbox" id="newsletter-form_gdpr" name="newsletter_gdpr">
					<span>Souhlasím se&nbsp;<a href="https://www.initmax.cz/ochrana-osobnich-udaju/" target="_blank">zpracováním osobních údajů</a>.</span>
				</label>
			</div>

		</div><!-- /.inputs -->
		<div class="sent hidden">
			<div class="iconOk"><h3>Děkujeme, že jste se přihlásili k&nbsp;odběru našeho newsletteru.</h3>
</div>
			<button class="sent__close" title="Zavřít" onclick="closeFormMessage(this,event)"><svg data-name="Group 3602" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 3272" d="M0,0H24V24H0Z" fill="none"/><line data-name="Line 98" y2="14" transform="translate(7.05 7.05) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 99" x2="14" transform="translate(7.05 16.95) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</button>
		</div><!-- /.sent -->
	</form>
</div>			</div>
		</div>
	</div>
</section></section>



<section id="social-links-block_e12874d6053280314f39965cd21c0840" data-id="social-links-block_e12874d6053280314f39965cd21c0840" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>

<p>The post <a href="https://www.initmax.cz/wiki/google-mapy-v-zabbix-geomap-widgetu/">Použití Google map v&nbsp;Zabbix Geomap widgetu</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Dvoufaktorová autentifikace (2FA) v&#160;Zabbixu 7.0</title>
		<link>https://www.initmax.cz/wiki/dvoufaktorova-autentifikace-2fa-v-zabbixu-7-0/</link>
		
		<dc:creator><![CDATA[Tomáš Heřmánek]]></dc:creator>
		<pubDate>Fri, 09 Feb 2024 14:36:01 +0000</pubDate>
				<guid isPermaLink="false">https://www.initmax.cz/?post_type=wiki&#038;p=13783</guid>

					<description><![CDATA[<p>V tomto návodu si ukážeme, jak jednoduše nastavit vynucení dvoufaktorového ověřování nad uživatelskou skupinou v Zabbixu, a jak případně resetovat token pro ...</p>
<p>The post <a href="https://www.initmax.cz/wiki/dvoufaktorova-autentifikace-2fa-v-zabbixu-7-0/">Dvoufaktorová autentifikace (2FA) v&nbsp;Zabbixu 7.0</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>V tomto návodu si ukážeme, jak jednoduše nastavit vynucení dvoufaktorového ověřování nad uživatelskou skupinou v&nbsp;Zabbixu, a&nbsp;jak případně resetovat token pro generování TOTP (<strong>Time-based One Time Password</strong> &#8211; Časově omezené jednorázové heslo).</p>




<section id="social-links-block_1b7bb4a852a4a8c13013022bc03a73c2" data-id="social-links-block_1b7bb4a852a4a8c13013022bc03a73c2" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>




<h2 class="wp-block-heading">Možnosti konfigurace</h2>



<p>Pro samotné použití dvoufaktorové autentifikace (2FA) není potřeba nic instalovat, jen mít váš Zabbix ve verzi minimálně 7.0.</p>



<p>Krok číslo jedna je povolení a&nbsp;nastavení vícefaktorového ověrování v&nbsp;rámci globálního nastavení. </p>



<p>Můžete zde použít více metod ověřování, k&nbsp;dispozici jsou následující:</p>



<ul class="wp-block-list">
<li><strong>TOTP</strong>&nbsp;znamená „Time-based One-Time Password“ a&nbsp;představuje jednorázové heslo založené na&nbsp;čase. Jedná se o&nbsp;mechanismus dvoufaktorové autentifikace, kde uživatel kromě běžného hesla generuje jednorázový kód založený na&nbsp;aktuálním čase. Tato metoda zvyšuje bezpečnost, protože heslo platí jen po&nbsp;omezenou dobu a&nbsp;nemůže být použito opakovaně.&nbsp;</li>



<li>Typicky se TOTP generuje pomocí mobilních aplikací, jako je například Google Authenticator nebo Authy. Uživatel zobrazí aktuální kód z&nbsp;aplikace a&nbsp;zadá ho společně s&nbsp;běžným heslem při&nbsp;přihlašování. Každý kód je platný jen po&nbsp;omezenou dobu, obvykle po&nbsp;dobu 30 sekund až několika minut, což zvyšuje bezpečnost autentizace.</li>
</ul>



<ul class="wp-block-list">
<li><strong>DUO Universal Prompt</strong>&nbsp;je funkce od společnosti Duo Security, která slouží k&nbsp;vylepšení a&nbsp;zjednodušení procesu vícefaktorové autentizace (MFA). MFA je bezpečnostní metoda, která vyžaduje, aby při&nbsp;přístupu k&nbsp;chráněným systémům a&nbsp;službám uživatelé prokázali svoji identitu pomocí více než jednoho ověřovacího mechanismu. Typicky zahrnuje něco, co uživatel zná (například heslo) a&nbsp;něco, co má (například mobilní telefon), nebo něco, co je (například otisk prstu).</li>



<li>Universal Prompt je navržen tak, aby byl kompatibilní s&nbsp;širokým spektrem zařízení a&nbsp;platforem, poskytuje rozšířené možnosti pro správu a&nbsp;nastavení politik autentizace podle potřeb organizace. Jeho použití může výrazně zvýšit celkovou bezpečnost přístupu k&nbsp;citlivým datům a&nbsp;službám, zatímco zároveň snižuje komplikace a&nbsp;frustraci spojenou s&nbsp;tradičními metodami MFA.</li>
</ul>



<h2 class="wp-block-heading">Konfigurace 2FA</h2>



<p>Prvním krokem konfigurace je obecné nastavení&nbsp;vícefaktorového ověřování. Toto nastavení najdeme ve webovém rozhraní Zabbixu v&nbsp;menu&nbsp;<code>Users -&gt; Authentication -&gt; MFA settings.</code></p>



<p>Zde povolíme vícefaktorové ověřování a&nbsp;klikneme na&nbsp;tlačítko <code>Add</code>, kde přidáme naši první ověřovací metodu. Jak vidíte můžete v&nbsp;Zabbixu pro různé uživatelské skupiny použít různá nastavení. </p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="1946" height="1212" src="https://www.initmax.cz/wp-content/uploads/2024/02/enable-2fa.png" alt="" class="wp-image-13785" style="aspect-ratio:1.6050156739811912;object-fit:cover" srcset="https://www.initmax.cz/wp-content/uploads/2024/02/enable-2fa.png 1946w, https://www.initmax.cz/wp-content/uploads/2024/02/enable-2fa-300x187.png 300w, https://www.initmax.cz/wp-content/uploads/2024/02/enable-2fa-1024x638.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/02/enable-2fa-768x478.png 768w, https://www.initmax.cz/wp-content/uploads/2024/02/enable-2fa-1536x957.png 1536w" sizes="auto, (max-width: 1946px) 100vw, 1946px" /></figure>
</div>


<p>Zde si zvolte libovolný název, který později bude fungovat jako identifikátor v&nbsp;mobilní aplikaci, která bude generovat jednorazové kódy.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img loading="lazy" decoding="async" width="940" height="442" src="https://www.initmax.cz/wp-content/uploads/2024/02/2fa-name.png" alt="" class="wp-image-13787" style="aspect-ratio:1.6050156739811912;object-fit:contain;width:auto;height:300px" srcset="https://www.initmax.cz/wp-content/uploads/2024/02/2fa-name.png 940w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa-name-300x141.png 300w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa-name-768x361.png 768w" sizes="auto, (max-width: 940px) 100vw, 940px" /></figure>
</div>


<p>Vyberte hash funkci, která bude použita pro generování jednorázových kódů. Pokud nemusíte z&nbsp;důvodu kompatiblity použít (dnes již zastaralou) SHA-1, pak se této možnosti raději vyhněte. V&nbsp;našem příkladu jsme použili nejsilnější dostupnou hashovací funkci SHA-512.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img loading="lazy" decoding="async" width="940" height="443" src="https://www.initmax.cz/wp-content/uploads/2024/02/2fa-hast_function.jpg" alt="" class="wp-image-13842" style="aspect-ratio:1.6050156739811912;object-fit:contain;width:auto;height:300px" srcset="https://www.initmax.cz/wp-content/uploads/2024/02/2fa-hast_function.jpg 940w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa-hast_function-300x141.jpg 300w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa-hast_function-768x362.jpg 768w" sizes="auto, (max-width: 940px) 100vw, 940px" /></figure>
</div>


<p>V nabídce <code>Code Length</code> si zvolte, jak dlouhý bude generovaný jednorázový kód. Máte zde na&nbsp;výběr buď 6 místný, anebo 8 místný kód &#8211; vyberte 8 místný a&nbsp;uložte zvolené nastavení pomocí tlačítka <code>Add</code>. </p>


<div class="wp-block-image is-style-default">
<figure class="aligncenter size-full is-resized"><img loading="lazy" decoding="async" width="940" height="466" src="https://www.initmax.cz/wp-content/uploads/2024/02/2fa-code_lenght.jpg" alt="" class="wp-image-13840" style="aspect-ratio:1.6050156739811912;object-fit:contain;width:auto;height:300px" srcset="https://www.initmax.cz/wp-content/uploads/2024/02/2fa-code_lenght.jpg 940w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa-code_lenght-300x149.jpg 300w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa-code_lenght-768x381.jpg 768w" sizes="auto, (max-width: 940px) 100vw, 940px" /></figure>
</div>


<p>Po uložení nastavení si oveřte, že je nastavení skutečně uloženo a&nbsp;je aktivní, a&nbsp;nezapomeňte zaktualizovat nastavení MFA pomocí tlačítka <code>Update</code>.</p>


<div class="wp-block-image is-style-default">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="1932" height="1206" src="https://www.initmax.cz/wp-content/uploads/2024/02/2fa-save_global_setting.png" alt="" class="wp-image-13793" style="aspect-ratio:1.6050156739811912;object-fit:contain" srcset="https://www.initmax.cz/wp-content/uploads/2024/02/2fa-save_global_setting.png 1932w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa-save_global_setting-300x187.png 300w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa-save_global_setting-1024x639.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa-save_global_setting-768x479.png 768w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa-save_global_setting-1536x959.png 1536w" sizes="auto, (max-width: 1932px) 100vw, 1932px" /></figure>
</div>


<h2 class="wp-block-heading">Aplikování nastavení na&nbsp;uživatelskou skupinu</h2>



<p>Pro nastavení dvoufaktorového ověřování na&nbsp;uživatelskou skupinu máte pochopitelně možnost použít skupinu již existující, my si ovšem v&nbsp;tomto případě vytvoříme novou, a&nbsp;to v&nbsp;sekci  <code>Users -&gt; User groups -&gt; Create user group</code>.</p>


<div class="wp-block-image is-style-default">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="2794" height="1222" src="https://www.initmax.cz/wp-content/uploads/2024/02/2fa-go_to_user_groups.png" alt="" class="wp-image-13795" srcset="https://www.initmax.cz/wp-content/uploads/2024/02/2fa-go_to_user_groups.png 2794w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa-go_to_user_groups-300x131.png 300w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa-go_to_user_groups-1024x448.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa-go_to_user_groups-768x336.png 768w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa-go_to_user_groups-1536x672.png 1536w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa-go_to_user_groups-2048x896.png 2048w" sizes="auto, (max-width: 2794px) 100vw, 2794px" /></figure>
</div>


<p>Skupinu nazvěte příznačně &#8222;MFA&#8220; a&nbsp;v&nbsp;sekci <code>Multi-factor authentication</code> zvolte své dříve vytvořené nastavení MFA, v&nbsp;tomto případě nazvané &#8222;Zabbix-2FA&#8220;.</p>


<div class="wp-block-image is-style-default">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="1862" height="1202" src="https://www.initmax.cz/wp-content/uploads/2024/02/2fa-group_mfa_setting.png" alt="" class="wp-image-13797" srcset="https://www.initmax.cz/wp-content/uploads/2024/02/2fa-group_mfa_setting.png 1862w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa-group_mfa_setting-300x194.png 300w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa-group_mfa_setting-1024x661.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa-group_mfa_setting-768x496.png 768w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa-group_mfa_setting-1536x992.png 1536w" sizes="auto, (max-width: 1862px) 100vw, 1862px" /></figure>
</div>


<h2 class="wp-block-heading">Přiřazení skupiny uživatelům</h2>



<p>Pro potřeby tohoto scénáře si pro vícefaktorové ověřování vytvoříme uživatele zcela nového. V&nbsp;praxi však toto nastavení budete nejspíše aplikovat na&nbsp;uživatele již existující, a&nbsp;to stejným způsobem. V&nbsp;sekci <code>Users -&gt; Users</code> klikněte na&nbsp;tlačítko <code>Create user</code>.</p>


<div class="wp-block-image is-style-default">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="2792" height="1212" src="https://www.initmax.cz/wp-content/uploads/2024/02/2fa-creating_test_user.png" alt="" class="wp-image-13799" srcset="https://www.initmax.cz/wp-content/uploads/2024/02/2fa-creating_test_user.png 2792w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa-creating_test_user-300x130.png 300w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa-creating_test_user-1024x445.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa-creating_test_user-768x333.png 768w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa-creating_test_user-1536x667.png 1536w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa-creating_test_user-2048x889.png 2048w" sizes="auto, (max-width: 2792px) 100vw, 2792px" /></figure>
</div>


<p>Uživateli přiřaďte výše-zmíněnou uživatelskou skupinu.</p>


<div class="wp-block-image is-style-default">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="1848" height="1378" src="https://www.initmax.cz/wp-content/uploads/2024/02/2fa-user_setting.png" alt="" class="wp-image-13801" srcset="https://www.initmax.cz/wp-content/uploads/2024/02/2fa-user_setting.png 1848w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa-user_setting-300x224.png 300w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa-user_setting-1024x764.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa-user_setting-768x573.png 768w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa-user_setting-1536x1145.png 1536w" sizes="auto, (max-width: 1848px) 100vw, 1848px" /></figure>
</div>


<p>Pro testovací účely nastavte tomuto uživateli oprávnění na&nbsp;roli &#8222;Super admin role&#8220;, a&nbsp;uživatele vytvořte pomocí tlačítka <code>Add</code>.</p>


<div class="wp-block-image is-style-default">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="1832" height="1378" src="https://www.initmax.cz/wp-content/uploads/2024/02/2fa-super_admin_role.png" alt="" class="wp-image-13803" style="aspect-ratio:1.6050156739811912;object-fit:contain" srcset="https://www.initmax.cz/wp-content/uploads/2024/02/2fa-super_admin_role.png 1832w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa-super_admin_role-300x226.png 300w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa-super_admin_role-1024x770.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa-super_admin_role-768x578.png 768w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa-super_admin_role-1536x1155.png 1536w" sizes="auto, (max-width: 1832px) 100vw, 1832px" /></figure>
</div>


<p>Zkontrolujte, že se uživatel vytvořil správně a&nbsp;je povolený.</p>


<div class="wp-block-image is-style-default">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="2790" height="1204" src="https://www.initmax.cz/wp-content/uploads/2024/02/2fa_user_after_creation.png" alt="" class="wp-image-13805" srcset="https://www.initmax.cz/wp-content/uploads/2024/02/2fa_user_after_creation.png 2790w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa_user_after_creation-300x129.png 300w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa_user_after_creation-1024x442.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa_user_after_creation-768x331.png 768w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa_user_after_creation-1536x663.png 1536w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa_user_after_creation-2048x884.png 2048w" sizes="auto, (max-width: 2790px) 100vw, 2790px" /></figure>
</div>


<p>V tuto chvíli již máte konfiguraci hotovou a&nbsp;můžete přistoupit k&nbsp;otestování celého řešení.</p>



<h2 class="wp-block-heading">Testování konfigurace</h2>



<p>Zkuste se přihlásit do&nbsp;Zabbixu na&nbsp;námi nově vytvořeného uživatele, a&nbsp;to pomocí jeho standardních přihlašovacích údajů &#8211; tedy jména a&nbsp;hesla.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img loading="lazy" decoding="async" width="840" height="944" src="https://www.initmax.cz/wp-content/uploads/2024/02/2fa_first_login.png" alt="" class="wp-image-13807" style="aspect-ratio:0.8898305084745762;object-fit:contain;width:auto;height:500px" srcset="https://www.initmax.cz/wp-content/uploads/2024/02/2fa_first_login.png 840w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa_first_login-267x300.png 267w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa_first_login-768x863.png 768w" sizes="auto, (max-width: 840px) 100vw, 840px" /></figure>
</div>


<p>Po zadání jména a&nbsp;hesla na&nbsp;vás čeká nový krok &#8211; požadavek o&nbsp;naskenování QR kódu pomocí mobilní autentizační aplikace.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img loading="lazy" decoding="async" width="1078" height="1318" src="https://www.initmax.cz/wp-content/uploads/2024/02/2fa_qr_code-1.png" alt="" class="wp-image-13848" style="aspect-ratio:0.818359375;object-fit:contain;width:auto;height:500px" srcset="https://www.initmax.cz/wp-content/uploads/2024/02/2fa_qr_code-1.png 1078w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa_qr_code-1-245x300.png 245w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa_qr_code-1-838x1024.png 838w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa_qr_code-1-768x939.png 768w" sizes="auto, (max-width: 1078px) 100vw, 1078px" /></figure>
</div>


<h2 class="wp-block-heading">Instalace a&nbsp;konfigurace mobilni aplikace</h2>



<p>Pro potřeby zprovoznění MFA potřebujete mobilní autentizační aplikaci. Tou může být například Microsoft Authenticator, Google Authenticator, anebo jiná.</p>



<p>Odkazy pro stažení Google Authenticator najdete zde, a&nbsp;to jak pro Android, tak pro IOS:</p>



<p><a href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2" target="_blank" rel="noreferrer noopener nofollow">Android &#8211; Google Authenticator</a></p>



<p><a href="https://apps.apple.com/us/app/google-authenticator/id388497605" target="_blank" rel="noreferrer noopener nofollow">IOS &#8211; Google Authenticator</a></p>



<p>Po instalaci aplikace na&nbsp;váš mobilní telefon zvolte v&nbsp;aplikaci přidání nového zdroje pomocí tlačítka plus v&nbsp;pravém dolním rohu.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img loading="lazy" decoding="async" width="1179" height="2556" src="https://www.initmax.cz/wp-content/uploads/2024/02/google_authenticator_01-1.png" alt="" class="wp-image-13825" style="width:auto;height:500px" srcset="https://www.initmax.cz/wp-content/uploads/2024/02/google_authenticator_01-1.png 1179w, https://www.initmax.cz/wp-content/uploads/2024/02/google_authenticator_01-1-138x300.png 138w, https://www.initmax.cz/wp-content/uploads/2024/02/google_authenticator_01-1-472x1024.png 472w, https://www.initmax.cz/wp-content/uploads/2024/02/google_authenticator_01-1-768x1665.png 768w, https://www.initmax.cz/wp-content/uploads/2024/02/google_authenticator_01-1-709x1536.png 709w, https://www.initmax.cz/wp-content/uploads/2024/02/google_authenticator_01-1-945x2048.png 945w" sizes="auto, (max-width: 1179px) 100vw, 1179px" /></figure>
</div>


<p>Ve vyskakovací nabídce zvolte položku &#8222;Scan a&nbsp;QR code&#8220;, tím se otevře aplikace fotoaparátu, pomocí které vyfoťte QR kód zobrazený při&nbsp;přihlášení do&nbsp;Zabbixu.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img loading="lazy" decoding="async" width="1179" height="2556" src="https://www.initmax.cz/wp-content/uploads/2024/02/google_authenticator_02-1.png" alt="" class="wp-image-13821" style="width:auto;height:500px" srcset="https://www.initmax.cz/wp-content/uploads/2024/02/google_authenticator_02-1.png 1179w, https://www.initmax.cz/wp-content/uploads/2024/02/google_authenticator_02-1-138x300.png 138w, https://www.initmax.cz/wp-content/uploads/2024/02/google_authenticator_02-1-472x1024.png 472w, https://www.initmax.cz/wp-content/uploads/2024/02/google_authenticator_02-1-768x1665.png 768w, https://www.initmax.cz/wp-content/uploads/2024/02/google_authenticator_02-1-709x1536.png 709w, https://www.initmax.cz/wp-content/uploads/2024/02/google_authenticator_02-1-945x2048.png 945w" sizes="auto, (max-width: 1179px) 100vw, 1179px" /></figure>
</div>


<p>Po načtení QR kódu můžete vidět, že se nám zobrazují námi zadané údaje, jako je aplikace a&nbsp;název MFA služby, a&nbsp;stejně i&nbsp;délka vygenerováného kódu má námi nastavených 8 míst.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img loading="lazy" decoding="async" width="1179" height="2556" src="https://www.initmax.cz/wp-content/uploads/2024/02/google_authenticator_03-1.png" alt="" class="wp-image-13823" style="width:auto;height:500px" srcset="https://www.initmax.cz/wp-content/uploads/2024/02/google_authenticator_03-1.png 1179w, https://www.initmax.cz/wp-content/uploads/2024/02/google_authenticator_03-1-138x300.png 138w, https://www.initmax.cz/wp-content/uploads/2024/02/google_authenticator_03-1-472x1024.png 472w, https://www.initmax.cz/wp-content/uploads/2024/02/google_authenticator_03-1-768x1665.png 768w, https://www.initmax.cz/wp-content/uploads/2024/02/google_authenticator_03-1-709x1536.png 709w, https://www.initmax.cz/wp-content/uploads/2024/02/google_authenticator_03-1-945x2048.png 945w" sizes="auto, (max-width: 1179px) 100vw, 1179px" /></figure>
</div>


<p>Vygenerovaný jednorázový kód pak vložte do&nbsp;ověřovacího formuláře v&nbsp;Zabbixu a&nbsp;přihlašte se.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img loading="lazy" decoding="async" width="1078" height="1318" src="https://www.initmax.cz/wp-content/uploads/2024/02/2fa_qr_code.png" alt="" class="wp-image-13811" style="width:auto;height:500px" srcset="https://www.initmax.cz/wp-content/uploads/2024/02/2fa_qr_code.png 1078w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa_qr_code-245x300.png 245w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa_qr_code-838x1024.png 838w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa_qr_code-768x939.png 768w" sizes="auto, (max-width: 1078px) 100vw, 1078px" /></figure>
</div>


<p>Tímto jste si nastavili vaši mobilní aplikaci na&nbsp;vícefaktorové ověřování pro Zabbix.</p>



<p>Při každém dalším přihlášení tohoto uživatele pak již nemusíte QR kód znovu skenovat a&nbsp;Zabbix vás pouze vyzve k&nbsp;zadání jednorázového kódu, který uživateli vygeneruje jeho nastavená mobilní aplikace.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img loading="lazy" decoding="async" width="1242" height="886" src="https://www.initmax.cz/wp-content/uploads/2024/02/2fa_totp_code.png" alt="" class="wp-image-13813" style="aspect-ratio:1.4027397260273973;object-fit:contain;width:auto;height:500px" srcset="https://www.initmax.cz/wp-content/uploads/2024/02/2fa_totp_code.png 1242w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa_totp_code-300x214.png 300w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa_totp_code-1024x730.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa_totp_code-768x548.png 768w" sizes="auto, (max-width: 1242px) 100vw, 1242px" /></figure>
</div>


<h2 class="wp-block-heading">Resetování tokenu TOTP</h2>



<p>Kazdý uživatel s&nbsp;aktivovaným dvoufaktorovým ověřováním má možnost požádat Zabbix Super administrátora o&nbsp;reset jeho TOTP tokenu. </p>



<p>Toto lze udělat u&nbsp;vybraného uživatelského účtu v&nbsp;sekci <code>Users -&gt; Users</code> pomocí tlačítka <code>Reset TOTP secret</code>.</p>



<p>Tato možnost je extrémně užitečná například při&nbsp;ztrátě mobilního telefonu, který je s&nbsp;uživatelským účtem svázán, a&nbsp;který má tento token také uložen.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2930" height="1116" src="https://www.initmax.cz/wp-content/uploads/2024/02/2fa_reset_totp.png" alt="" class="wp-image-13809" srcset="https://www.initmax.cz/wp-content/uploads/2024/02/2fa_reset_totp.png 2930w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa_reset_totp-300x114.png 300w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa_reset_totp-1024x390.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa_reset_totp-768x293.png 768w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa_reset_totp-1536x585.png 1536w, https://www.initmax.cz/wp-content/uploads/2024/02/2fa_reset_totp-2048x780.png 2048w" sizes="auto, (max-width: 2930px) 100vw, 2930px" /></figure>



<p>A to je vše! Nyní jste se naučili, jak zabezpečit váš Zabbix dvoufaktorovou atuentifikací a&nbsp;jak si v&nbsp;případě potřeby resetovat autorizační token pro aplikaci TOTP.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>


<section id="block-newsletter-block_3fe78b3887f70933798d096b1179206f" data-id="block-newsletter-block_3fe78b3887f70933798d096b1179206f" class="gt-block block-newsletter">
    <section id="newsletter" class="newsletter">
	<div class="gradient basic">
		<div class="newsletter__inner width width--general">
			<div class="col left">
									<h2 class="newsletter__title">Buďte v&nbsp;obraze s&nbsp;naším newsletterem</h2>
													<div class="newsletter__content"><p>Díky initMAX newsletteru Vám neunikne žádná z&nbsp;pozvánek na&nbsp;akce a&nbsp;webináře, žádný z&nbsp;tipů, jak dostat ze svého IT MAXimum, ani ověřené informace o&nbsp;novinkách ze světa Zabbix a&nbsp;dalších technologií.</p>
</div>
							</div>
			<div class="col right form-wrapper">
				<div class="newsletter-form">
	<form method="post" action="/wiki/kapitola/zabbix/feed/" enctype="multipart/form-data">
		<input type="hidden" name="url" value="https://www.initmax.cz/wiki/kapitola/zabbix/feed/">

		<div class="inputs">

			<label for="newsletter-form_contact_email" class="top">Vaše e-mailová adresa:</label>
			<div class="df">

				<div class="input">
					<input type="text" id="newsletter-form_contact_email" name="newsletter_email" placeholder="@" data-format="email" data-required="1">
									</div><!-- /.input -->

				<a href="#" class="btn btn--white sendBtn">Odeslat</a>

			</div>

			<div class="bottom nm">
				<label for="newsletter-form_gdpr" class="checkbox gdpr">
					<input type="checkbox" id="newsletter-form_gdpr" name="newsletter_gdpr">
					<span>Souhlasím se&nbsp;<a href="https://www.initmax.cz/ochrana-osobnich-udaju/" target="_blank">zpracováním osobních údajů</a>.</span>
				</label>
			</div>

		</div><!-- /.inputs -->
		<div class="sent hidden">
			<div class="iconOk"><h3>Děkujeme, že jste se přihlásili k&nbsp;odběru našeho newsletteru.</h3>
</div>
			<button class="sent__close" title="Zavřít" onclick="closeFormMessage(this,event)"><svg data-name="Group 3602" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 3272" d="M0,0H24V24H0Z" fill="none"/><line data-name="Line 98" y2="14" transform="translate(7.05 7.05) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 99" x2="14" transform="translate(7.05 16.95) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</button>
		</div><!-- /.sent -->
	</form>
</div>			</div>
		</div>
	</div>
</section></section>



<section id="social-links-block_1b7bb4a852a4a8c13013022bc03a73c2" data-id="social-links-block_1b7bb4a852a4a8c13013022bc03a73c2" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>

<p>The post <a href="https://www.initmax.cz/wiki/dvoufaktorova-autentifikace-2fa-v-zabbixu-7-0/">Dvoufaktorová autentifikace (2FA) v&nbsp;Zabbixu 7.0</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Jak nastavit SNMP Trap v&#160;Zabbixu</title>
		<link>https://www.initmax.cz/wiki/jak-nastavit-snmp-trap-v-zabbixu/</link>
		
		<dc:creator><![CDATA[Tomáš Heřmánek]]></dc:creator>
		<pubDate>Fri, 09 Feb 2024 12:38:56 +0000</pubDate>
				<guid isPermaLink="false">https://www.initmax.cz/?post_type=wiki&#038;p=13844</guid>

					<description><![CDATA[<p>V tomto návodu si společně ukážeme, jak nastavit SNMP trap v Zabbixu pro operační systému rodiny RHEL, a to pro SNMPv2 i pro ...</p>
<p>The post <a href="https://www.initmax.cz/wiki/jak-nastavit-snmp-trap-v-zabbixu/">Jak nastavit SNMP Trap v&nbsp;Zabbixu</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>V tomto návodu si společně ukážeme, jak nastavit SNMP trap v&nbsp;Zabbixu pro operační systému rodiny RHEL, a&nbsp;to pro SNMPv2 i&nbsp;pro SNMPv3!</p>



<p>Tento postup je naprosto totožný jak pro Zabbix Server, tak i&nbsp;pro Zabbix Proxy a&nbsp;v&nbsp;případě HA je potřeba ho zopakovat na&nbsp;všech nodech clusteru.</p>


<section id="social-links-block_01cca8fbedec94ab7546035e39cd6c56" data-id="social-links-block_01cca8fbedec94ab7546035e39cd6c56" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>




<h2 class="wp-block-heading">Instalace doplňkových komponent</h2>



<p>Pro funkčnost SNMP traps potřebujete na&nbsp;server nainstalovat následující komponenty:</p>



<ul class="wp-block-list">
<li>net-snmp (hlavní balík obsahující potřebné binárky a&nbsp;knihovny)</li>



<li>net-snmp-perl (perl modul pro SNMP)</li>



<li>net-snmp-utils (nástroje převážně pro debugging &#8211; volitelné)</li>
</ul>


<section id="block-code-block_5cf5ba7fa10fed1be4240aeb53287c50" data-id="block-code-block_5cf5ba7fa10fed1be4240aeb53287c50" class="gt-block block-code">
    <pre><code>dnf install net-snmp-utils net-snmp-perl net-snmp</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Konfigurace SNMP Trap na&nbsp;úrovni OS</h2>



<p>Nejprve si z&nbsp;oficiálního repozitáře Zabbixu stáhněte perl skript pro sběr SNMP traps a&nbsp;následné odesílání dat do&nbsp;Zabbixu.</p>


<section id="block-code-block_43016fe97b3acb9a9e472cf4eb7bdb64" data-id="block-code-block_43016fe97b3acb9a9e472cf4eb7bdb64" class="gt-block block-code">
    <pre><code>curl -o /usr/bin/zabbix_trap_receiver.pl https://git.zabbix.com/projects/ZBX/repos/zabbix/raw/misc/snmptrap/zabbix_trap_receiver.pl</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Tento skript pak nastavte jako spustitelný:</p>


<section id="block-code-block_e228f0f9739109ec1d5cca184b50be7f" data-id="block-code-block_e228f0f9739109ec1d5cca184b50be7f" class="gt-block block-code">
    <pre><code>chmod +x /usr/bin/zabbix_trap_receiver.pl</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V dalším kroku je potřeba tento skript nastavit &#8211; otevřete ho:</p>


<section id="block-code-block_f054750f50433579a7f106d72863e867" data-id="block-code-block_f054750f50433579a7f106d72863e867" class="gt-block block-code">
    <pre><code>nano /usr/bin/zabbix_trap_receiver.pl</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Zde nastavte proměnnou <code>$SNMPTrapperFile</code>, která určuje, kam se bude ukládat SNMP trap soubor.</p>



<p>Nastavte cestu tak, aby se zaručilo, že se daný soubor nesmaže ani např.&nbsp;při&nbsp;restartu serveru.</p>



<p>V našem případě to bude soubor <code>/var/log/snmptrap/snmptrap.log</code>.</p>


<section id="block-code-block_a4718c7ebb46b60c34050e7840f7c3b9" data-id="block-code-block_a4718c7ebb46b60c34050e7840f7c3b9" class="gt-block block-code">
    <pre><code>### Option: SNMPTrapperFile
#       Temporary file used for passing data to the server (or proxy). Must be the same
#       as in the server (or proxy) configuration file.
#
# Mandatory: yes
# Default: /tmp/zabbix_traps.tmp
$SNMPTrapperFile = &#039;/var/log/snmptrap/snmptrap.log&#039;;
</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Následně tedy tuto složku vytvořte:</p>


<section id="block-code-block_efd29872244dce7e51489f581c2a1ebd" data-id="block-code-block_efd29872244dce7e51489f581c2a1ebd" class="gt-block block-code">
    <pre><code>mkdir /var/log/snmptrap</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Nastavení SNMP</h2>



<p>Když máte nastaven skript pro přijímání SNMP traps a&nbsp;odesílání dat do&nbsp;Zabbixu, pak musíte nakonfigurovat i&nbsp;samotné SNMP.</p>



<p>Otevřete si konfigurační soubor v&nbsp;cestě <code>/etc/snmp/snmptrapd.conf</code>:</p>


<section id="block-code-block_e41d90daf82fba66b54c006e86e9d2e1" data-id="block-code-block_e41d90daf82fba66b54c006e86e9d2e1" class="gt-block block-code">
    <pre><code>nano /etc/snmp/snmptrapd.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Níže vidíte příklad nastavení pro SNMPv1, SNMPv2 i&nbsp;SNMPv3 včetně výše zmíněného skriptu (SNMP komunit můžete vydefinovat více).</p>



<p><strong>Pozor:</strong> Řádek obsahující volání perl skriptu pro SNMP traps musí být v&nbsp;konfiguračním souboru jako úplně poslední!</p>



<p><strong>Pozor:</strong> Minimální délka hesla pro SNMPv3 musí být alespoň 8 znaků, v&nbsp;našem příkladu je heslo: %Heslo123%.</p>


<section id="block-code-block_96bc202109209729c6ec8ae5553097fb" data-id="block-code-block_96bc202109209729c6ec8ae5553097fb" class="gt-block block-code">
    <pre><code>#SNMPv3
createUser -e 0x800000020109840301 monitoring SHA512 zabbix_trap AES256 %Heslo123%
authUser execute monitoring

#SNMPv1,2
authCommunity execute initmax

#Zabbix SNMP trap receiver
perl do &quot;/usr/bin/zabbix_trap_receiver.pl&quot;;
</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Nastavení rotování logu pro snmptrap.log</h2>



<p>Vytvořte konfigurační soubor pro logrotate:</p>


<section id="block-code-block_cc72343d9cc3da4133e6726f3322249c" data-id="block-code-block_cc72343d9cc3da4133e6726f3322249c" class="gt-block block-code">
    <pre><code>nano /etc/logrotate.d/snmptrap</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Zde nastavte následující parametry:</p>


<section id="block-code-block_aedd46be2371ac07efc04c3d10dfa5d1" data-id="block-code-block_aedd46be2371ac07efc04c3d10dfa5d1" class="gt-block block-code">
    <pre><code>/var/log/snmptrap/snmptrap.log {
    weekly
    rotate 12
    compress
    delaycompress
    missingok
    notifempty
}</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Povolení SNMP portu ve firewallu (volitelné)</h2>



<p>Pomocí následujících příkazů přidejte port 162/UDP jako výjimku do&nbsp;firewallu:</p>


<section id="block-code-block_20dd01f2a9315e0b913c81b2470bb051" data-id="block-code-block_20dd01f2a9315e0b913c81b2470bb051" class="gt-block block-code">
    <pre><code>firewall-cmd --permanent --add-service=snmptrap
firewall-cmd --reload</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Aplikování konfigurace SNMP Trap</h2>



<p>Následujícími příkazy restartujte službu <code>snmptrapd</code> a&nbsp;povolte její spouštění po&nbsp;startu systému.</p>


<section id="block-code-block_915d60bac57b93980f404df54f90257f" data-id="block-code-block_915d60bac57b93980f404df54f90257f" class="gt-block block-code">
    <pre><code>systemctl restart snmptrapd
systemctl enable snmptrapd</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Zastavení nepotřebných služeb</h2>



<p>V případě, že server, kde SNMP traps nastavujeme nebudeme chtít monitorovat pomocí SNMP, můžeme zastavit a&nbsp;zakázat spouštění služby <code>snmpd</code>.</p>



<p>Toto nijak neovlivní sběr a&nbsp;odesílání nastaveného SNMP traps do&nbsp;Zabbixu.</p>


<section id="block-code-block_d7ceb7bfabb35b16c94f7d9351ae6bd7" data-id="block-code-block_d7ceb7bfabb35b16c94f7d9351ae6bd7" class="gt-block block-code">
    <pre><code>systemctl disable snmpd --now</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Tím jste úspěšně dokončili nastavení sběru SNMP traps a&nbsp;můžete přikročit k&nbsp;nastavení samotného Zabbixu.</p>



<h2 class="wp-block-heading">Konfigurace Zabbix Serveru</h2>



<p>Na úrovni Zabbix Serveru povolte SNMP trapper a&nbsp;nastavte cestu k&nbsp;logu.</p>



<p>Otevřete si konfigurační soubor Zabbix Serveru v&nbsp;cestě <code>/etc/zabbix/zabbix_server.conf</code>:</p>


<section id="block-code-block_c2e202e455e6573703a9c8e20cc1a53c" data-id="block-code-block_c2e202e455e6573703a9c8e20cc1a53c" class="gt-block block-code">
    <pre><code>nano /etc/zabbix/zabbix_server.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Zde upravte následující konfigurační direktivy a&nbsp;soubor uložte.</p>


<section id="block-code-block_f4b7223ee0660da2beefe8881eb2a7fe" data-id="block-code-block_f4b7223ee0660da2beefe8881eb2a7fe" class="gt-block block-code">
    <pre><code>### Option: SNMPTrapperFile
#       Temporary file used for passing data from SNMP trap daemon to the server.
#       Must be the same as in zabbix_trap_receiver.pl or SNMPTT configuration file.
#
# Mandatory: no
# Default:
# SNMPTrapperFile=/tmp/zabbix_traps.tmp

SNMPTrapperFile=/var/log/snmptrap/snmptrap.log

### Option: StartSNMPTrapper
#       If 1, SNMP trapper process is started.
#
# Mandatory: no
# Range: 0-1
# Default:
# StartSNMPTrapper=0

StartSNMPTrapper=1</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Pro aplikování změněných konfiguračních parametrů restartujte Zabbix Server:</p>


<section id="block-code-block_da1bf454709a45468c89eb33e6d6382d" data-id="block-code-block_da1bf454709a45468c89eb33e6d6382d" class="gt-block block-code">
    <pre><code>systemctl restart zabbix-server</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Konfigurace Zabbix Proxy (volitelné)</h2>



<p>V případě, že nastavujete Zabbix Proxy je postup naprosto stejný, pouze dané direktivy upravíme v&nbsp;konfiguračním souboru Zabbix Proxy v&nbsp;cestě <code>/etc/zabbix/zabbix_proxy.conf</code>:</p>


<section id="block-code-block_cb08998597414e97dc2a9f4ba79c7700" data-id="block-code-block_cb08998597414e97dc2a9f4ba79c7700" class="gt-block block-code">
    <pre><code>nano /etc/zabbix/zabbix_proxy.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Zde upravte konfigurační direktivy <code>StartSNMPTrapper</code> a&nbsp;<code>SNMPTrapperFile</code> stejně jako v&nbsp;případě Zabbix Serveru:</p>


<section id="block-code-block_40b9046a3ae45eb21a782851047a5a04" data-id="block-code-block_40b9046a3ae45eb21a782851047a5a04" class="gt-block block-code">
    <pre><code>### Option: SNMPTrapperFile
#       Temporary file used for passing data from SNMP trap daemon to the proxy.
#       Must be the same as in zabbix_trap_receiver.pl or SNMPTT configuration file.
#
# Mandatory: no
# Default:
# SNMPTrapperFile=/tmp/zabbix_traps.tmp

SNMPTrapperFile=/var/log/snmptrap/snmptrap.log

### Option: StartSNMPTrapper
#       If 1, SNMP trapper process is started.
#
# Mandatory: no
# Range: 0-1
# Default:
# StartSNMPTrapper=0

StartSNMPTrapper=1</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Následuje restart systémové služby Zabbix Proxy:</p>


<section id="block-code-block_0eb99ee3da18abc9745b1970285229ed" data-id="block-code-block_0eb99ee3da18abc9745b1970285229ed" class="gt-block block-code">
    <pre><code>systemctl restart zabbix-proxy</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Tímto jste dokončili celé nastavení pro sběr SNMP traps a&nbsp;nezbývá než otestovat funkčnost a&nbsp;aplikovat sběr těchto dat v&nbsp;Zabbixu.</p>



<h2 class="wp-block-heading">Otestování konfigurace pomocí CLI</h2>



<p>Následujícím příkazem odešlete testovací SNMPv2 trap (simulace linkDown pro eth0):</p>


<section id="block-code-block_125402a169e30294fe4e74ddf4baa8d0" data-id="block-code-block_125402a169e30294fe4e74ddf4baa8d0" class="gt-block block-code">
    <pre><code>snmptrap -v 2c -c initmax localhost &#039;&#039; SNMPv2-MIB::snmpMIB IF-MIB::linkDown  s eth0</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>To, že se SNMP trap správně odeslal můžete ověřit ve vytvořeném SNMP trap souboru v&nbsp;cestě <code>/var/log/snmptrap/snmptrap.log</code>:</p>


<section id="block-code-block_fee3a3f81b3b3d808684544751b6df0d" data-id="block-code-block_fee3a3f81b3b3d808684544751b6df0d" class="gt-block block-code">
    <pre><code>tail -n15 /var/log/snmptrap/snmptrap.log</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Pro představu níže vidíte příklad toho, jak výstup vypadá přímo v&nbsp;logu:</p>


<section id="block-code-block_d821a200518bd7ef49f60da57de586ac" data-id="block-code-block_d821a200518bd7ef49f60da57de586ac" class="gt-block block-code">
    <pre><code>2024-02-10T00:53:43+0100 ZBXTRAP 127.0.0.1
PDU INFO:
  notificationtype               TRAP
  errorstatus                    0
  transactionid                  9
  version                        1
  errorindex                     0
  community                      public
  requestid                      1092987547
  receivedfrom                   UDP: [127.0.0.1]:32856-&gt;[127.0.0.1]:162
  messageid                      0
VARBINDS:
  DISMAN-EVENT-MIB::sysUpTimeInstance type=67 value=Timeticks: (2804608) 7:47:26.08
  SNMPv2-MIB::snmpTrapOID.0      type=6  value=OID: SNMPv2-MIB::snmpMIB
  IF-MIB::linkDown               type=4  value=STRING: &quot;eth0&quot;</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Odeslání SNMP trap ve verzi 3 je o&nbsp;něco složitější. Testovací příkaz simulující &#8222;linkDown&#8220; síťového adaptéru eth1 pro SNMPv3 tedy vypadá takto. </p>



<p>Nezapomeňte nastavení SNMP přizpůsobit vašemu konkrétnímu zařízení nebo nastavení místní infrastruktury.</p>


<section id="block-code-block_acd08f672deb897f655f9c559e3ea786" data-id="block-code-block_acd08f672deb897f655f9c559e3ea786" class="gt-block block-code">
    <pre><code>snmptrap -v3 -umonitoring -lauthPriv -aSHA512 -Azabbix_trap -xAES256 -X%Heslo123% -e0x800000020109840301 localhost &quot;&quot; SNMPv2-MIB::snmpMIB IF-MIB::linkDown s eth1</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Výstup pak opět můžete najít v&nbsp;souboru <code>/var/log/snmptrap/snmptrap.log</code>:</p>


<section id="block-code-block_b9d29dc5c378aa3d49fb84764f7f4c4f" data-id="block-code-block_b9d29dc5c378aa3d49fb84764f7f4c4f" class="gt-block block-code">
    <pre><code>tail -n20 /var/log/snmptrap/snmptrap.log</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Příklad výstupu pro SNMP trap verze 3 vidíte zde:</p>


<section id="block-code-block_1fde33c178057d7d275069b30b299011" data-id="block-code-block_1fde33c178057d7d275069b30b299011" class="gt-block block-code">
    <pre><code>2024-02-10T01:11:42+0100 ZBXTRAP 127.0.0.1
PDU INFO:
  contextName
  errorstatus                    0
  notificationtype               TRAP
  securitylevel                  3
  requestid                      1877627576
  version                        3
  securityName                   monitoring
  transactionid                  1
  securitymodel                  3
  errorindex                     0
  messageid                      653771479
  contextEngineID                0x80001f888081e0634397b4c66500000000
  receivedfrom                   UDP: [127.0.0.1]:53391-&gt;[127.0.0.1]:162
  securityEngineID               0x800000020109840301
VARBINDS:
  DISMAN-EVENT-MIB::sysUpTimeInstance type=67 value=Timeticks: (2912564) 8:05:25.64
  SNMPv2-MIB::snmpTrapOID.0      type=6  value=OID: SNMPv2-MIB::snmpMIB
  IF-MIB::linkDown               type=4  value=STRING: &quot;eth1&quot;</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Záměrně zde posíláme testovací příkazy na&nbsp;rozdílný síťový interface pro SNMPv2 (eth0) a&nbsp;SNMPv3 (eth1), aby to od sebe bylo lehce rozpoznatelné.</p>



<p>Nyní už se můžeme přesunout na&nbsp;nastavení hosta a&nbsp;vytvoření šablony pro monitoring pomocí SNMP v&nbsp;Zabbixu.</p>



<h2 class="wp-block-heading">Konfigurace v&nbsp;Zabbixu</h2>



<p>V Zabbixu nejprve musíte vybraného hosta připravit na&nbsp;monitoring pomocí SNMP.</p>



<p>To uděláte tak, že mu přidáte interface typu SNMP a&nbsp;tomuto interface nastavíte správnou IP adresu a&nbsp;port.</p>



<p>V naší testovací konfiguraci použijeme pro monitoring localhost a&nbsp;výchozí port 161.</p>



<p>SNMP komunitu (proměnná <code>{$SNMP_COMMUNITY}</code>) je potřeba přizpůsobit pro standardní SNMP monitoring. Pro SNMP Trap se komunita vyhodnocuje již na&nbsp;úrovni konfiguračního souboru pro snmptrapd daemon, viz část <code>/etc/snmp/snmptrapd.conf</code>. Nebude mít tedy vliv na&nbsp;SNMP Trap item a&nbsp;je potřeba to v&nbsp;nastavení zohlednit.</p>



<p>To můžete udělat buďto globálně, v&nbsp;sekci <code>Administration -&gt; Macros</code> anebo lokálně na&nbsp;úrovni hosta &#8211; v&nbsp;záložce <code>Macros</code>.</p>



<p>Tuto změnu však můžete provést i&nbsp;pouze na&nbsp;úrovni vytvořeného SNMP interface tak, jak vidíte na&nbsp;obrázku níže.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="744" src="https://www.initmax.cz/wp-content/uploads/2024/03/host_setting_snmp_community-1024x744.png" alt="" class="wp-image-14051" srcset="https://www.initmax.cz/wp-content/uploads/2024/03/host_setting_snmp_community-1024x744.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/03/host_setting_snmp_community-300x218.png 300w, https://www.initmax.cz/wp-content/uploads/2024/03/host_setting_snmp_community-768x558.png 768w, https://www.initmax.cz/wp-content/uploads/2024/03/host_setting_snmp_community-1536x1116.png 1536w, https://www.initmax.cz/wp-content/uploads/2024/03/host_setting_snmp_community-2048x1488.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Nastavení hosta uložte a&nbsp;v&nbsp;tuto chvíli jste připraveni zahájit monitoring pomocí SNMP.</p>



<p>Pokud si chcete vyzkoušet základní funkcionalitu SNMP, tak pro vás máme připravenou vzorovou šablonu pro Zabbix 6.0 a&nbsp;novější, kterou si můžete stáhnout na&nbsp;odkaze níže.</p>



<p>Vzorovou šablonu SNMP trap pro Zabbix 6.0+ si můžete stáhnout zde: <a href="https://www.initmax.cz/wp-content/uploads/2024/03/zabbix_snmptrap_example_template.xml">zabbix_snmptrap_example_template.xml</a>.</p>



<p>Pokud ale rádi zkoumáte, anebo si k&nbsp;lepšímu pochopení potřebujete celý proces tzv.&nbsp;&#8222;osahat&#8220;, tak můžete pokračovat v&nbsp;kapitolách dál, kde vás jednotlivými kroky provedeme.</p>



<h2 class="wp-block-heading">Vytvoření testovacího itemu snmptrap.fallback (volitelné)</h2>



<p>Item typu fallback primárně slouží k&nbsp;zachycení všech SNMP zpráv, které nebyly předtím zachyceny žádným jiným konkrétním itemem v&nbsp;dané šabloně.</p>



<p>Proto si item tohoto typu vytvoříme jako první &#8211; vytvořte si novou šablonu a&nbsp;do&nbsp;ní přidejte nový item nastavený tak, jak vidíte na&nbsp;obrázku níže.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1840" height="1112" src="https://www.initmax.cz/wp-content/uploads/2024/03/snmptrap_fallback.png" alt="" class="wp-image-14039" srcset="https://www.initmax.cz/wp-content/uploads/2024/03/snmptrap_fallback.png 1840w, https://www.initmax.cz/wp-content/uploads/2024/03/snmptrap_fallback-300x181.png 300w, https://www.initmax.cz/wp-content/uploads/2024/03/snmptrap_fallback-1024x619.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/03/snmptrap_fallback-768x464.png 768w, https://www.initmax.cz/wp-content/uploads/2024/03/snmptrap_fallback-1536x928.png 1536w" sizes="auto, (max-width: 1840px) 100vw, 1840px" /></figure>



<p>Nyní zkuste znovu spustit již jednou použitý testovací příkaz pro SNMPv2 simulující linkDown na&nbsp;eth0:</p>


<section id="block-code-block_125402a169e30294fe4e74ddf4baa8d0" data-id="block-code-block_125402a169e30294fe4e74ddf4baa8d0" class="gt-block block-code">
    <pre><code>snmptrap -v 2c -c initmax localhost &#039;&#039; SNMPv2-MIB::snmpMIB IF-MIB::linkDown  s eth0</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V Zabbixu, v&nbsp;sekci <code>Monitoring -&gt; Latest data</code> si pak na&nbsp;vašem testovacím hostu ověřte, že data dorazila správně.</p>



<p>Zde můžete vidět, že testovací data skutečně dorazila v&nbsp;pořádku. Zpráva má správnou SNMP komunitu, zdrojový server je skutečně localhost a&nbsp;data zprávy obsahují odeslaný řetězec.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="3152" height="1644" src="https://www.initmax.cz/wp-content/uploads/2024/03/snmptrap_fallback_latest.png" alt="" class="wp-image-14041" srcset="https://www.initmax.cz/wp-content/uploads/2024/03/snmptrap_fallback_latest.png 3152w, https://www.initmax.cz/wp-content/uploads/2024/03/snmptrap_fallback_latest-300x156.png 300w, https://www.initmax.cz/wp-content/uploads/2024/03/snmptrap_fallback_latest-1024x534.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/03/snmptrap_fallback_latest-768x401.png 768w, https://www.initmax.cz/wp-content/uploads/2024/03/snmptrap_fallback_latest-1536x801.png 1536w, https://www.initmax.cz/wp-content/uploads/2024/03/snmptrap_fallback_latest-2048x1068.png 2048w" sizes="auto, (max-width: 3152px) 100vw, 3152px" /></figure>



<p>Nyní se můžeme přesunout k&nbsp;vytvoření konkrétních items pro jednotlivé monitorované položky.</p>



<h2 class="wp-block-heading">Vytvoření testovacího itemu snmptrap (volitelné)</h2>



<p>Ve vaší nové šabloně si vytvořte nové items typu SNMP trap, které budou odpovídat nám posílaným testovacím příkazům.</p>



<p>Pro zjednodušení použijeme v&nbsp;klíči těchto itemů regulérní výraz tak, jak vidíte zde:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2006" height="1286" src="https://www.initmax.cz/wp-content/uploads/2024/03/snmptrap_regex.png" alt="" class="wp-image-14045" srcset="https://www.initmax.cz/wp-content/uploads/2024/03/snmptrap_regex.png 2006w, https://www.initmax.cz/wp-content/uploads/2024/03/snmptrap_regex-300x192.png 300w, https://www.initmax.cz/wp-content/uploads/2024/03/snmptrap_regex-1024x656.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/03/snmptrap_regex-768x492.png 768w, https://www.initmax.cz/wp-content/uploads/2024/03/snmptrap_regex-1536x985.png 1536w" sizes="auto, (max-width: 2006px) 100vw, 2006px" /></figure>



<p>Druhý item pro testovací příkaz na&nbsp;eth1 přes SNMPv3 můžete z&nbsp;toho nově vytvořeného itemu jednoduše naklonovat, a&nbsp;pouze v&nbsp;regulérním výrazu změňte název síťového inteface na&nbsp;eth1.</p>



<p>Konfiguraci šablony uložte a&nbsp;znovu spusťte naše dva testovací příkazy.</p>



<p>Pro SNMPv2 na&nbsp;eth0:</p>


<section id="block-code-block_125402a169e30294fe4e74ddf4baa8d0" data-id="block-code-block_125402a169e30294fe4e74ddf4baa8d0" class="gt-block block-code">
    <pre><code>snmptrap -v 2c -c initmax localhost &#039;&#039; SNMPv2-MIB::snmpMIB IF-MIB::linkDown  s eth0</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V latest data pak uvidíte, že tento test tentokrát nezachytil snmptrap.fallback, ale správný item pro tento inteface, který jste si předem vytvořili.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="3154" height="1524" src="https://www.initmax.cz/wp-content/uploads/2024/03/latest_data_eth0.png" alt="" class="wp-image-14047" srcset="https://www.initmax.cz/wp-content/uploads/2024/03/latest_data_eth0.png 3154w, https://www.initmax.cz/wp-content/uploads/2024/03/latest_data_eth0-300x145.png 300w, https://www.initmax.cz/wp-content/uploads/2024/03/latest_data_eth0-1024x495.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/03/latest_data_eth0-768x371.png 768w, https://www.initmax.cz/wp-content/uploads/2024/03/latest_data_eth0-1536x742.png 1536w, https://www.initmax.cz/wp-content/uploads/2024/03/latest_data_eth0-2048x990.png 2048w" sizes="auto, (max-width: 3154px) 100vw, 3154px" /></figure>



<p>A stejným způsobem ověříme i&nbsp;funkčnost druhého snmptrap itemu pro eth1.</p>



<p>Znovu spusťte náš testovací příkaz pro SNMPv3 na&nbsp;linkDown interface eth1:</p>


<section id="block-code-block_acd08f672deb897f655f9c559e3ea786" data-id="block-code-block_acd08f672deb897f655f9c559e3ea786" class="gt-block block-code">
    <pre><code>snmptrap -v3 -umonitoring -lauthPriv -aSHA512 -Azabbix_trap -xAES256 -X%Heslo123% -e0x800000020109840301 localhost &quot;&quot; SNMPv2-MIB::snmpMIB IF-MIB::linkDown s eth1</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A v&nbsp;latest data ověřte, že zpráva byla úspěšně zachycena pomocí tohoto itemu:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="3154" height="1598" src="https://www.initmax.cz/wp-content/uploads/2024/03/latest_data_eth1.png" alt="" class="wp-image-14049" srcset="https://www.initmax.cz/wp-content/uploads/2024/03/latest_data_eth1.png 3154w, https://www.initmax.cz/wp-content/uploads/2024/03/latest_data_eth1-300x152.png 300w, https://www.initmax.cz/wp-content/uploads/2024/03/latest_data_eth1-1024x519.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/03/latest_data_eth1-768x389.png 768w, https://www.initmax.cz/wp-content/uploads/2024/03/latest_data_eth1-1536x778.png 1536w, https://www.initmax.cz/wp-content/uploads/2024/03/latest_data_eth1-2048x1038.png 2048w" sizes="auto, (max-width: 3154px) 100vw, 3154px" /></figure>



<p>Gratulujeme, tímto máte tuto vzorovou konfiguraci hotovou a&nbsp;úspěšně jste pronikli do&nbsp;základů monitoringu pomocí SNMP traps!</p>


<section id="block-newsletter-block_0e214b6b847ff4b1460a5d1c35104159" data-id="block-newsletter-block_0e214b6b847ff4b1460a5d1c35104159" class="gt-block block-newsletter">
    <section id="newsletter" class="newsletter">
	<div class="gradient basic">
		<div class="newsletter__inner width width--general">
			<div class="col left">
									<h2 class="newsletter__title">Buďte v&nbsp;obraze s&nbsp;naším newsletterem</h2>
													<div class="newsletter__content"><p>Díky initMAX newsletteru Vám neunikne žádná z&nbsp;pozvánek na&nbsp;akce a&nbsp;webináře, žádný z&nbsp;tipů, jak dostat ze svého IT MAXimum, ani ověřené informace o&nbsp;novinkách ze světa Zabbix a&nbsp;dalších technologií.</p>
</div>
							</div>
			<div class="col right form-wrapper">
				<div class="newsletter-form">
	<form method="post" action="/wiki/kapitola/zabbix/feed/" enctype="multipart/form-data">
		<input type="hidden" name="url" value="https://www.initmax.cz/wiki/kapitola/zabbix/feed/">

		<div class="inputs">

			<label for="newsletter-form_contact_email" class="top">Vaše e-mailová adresa:</label>
			<div class="df">

				<div class="input">
					<input type="text" id="newsletter-form_contact_email" name="newsletter_email" placeholder="@" data-format="email" data-required="1">
									</div><!-- /.input -->

				<a href="#" class="btn btn--white sendBtn">Odeslat</a>

			</div>

			<div class="bottom nm">
				<label for="newsletter-form_gdpr" class="checkbox gdpr">
					<input type="checkbox" id="newsletter-form_gdpr" name="newsletter_gdpr">
					<span>Souhlasím se&nbsp;<a href="https://www.initmax.cz/ochrana-osobnich-udaju/" target="_blank">zpracováním osobních údajů</a>.</span>
				</label>
			</div>

		</div><!-- /.inputs -->
		<div class="sent hidden">
			<div class="iconOk"><h3>Děkujeme, že jste se přihlásili k&nbsp;odběru našeho newsletteru.</h3>
</div>
			<button class="sent__close" title="Zavřít" onclick="closeFormMessage(this,event)"><svg data-name="Group 3602" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 3272" d="M0,0H24V24H0Z" fill="none"/><line data-name="Line 98" y2="14" transform="translate(7.05 7.05) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 99" x2="14" transform="translate(7.05 16.95) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</button>
		</div><!-- /.sent -->
	</form>
</div>			</div>
		</div>
	</div>
</section></section>



<section id="social-links-block_01cca8fbedec94ab7546035e39cd6c56" data-id="social-links-block_01cca8fbedec94ab7546035e39cd6c56" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>

<p>The post <a href="https://www.initmax.cz/wiki/jak-nastavit-snmp-trap-v-zabbixu/">Jak nastavit SNMP Trap v&nbsp;Zabbixu</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Throttling a&#160;ochrana před falešnými alerty pomocí min/max/avg</title>
		<link>https://www.initmax.cz/wiki/throttling-a-ochrana-pred-falesnymi-alerty-pomoci-min-max-avg/</link>
		
		<dc:creator><![CDATA[Tomáš Heřmánek]]></dc:creator>
		<pubDate>Fri, 09 Feb 2024 09:19:49 +0000</pubDate>
				<guid isPermaLink="false">https://www.initmax.cz/?post_type=wiki&#038;p=13831</guid>

					<description><![CDATA[<p>Pokud používáte Throttling u stavových položek můžete se potkat s falešně pozitivními alerty. Throttling vám totiž neumožňuje použít funkce min, max nebo ...</p>
<p>The post <a href="https://www.initmax.cz/wiki/throttling-a-ochrana-pred-falesnymi-alerty-pomoci-min-max-avg/">Throttling a&nbsp;ochrana před falešnými alerty pomocí min/max/avg</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Pokud používáte Throttling u&nbsp;stavových položek můžete se potkat s&nbsp;falešně pozitivními alerty. Throttling vám totiž neumožňuje použít funkce <code>min</code>, <code>max</code> nebo <code>avg</code> pro vyhodnocení více hodnot. Je to proto, že Zabbix stejné, po&nbsp;sobě jdoucí stavy zahazuje.</p>


<section id="social-links-block_1d8eb41953c79430d99ba700ef8d3307" data-id="social-links-block_1d8eb41953c79430d99ba700ef8d3307" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>




<h2 class="wp-block-heading">Popis problematiky</h2>



<p>U stavových položek, jako jsou stavy Windows služeb nejspíše používáte filtrování stejných hodnot v&nbsp;řadě (tzv.&nbsp;Throttling). Jistě jste si tedy všimli, že Throttling nemůžete použít, protože se pak neaktivuje trigger, který je standardně nastaven na&nbsp;3 po&nbsp;sobě jdoucí hodnoty. Nicméně existuje řešení, jak tuto situaci změnit. Toto řešení vám umožní v&nbsp;rozsáhlých systémech ušetřit významné množství zdrojů tím, že nebudete ukládat nerelavantní data. Návod vychází ze standardní šablony pro Windows služby a&nbsp;slouží jako obecný příklad. Pokud například máte 1000 Windows serverů, na&nbsp;každém běží 100 služeb a&nbsp;kontrola probíhá každou minutu, pak bez tohoto vylepšení se průměrně každou sekundu načte 1&nbsp;660 hodnot. S&nbsp;touto malou změnou v&nbsp;konfiguraci se situace změní na&nbsp;odhadem 0-100 hodnot za minutu, v&nbsp;závislosti na&nbsp;četnosti změn stavu služeb. Uvedená čísla jsou orientační a&nbsp;ve vašem prostředí se mohou lišit.</p>



<h2 class="wp-block-heading">Snadné řešení</h2>



<p>Pro vyřešení tohoto problému můžete použít preprocessing. Ten provede manipulaci s&nbsp;chybovou hodnotou (přidá časovou značku) tak, aby byla chybová hodnota pokaždé jiná. Chybová hodnota tedy projde skrz throttling (discard unchanged). Hodnota indikující správný stav se opakuje a&nbsp;je pomocí throttlingu (discard unchanged) zahazována. Nastavení můžete v&nbsp;preprocessingu provést následovně:</p>



<figure class="wp-block-image size-full is-resized"><img loading="lazy" decoding="async" width="2088" height="682" src="https://www.initmax.cz/wp-content/uploads/2024/02/throttling-item-1-2.png" alt="" class="wp-image-13862" style="width:1000px" srcset="https://www.initmax.cz/wp-content/uploads/2024/02/throttling-item-1-2.png 2088w, https://www.initmax.cz/wp-content/uploads/2024/02/throttling-item-1-2-300x98.png 300w, https://www.initmax.cz/wp-content/uploads/2024/02/throttling-item-1-2-1024x334.png 1024w, https://www.initmax.cz/wp-content/uploads/2024/02/throttling-item-1-2-768x251.png 768w, https://www.initmax.cz/wp-content/uploads/2024/02/throttling-item-1-2-1536x502.png 1536w, https://www.initmax.cz/wp-content/uploads/2024/02/throttling-item-1-2-2048x669.png 2048w" sizes="auto, (max-width: 2088px) 100vw, 2088px" /></figure>



<ul class="wp-block-list">
<li>První krok přidává časovou značku k&nbsp;chybové hodnotě</li>



<li>Druhý krok zahazuje nezměněné hodnoty</li>



<li>Třetí krok z&nbsp;časové značky vytáhne původní chybovou hodnotu</li>
</ul>



<p>Přidání časové značky je jednoduché:</p>


<section id="block-code-block_8bc4112016b0b9268be2068558ff52d0" data-id="block-code-block_8bc4112016b0b9268be2068558ff52d0" class="gt-block block-code">
    <pre><code>if (value == 0 ) {
  return value;
} else {
  return (Math.floor(Date.now() / 1000) - 1707000000 )*1000 + value;
}</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Po průchodu throttlingem získáte zpět původní hodnotu pomocí výrazu:</p>


<section id="block-code-block_202e9e0873543ae91b888812e0f7e94c" data-id="block-code-block_202e9e0873543ae91b888812e0f7e94c" class="gt-block block-code">
    <pre><code>return value % 1000;</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Výše uvedený příklad funguje pro chybové stavy od 1 – 999 a&nbsp;pro stav s&nbsp;hodnotou 0, kdy je stav OK.</p>



<p>S&nbsp;výše uvedeným preprocessingem můžete stále používat definici triggeru s&nbsp;funkcemi min/max/avg a&nbsp;bude to fungovat dle očekávání. Je to proto, že chybové hodnoty máte v&nbsp;klasickém intervalu:</p>


<section id="block-code-block_5933fc07fc90ef24220c5b10419e679e" data-id="block-code-block_5933fc07fc90ef24220c5b10419e679e" class="gt-block block-code">
    <pre><code>min(//service.info[&quot;{#SERVICE.NAME}&quot;,state],#3)&lt;&gt;0</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>



<section id="block-newsletter-block_ce67e9b5b5ceb67a94efab71dc23bd5a" data-id="block-newsletter-block_ce67e9b5b5ceb67a94efab71dc23bd5a" class="gt-block block-newsletter">
    <section id="newsletter" class="newsletter">
	<div class="gradient basic">
		<div class="newsletter__inner width width--general">
			<div class="col left">
									<h2 class="newsletter__title">Buďte v&nbsp;obraze s&nbsp;naším newsletterem</h2>
													<div class="newsletter__content"><p>Díky initMAX newsletteru Vám neunikne žádná z&nbsp;pozvánek na&nbsp;akce a&nbsp;webináře, žádný z&nbsp;tipů, jak dostat ze svého IT MAXimum, ani ověřené informace o&nbsp;novinkách ze světa Zabbix a&nbsp;dalších technologií.</p>
</div>
							</div>
			<div class="col right form-wrapper">
				<div class="newsletter-form">
	<form method="post" action="/wiki/kapitola/zabbix/feed/" enctype="multipart/form-data">
		<input type="hidden" name="url" value="https://www.initmax.cz/wiki/kapitola/zabbix/feed/">

		<div class="inputs">

			<label for="newsletter-form_contact_email" class="top">Vaše e-mailová adresa:</label>
			<div class="df">

				<div class="input">
					<input type="text" id="newsletter-form_contact_email" name="newsletter_email" placeholder="@" data-format="email" data-required="1">
									</div><!-- /.input -->

				<a href="#" class="btn btn--white sendBtn">Odeslat</a>

			</div>

			<div class="bottom nm">
				<label for="newsletter-form_gdpr" class="checkbox gdpr">
					<input type="checkbox" id="newsletter-form_gdpr" name="newsletter_gdpr">
					<span>Souhlasím se&nbsp;<a href="https://www.initmax.cz/ochrana-osobnich-udaju/" target="_blank">zpracováním osobních údajů</a>.</span>
				</label>
			</div>

		</div><!-- /.inputs -->
		<div class="sent hidden">
			<div class="iconOk"><h3>Děkujeme, že jste se přihlásili k&nbsp;odběru našeho newsletteru.</h3>
</div>
			<button class="sent__close" title="Zavřít" onclick="closeFormMessage(this,event)"><svg data-name="Group 3602" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 3272" d="M0,0H24V24H0Z" fill="none"/><line data-name="Line 98" y2="14" transform="translate(7.05 7.05) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 99" x2="14" transform="translate(7.05 16.95) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</button>
		</div><!-- /.sent -->
	</form>
</div>			</div>
		</div>
	</div>
</section></section>



<section id="social-links-block_1d8eb41953c79430d99ba700ef8d3307" data-id="social-links-block_1d8eb41953c79430d99ba700ef8d3307" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>

<p>The post <a href="https://www.initmax.cz/wiki/throttling-a-ochrana-pred-falesnymi-alerty-pomoci-min-max-avg/">Throttling a&nbsp;ochrana před falešnými alerty pomocí min/max/avg</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Reporting v&#160;Zabbixu 7.0</title>
		<link>https://www.initmax.cz/wiki/reporting-v-zabbixu-7-0/</link>
		
		<dc:creator><![CDATA[Karolína Vrtalová]]></dc:creator>
		<pubDate>Thu, 02 Nov 2023 13:04:00 +0000</pubDate>
				<guid isPermaLink="false">https://www.initmax.cz/?post_type=wiki&#038;p=13364</guid>

					<description><![CDATA[<p>V tomto návodu si ukážeme, jak si můžete vytvořit grafickou prezentaci dat pomocí nativních částí Zabbixu a pak si v rámci plánovaných ...</p>
<p>The post <a href="https://www.initmax.cz/wiki/reporting-v-zabbixu-7-0/">Reporting v&nbsp;Zabbixu 7.0</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>V tomto návodu si ukážeme, jak si můžete vytvořit grafickou prezentaci dat pomocí nativních částí Zabbixu a&nbsp;pak si v&nbsp;rámci plánovaných reportů nechat tato data zasílat pravidelně na&nbsp;e-mail.</p>


<section id="block-webinar-block_8ead03e6788e757049261e7b0bbd01ed" data-id="block-webinar-block_8ead03e6788e757049261e7b0bbd01ed" class="gt-block block-webinar">
    <div class="connected-webinars__grid">
        <a href="https://www.initmax.cz/webinar/reporting-v-zabbixu-7-0/" class="grid-item">
	<article class="webinar-promotion">
		<div class="webinar-promotion__thumbnail-wrap">
			<figure class="webinar-promotion__thumbnail">
					<img decoding="async" src="https://www.initmax.cz/wp-content/uploads/2023/09/ilustrace_webinare_zabbix_7.0_02_thumbnail_web-81.png"
				 width="400"
		 height="250"
		 class=""
		 alt="Reporting v&nbsp;Zabbixu 7.0"
		 loading="lazy"	>
									<div class="webinar-promotion__tags">
						<span class="tag tag--small" style="color:#ffffff;background-color:#d40000;">Zabbix</span>					</div>
							</figure>
		</div>
		<div class="webinar-promotion__text">
			<div>
									<time datetime="2023-10-03">3.&nbsp;10.&nbsp;2023</time>
							</div>
			<h3 class="webinar-promotion__title">Reporting v&nbsp;Zabbixu 7.0</h3>
			<div class="icon-link">
				<figure class="icon-wrap icon-wrap--primary"><svg data-name="Group 3411" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 455" d="M0,0H24V24H0Z" fill="none"/><path data-name="Path 456" d="M15,10l4.553-2.276A1,1,0,0,1,21,8.618v6.764a1,1,0,0,1-1.447.894L15,14V10Z" transform="translate(0 0)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><rect data-name="Rectangle 1286" width="12" height="12" rx="2" transform="translate(3.112 6)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</figure>
				<span>Zhlédnout záznam</span>
			</div>
		</div>
	</article>
</a>    </div>
</section>


<section id="social-links-block_56aef360f0535dd764b22dc1a1b74e26" data-id="social-links-block_56aef360f0535dd764b22dc1a1b74e26" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>




<h2 class="wp-block-heading">Instalace a&nbsp;konfigurace</h2>



<p>Nejprve musíte nainstalovat balíček zabbix-web-service, a&nbsp;to z&nbsp;oficiálního repozitáře Zabbix:</p>


<section id="block-code-block_a661320c823680817ea8ba38d047b675" data-id="block-code-block_a661320c823680817ea8ba38d047b675" class="gt-block block-code">
    <pre><code>dnf install -y zabbix-web-service</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Následně přidáme repozitář pro instalaci Google Chrome. Toto je pro tyto účely Zabbixem doporučovaný prohlížeč, ovšem lze ho zaměnit i&nbsp;např.&nbsp;za Chromium nebo Firefox.</p>



<p>V prvním kroku si vytvoříme soubor s&nbsp;konfigurací repozitáře:</p>


<section id="block-code-block_f72186187ad71ee7459b7838d3b38165" data-id="block-code-block_f72186187ad71ee7459b7838d3b38165" class="gt-block block-code">
    <pre><code>nano /etc/yum.repos.d/google-chrome.repo</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Vložíme do&nbsp;něj následující nastavení, soubor uložíme a&nbsp;můžeme ho zavřít.</p>


<section id="block-code-block_69cd668a2e683918210fa326c8affb78" data-id="block-code-block_69cd668a2e683918210fa326c8affb78" class="gt-block block-code">
    <pre><code>[google-chrome]
name=google-chrome
baseurl=http://dl.google.com/linux/chrome/rpm/stable/$basearch
enabled=1
gpgcheck=1
gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nyní již můžeme přejít k&nbsp;samotné instalaci prohlížeče Google Chrome, a&nbsp;to následujícím příkazem.</p>



<p>Pozn.: Součástí instalace prohlížeče není grafické rozhraní a&nbsp;není ani vyžadováno.</p>


<section id="block-code-block_14508cfe93f02eefc459fb610aa4f035" data-id="block-code-block_14508cfe93f02eefc459fb610aa4f035" class="gt-block block-code">
    <pre><code>dnf install -y google-chrome-stable</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V případě, že máme službu zabbix-web-service nainstalovanou na&nbsp;stejném serveru jako samotný Zabbix server, pak nemusíme nijak upravovat nastavení této služby.</p>



<p>V obou případech je však nutná dodatečná konfigurace Zabbix serveru.</p>



<p>Otevřeme si tedy konfigurační soubor Zabbix serveru:</p>


<section id="block-code-block_78b52edd514089949cdd011b573a7672" data-id="block-code-block_78b52edd514089949cdd011b573a7672" class="gt-block block-code">
    <pre><code>nano /etc/zabbix/zabbix_server.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A zde upravíme následující konfigurační direktivy:</p>


<section id="block-code-block_72689612eea5688e9a7ceb359f2526e3" data-id="block-code-block_72689612eea5688e9a7ceb359f2526e3" class="gt-block block-code">
    <pre><code>...
StartReportWriters=1
...
WebServiceURL=http://localhost:10053/report
...</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V případě, že jsme službu zabbix-web-service nainstalovali na&nbsp;jiný server než ten, na&nbsp;kterém běží i&nbsp;Zabbix server, pak vůčihledně tomu upravíme i&nbsp;direktivu <code>WebServiceURL</code>. </p>



<p>Zároveň by pak bylo nutné nastavit tuto IP adresu do&nbsp;povolených právě na&nbsp;úrovni konfigurace Zabbix Web service, a&nbsp;to v&nbsp;cestě <code>/etc/zabbix/zabbix_web_service.conf</code>, příklad tohoto nastavení můžete vidět níže:</p>


<section id="block-code-block_1924f8ce2b8da70dc63297cd1c562ca2" data-id="block-code-block_1924f8ce2b8da70dc63297cd1c562ca2" class="gt-block block-code">
    <pre><code>### Option: AllowedIP
# List of comma delimited IP addresses, optionally in CIDR notation, or DNS names of Zabbix servers and
# Zabbix proxies.
# Example: AllowedIP=127.0.0.1,192.168.1.0/24,::1,2001:db8::/32,zabbix.example.com
#
# Mandatory: yes
# Default:
# AllowedIP=

AllowedIP=127.0.0.1,::1</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Po dokončení konfigurace můžeme službu pro reporting restartovat a&nbsp;povolit její automatické spouštění po&nbsp;startu:</p>


<section id="block-code-block_787b64c499a86cb77aa61d02c86f5990" data-id="block-code-block_787b64c499a86cb77aa61d02c86f5990" class="gt-block block-code">
    <pre><code>systemctl restart zabbix-server.service
systemctl enable zabbix-web-service.service --now</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Posledním krokem instalace je pak nastavení <code>Frontend URL</code>. Toto nastavení najdeme ve webovém rozhraní Zabbixu v&nbsp;menu <code>Administration -&gt; General</code>.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="724" src="https://www.initmax.cz/wp-content/uploads/2023/11/image-1-1024x724.png" alt="" class="wp-image-13376" srcset="https://www.initmax.cz/wp-content/uploads/2023/11/image-1-1024x724.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/11/image-1-300x212.png 300w, https://www.initmax.cz/wp-content/uploads/2023/11/image-1-768x543.png 768w, https://www.initmax.cz/wp-content/uploads/2023/11/image-1.png 1189w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Po uložení tohoto nastavení pomocí tlačítka <code>Update</code> můžeme přejít k&nbsp;samotnému vytváření reportů.</p>



<h2 class="wp-block-heading">Nastavení reportingu</h2>



<h3 class="wp-block-heading">Dashboard</h3>



<p>Plánované reporty jsou založené na&nbsp;konkrétním dashboardu, který se následně na&nbsp;základě předdefinovaného intervalu pravidelně zasílá na&nbsp;e-mail, nastavený v&nbsp;médiích toho konkrétního uživatele nebo skupiny uživatelů.</p>



<p>Pro účely této ukázky použijeme implicitní dashboard &#8222;Zabbix server health&#8220;, který je jako vzorový dashboard dostupný ihned po&nbsp;čisté instalaci Zabbixu.</p>



<p>Do tohoto dashboardu si ale přidáme widget, který je v&nbsp;Zabbix verze 7.0 novinkou, a&nbsp;to widget s&nbsp;názvem &#8222;Top Triggers&#8220;.</p>



<p>Tento widget umí reagovat časový filtr a&nbsp;je tudíž velice přínosný právě i&nbsp;pro potřeby reportingu, kde zasíláme data za určité období.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="204" src="https://www.initmax.cz/wp-content/uploads/2023/11/image-5-1024x204.png" alt="" class="wp-image-13384" srcset="https://www.initmax.cz/wp-content/uploads/2023/11/image-5-1024x204.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/11/image-5-300x60.png 300w, https://www.initmax.cz/wp-content/uploads/2023/11/image-5-768x153.png 768w, https://www.initmax.cz/wp-content/uploads/2023/11/image-5-1536x306.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/11/image-5.png 1615w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Po uložení nastavení dashboardu si pro tento dashboard vytvoříme i&nbsp;pravidelný reporting.</p>



<h3 class="wp-block-heading">Plánované reporty</h3>



<p>To uděláme tak, že v&nbsp;menu zvolíme nabídku <code>Reports -&gt; Scheduled reports</code> a&nbsp;zde klikneme na&nbsp;tlačítko <code>Create report</code>.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="366" src="https://www.initmax.cz/wp-content/uploads/2023/11/image-3-1024x366.png" alt="" class="wp-image-13380" srcset="https://www.initmax.cz/wp-content/uploads/2023/11/image-3-1024x366.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/11/image-3-300x107.png 300w, https://www.initmax.cz/wp-content/uploads/2023/11/image-3-768x274.png 768w, https://www.initmax.cz/wp-content/uploads/2023/11/image-3-1536x548.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/11/image-3.png 1885w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Objeví se nám popup, kde si zvolíme konkrétního uživatele jako vlastníka reportu a&nbsp;zvolíme si jeho název.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="796" src="https://www.initmax.cz/wp-content/uploads/2023/11/image-6-1024x796.png" alt="" class="wp-image-13386" srcset="https://www.initmax.cz/wp-content/uploads/2023/11/image-6-1024x796.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/11/image-6-300x233.png 300w, https://www.initmax.cz/wp-content/uploads/2023/11/image-6-768x597.png 768w, https://www.initmax.cz/wp-content/uploads/2023/11/image-6.png 1078w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>V sekci <code>Dashboard</code> nastavení tohoto ukázkového reportu tlačítkem <code>Select</code> vybereme námi dříve upravený dashboard s&nbsp;názvem <code>Zabbix server health</code>.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="727" src="https://www.initmax.cz/wp-content/uploads/2023/11/image-7-1024x727.png" alt="" class="wp-image-13388" srcset="https://www.initmax.cz/wp-content/uploads/2023/11/image-7-1024x727.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/11/image-7-300x213.png 300w, https://www.initmax.cz/wp-content/uploads/2023/11/image-7-768x545.png 768w, https://www.initmax.cz/wp-content/uploads/2023/11/image-7.png 1178w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Následně zvolíme za jaké období a&nbsp;jak často se nám má report zasílat, a&nbsp;zvolíme který den v&nbsp;týdnu, a&nbsp;ve který čas (toto je serverový čas!).</p>



<p>Zároveň si můžeme nastavit i&nbsp;konkrétní datum, od kdy má tento naplánovaný reporting začít a&nbsp;případně i&nbsp;jak dlouho má trvat.</p>



<p>A nakonec zvolíme předmět e-mailu a&nbsp;obsah jeho zprávy. Zde můžeme používat standardní HTML syntaxi, stejně jako globální makra.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="552" src="https://www.initmax.cz/wp-content/uploads/2023/11/image-9-1024x552.png" alt="" class="wp-image-13392" srcset="https://www.initmax.cz/wp-content/uploads/2023/11/image-9-1024x552.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/11/image-9-300x162.png 300w, https://www.initmax.cz/wp-content/uploads/2023/11/image-9-768x414.png 768w, https://www.initmax.cz/wp-content/uploads/2023/11/image-9-1536x828.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/11/image-9.png 1555w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>V předmětu zprávy jsme pro naši ukázku použili následující text:</p>


<section id="block-code-block_6ae5a513198484610d4daeee09129586" data-id="block-code-block_6ae5a513198484610d4daeee09129586" class="gt-block block-code">
    <pre><code>Weekly demo report From {{TIME}.fmttime(%d %B,-1w/w)} to {{TIME}.fmttime(%d %B %Y,-1w/w+6d)}</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A v&nbsp;těle zprávy pak tento:</p>


<section id="block-code-block_6bf13897fd13c34f8f8b9b167cd7c684" data-id="block-code-block_6bf13897fd13c34f8f8b9b167cd7c684" class="gt-block block-code">
    <pre><code>&lt;b&gt;Week from {{TIME}.fmttime(%d/%m/%y,-1w/w)} to {{TIME}.fmttime(%d/%m/%y,-1w/w+6d)}&lt;/b&gt;&lt;br&gt;
Week from {{TIME}.fmttime(%d/%B/%Y,-1w/w)} to {{TIME}.fmttime(%d/%B/%Y,-1w/w+6d)}&lt;br&gt;
Week number {{TIME}.fmttime(%W,-1w/w)}&lt;br&gt;</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V konfigurační možnosti <code>Subscriptions</code> určujeme, kterým konkrétním uživatelům (nebo uživatelským skupinám) se má tento pravidelný report zasílat.</p>



<p>Případně můžeme určit i&nbsp;to, komu se naopak zasílat nemá.</p>



<p>Například to tedy může vypadat takto:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="472" src="https://www.initmax.cz/wp-content/uploads/2023/11/image-13-1024x472.png" alt="" class="wp-image-13400" srcset="https://www.initmax.cz/wp-content/uploads/2023/11/image-13-1024x472.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/11/image-13-300x138.png 300w, https://www.initmax.cz/wp-content/uploads/2023/11/image-13-768x354.png 768w, https://www.initmax.cz/wp-content/uploads/2023/11/image-13-1536x708.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/11/image-13.png 1565w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Funkčnost nastavení a&nbsp;například i&nbsp;vzhledu našeho reportu můžeme před jeho uložením otestovat pomocí tlačítka <code>Test</code>.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="698" src="https://www.initmax.cz/wp-content/uploads/2023/11/image-16-1024x698.png" alt="" class="wp-image-13406" srcset="https://www.initmax.cz/wp-content/uploads/2023/11/image-16-1024x698.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/11/image-16-300x204.png 300w, https://www.initmax.cz/wp-content/uploads/2023/11/image-16-768x523.png 768w, https://www.initmax.cz/wp-content/uploads/2023/11/image-16.png 1214w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Po úspěšném otestování můžeme tento nový report vytvořit kliknutím na&nbsp;tlačítko <code>Add</code>.</p>



<p>Výsledek našeho nově vytvořeného ukázkového reportu pak bude v&nbsp;e-mailu vypadat takto:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="575" src="https://www.initmax.cz/wp-content/uploads/2023/11/image-17-1024x575.png" alt="" class="wp-image-13408" srcset="https://www.initmax.cz/wp-content/uploads/2023/11/image-17-1024x575.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/11/image-17-300x168.png 300w, https://www.initmax.cz/wp-content/uploads/2023/11/image-17-768x431.png 768w, https://www.initmax.cz/wp-content/uploads/2023/11/image-17-1536x862.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/11/image-17.png 1538w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Nejnovější verze Zabbix pak obsahuje i&nbsp;podporu pro více stránkové dashboardy.</p>



<p>Výsledkem toho je v&nbsp;rámci plánovaných reportů pak to, že přílohou e-mailu je PDF dokument, jehož každá stránka koresponduje s&nbsp;každou jednotlivou stránkou tohoto více stránkového dashboardu. </p>



<p>Příklad vícestránkového PDF reportu naleznete <a href="https://www.initmax.cz/wp-content/uploads/2023/11/demo_report_2023-11-02_19-42.pdf">ZDE</a>.</p>



<p>A to je vše! Nyní jste se naučili, jak vytvářet plánované reporty generované z&nbsp;dashboardů, které vás budou pravidelně e-mailem informovat o&nbsp;stavu vaší infrastruktury.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>


<section id="block-newsletter-block_06eb26f997c30c27d082071f71e42af6" data-id="block-newsletter-block_06eb26f997c30c27d082071f71e42af6" class="gt-block block-newsletter">
    <section id="newsletter" class="newsletter">
	<div class="gradient basic">
		<div class="newsletter__inner width width--general">
			<div class="col left">
									<h2 class="newsletter__title">Buďte v&nbsp;obraze s&nbsp;naším newsletterem</h2>
													<div class="newsletter__content"><p>Díky initMAX newsletteru Vám neunikne žádná z&nbsp;pozvánek na&nbsp;akce a&nbsp;webináře, žádný z&nbsp;tipů, jak dostat ze svého IT MAXimum, ani ověřené informace o&nbsp;novinkách ze světa Zabbix a&nbsp;dalších technologií.</p>
</div>
							</div>
			<div class="col right form-wrapper">
				<div class="newsletter-form">
	<form method="post" action="/wiki/kapitola/zabbix/feed/" enctype="multipart/form-data">
		<input type="hidden" name="url" value="https://www.initmax.cz/wiki/kapitola/zabbix/feed/">

		<div class="inputs">

			<label for="newsletter-form_contact_email" class="top">Vaše e-mailová adresa:</label>
			<div class="df">

				<div class="input">
					<input type="text" id="newsletter-form_contact_email" name="newsletter_email" placeholder="@" data-format="email" data-required="1">
									</div><!-- /.input -->

				<a href="#" class="btn btn--white sendBtn">Odeslat</a>

			</div>

			<div class="bottom nm">
				<label for="newsletter-form_gdpr" class="checkbox gdpr">
					<input type="checkbox" id="newsletter-form_gdpr" name="newsletter_gdpr">
					<span>Souhlasím se&nbsp;<a href="https://www.initmax.cz/ochrana-osobnich-udaju/" target="_blank">zpracováním osobních údajů</a>.</span>
				</label>
			</div>

		</div><!-- /.inputs -->
		<div class="sent hidden">
			<div class="iconOk"><h3>Děkujeme, že jste se přihlásili k&nbsp;odběru našeho newsletteru.</h3>
</div>
			<button class="sent__close" title="Zavřít" onclick="closeFormMessage(this,event)"><svg data-name="Group 3602" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 3272" d="M0,0H24V24H0Z" fill="none"/><line data-name="Line 98" y2="14" transform="translate(7.05 7.05) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 99" x2="14" transform="translate(7.05 16.95) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</button>
		</div><!-- /.sent -->
	</form>
</div>			</div>
		</div>
	</div>
</section></section>



<section id="social-links-block_56aef360f0535dd764b22dc1a1b74e26" data-id="social-links-block_56aef360f0535dd764b22dc1a1b74e26" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>

<p>The post <a href="https://www.initmax.cz/wiki/reporting-v-zabbixu-7-0/">Reporting v&nbsp;Zabbixu 7.0</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Zabbix 7.0 &#8211; návod na&#160;instalaci v&#160;5 minutách</title>
		<link>https://www.initmax.cz/wiki/zabbix-7-0-instalace-v-5-minutach/</link>
		
		<dc:creator><![CDATA[Tomáš Heřmánek]]></dc:creator>
		<pubDate>Thu, 26 Oct 2023 19:07:00 +0000</pubDate>
				<guid isPermaLink="false">https://www.initmax.cz/?post_type=wiki&#038;p=13309</guid>

					<description><![CDATA[<p>V tomto návodu si ukážeme, jak během pěti minut nainstalovat a nakonfigurovat nejnovější Zabbix verze 7.0 s databází PostgreSQL 16 na Rocky Linux ...</p>
<p>The post <a href="https://www.initmax.cz/wiki/zabbix-7-0-instalace-v-5-minutach/">Zabbix 7.0 &#8211; návod na&nbsp;instalaci v&nbsp;5 minutách</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>V tomto návodu si ukážeme, jak během pěti minut nainstalovat a&nbsp;nakonfigurovat nejnovější Zabbix verze 7.0 s&nbsp;databází PostgreSQL 16 na&nbsp;Rocky Linux 9!</p>


<section id="block-webinar-block_b6129c92c355e5621a8f34f5ac06a5d1" data-id="block-webinar-block_b6129c92c355e5621a8f34f5ac06a5d1" class="gt-block block-webinar">
    <div class="connected-webinars__grid">
        <a href="https://www.initmax.cz/webinar/instalace-zabbixu-v-peti-minutach-7-0/" class="grid-item">
	<article class="webinar-promotion">
		<div class="webinar-promotion__thumbnail-wrap">
			<figure class="webinar-promotion__thumbnail">
					<img decoding="async" src="https://www.initmax.cz/wp-content/uploads/2023/09/ilustrace_webinare_zabbix_7.0_03_thumbnail_web-08.png"
				 width="400"
		 height="250"
		 class=""
		 alt="Instalace Zabbixu v&nbsp;pěti minutách"
		 loading="lazy"	>
									<div class="webinar-promotion__tags">
						<span class="tag tag--small" style="color:#ffffff;background-color:#d40000;">Zabbix</span>					</div>
							</figure>
		</div>
		<div class="webinar-promotion__text">
			<div>
									<time datetime="2023-10-12">12.&nbsp;10.&nbsp;2023</time>
							</div>
			<h3 class="webinar-promotion__title">Instalace Zabbixu v&nbsp;pěti minutách</h3>
			<div class="icon-link">
				<figure class="icon-wrap icon-wrap--primary"><svg data-name="Group 3411" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 455" d="M0,0H24V24H0Z" fill="none"/><path data-name="Path 456" d="M15,10l4.553-2.276A1,1,0,0,1,21,8.618v6.764a1,1,0,0,1-1.447.894L15,14V10Z" transform="translate(0 0)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><rect data-name="Rectangle 1286" width="12" height="12" rx="2" transform="translate(3.112 6)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</figure>
				<span>Zhlédnout záznam</span>
			</div>
		</div>
	</article>
</a>    </div>
</section>


<section id="social-links-block_17d9a75d671bb48941f30db03cf32387" data-id="social-links-block_17d9a75d671bb48941f30db03cf32387" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>




<h2 class="wp-block-heading">Než začneme</h2>



<p>Pro účely této <strong>ukázky</strong> si nejdříve přepneme SELinux do&nbsp;Permissive módu.</p>



<p>Pokud plánujete SELinux trvale deaktivovat, můžete tak učinit úpravou konfiguračního souboru. Nicméně, doporučujeme zvážit možnost naučit se s&nbsp;SELinuxem pracovat a&nbsp;využít jeho bezpečnostní výhody. Podrobné informace o&nbsp;správném nastavení a&nbsp;monitorování SELinuxu naleznete <a href="https://www.initmax.cz/wiki/selinux-integrace-se-zabbixem-a-dalsimi-nastroji/">v našem samostatném článku.​</a></p>


<section id="block-code-block_b48d31084fe6c0d9965f7b74bd108e24" data-id="block-code-block_b48d31084fe6c0d9965f7b74bd108e24" class="gt-block block-code">
    <pre><code>setenforce 0</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Instalace PostgreSQL</h2>



<p>V prvním kroku si naistalujeme repozitáře pro PostgreSQL a&nbsp;zakážeme výchozí, systémové PostgreSQL repozitáře.</p>


<section id="block-code-block_b5158faff8d21a61a45969da89e2aaf4" data-id="block-code-block_b5158faff8d21a61a45969da89e2aaf4" class="gt-block block-code">
    <pre><code>dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm
dnf -qy module disable postgresql</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Následně pak nainstalujeme PostgreSQL, v&nbsp;tomto případě to bude aktuálně podporovaná verze 16.</p>


<section id="block-code-block_20cf6a35cb3df0404f26940b52141b47" data-id="block-code-block_20cf6a35cb3df0404f26940b52141b47" class="gt-block block-code">
    <pre><code>dnf install -y postgresql16-server</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Inicializujeme databázi a&nbsp;nastavíme její automatické spouštění.</p>


<section id="block-code-block_92618bb769cbb99806ad987994c5db39" data-id="block-code-block_92618bb769cbb99806ad987994c5db39" class="gt-block block-code">
    <pre><code>/usr/pgsql-16/bin/postgresql-16-setup initdb
systemctl enable postgresql-16 --now</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Instalace Zabbix serveru a&nbsp;jeho součástí</h2>



<p>Databáze je nyní nainstalovaná, a&nbsp;můžeme tedy přikročit k&nbsp;instalaci Zabbix serveru a&nbsp;všech jeho součástí.</p>



<p>Nejprve si z&nbsp;repozitáře EPEL vyloučíme jakékoliv instalační balíčky týkající se Zabbixu. Za předpokladu, že je nainstalován.</p>



<p>To provedeme tak, že na&nbsp;konec souboru <code>/etc/yum.repos.d/epel.repo</code> vložíme následující řádek:</p>


<section id="block-code-block_0e06e3e70cafe1c709706270e7fe0625" data-id="block-code-block_0e06e3e70cafe1c709706270e7fe0625" class="gt-block block-code">
    <pre><code>[epel]
...
excludepkgs=zabbix*</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Přidáme si repozitáře Zabbixu a&nbsp;vyčistíme instalační cache.</p>


<section id="block-code-block_f667086c0fac5159a0ba9fa994dae363" data-id="block-code-block_f667086c0fac5159a0ba9fa994dae363" class="gt-block block-code">
    <pre><code>rpm -Uvh https://repo.zabbix.com/zabbix/7.0/rocky/9/x86_64/zabbix-release-latest.el9.noarch.rpm
dnf clean all</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A nainstalujeme všechny potřebné součásti Zabbixu.</p>



<p>V tomto případě použijeme jako primárního monitorovacího agenta Zabbix Agent 2, který vám doporučujeme používat, jelikož přináší daleko více funkcionalit.</p>


<section id="block-code-block_22540587e67f451d897b631a1da8b33e" data-id="block-code-block_22540587e67f451d897b631a1da8b33e" class="gt-block block-code">
    <pre><code>dnf install zabbix-server-pgsql zabbix-web-pgsql zabbix-apache-conf zabbix-sql-scripts zabbix-agent2 zabbix-web-service</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Inicializace databáze</h2>



<p>Nejprve vytvoříme databázového uživatele pro Zabbix, budeme vyzváni k&nbsp;zadání jeho přístupového hesla.</p>


<section id="block-code-block_0cdd2073bde77da88b05c348f0c1c532" data-id="block-code-block_0cdd2073bde77da88b05c348f0c1c532" class="gt-block block-code">
    <pre><code>cd /tmp
sudo -u postgres createuser --pwprompt zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V tuto chvíli jsme schopni naimportovat výchozí schéma a&nbsp;data. Opět budeme vyzváni k&nbsp;zadání hesla. <br>Zde použijeme heslo z&nbsp;předchozího kroku.</p>


<section id="block-code-block_3f7b1eee17eee8c4be45b887f62c8436" data-id="block-code-block_3f7b1eee17eee8c4be45b887f62c8436" class="gt-block block-code">
    <pre><code>sudo -u postgres createdb -O zabbix zabbix
zcat /usr/share/zabbix-sql-scripts/postgresql/server.sql.gz | sudo -u zabbix psql zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Nastavení firewallu</h2>



<p>Nazávěr na&nbsp;firewallu povolíme porty, které jsou nezbytné pro běh Zabbix serveru.</p>


<section id="block-code-block_fd0107bfa8ab812e90a197656f079999" data-id="block-code-block_fd0107bfa8ab812e90a197656f079999" class="gt-block block-code">
    <pre><code>firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-port=10051/tcp
firewall-cmd --reload</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Instalace TimescaleDB</h2>



<p>Nyní se pustíme do&nbsp;instalace TimescaleDB a&nbsp;začneme tím, že přidáme její oficiální repozitář.</p>


<section id="block-code-block_8a3ee5a6b7ce8df9aced70b16cde2e5a" data-id="block-code-block_8a3ee5a6b7ce8df9aced70b16cde2e5a" class="gt-block block-code">
    <pre><code>tee /etc/yum.repos.d/timescale_timescaledb.repo &lt;&lt;EOL
[timescale_timescaledb]
name=timescale_timescaledb
baseurl=https://packagecloud.io/timescale/timescaledb/el/$(rpm -E %{rhel})/\$basearch
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/timescale/timescaledb/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
EOL</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nainstalujme TimescaleDB.</p>


<section id="block-code-block_8b991152a2c58a1baea5c830b1b32d3c" data-id="block-code-block_8b991152a2c58a1baea5c830b1b32d3c" class="gt-block block-code">
    <pre><code>dnf install timescaledb-2-postgresql-16 timescaledb-2-loader-postgresql-16</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Spustíme utilitu <code>timescaledb-tune</code> a&nbsp;jako parametr jí předáme vyšší hodnotu maximálního množství připojení (<code>--max-conns</code>), které pro tyto testovací účely nastavíme na&nbsp;<code>125</code>.</p>



<p>Tato utilita slouží k&nbsp;přizpůsobení výchozího nastavení PostgreSQL vůčihledně výkonu a&nbsp;adekvátnímu nastavení parametrů PostgreSQL pro fungování s&nbsp;TimescaleDB.</p>



<p>Zároveň nám tato utilit pomocí instalačního průvodce pomůže vybrat aktuální a&nbsp;platný konfigurační soubor PostgreSQL a&nbsp;nastaví i&nbsp;automatické načítání knihoven TimescaleDB.</p>



<p>Prosím, odpovídejte &#8222;ano&#8220; (y) na&nbsp;všechny otázky. Pozor, automatický tuner předpokládá, že PostgreSQL běží na&nbsp;samostatném serveru, a&nbsp;proto může být potřeba případně upravit parametry.</p>


<section id="block-code-block_98f4a1f8d161f787e78b8d29f3c4f22c" data-id="block-code-block_98f4a1f8d161f787e78b8d29f3c4f22c" class="gt-block block-code">
    <pre><code>timescaledb-tune --pg-config /usr/pgsql-16/bin --max-conns=125</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1254" height="528" src="https://www.initmax.cz/wp-content/uploads/2023/10/postgresql16-timescaledb.png" alt="" class="wp-image-13933" srcset="https://www.initmax.cz/wp-content/uploads/2023/10/postgresql16-timescaledb.png 1254w, https://www.initmax.cz/wp-content/uploads/2023/10/postgresql16-timescaledb-300x126.png 300w, https://www.initmax.cz/wp-content/uploads/2023/10/postgresql16-timescaledb-1024x431.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/10/postgresql16-timescaledb-768x323.png 768w" sizes="auto, (max-width: 1254px) 100vw, 1254px" /></figure>



<p>Následně restartujeme systémovou službu pro PostgreSQL:</p>


<section id="block-code-block_1ff126a375a520d435fbc4119a801835" data-id="block-code-block_1ff126a375a520d435fbc4119a801835" class="gt-block block-code">
    <pre><code>systemctl restart postgresql-16.service</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Zbývá již jen vytvořit a&nbsp;aktivovat samotnou TimescaleDB:</p>



<p>Pozor, během vývoje došlo ke změně cesty z&nbsp;původní /usr/share/zabbix-sql-scripts/postgresql/timescaledb.sql na&nbsp;novou /usr/share/zabbix-sql-scripts/postgresql/timescaledb/schema.sql.</p>


<section id="block-code-block_95d01a482660dc4a72a730d6d0d37395" data-id="block-code-block_95d01a482660dc4a72a730d6d0d37395" class="gt-block block-code">
    <pre><code>echo &quot;CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;&quot; | sudo -u postgres psql zabbix
cat /usr/share/zabbix-sql-scripts/postgresql/timescaledb/schema.sql | sudo -u zabbix psql zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Nastavení Zabbix serveru</h2>



<p>Otevřeme konfigurační soubor Zabbix serveru v&nbsp;cestě:</p>


<section id="block-code-block_4ef78878ba2f8651c52cfb565da2019d" data-id="block-code-block_4ef78878ba2f8651c52cfb565da2019d" class="gt-block block-code">
    <pre><code>nano /etc/zabbix/zabbix_server.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V tomto konfiguračním souboru upravíme následující parametry tak, jak vídíte na&nbsp;předloze níže:</p>


<section id="block-code-block_0d658c2759baee841550eb6430b8bf0e" data-id="block-code-block_0d658c2759baee841550eb6430b8bf0e" class="gt-block block-code">
    <pre><code>...
DBPassword=password
StartReportWriters=1
WebServiceURL=http://localhost:10053/report
...</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V dalším kroku doinstalujeme jazykové balíčky pro češtinu a&nbsp;slovenštinu:</p>


<section id="block-code-block_3d6cb2593536ee7cc55e0b5bf253c811" data-id="block-code-block_3d6cb2593536ee7cc55e0b5bf253c811" class="gt-block block-code">
    <pre><code>dnf install glibc-langpack-cs.x86_64 glibc-langpack-sk.x86_64</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A nakonec restartujeme všechny související služby a&nbsp;nastavíme je tak, aby se spouštěly automaticky po&nbsp;startu:</p>


<section id="block-code-block_d932fb2f4059e22fbf072c2942ef9126" data-id="block-code-block_d932fb2f4059e22fbf072c2942ef9126" class="gt-block block-code">
    <pre><code>systemctl restart zabbix-server zabbix-web-service zabbix-agent2 httpd php-fpm
systemctl enable zabbix-server zabbix-web-service zabbix-agent2 httpd php-fpm</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Pro ověření stavu, že nám Zabbix server nastartoval v&nbsp;pořádku můžeme kromě jiného zkontrolovat i&nbsp;jeho log soubor:</p>


<section id="block-code-block_56dc293b246a994e737ecbf87281bba7" data-id="block-code-block_56dc293b246a994e737ecbf87281bba7" class="gt-block block-code">
    <pre><code>less /var/log/zabbix/zabbix_server.log</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V případě, že uvidíte v&nbsp;log souboru zprávu o&nbsp;tom, že je verze TimescaleDB příliš nová, pak to není žádný velký problém. Zabbix nedokáže dostatečně rychle reagovat na&nbsp;nejnovější verze TimescaleDB tak, aby ji ve svém kódu nastavil jako podporovanou, ovšem kompatibilita je Zabbixem zaručena a&nbsp;námi ověřena.</p>



<p>V případě této chyby stačí otevřít konfigurační soubor Zabbix serveru v&nbsp;cestě <code>/etc/zabbix/zabbix_server.conf</code> a&nbsp;zde upravte následující konfigurační parametr:</p>


<section id="block-code-block_793c00b2a19eb5deadeee07bab7302a7" data-id="block-code-block_793c00b2a19eb5deadeee07bab7302a7" class="gt-block block-code">
    <pre><code>AllowUnsupportedDBVersions=1</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Soubor s&nbsp;tímto nastavením uložte a&nbsp;zrestartujte systémovou službu Zabbix serveru.</p>


<section id="block-code-block_5af40f9573f04eed49fa5cde90488e5c" data-id="block-code-block_5af40f9573f04eed49fa5cde90488e5c" class="gt-block block-code">
    <pre><code>systemctl restart zabbix-server</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Nastavení Zabbix frontendu</h2>



<p>V prohlížeči si otevřeme cílové URL, na&nbsp;kterém Zabbix běží. Například tedy <code>http://192.168.0.50/zabbix</code>, kde nás uvítá průvodce prvotní instalací.</p>



<p>Po zvolení implicitního jazyka se tlačítkem <code>Next step</code> posuneme na&nbsp;stránku s&nbsp;kontrolou minimálních požadavků.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1798" height="1126" src="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-1.png" alt="" class="wp-image-16595" srcset="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-1.png 1798w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-1-300x188.png 300w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-1-1024x641.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-1-768x481.png 768w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-1-1536x962.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-1-608x381.png 608w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-1-1216x762.png 1216w" sizes="auto, (max-width: 1798px) 100vw, 1798px" /></figure>



<p>Pokud je kontrola v&nbsp;pořádku, pak se tedy můžeme kliknutím na&nbsp;<code>Next step</code> posunout na&nbsp;další stránku s&nbsp;nastavením připojení do&nbsp;databáze.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1794" height="1134" src="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-2.png" alt="" class="wp-image-16593" srcset="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-2.png 1794w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-2-300x190.png 300w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-2-1024x647.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-2-768x485.png 768w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-2-1536x971.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-2-608x384.png 608w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-2-1216x769.png 1216w" sizes="auto, (max-width: 1794px) 100vw, 1794px" /></figure>



<p>Zde vyplňujeme pouze políčko <strong>Password</strong> pro přístup do&nbsp;databáze, nic dalšího není třeba měnit.</p>



<p>Po vyplnění opět klikneme na&nbsp;<code>Next step</code>.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1794" height="1134" src="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-3.png" alt="" class="wp-image-16591" srcset="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-3.png 1794w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-3-300x190.png 300w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-3-1024x647.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-3-768x485.png 768w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-3-1536x971.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-3-608x384.png 608w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-3-1216x769.png 1216w" sizes="auto, (max-width: 1794px) 100vw, 1794px" /></figure>



<p>Na následující stránce se základním nastavením vyplníme název serveru, časové pásmo, a&nbsp;kliknutím na&nbsp;<code>Next step</code> pokračujeme k&nbsp;souhrnu konfigurace.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1796" height="1124" src="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-4.png" alt="" class="wp-image-16589" srcset="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-4.png 1796w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-4-300x188.png 300w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-4-1024x641.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-4-768x481.png 768w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-4-1536x961.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-4-608x381.png 608w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-4-1216x761.png 1216w" sizes="auto, (max-width: 1796px) 100vw, 1796px" /></figure>



<p>V tomto souhrnu zkontrolumeme všechny zadané hodnoty a&nbsp;kliknutím na&nbsp;<code>Next step</code> dokončíme instalaci.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1792" height="1136" src="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-5.png" alt="" class="wp-image-16587" srcset="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-5.png 1792w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-5-300x190.png 300w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-5-1024x649.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-5-768x487.png 768w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-5-1536x974.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-5-608x385.png 608w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-5-1216x771.png 1216w" sizes="auto, (max-width: 1792px) 100vw, 1792px" /></figure>



<p>Nyní již kliknutím na&nbsp;tlačítko <code>Finish</code> přejdeme na&nbsp;přihlašovací obrazovku.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1796" height="1130" src="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-6.png" alt="" class="wp-image-16585" srcset="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-6.png 1796w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-6-300x189.png 300w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-6-1024x644.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-6-768x483.png 768w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-6-1536x966.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-6-608x383.png 608w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-6-1216x765.png 1216w" sizes="auto, (max-width: 1796px) 100vw, 1796px" /></figure>



<p>Po úspěšném přihlášení pomocí dříve zadaných údajů můžeme začít používat nejnovější Zabbix verze 7.0 (<code>Admin/zabbix</code>).</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2440" height="1116" src="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-7.png" alt="" class="wp-image-16583" srcset="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-7.png 2440w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-7-300x137.png 300w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-7-1024x468.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-7-768x351.png 768w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-7-1536x703.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-7-2048x937.png 2048w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-7-608x278.png 608w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-7-1216x556.png 1216w" sizes="auto, (max-width: 2440px) 100vw, 2440px" /></figure>



<p>A takto vypada úvodní dashboard nového Zabbixu 7.0:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="4094" height="1720" src="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-8.png" alt="" class="wp-image-16581" srcset="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-8.png 4094w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-8-300x126.png 300w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-8-1024x430.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-8-768x323.png 768w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-8-1536x645.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-8-2048x860.png 2048w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-8-608x255.png 608w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-8-1216x511.png 1216w" sizes="auto, (max-width: 4094px) 100vw, 4094px" /></figure>



<h2 class="wp-block-heading">Nastavení Zabbix reportingu</h2>



<p>Proto, aby byl plně funkční reporting se všemi jeho vylepšeními si nejprve musíme nainstalovat Google Chrome.</p>



<p>Následujícím příkazem stáhneme instalační balíček, a&nbsp;ten také nainstalujeme:</p>


<section id="block-code-block_64be025ff063912eafe97a0a4c8b66f3" data-id="block-code-block_64be025ff063912eafe97a0a4c8b66f3" class="gt-block block-code">
    <pre><code>wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
dnf localinstall google-chrome-stable_current_x86_64.rpm</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V dalším kroku upravíme v&nbsp;Zabbix frontendu parametr &#8222;Frontend URL&#8220; na&nbsp;aktuálně platnou hodnotu, toto nastavení se nachází zde:</p>


<section id="block-code-block_a83189b3e1999fda911b340917a18e30" data-id="block-code-block_a83189b3e1999fda911b340917a18e30" class="gt-block block-code">
    <pre><code>Administration -&gt; General -&gt; Other</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Příklad této konfigurace pak můžete vidět na&nbsp;obrázku níže.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2798" height="1364" src="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-9.png" alt="" class="wp-image-16598" srcset="https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-9.png 2798w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-9-300x146.png 300w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-9-1024x499.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-9-768x374.png 768w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-9-1536x749.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-9-2048x998.png 2048w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-9-608x296.png 608w, https://www.initmax.cz/wp-content/uploads/2023/10/zabbix70-9-1216x593.png 1216w" sizes="auto, (max-width: 2798px) 100vw, 2798px" /></figure>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">Dokončovací práce</h2>



<ul class="wp-block-list">
<li>Zkontrolujte, že správně běží Zabbix server, databázový server a&nbsp;mají správnou verzi</li>



<li>Zkontrolujte také, zda při&nbsp;startu serveru nebo proxy v&nbsp;systému neuvidíte následující chybu: ‚…the user limit of 1024 file descriptors is insufficient. The maximum number of concurrent checks per worker has been reduced…‘ <a href="https://www.initmax.cz/wiki/zabbix-7-0-a-navyseni-systemovych-limitu/">Návod na&nbsp;odstranění naleznete na&nbsp;naší wiki</a>.</li>
</ul>



<h2 class="wp-block-heading">Podpora pro nový Item Browser</h2>



<p>Veškeré potřebné kroky naleznete v&nbsp;<a href="https://www.initmax.cz/wiki/instalace-a-zakladni-pouziti-pro-item-browser/">samostatném návodu na&nbsp;naší wiki<strong>.</strong></a></p>


<section id="block-webinar-block_639b258fc0bfd30882f4f8d79065a41b" data-id="block-webinar-block_639b258fc0bfd30882f4f8d79065a41b" class="gt-block block-webinar">
    <div class="connected-webinars__grid">
        <a href="https://www.initmax.cz/webinar/7-0-workshop-zabbix-7-0-monitorovani-pomoci-browser-item-pomoci-aplikace-selenium/" class="grid-item">
	<article class="webinar-promotion">
		<div class="webinar-promotion__thumbnail-wrap">
			<figure class="webinar-promotion__thumbnail">
					<img decoding="async" src="https://www.initmax.cz/wp-content/uploads/2024/05/ilustrace_webinare_zabbix_7.0_13_thumbnail_web-copy-2.png"
				 width="400"
		 height="250"
		 class=""
		 alt="7.0 Workshop: Zabbix 7.0 &#8211; Monitorování pomocí Browser Item pomocí aplikace Selenium"
		 loading="lazy"	>
									<div class="webinar-promotion__tags">
						<span class="tag tag--small" style="color:#ffffff;background-color:#4caf50;">Nový</span><span class="tag tag--small" style="color:#ffffff;background-color:#d40000;">Zabbix</span>					</div>
							</figure>
		</div>
		<div class="webinar-promotion__text">
			<div>
									<time datetime="2024-06-21">21.&nbsp;6.&nbsp;2024</time>
							</div>
			<h3 class="webinar-promotion__title">7.0 Workshop: Zabbix 7.0 &#8211; Monitorování pomocí Browser Item pomocí aplikace Selenium</h3>
			<div class="icon-link">
				<figure class="icon-wrap icon-wrap--primary"><svg data-name="Group 3411" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 455" d="M0,0H24V24H0Z" fill="none"/><path data-name="Path 456" d="M15,10l4.553-2.276A1,1,0,0,1,21,8.618v6.764a1,1,0,0,1-1.447.894L15,14V10Z" transform="translate(0 0)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><rect data-name="Rectangle 1286" width="12" height="12" rx="2" transform="translate(3.112 6)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</figure>
				<span>Zhlédnout záznam</span>
			</div>
		</div>
	</article>
</a>    </div>
</section>



<h2 class="wp-block-heading">Vlastní rebranding</h2>



<p>Veškeré potřebné kroky naleznete v&nbsp;<a href="https://www.initmax.cz/wiki/rebranding-zabbixu/">samostatném návodu na&nbsp;naší wiki<strong>.</strong></a></p>


<section id="block-newsletter-block_ac303ed0256b5fe769296e5c3dbedded" data-id="block-newsletter-block_ac303ed0256b5fe769296e5c3dbedded" class="gt-block block-newsletter">
    <section id="newsletter" class="newsletter">
	<div class="gradient basic">
		<div class="newsletter__inner width width--general">
			<div class="col left">
									<h2 class="newsletter__title">Buďte v&nbsp;obraze s&nbsp;naším newsletterem</h2>
													<div class="newsletter__content"><p>Díky initMAX newsletteru Vám neunikne žádná z&nbsp;pozvánek na&nbsp;akce a&nbsp;webináře, žádný z&nbsp;tipů, jak dostat ze svého IT MAXimum, ani ověřené informace o&nbsp;novinkách ze světa Zabbix a&nbsp;dalších technologií.</p>
</div>
							</div>
			<div class="col right form-wrapper">
				<div class="newsletter-form">
	<form method="post" action="/wiki/kapitola/zabbix/feed/" enctype="multipart/form-data">
		<input type="hidden" name="url" value="https://www.initmax.cz/wiki/kapitola/zabbix/feed/">

		<div class="inputs">

			<label for="newsletter-form_contact_email" class="top">Vaše e-mailová adresa:</label>
			<div class="df">

				<div class="input">
					<input type="text" id="newsletter-form_contact_email" name="newsletter_email" placeholder="@" data-format="email" data-required="1">
									</div><!-- /.input -->

				<a href="#" class="btn btn--white sendBtn">Odeslat</a>

			</div>

			<div class="bottom nm">
				<label for="newsletter-form_gdpr" class="checkbox gdpr">
					<input type="checkbox" id="newsletter-form_gdpr" name="newsletter_gdpr">
					<span>Souhlasím se&nbsp;<a href="https://www.initmax.cz/ochrana-osobnich-udaju/" target="_blank">zpracováním osobních údajů</a>.</span>
				</label>
			</div>

		</div><!-- /.inputs -->
		<div class="sent hidden">
			<div class="iconOk"><h3>Děkujeme, že jste se přihlásili k&nbsp;odběru našeho newsletteru.</h3>
</div>
			<button class="sent__close" title="Zavřít" onclick="closeFormMessage(this,event)"><svg data-name="Group 3602" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 3272" d="M0,0H24V24H0Z" fill="none"/><line data-name="Line 98" y2="14" transform="translate(7.05 7.05) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 99" x2="14" transform="translate(7.05 16.95) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</button>
		</div><!-- /.sent -->
	</form>
</div>			</div>
		</div>
	</div>
</section></section>



<section id="social-links-block_17d9a75d671bb48941f30db03cf32387" data-id="social-links-block_17d9a75d671bb48941f30db03cf32387" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>

<p>The post <a href="https://www.initmax.cz/wiki/zabbix-7-0-instalace-v-5-minutach/">Zabbix 7.0 &#8211; návod na&nbsp;instalaci v&nbsp;5 minutách</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Zabbix &#8211; automatizace správy uživatelů (JIT)</title>
		<link>https://www.initmax.cz/wiki/zabbix-automatizace-spravy-uzivatelu-jit/</link>
		
		<dc:creator><![CDATA[Tomáš Heřmánek]]></dc:creator>
		<pubDate>Tue, 01 Aug 2023 20:50:21 +0000</pubDate>
				<guid isPermaLink="false">https://www.initmax.cz/?post_type=wiki&#038;p=12639</guid>

					<description><![CDATA[<p>Dnes si společně probereme možnosti autentizace v Zabbixu, ukážeme si příklady jejich nastavení a probereme i výhody a možná úskalí použití jednotlivých metod. Možnosti ...</p>
<p>The post <a href="https://www.initmax.cz/wiki/zabbix-automatizace-spravy-uzivatelu-jit/">Zabbix &#8211; automatizace správy uživatelů (JIT)</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Dnes si společně probereme možnosti autentizace v&nbsp;Zabbixu, ukážeme si příklady jejich nastavení a&nbsp;probereme i&nbsp;výhody a&nbsp;možná úskalí použití jednotlivých metod.</p>


<section id="block-webinar-block_ed68aeb1a72b1de83733de149c1a538b" data-id="block-webinar-block_ed68aeb1a72b1de83733de149c1a538b" class="gt-block block-webinar">
    <div class="connected-webinars__grid">
        <a href="https://www.initmax.cz/webinar/automatizace-spravy-uzivatelu-v-zabbixu-7-0/" class="grid-item">
	<article class="webinar-promotion">
		<div class="webinar-promotion__thumbnail-wrap">
			<figure class="webinar-promotion__thumbnail">
					<img decoding="async" src="https://www.initmax.cz/wp-content/uploads/2023/09/ilustrace_webinare_zabbix_7.0_09_thumbnail_web-68.png"
				 width="400"
		 height="250"
		 class=""
		 alt="Automatizace správy uživatelů v&nbsp;Zabbixu 7.0"
		 loading="lazy"	>
									<div class="webinar-promotion__tags">
						<span class="tag tag--small" style="color:#ffffff;background-color:#d40000;">Zabbix</span>					</div>
							</figure>
		</div>
		<div class="webinar-promotion__text">
			<div>
									<time datetime="2024-01-25">25.&nbsp;1.&nbsp;2024</time>
							</div>
			<h3 class="webinar-promotion__title">Automatizace správy uživatelů v&nbsp;Zabbixu 7.0</h3>
			<div class="icon-link">
				<figure class="icon-wrap icon-wrap--primary"><svg data-name="Group 3411" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 455" d="M0,0H24V24H0Z" fill="none"/><path data-name="Path 456" d="M15,10l4.553-2.276A1,1,0,0,1,21,8.618v6.764a1,1,0,0,1-1.447.894L15,14V10Z" transform="translate(0 0)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><rect data-name="Rectangle 1286" width="12" height="12" rx="2" transform="translate(3.112 6)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</figure>
				<span>Zhlédnout záznam</span>
			</div>
		</div>
	</article>
</a>    </div>
</section>


<section id="social-links-block_1e1b91e7162fbb09ea8feb9cfaf538a3" data-id="social-links-block_1e1b91e7162fbb09ea8feb9cfaf538a3" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>




<h2 class="wp-block-heading">Možnosti autentizace v&nbsp;Zabbix</h2>



<p>Ve výchozím nastavení používá Zabbix pro všechny uživatele <strong>interní ověřování</strong>. Lze však použít kombinaci interních účtů a&nbsp;účtů z&nbsp;<strong>LDAP</strong> (Microsoft Active Directory a&nbsp;OpenLDAP), <strong>SAML 2.0</strong> nebo <strong>SCIM</strong>, případně lze k&nbsp;ověření uživatelského jména a&nbsp;hesla využít i&nbsp;<strong>HTTP</strong> autentizaci (například Basic Authentication nebo NTLM/Kerberos), oproti ostatním způsobům však v&nbsp;tomto případě není možné použít <strong>JIT</strong>. </p>



<p>V následujících kapitolách se blíže podíváme na&nbsp;základní nastavení ověřování oproti LDAP (Active Directory), SAML (Azure) i&nbsp;SCIM (Azure).</p>



<p>Ve všech našich příkladech nejprve zapneme autentizaci pomocí LDAP a&nbsp;povolíme JIT provisioning.</p>



<p>V sekci <code>Users -&gt; Authentication -&gt; Authentication</code> nastavíme výchozí ověřování (<code>Default authentication</code>) na&nbsp;<code>LDAP</code>.</p>



<p>Pro položku <code>Deprovisioned user groups</code> pak vybereme skupinu <code>Disabled</code>.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="869" height="647" src="https://www.initmax.cz/wp-content/uploads/2023/08/image-37.png" alt="Zapnutí autentizace pomocí LDAP a povolení JIT provisioning" class="wp-image-12812" srcset="https://www.initmax.cz/wp-content/uploads/2023/08/image-37.png 869w, https://www.initmax.cz/wp-content/uploads/2023/08/image-37-300x223.png 300w, https://www.initmax.cz/wp-content/uploads/2023/08/image-37-768x572.png 768w" sizes="auto, (max-width: 869px) 100vw, 869px" /></figure>
</div>


<h2 class="wp-block-heading">LDAP (Active Directory)</h2>



<h3 class="wp-block-heading">Základní nastavení</h3>



<p>Nejprve v&nbsp;sekci <code>Users -&gt; Authentication -&gt; LDAP settings</code> zaškrtneme checkboxy <code>Enable LDAP authentication</code> a&nbsp;<code>Enable JIT provisioning</code>.</p>



<p>Pokud to naše prostředí vyžaduje, pak můžeme také povolit case-sensitive přihlašování, tedy např.&nbsp;uživatelé se stejným jménem a&nbsp;příjmením rozlišení case-sensitive přihlašovacím jménem.</p>



<p>Můžeme také nastavit nižší nebo vyšší četnost s&nbsp;jakou provisioning probíhá, než je hodnota výchozí (1 hodina).</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="829" height="498" src="https://www.initmax.cz/wp-content/uploads/2023/07/image-1.png" alt="Základní nastavení LDAP" class="wp-image-12642" srcset="https://www.initmax.cz/wp-content/uploads/2023/07/image-1.png 829w, https://www.initmax.cz/wp-content/uploads/2023/07/image-1-300x180.png 300w, https://www.initmax.cz/wp-content/uploads/2023/07/image-1-768x461.png 768w" sizes="auto, (max-width: 829px) 100vw, 829px" /></figure>
</div>


<p>Následně musíme přidat LDAP server a&nbsp;nastavit JIT provisioning, a&nbsp;to tak, že klikneme na&nbsp;odkaz <code>Add</code> nacházející se v&nbsp;sekci <code>Servers</code>.</p>



<p>V následujícím dialogu pak vyplníme veškeré údaje o&nbsp;LDAP serveru, přihlašování k&nbsp;němu (např.&nbsp;pomocí servisního účtu) a&nbsp;údaje potřebné pro procházení strukturou cílového LDAP serveru.</p>



<p>Nejprve nastavíme jméno LDAP serveru, jeho IP adresu nebo hostname, port LDAP služby (standardně 389 pro ldap a&nbsp;636 pro ldaps), LDAP serverů můžeme mít definováno i&nbsp;více než jen jeden.</p>



<p>Zvolíme cestu, kde má Zabbix v&nbsp;LDAP hledat uživatele a&nbsp;skupiny (<code>BaseDN</code>) a&nbsp;LDAP atribut, který se má hledat (<code>Search attribute</code>), tento bývá standardně <code>sAMAccountName</code>.</p>



<p>Vyplníme cestu v&nbsp;LDAP k&nbsp;uživateli, který je oprávněn se k&nbsp;LDAP připojit (<code>BindDN</code>) a&nbsp;jeho heslo (<code>Bind password</code>).</p>



<p><strong>Pozn.: </strong>Z bezpečnostních důvodů doporučujeme na&nbsp;úrovni LDAP serveru zakázat anonymní bind a&nbsp;striktně používat ldaps (tcp/636).</p>


<div class="wp-block-image is-resized">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="875" height="645" src="https://www.initmax.cz/wp-content/uploads/2023/07/image-4.png" alt="Dialog s veškerými údaji o LDAP serveru, přihlašování k němu a údaje potřebné pro procházení strukturou cílového LDAP serveru." class="wp-image-12648" srcset="https://www.initmax.cz/wp-content/uploads/2023/07/image-4.png 875w, https://www.initmax.cz/wp-content/uploads/2023/07/image-4-300x221.png 300w, https://www.initmax.cz/wp-content/uploads/2023/07/image-4-768x566.png 768w" sizes="auto, (max-width: 875px) 100vw, 875px" /></figure>
</div>


<h3 class="wp-block-heading">JIT</h3>



<p>Nyní přikročíme k&nbsp;nastavení samotného JIT provisioningu a&nbsp;to tak, že zaškrtneme checkbox <code>Configure JIT provisioning</code>, což rozbalí nabídku konfiguračních možností.</p>



<p>Nejprve zvolíme v&nbsp;položce <code>Group configuration</code> jak se mají na&nbsp;úrovni LDAP hledat skupiny. V&nbsp;tomto případě vybereme metodu <code>memberOf</code>, tedy že Zabbix má hledat uživatele a&nbsp;jejich členství ve skupinách.</p>



<p>Následně vyplníme název atributu, který určuje název skupiny (<code>Group name attribute</code>), obvykle je to <code>CN</code>, tedy CommonName.</p>



<p>V položce <code>User group membership attribute</code> doplníme atribut určující členství ve skupinách. </p>



<p>Povšimněte si, že na&nbsp;příkladu níže je tato položka správně vyplněna hodnotou <code>memberof</code>, ačkoliv nápověda v&nbsp;Zabbixu nabízí hodnotu <code><s>memberOf</s></code>, tato nápověda je ale chybná!</p>



<p><strong>Edit</strong>: Tento bug byl oficiálně reportován a&nbsp;byl opraven v&nbsp;issue <code>[ZBX-22597] resolved issue with LDAP group membership mapping not matching case-insensitive&nbsp;entries</code>. Od verze 6.4.2 to tedy již neplatí a&nbsp;nápověda nabízí správnou hodnotu, kterou doporučujeme výše.</p>



<p>Dalšími položkami jsou atributy určující křestní jméno uživatele (<code>User name attribute</code>) a&nbsp;jeho příjmení (<code>User last name attribute</code>). </p>



<p>Tyto hodnoty jsou v&nbsp;případě Active Directory <code>givenName</code> pro křestní jméno a&nbsp;<code>sn</code> pro příjmení.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="612" height="770" src="https://www.initmax.cz/wp-content/uploads/2023/07/image.png" alt="Nastavení samotného JIT provisioningu" class="wp-image-12640" srcset="https://www.initmax.cz/wp-content/uploads/2023/07/image.png 612w, https://www.initmax.cz/wp-content/uploads/2023/07/image-238x300.png 238w" sizes="auto, (max-width: 612px) 100vw, 612px" /></figure>
</div>


<h3 class="wp-block-heading">Mapování atributů</h3>



<p>V sekci &#8222;<code>User group mapping</code>&#8220; je nutné zvolit již existující skupinu na&nbsp;úrovni Zabbixu, do&nbsp;které se budou mapovat uživatelé z&nbsp;LDAP. </p>



<p>Skupina se musí jmenovat stejně v&nbsp;Zabbixu i&nbsp;v&nbsp;LDAP a&nbsp;v&nbsp;našem případě je to skupina <code>Zabbix_Super_Admins</code>.</p>



<p>Této skupině pak přiřadíme požadovanou uživatelskou roli, jejíž oprávnění skupina zdědí, jako například zde roli <code>Super admin role</code>.</p>



<p><strong>Pozn.:</strong> Pro obě nastavení je povoleno používání zástupných znaků (např.&nbsp;<code>*</code>).</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="588" height="768" src="https://www.initmax.cz/wp-content/uploads/2023/07/image-5.png" alt="User group mapping" class="wp-image-12650" srcset="https://www.initmax.cz/wp-content/uploads/2023/07/image-5.png 588w, https://www.initmax.cz/wp-content/uploads/2023/07/image-5-230x300.png 230w" sizes="auto, (max-width: 588px) 100vw, 588px" /></figure>
</div>


<p>Následující položka <code>Media type mapping</code> mapuje atributy z&nbsp;objektů v&nbsp;LDAP pro potřeby naplnění media typů jednotlivých uživatelů. </p>



<p>Níže můžete vidět příklad mapující například e-mail:</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="1336" height="1666" src="https://www.initmax.cz/wp-content/uploads/2023/08/media_mapping_jit.png" alt="" class="wp-image-14472" srcset="https://www.initmax.cz/wp-content/uploads/2023/08/media_mapping_jit.png 1336w, https://www.initmax.cz/wp-content/uploads/2023/08/media_mapping_jit-241x300.png 241w, https://www.initmax.cz/wp-content/uploads/2023/08/media_mapping_jit-821x1024.png 821w, https://www.initmax.cz/wp-content/uploads/2023/08/media_mapping_jit-768x958.png 768w, https://www.initmax.cz/wp-content/uploads/2023/08/media_mapping_jit-1232x1536.png 1232w" sizes="auto, (max-width: 1336px) 100vw, 1336px" /></figure>
</div>


<p>Před uložením konfigurace je možné funkčnost celého nastavení otestovat pomocí tlačítka <code>Test</code>.</p>


<div class="wp-block-image is-resized">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="567" height="608" src="https://www.initmax.cz/wp-content/uploads/2023/07/image-7.png" alt="Otestování funkčnosti celého nastavení" class="wp-image-12654" srcset="https://www.initmax.cz/wp-content/uploads/2023/07/image-7.png 567w, https://www.initmax.cz/wp-content/uploads/2023/07/image-7-280x300.png 280w" sizes="auto, (max-width: 567px) 100vw, 567px" /></figure>
</div>


<p>V tuto chvíli máme nastavení přihlašování pomocí LDAP včetně JIT provisioningu uživatelů hotové. Konfiguraci můžeme uložit a&nbsp;přihlásit se pomocí svých přihlašovacích údajů do&nbsp;LDAP.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="337" height="342" src="https://www.initmax.cz/wp-content/uploads/2023/07/image-9.png" alt="Přihlášení do LDAP" class="wp-image-12658" srcset="https://www.initmax.cz/wp-content/uploads/2023/07/image-9.png 337w, https://www.initmax.cz/wp-content/uploads/2023/07/image-9-296x300.png 296w" sizes="auto, (max-width: 337px) 100vw, 337px" /></figure>
</div>


<p>Pokud pro připojení k&nbsp;LDAP serveru používáme &#8222;bind&#8220; uživatele a&nbsp;LDAP nastavíme jako implicitní způsob ověřování (jako je tomu zde v&nbsp;našem případě), pak lze provést i&nbsp;jednorázový provisioning, například v&nbsp;případě, že víme o&nbsp;proběhlých změnách na&nbsp;úrovni LDAP a&nbsp;nechceme čekat předdefinovanou dobu četnosti provisioningu automatického. </p>



<p>Vykonat jednorázový, okamžitý provisioning můžeme v&nbsp;sekci <code>Users -&gt; Users</code>. Zde, pod seznamem uživatelů je tlačítko <code>Provision now</code>.</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="366" src="https://www.initmax.cz/wp-content/uploads/2023/07/image-8-1024x366.png" alt="Sekce Users -&gt; Users. Tlačítko Provision now = spuštění okamžitého provisioning" class="wp-image-12656" srcset="https://www.initmax.cz/wp-content/uploads/2023/07/image-8-1024x366.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/07/image-8-300x107.png 300w, https://www.initmax.cz/wp-content/uploads/2023/07/image-8-768x274.png 768w, https://www.initmax.cz/wp-content/uploads/2023/07/image-8-1536x548.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/07/image-8.png 1703w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<h2 class="wp-block-heading">SAML (Azure AD/Microsoft Entra ID)</h2>



<h3 class="wp-block-heading">Základní nastavení</h3>



<p>Jak úplně první krok je nutné vytvořit si v&nbsp;Azure novou aplikaci, a&nbsp;to v&nbsp;sekci <code>Enterprise applications -&gt; All applications -&gt; New application</code>, viz následující screenshot.</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="312" src="https://www.initmax.cz/wp-content/uploads/2023/08/image-1024x312.png" alt="Azure Enterprise application - vytvoření nové aplikace" class="wp-image-12660" srcset="https://www.initmax.cz/wp-content/uploads/2023/08/image-1024x312.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/08/image-300x92.png 300w, https://www.initmax.cz/wp-content/uploads/2023/08/image-768x234.png 768w, https://www.initmax.cz/wp-content/uploads/2023/08/image-1536x469.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/08/image.png 1727w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<p>Zde zvolíme možnost <code>Create your own application</code>. </p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="461" src="https://www.initmax.cz/wp-content/uploads/2023/08/image-1-1024x461.png" alt="Browse Azure AD Gallery - tlačítko Create your own application" class="wp-image-12662" srcset="https://www.initmax.cz/wp-content/uploads/2023/08/image-1-1024x461.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/08/image-1-300x135.png 300w, https://www.initmax.cz/wp-content/uploads/2023/08/image-1-768x346.png 768w, https://www.initmax.cz/wp-content/uploads/2023/08/image-1.png 1345w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<p>Objeví se dialog, kde vybereme možnost, že aplikace není součástí nabídky, novou aplikaci si pojmenujeme a&nbsp;volby potvrdíme tlačítkem <code>Create</code>.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="884" height="604" src="https://www.initmax.cz/wp-content/uploads/2023/08/image-2.png" alt="Dialog - Create your own application. Pojmenování aplikace" class="wp-image-12664" srcset="https://www.initmax.cz/wp-content/uploads/2023/08/image-2.png 884w, https://www.initmax.cz/wp-content/uploads/2023/08/image-2-300x205.png 300w, https://www.initmax.cz/wp-content/uploads/2023/08/image-2-768x525.png 768w" sizes="auto, (max-width: 884px) 100vw, 884px" /></figure>
</div>


<p>V nově vytvořené aplikaci zvolíme Single sign-on metodu SAML.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="1083" height="587" src="https://www.initmax.cz/wp-content/uploads/2023/08/image-3.png" alt="Single sign-on - metoda SAML" class="wp-image-12666" srcset="https://www.initmax.cz/wp-content/uploads/2023/08/image-3.png 1083w, https://www.initmax.cz/wp-content/uploads/2023/08/image-3-300x163.png 300w, https://www.initmax.cz/wp-content/uploads/2023/08/image-3-1024x555.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/08/image-3-768x416.png 768w" sizes="auto, (max-width: 1083px) 100vw, 1083px" /></figure>
</div>


<p>To nás zavede do&nbsp;možností nastavení SAML, kde u&nbsp;první možnosti <code>Basic SAML Configuration</code> klikneme na&nbsp;odkaz <code>Edit</code>.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1569" height="615" src="https://www.initmax.cz/wp-content/uploads/2023/08/image-4.png" alt="Set up Single Sign-On with SAML" class="wp-image-12668" srcset="https://www.initmax.cz/wp-content/uploads/2023/08/image-4.png 1569w, https://www.initmax.cz/wp-content/uploads/2023/08/image-4-300x118.png 300w, https://www.initmax.cz/wp-content/uploads/2023/08/image-4-1024x401.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/08/image-4-768x301.png 768w, https://www.initmax.cz/wp-content/uploads/2023/08/image-4-1536x602.png 1536w" sizes="auto, (max-width: 1569px) 100vw, 1569px" /></figure>



<p>Zde je nutné vyplnit <code>Identity ID</code>, což je URL adresa Zabbix frontendu. V&nbsp;našem případě tedy <code>https://student-01.initmax.cz/zabbix</code>. </p>



<p>Následně &#8222;<code>Reply URL</code>&#8222;, což je místo, kde Zabbix očekává autentizační token, tedy <code>https://student-01.initmax.cz/zabbix/index_sso.php?acs</code>.</p>



<p>Volitelně pak můžeme vyplnit i&nbsp;<code>Logout URL</code>, který je pro náš vzorový Zabbix následující: <code>https://student-01.initmax.cz/zabbix/index_sso.php?sls</code>.</p>



<p>Nastavení uložíme pomocí tlačítka <code>Save</code> a&nbsp;dialogové okno můžeme zavřít.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="695" height="814" src="https://www.initmax.cz/wp-content/uploads/2023/08/image-5.png" alt="Basic SAML Configuration" class="wp-image-12670" srcset="https://www.initmax.cz/wp-content/uploads/2023/08/image-5.png 695w, https://www.initmax.cz/wp-content/uploads/2023/08/image-5-256x300.png 256w" sizes="auto, (max-width: 695px) 100vw, 695px" /></figure>
</div>


<p>Objeví se vyskakovací okno s&nbsp;nabídkou otestování našeho nastavení, tento krok prozatím přeskočíme a&nbsp;zvolíme <code>No, I'll test later</code>, protože nastavení ještě není kompletní.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="1651" height="248" src="https://www.initmax.cz/wp-content/uploads/2023/08/image-7.png" alt="Test single sign-on" class="wp-image-12674" srcset="https://www.initmax.cz/wp-content/uploads/2023/08/image-7.png 1651w, https://www.initmax.cz/wp-content/uploads/2023/08/image-7-300x45.png 300w, https://www.initmax.cz/wp-content/uploads/2023/08/image-7-1024x154.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/08/image-7-768x115.png 768w, https://www.initmax.cz/wp-content/uploads/2023/08/image-7-1536x231.png 1536w" sizes="auto, (max-width: 1651px) 100vw, 1651px" /></figure>
</div>


<h3 class="wp-block-heading">Atributy uživatelů a&nbsp;skupin</h3>



<p>V sekci <code>Attributes &amp; Claims</code> zvolíme odkaz <code>Edit</code>.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="1108" height="616" src="https://www.initmax.cz/wp-content/uploads/2023/08/image-8.png" alt="Sekce Attributes &amp; Claims" class="wp-image-12676" srcset="https://www.initmax.cz/wp-content/uploads/2023/08/image-8.png 1108w, https://www.initmax.cz/wp-content/uploads/2023/08/image-8-300x167.png 300w, https://www.initmax.cz/wp-content/uploads/2023/08/image-8-1024x569.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/08/image-8-768x427.png 768w" sizes="auto, (max-width: 1108px) 100vw, 1108px" /></figure>
</div>


<p>Zde vytvoříme nastavení pro skupinu pomocí tlačítka <code>Add a group claim</code>.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="1497" height="636" src="https://www.initmax.cz/wp-content/uploads/2023/08/image-9.png" alt="Attributes &amp; Claims - Add a group claim" class="wp-image-12678" srcset="https://www.initmax.cz/wp-content/uploads/2023/08/image-9.png 1497w, https://www.initmax.cz/wp-content/uploads/2023/08/image-9-300x127.png 300w, https://www.initmax.cz/wp-content/uploads/2023/08/image-9-1024x435.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/08/image-9-768x326.png 768w" sizes="auto, (max-width: 1497px) 100vw, 1497px" /></figure>
</div>


<p>V dialogovém okně s&nbsp;nastavením skupin zvolíme <code>All groups</code> a&nbsp;vybereme <code>sAMAccountName</code> jako zdrojový atribut (<code>Source attribute</code>).</p>



<p>V pokročilých možnostech nastavení pak zaškrtneme checkbox, kterým si vybereme vlastní jméno pro náš nový &#8222;group claim&#8220; a&nbsp;vyplníme námi zvolenou hodnotu, např.&nbsp;<code>groups</code>.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="907" height="614" src="https://www.initmax.cz/wp-content/uploads/2023/08/image-10.png" alt="Dialogové okno Group Claims" class="wp-image-12680" srcset="https://www.initmax.cz/wp-content/uploads/2023/08/image-10.png 907w, https://www.initmax.cz/wp-content/uploads/2023/08/image-10-300x203.png 300w, https://www.initmax.cz/wp-content/uploads/2023/08/image-10-768x520.png 768w" sizes="auto, (max-width: 907px) 100vw, 907px" /></figure>
</div>


<p>Dále potřebujeme vytvořit nový claim pro username, pro jméno a&nbsp;příjmení a&nbsp;pro média.</p>



<p>Nový claim vytvoříme pomocí tlačítka <code>Add new claim</code>.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="1293" height="633" src="https://www.initmax.cz/wp-content/uploads/2023/08/image-11.png" alt="Sekce Attributes &amp; Claim - Add new claim - vytvoření nového claim" class="wp-image-12682" srcset="https://www.initmax.cz/wp-content/uploads/2023/08/image-11.png 1293w, https://www.initmax.cz/wp-content/uploads/2023/08/image-11-300x147.png 300w, https://www.initmax.cz/wp-content/uploads/2023/08/image-11-1024x501.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/08/image-11-768x376.png 768w" sizes="auto, (max-width: 1293px) 100vw, 1293px" /></figure>
</div>


<p>Na tomto obrázku můžete vidět příklad parsování zdrojového atributu <code>user.mail</code> pro média typ <code>Email</code>.</p>



<p>Tento atribut je pro nás velice důležitý, jelikož emailovou adresu uživatele následně používáme jako přihlašovací jméno do&nbsp;Zabbixu.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="1550" height="551" src="https://www.initmax.cz/wp-content/uploads/2023/08/image-12.png" alt="Sekce Manage claim" class="wp-image-12684" srcset="https://www.initmax.cz/wp-content/uploads/2023/08/image-12.png 1550w, https://www.initmax.cz/wp-content/uploads/2023/08/image-12-300x107.png 300w, https://www.initmax.cz/wp-content/uploads/2023/08/image-12-1024x364.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/08/image-12-768x273.png 768w, https://www.initmax.cz/wp-content/uploads/2023/08/image-12-1536x546.png 1536w" sizes="auto, (max-width: 1550px) 100vw, 1550px" /></figure>
</div>


<p>Zde můžete vidět příklad nastavení claims i&nbsp;pro volitelné atributy, jako jméno a&nbsp;příjmení uživatele, jeho telefonní číslo a&nbsp;pushover ID.</p>



<p>Po nastavení všech požadovaných claims můžeme toho okno s&nbsp;nastavením zavřít.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="1219" height="662" src="https://www.initmax.cz/wp-content/uploads/2023/08/image-14.png" alt="Sekce Attributes &amp; Claims a nastavení všech claims" class="wp-image-12688" srcset="https://www.initmax.cz/wp-content/uploads/2023/08/image-14.png 1219w, https://www.initmax.cz/wp-content/uploads/2023/08/image-14-300x163.png 300w, https://www.initmax.cz/wp-content/uploads/2023/08/image-14-1024x556.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/08/image-14-768x417.png 768w" sizes="auto, (max-width: 1219px) 100vw, 1219px" /></figure>
</div>


<p>Následně si stáhneme Base64 certifikát, který obsahuje přihlašovací token.</p>



<p>K tomuto účelu slouží odkaz <code>Download</code> v&nbsp;sekci <code>SAML Certificates</code>, jak vidíte na&nbsp;následujícím obrázku.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="1109" height="471" src="https://www.initmax.cz/wp-content/uploads/2023/08/image-15.png" alt="SAML Certificates - přihlašovací token" class="wp-image-12690" srcset="https://www.initmax.cz/wp-content/uploads/2023/08/image-15.png 1109w, https://www.initmax.cz/wp-content/uploads/2023/08/image-15-300x127.png 300w, https://www.initmax.cz/wp-content/uploads/2023/08/image-15-1024x435.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/08/image-15-768x326.png 768w" sizes="auto, (max-width: 1109px) 100vw, 1109px" /></figure>
</div>


<p>Předsvědčíme se, že se nám certifikát s&nbsp;přihlašovacím tokenem skutečně stáhl a&nbsp;můžeme přikročit k&nbsp;nastavení na&nbsp;úrovni Zabbixu.</p>



<h3 class="wp-block-heading">Zabbix</h3>



<p>Nejprve v&nbsp;sekci <code>Users -&gt; Authentication -&gt; SAML settings</code> zaškrtneme checkbox <code>Enable SAML authentication</code>.</p>



<p>Pokud to naše prostředí vyžaduje, pak můžeme také povolit case-sensitive přihlašování, tedy např.&nbsp;uživatelé se stejným jménem a&nbsp;příjmením rozlišení case-sensitive přihlašovacím jménem.</p>



<p>Můžeme také nastavit nižší nebo vyšší četnost s&nbsp;jakou provissioning probíhá, než je hodnota výchozí (1 hodina).</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="835" height="703" src="https://www.initmax.cz/wp-content/uploads/2023/08/image-16.png" alt="SAML Settings" class="wp-image-12692" srcset="https://www.initmax.cz/wp-content/uploads/2023/08/image-16.png 835w, https://www.initmax.cz/wp-content/uploads/2023/08/image-16-300x253.png 300w, https://www.initmax.cz/wp-content/uploads/2023/08/image-16-768x647.png 768w" sizes="auto, (max-width: 835px) 100vw, 835px" /></figure>
</div>


<p>Správné hodnoty pro všechna požadovaná pole nastavení SAMLu najdeme v&nbsp;příslušných sekcích webového rozhraní MS Azure.</p>



<p>IdP entity ID je na&nbsp;úrovni Azure pojmenován <code>Azure AD Identifier</code>, hodnotu pro SSO service URL najdeme v&nbsp;Azure pod jménem <code>Login URL</code>, a&nbsp;SLO&nbsp;service URL je pak <code>Logout URL</code>.</p>



<p>Položku <code>Username attribute</code> vyplníme jménem námi vytvořeného claim pro uživatelský e-mail, tedy v&nbsp;našem případě <code>user_email</code>.</p>



<p>SPN pro SP entity ID pak vyplníme hodnotou <code>Application ID</code> z&nbsp;Azure. Tuto hodnotu najdeme ve vlastnostech naší vytvořené aplikace, tedy v&nbsp;menu <code>Properties</code> je to <code>Application ID</code>.</p>



<p>Tuto hodnotu si zkopírujeme a&nbsp;předtím, než ji vložíme do&nbsp;položky SP entity ID, tak je nutné napsat sem prefix <code>spn:</code>, jinak toto nastavení nebude fungovat!</p>



<p>Pro tuto chvíli jsme s&nbsp;nastavením SAMLu hotovi a&nbsp;můžeme ho uložit pomocí tlačítka <code>Update</code>.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="1716" height="827" src="https://www.initmax.cz/wp-content/uploads/2023/08/image-19.png" alt="Hodnoty z rozhraní MS Azure použijeme pro nastavení SAMlu" class="wp-image-12698" srcset="https://www.initmax.cz/wp-content/uploads/2023/08/image-19.png 1716w, https://www.initmax.cz/wp-content/uploads/2023/08/image-19-300x145.png 300w, https://www.initmax.cz/wp-content/uploads/2023/08/image-19-1024x494.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/08/image-19-768x370.png 768w, https://www.initmax.cz/wp-content/uploads/2023/08/image-19-1536x740.png 1536w" sizes="auto, (max-width: 1716px) 100vw, 1716px" /></figure>
</div>


<p>Nyní nám ale přihlašování nefunguje, jelikož zatím Zabbix nedisponuje certifikátem obsahujícím autentizační token, který jsme si už z&nbsp;MS Azure stáhli.</p>



<p>Do Zabbixu ho musíme fyzicky dodat. Připojíme se tedy k&nbsp;Zabbix serveru pomocí SSH a&nbsp;nejprve vytvoříme složku pro certifikáty:</p>



<p><strong>Pro verzi Zabbixu 7.0 a&nbsp;starší:</strong></p>


<section id="block-code-block_66bc1d2a9a38f7c99a62c4869e924858" data-id="block-code-block_66bc1d2a9a38f7c99a62c4869e924858" class="gt-block block-code">
    <pre><code>mkdir /usr/share/zabbix/conf/certs/</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p><strong>Od verze Zabbixu 7.2:</strong></p>


<section id="block-code-block_4a05fb554a7f484bc2d6b3d209950e9a" data-id="block-code-block_4a05fb554a7f484bc2d6b3d209950e9a" class="gt-block block-code">
    <pre><code>mkdir /usr/share/zabbix/ui/conf/certs/</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Sem nakopírujeme náš certifikát, například pod názvem <code>AZURE.cer</code> a&nbsp;nastavíme mu korektní oprávnění:</p>



<p><strong>Pro verzi Zabbixu 7.0 a&nbsp;starší:</strong></p>


<section id="block-code-block_4aecd95624b5f4fa6aaaa040edcef552" data-id="block-code-block_4aecd95624b5f4fa6aaaa040edcef552" class="gt-block block-code">
    <pre><code>chmod 644 /usr/share/zabbix/conf/certs/AZURE.cer</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p><strong>Od verze Zabbixu 7.2:</strong></p>


<section id="block-code-block_d552e297f9e549fae07392df8d10993c" data-id="block-code-block_d552e297f9e549fae07392df8d10993c" class="gt-block block-code">
    <pre><code>chmod 644 /usr/share/zabbix/ui/conf/certs/AZURE.cer</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Následně otevřeme konfigurační soubor Zabbix front-endu:</p>


<section id="block-code-block_2b6f8037cc2121fc3119c4de0041baa6" data-id="block-code-block_2b6f8037cc2121fc3119c4de0041baa6" class="gt-block block-code">
    <pre><code>nano /etc/zabbix/web/zabbix.conf.php</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Zde je třeba vyplnit v&nbsp;sekci <code>SAML authentication</code> konfigurační direktivu <code>$SSO['IDP_CERT']</code> s&nbsp;relativní cestou k&nbsp;našemu certifikátu, tedy v&nbsp;našem případě následovně:</p>


<section id="block-code-block_e69aed72fcbdd3c4bf31ef4927cf9813" data-id="block-code-block_e69aed72fcbdd3c4bf31ef4927cf9813" class="gt-block block-code">
    <pre><code>// Used for SAML authentication.
// Uncomment to override the default paths to SP private key, SP and IdP X.509 certificates, and to set extra settings.
//$SSO[&#039;SP_KEY&#039;] = &#039;conf/certs/sp.key&#039;;
//$SSO[&#039;SP_CERT&#039;] = &#039;conf/certs/sp.crt&#039;;
$SSO[&#039;IDP_CERT&#039;] = &#039;conf/certs/AZURE.cer&#039;;
//$SSO[&#039;SETTINGS&#039;] = [];</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h3 class="wp-block-heading">JIT</h3>



<p>Nyní přikročíme k&nbsp;nastavení JIT provisioningu, a&nbsp;to opět v&nbsp;sekci <code>Users -&gt; Authentication -&gt; SAML settings</code>, kde zaškrtneme checkboxy <code>Enable JIT provisioning</code> a&nbsp;Configure JIT provisioning.</p>



<p>Otevře se nám nastavení, kde vyplníme požadované položky jmény našich claims, vytvořenými již dříve na&nbsp;úrovni Azure.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="656" height="870" src="https://www.initmax.cz/wp-content/uploads/2023/08/image-20.png" alt="Nastavení JIT provisioningu, v sekci Users -&gt; Authentication -&gt; SAML settings" class="wp-image-12700" srcset="https://www.initmax.cz/wp-content/uploads/2023/08/image-20.png 656w, https://www.initmax.cz/wp-content/uploads/2023/08/image-20-226x300.png 226w" sizes="auto, (max-width: 656px) 100vw, 656px" /></figure>
</div>


<p>Po uložení tohoto nastavení je možné se přihlásit pod svými přihlašovacími údaji pomocí SSO, k&nbsp;tomuto účelu slouží na&nbsp;přihlašovací obrazovce odkaz <code>Sign in with Single Sign-On (SAML)</code>, který nás přesměruje na&nbsp;přihlašovací stránku Microsoftu, případně nás rovnou přihlásí.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="366" height="424" src="https://www.initmax.cz/wp-content/uploads/2023/08/image-21.png" alt="Přihlašovací stránka" class="wp-image-12702" srcset="https://www.initmax.cz/wp-content/uploads/2023/08/image-21.png 366w, https://www.initmax.cz/wp-content/uploads/2023/08/image-21-259x300.png 259w" sizes="auto, (max-width: 366px) 100vw, 366px" /></figure>
</div>


<p>Že provisioning skutečně funguje je možné ověřit přímo u&nbsp;daného uživatele v&nbsp;sekci <code>Users -&gt; Users</code>. </p>



<p>Ve sloupci <code>Provisioned</code> bude datum a&nbsp;čas, kdy provisioning naposledy proběhl.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="1603" height="557" src="https://www.initmax.cz/wp-content/uploads/2023/08/image-22.png" alt="Zobrazení datumu a času u uživatele, kdy naposled provisioning proběhl." class="wp-image-12704" srcset="https://www.initmax.cz/wp-content/uploads/2023/08/image-22.png 1603w, https://www.initmax.cz/wp-content/uploads/2023/08/image-22-300x104.png 300w, https://www.initmax.cz/wp-content/uploads/2023/08/image-22-1024x356.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/08/image-22-768x267.png 768w, https://www.initmax.cz/wp-content/uploads/2023/08/image-22-1536x534.png 1536w" sizes="auto, (max-width: 1603px) 100vw, 1603px" /></figure>
</div>


<p>Po kliknutí na&nbsp;konkrétního uživatele jsou políčka šedá, jelikož je toto nastavení řídíme centrálně, na&nbsp;úrovni Azure AD.</p>


<div class="wp-block-image is-resized">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="715" height="613" src="https://www.initmax.cz/wp-content/uploads/2023/08/image-23.png" alt="Manuální úprava uživatele není možná" class="wp-image-12706" srcset="https://www.initmax.cz/wp-content/uploads/2023/08/image-23.png 715w, https://www.initmax.cz/wp-content/uploads/2023/08/image-23-300x257.png 300w" sizes="auto, (max-width: 715px) 100vw, 715px" /></figure>
</div>


<h2 class="wp-block-heading">SCIM (Azure AD/Microsoft Entra ID)</h2>



<h3 class="wp-block-heading">Základní nastavení</h3>



<p>Pro nastavení SCIM ho nejprve povolíme. To uděláme zaškrtnutím checkboxu Enable SCIM provisioning ve stejném dialogovém okně s&nbsp;nastavením pro SAML.</p>



<p>Tedy opět v&nbsp;sekci <code>Users -&gt; Authentication -&gt; SAML settings</code>.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="648" height="866" src="https://www.initmax.cz/wp-content/uploads/2023/08/image-24.png" alt="Nastavení SCIM provisioningu, v sekci Users -&gt; Authentication -&gt; SAML settings" class="wp-image-12708" srcset="https://www.initmax.cz/wp-content/uploads/2023/08/image-24.png 648w, https://www.initmax.cz/wp-content/uploads/2023/08/image-24-224x300.png 224w" sizes="auto, (max-width: 648px) 100vw, 648px" /></figure>
</div>


<p>Následně si vytvoříme API token se super admin oprávněním.</p>



<p>V sekci <code>Users -&gt; API tokens</code> klikneme na&nbsp;tlačítko <code>Create API token</code> a&nbsp;v&nbsp;dialogovém okně s&nbsp;nastavením tokenu vybereme jméno tokenu a&nbsp;jako uživatele zvolíme lokálního privilegovaného uživatele <code>Admin</code>.</p>



<p>Dále tomuto tokenu zrušíme předdefinovanou dobu platnosti odškrtnutím checkboxu <code>Set expiration date and time</code>.</p>



<p>Zaškrtneme checkbox <code>Enabled</code>, abychom token povolili a&nbsp;takto nastavený token přidáme tlačítkem <code>Add</code>.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="1522" height="573" src="https://www.initmax.cz/wp-content/uploads/2023/08/image-25.png" alt="Dialogové okno pro vytvoření API tokenu" class="wp-image-12710" srcset="https://www.initmax.cz/wp-content/uploads/2023/08/image-25.png 1522w, https://www.initmax.cz/wp-content/uploads/2023/08/image-25-300x113.png 300w, https://www.initmax.cz/wp-content/uploads/2023/08/image-25-1024x386.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/08/image-25-768x289.png 768w" sizes="auto, (max-width: 1522px) 100vw, 1522px" /></figure>
</div>


<p>Po vytvoření tokenu se objeví stavové okno s&nbsp;popisem tokenu a&nbsp;tokenem samotným, který si zkopírujeme do&nbsp;schránky a&nbsp;následně uložíme.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="1523" height="577" src="https://www.initmax.cz/wp-content/uploads/2023/08/image-26.png" alt="Stavové okno API token" class="wp-image-12712" srcset="https://www.initmax.cz/wp-content/uploads/2023/08/image-26.png 1523w, https://www.initmax.cz/wp-content/uploads/2023/08/image-26-300x114.png 300w, https://www.initmax.cz/wp-content/uploads/2023/08/image-26-1024x388.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/08/image-26-768x291.png 768w" sizes="auto, (max-width: 1523px) 100vw, 1523px" /></figure>
</div>


<h3 class="wp-block-heading">Nastavení provisioningu</h3>



<p>Nyní se vrátíme do&nbsp;Azure a&nbsp;v&nbsp;naší dříve vytvořené aplikaci jdeme do&nbsp;sekce <code>Provisioning</code> a&nbsp;klikneme na&nbsp;tlačítko <code>Get started</code>.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="1467" height="574" src="https://www.initmax.cz/wp-content/uploads/2023/08/image-27.png" alt="Pro nastavení provisioningu klikneme v Azure na tlačítko Get started" class="wp-image-12714" srcset="https://www.initmax.cz/wp-content/uploads/2023/08/image-27.png 1467w, https://www.initmax.cz/wp-content/uploads/2023/08/image-27-300x117.png 300w, https://www.initmax.cz/wp-content/uploads/2023/08/image-27-1024x401.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/08/image-27-768x300.png 768w" sizes="auto, (max-width: 1467px) 100vw, 1467px" /></figure>
</div>


<p>V nastavení provisioningu vybereme mód <code>Automatic</code> a&nbsp;v&nbsp;sekci <code>Admin Credentials</code> vyplníme <code>Tenant URL</code>, v&nbsp;našem případě URL SCIM API v&nbsp;Zabbixu.</p>



<p>Tedy konkrétně <code>https://student-01.initmax.cz/zabbix/api_scim.php</code> a&nbsp;do&nbsp;pole <code>Secret Token</code> vložíme náš uložený token z&nbsp;předcházejících kroků.</p>



<p>Spojení otestujeme pomocí tlačítka <code>Test Connection</code> a&nbsp;pokud je vše v&nbsp;pořádku, tak konfiguraci uložíme.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="1390" height="545" src="https://www.initmax.cz/wp-content/uploads/2023/08/image-28.png" alt="Otestování a uložení konfigurace v Azure" class="wp-image-12716" srcset="https://www.initmax.cz/wp-content/uploads/2023/08/image-28.png 1390w, https://www.initmax.cz/wp-content/uploads/2023/08/image-28-300x118.png 300w, https://www.initmax.cz/wp-content/uploads/2023/08/image-28-1024x401.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/08/image-28-768x301.png 768w" sizes="auto, (max-width: 1390px) 100vw, 1390px" /></figure>
</div>


<h3 class="wp-block-heading">Mapování atributů</h3>



<p>Po uložení konfigurace se objeví možnosti nastavení mapování uživatelů a&nbsp;skupin.</p>



<p>Zde vybereme možnost <code>Provision Azure Active Directory Users</code>.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="1173" height="611" src="https://www.initmax.cz/wp-content/uploads/2023/08/image-29.png" alt="Mapování uživatel a skupin" class="wp-image-12718" srcset="https://www.initmax.cz/wp-content/uploads/2023/08/image-29.png 1173w, https://www.initmax.cz/wp-content/uploads/2023/08/image-29-300x156.png 300w, https://www.initmax.cz/wp-content/uploads/2023/08/image-29-1024x533.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/08/image-29-768x400.png 768w" sizes="auto, (max-width: 1173px) 100vw, 1173px" /></figure>
</div>


<p>Dostaneme se do&nbsp;sekce <code>Attribute Mapping</code>, kde musíme přidat vlastní atributy.</p>



<p>Abychom byli schopni zeditovat a&nbsp;přidávat vlastní atributy je nutné zaškrtnout checkbox <code>Show advanced options</code>, který se nachází úplně dole na&nbsp;této stránce. </p>



<p>Posléze klikneme na&nbsp;odkaz <code>Edit attribute list for customappsso</code>.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="1267" height="627" src="https://www.initmax.cz/wp-content/uploads/2023/08/image-30.png" alt="Sekce Attribute mapping" class="wp-image-12720" srcset="https://www.initmax.cz/wp-content/uploads/2023/08/image-30.png 1267w, https://www.initmax.cz/wp-content/uploads/2023/08/image-30-300x148.png 300w, https://www.initmax.cz/wp-content/uploads/2023/08/image-30-1024x507.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/08/image-30-768x380.png 768w" sizes="auto, (max-width: 1267px) 100vw, 1267px" /></figure>
</div>


<p>Tím se dostaneme na&nbsp;list všech atributů naší aplikace a&nbsp;sem si přidáme stejné atributy, jako v&nbsp;předchozích případech a&nbsp;konfiguraci mapování uživatelů uložíme pomocí tlačítka <code>Save</code>.</p>



<p>Již přidané atributy můžete vidět na&nbsp;obrázku níže.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="1266" height="534" src="https://www.initmax.cz/wp-content/uploads/2023/08/image-31.png" alt="Seznam již přidaných atributů" class="wp-image-12722" srcset="https://www.initmax.cz/wp-content/uploads/2023/08/image-31.png 1266w, https://www.initmax.cz/wp-content/uploads/2023/08/image-31-300x127.png 300w, https://www.initmax.cz/wp-content/uploads/2023/08/image-31-1024x432.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/08/image-31-768x324.png 768w" sizes="auto, (max-width: 1266px) 100vw, 1266px" /></figure>
</div>


<p>Uložení listu atributů nás vrátí do&nbsp;původní sekce <code>Attribute Mapping</code>, kde je třeba na&nbsp;tyto atributy vytvořit správná mapování. Klikneme tedy na&nbsp;odkaz <code>Add New Mapping</code>.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="1269" height="501" src="https://www.initmax.cz/wp-content/uploads/2023/08/image-32.png" alt="Vytvoření mapování - Sekce Attribute mapping - odkaz Add New Mapping" class="wp-image-12724" srcset="https://www.initmax.cz/wp-content/uploads/2023/08/image-32.png 1269w, https://www.initmax.cz/wp-content/uploads/2023/08/image-32-300x118.png 300w, https://www.initmax.cz/wp-content/uploads/2023/08/image-32-1024x404.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/08/image-32-768x303.png 768w" sizes="auto, (max-width: 1269px) 100vw, 1269px" /></figure>
</div>


<p>Pro všechny naše atributy vytvoříme mapování k&nbsp;jejich konkrétnímu protějšku v&nbsp;AD, stejně jako v&nbsp;předcházejících případech.</p>



<p>Níže vidíte příklad pro mapování atributu <code>user_mobile</code>.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="1026" height="628" src="https://www.initmax.cz/wp-content/uploads/2023/08/image-33.png" alt="Mapování atributu user_mobile" class="wp-image-12726" srcset="https://www.initmax.cz/wp-content/uploads/2023/08/image-33.png 1026w, https://www.initmax.cz/wp-content/uploads/2023/08/image-33-300x184.png 300w, https://www.initmax.cz/wp-content/uploads/2023/08/image-33-1024x627.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/08/image-33-768x470.png 768w" sizes="auto, (max-width: 1026px) 100vw, 1026px" /></figure>
</div>


<p>Zde pak vidíte seznam všech vyplněných atributů i&nbsp;s&nbsp;jejich správně nastaveným atributem zdrojovým.</p>



<p>Po nastavení mapování všech požadovaných atributů klikneme na&nbsp;tlačítko <code>Save</code> a&nbsp;dialogové okno zavřeme.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="1409" height="629" src="https://www.initmax.cz/wp-content/uploads/2023/08/image-34.png" alt="Seznam všech vyplněných atributů se správně nastaveným atributem zdrojovým" class="wp-image-12728" srcset="https://www.initmax.cz/wp-content/uploads/2023/08/image-34.png 1409w, https://www.initmax.cz/wp-content/uploads/2023/08/image-34-300x134.png 300w, https://www.initmax.cz/wp-content/uploads/2023/08/image-34-1024x457.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/08/image-34-768x343.png 768w" sizes="auto, (max-width: 1409px) 100vw, 1409px" /></figure>
</div>


<p>Posledním krokem pro nastavení funkčního SCIM je spuštění samotného provisioningu.</p>



<p>Vrátím se zpět na&nbsp;úvodní stránku našeho nově vytvořeného provisioningu do&nbsp;sekce <code>Overview</code> a&nbsp;zde klikneme na&nbsp;tlačítko <code>Start provisioning</code>.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="1595" height="618" src="https://www.initmax.cz/wp-content/uploads/2023/08/image-35.png" alt="Posledním krokem nastavení SCIM provisioningu je kliknutí na tlačítko Start provisioning v sekci Overview" class="wp-image-12730" srcset="https://www.initmax.cz/wp-content/uploads/2023/08/image-35.png 1595w, https://www.initmax.cz/wp-content/uploads/2023/08/image-35-300x116.png 300w, https://www.initmax.cz/wp-content/uploads/2023/08/image-35-1024x397.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/08/image-35-768x298.png 768w, https://www.initmax.cz/wp-content/uploads/2023/08/image-35-1536x595.png 1536w" sizes="auto, (max-width: 1595px) 100vw, 1595px" /></figure>
</div>


<p>Tímto je nastavení SCIM provisioningu kompletní. </p>



<p>Za zmínku stojí upozornit, že SCIM provisioning má stále jisté limitace. </p>



<p>Například na&nbsp;úrovni Zabbixu sice uživatele vytvoří, ale neumí už je zaktualizovat, ani jim přiřadit konkrétní média.</p>



<p>Dle interních informací přímo ze Zabbixu se toto vývojáři Zabbix v&nbsp;blízké době zlepší a&nbsp;tyto funkcionality implementují.</p>



<p><strong>Edit (8.&nbsp;3.&nbsp;2024):</strong> Toto je ve verzi Zabbixu 7.0 již opraveno &#8211; více v&nbsp;našem článku <a href="https://www.initmax.cz/novy-zabbix-7-0-lts/">Verze Zabbix 7.0 LTS je téměř zde</a>.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>


<section id="block-newsletter-block_fe5c4e2f9a270c5842327a16576f2b1e" data-id="block-newsletter-block_fe5c4e2f9a270c5842327a16576f2b1e" class="gt-block block-newsletter">
    <section id="newsletter" class="newsletter">
	<div class="gradient basic">
		<div class="newsletter__inner width width--general">
			<div class="col left">
									<h2 class="newsletter__title">Buďte v&nbsp;obraze s&nbsp;naším newsletterem</h2>
													<div class="newsletter__content"><p>Díky initMAX newsletteru Vám neunikne žádná z&nbsp;pozvánek na&nbsp;akce a&nbsp;webináře, žádný z&nbsp;tipů, jak dostat ze svého IT MAXimum, ani ověřené informace o&nbsp;novinkách ze světa Zabbix a&nbsp;dalších technologií.</p>
</div>
							</div>
			<div class="col right form-wrapper">
				<div class="newsletter-form">
	<form method="post" action="/wiki/kapitola/zabbix/feed/" enctype="multipart/form-data">
		<input type="hidden" name="url" value="https://www.initmax.cz/wiki/kapitola/zabbix/feed/">

		<div class="inputs">

			<label for="newsletter-form_contact_email" class="top">Vaše e-mailová adresa:</label>
			<div class="df">

				<div class="input">
					<input type="text" id="newsletter-form_contact_email" name="newsletter_email" placeholder="@" data-format="email" data-required="1">
									</div><!-- /.input -->

				<a href="#" class="btn btn--white sendBtn">Odeslat</a>

			</div>

			<div class="bottom nm">
				<label for="newsletter-form_gdpr" class="checkbox gdpr">
					<input type="checkbox" id="newsletter-form_gdpr" name="newsletter_gdpr">
					<span>Souhlasím se&nbsp;<a href="https://www.initmax.cz/ochrana-osobnich-udaju/" target="_blank">zpracováním osobních údajů</a>.</span>
				</label>
			</div>

		</div><!-- /.inputs -->
		<div class="sent hidden">
			<div class="iconOk"><h3>Děkujeme, že jste se přihlásili k&nbsp;odběru našeho newsletteru.</h3>
</div>
			<button class="sent__close" title="Zavřít" onclick="closeFormMessage(this,event)"><svg data-name="Group 3602" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 3272" d="M0,0H24V24H0Z" fill="none"/><line data-name="Line 98" y2="14" transform="translate(7.05 7.05) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 99" x2="14" transform="translate(7.05 16.95) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</button>
		</div><!-- /.sent -->
	</form>
</div>			</div>
		</div>
	</div>
</section></section>



<section id="social-links-block_1e1b91e7162fbb09ea8feb9cfaf538a3" data-id="social-links-block_1e1b91e7162fbb09ea8feb9cfaf538a3" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>

<p>The post <a href="https://www.initmax.cz/wiki/zabbix-automatizace-spravy-uzivatelu-jit/">Zabbix &#8211; automatizace správy uživatelů (JIT)</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Zabbix &#8211; aktualizace na&#160;poslední verzi 6.4</title>
		<link>https://www.initmax.cz/wiki/zabbix-aktualizace-na-posledni-verzi-6-4/</link>
		
		<dc:creator><![CDATA[Tomáš Heřmánek]]></dc:creator>
		<pubDate>Fri, 21 Jul 2023 15:42:56 +0000</pubDate>
				<guid isPermaLink="false">https://www.initmax.cz/?post_type=wiki&#038;p=12472</guid>

					<description><![CDATA[<p>Tentokrát si ukážeme jak zaktualizovat Zabbix na nejnovější verzi 6.4, a to včetně upgrade PHP a PostgreSQL! Přípravné kroky Kontrola verzí Nejprve zkontrolujeme ...</p>
<p>The post <a href="https://www.initmax.cz/wiki/zabbix-aktualizace-na-posledni-verzi-6-4/">Zabbix &#8211; aktualizace na&nbsp;poslední verzi 6.4</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Tentokrát si ukážeme jak zaktualizovat Zabbix na&nbsp;nejnovější verzi 6.4, a&nbsp;to včetně upgrade PHP a&nbsp;PostgreSQL!</p>


<section id="block-webinar-block_e645e5e71cf937ea583f8d0a099003ae" data-id="block-webinar-block_e645e5e71cf937ea583f8d0a099003ae" class="gt-block block-webinar">
    <div class="connected-webinars__grid">
        <a href="https://www.initmax.cz/webinar/aktualizace-na-posledni-verzi-6-4/" class="grid-item">
	<article class="webinar-promotion">
		<div class="webinar-promotion__thumbnail-wrap">
			<figure class="webinar-promotion__thumbnail">
					<img decoding="async" src="https://www.initmax.cz/wp-content/uploads/2023/03/ilustrace_webinare_6.4_07_thumbnail_web-54.png"
				 width="400"
		 height="250"
		 class=""
		 alt="Aktualizace na&nbsp;poslední verzi 6.4"
		 loading="lazy"	>
									<div class="webinar-promotion__tags">
						<span class="tag tag--small" style="color:#ffffff;background-color:#d40000;">Zabbix</span>					</div>
							</figure>
		</div>
		<div class="webinar-promotion__text">
			<div>
									<time datetime="2023-03-17">17.&nbsp;3.&nbsp;2023</time>
							</div>
			<h3 class="webinar-promotion__title">Aktualizace na&nbsp;poslední verzi 6.4</h3>
			<div class="icon-link">
				<figure class="icon-wrap icon-wrap--primary"><svg data-name="Group 3411" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 455" d="M0,0H24V24H0Z" fill="none"/><path data-name="Path 456" d="M15,10l4.553-2.276A1,1,0,0,1,21,8.618v6.764a1,1,0,0,1-1.447.894L15,14V10Z" transform="translate(0 0)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><rect data-name="Rectangle 1286" width="12" height="12" rx="2" transform="translate(3.112 6)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</figure>
				<span>Zhlédnout záznam</span>
			</div>
		</div>
	</article>
</a>    </div>
</section>


<section id="social-links-block_67f8df35c7170f1a6d31db449f2102de" data-id="social-links-block_67f8df35c7170f1a6d31db449f2102de" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>




<h2 class="wp-block-heading">Přípravné kroky</h2>



<ul class="wp-block-list">
<li>Přečtěte si &#8222;poznámky k&nbsp;vydané verzi&#8220; (release notes) [ <a href="https://www.zabbix.com/rn/rn6.4.0" target="_blank" rel="noreferrer noopener nofollow">Official release notes for Zabbix 6.4</a> ]</li>



<li>Přečtěte si důkladně dokument &#8222;poznámky k&nbsp;aktualizaci&#8220; (upgrade notes) [ <a href="https://www.zabbix.com/documentation/6.4/en/manual/installation/upgrade_notes_640" target="_blank" rel="noreferrer noopener nofollow">Official upgrade notes for Zabbix 6.4</a> ]</li>



<li>Zkontrolujte a&nbsp;případně optimalizujte výkon současné databáze dle doporučení vendora a&nbsp;s&nbsp;ohledem na&nbsp;požadavky Zabbix instance</li>



<li>Zkontrolujte, zda verze veškerých komponent odpovídají matici kompatiblity nové verze Zabbix</li>



<li>Zazálohovat konfigurační soubory Zabbix serveru a&nbsp;Zabbix proxy</li>



<li>Zázálohovat databáze Zabbix serveru, případně Zabbix proxy</li>



<li>Zazálohovat veškeré možné úpravy &#8222;na&nbsp;míru&#8220;, které byly na&nbsp;úrovni Zabbix ručně provedeny</li>
</ul>



<h3 class="wp-block-heading">Kontrola verzí</h3>



<p>Nejprve zkontrolujeme verze všech komponent, na&nbsp;kterých je běh Zabbixu a&nbsp;jeho součástí závislý tak, aby <strong>přesně </strong>odpovídal oficiální matici kompatibility pro Zabbix 6.4.</p>


<section id="block-code-block_dcd2cd1915fbdd29717fb4db32da1e76" data-id="block-code-block_dcd2cd1915fbdd29717fb4db32da1e76" class="gt-block block-code">
    <pre><code>php-fpm -v
postgres -V</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h3 class="wp-block-heading">Záloha konfiguračních souborů Zabbix</h3>



<p>Než se pustíme do&nbsp;dalších kroků, si pro jistotu zazálohujeme i&nbsp;veškeré konfigurační soubory Zabbix serveru a&nbsp;Zabbix Proxy, případně zvažte také zálohu konfiguračních souborů web serveru.</p>


<section id="block-code-block_e7b01432da52ab0af288e0f6888b377d" data-id="block-code-block_e7b01432da52ab0af288e0f6888b377d" class="gt-block block-code">
    <pre><code>cp /etc/zabbix/zabbix_server.conf /&lt;backup directory&gt;/
cp /etc/zabbix/zabbix_agentd.conf /&lt;backup directory&gt;/
cp /usr/share/zabbix/alertscripts/* /&lt;backup directory&gt;/
cp /usr/share/zabbix/externalscripts/* /&lt;backup directory&gt;/
cp -R /usr/share/zabbix/ /&lt;backup directory&gt;/
cp /etc/httpd/conf/httpd.conf /&lt;backup directory&gt;/
cp /etc/httpd/conf.d/zabbix.conf /&lt;backup directory&gt;/
cp /etc/zabbix/web/zabbix.conf.php /&lt;backup directory&gt;/</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h3 class="wp-block-heading">Zastavení služeb</h3>



<p>Nejprve zastavíme Zabbix server, aby do&nbsp;databáze již nic nezapisoval.</p>


<section id="block-code-block_36ce523e4f8daeb83d2847ae7ee07a7b" data-id="block-code-block_36ce523e4f8daeb83d2847ae7ee07a7b" class="gt-block block-code">
    <pre><code>systemctl stop zabbix-server</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Pokud jako backend Zabbix proxy používáme <strong>SQLite</strong>, pak zastavíme i&nbsp;jednotlivé Zabbix proxy, jelikož jejich databázi po&nbsp;aktualizaci budeme muset v&nbsp;tomto případě <strong>smazat</strong>.</p>


<section id="block-code-block_be866118ac5a8566c0df4dcedc34178e" data-id="block-code-block_be866118ac5a8566c0df4dcedc34178e" class="gt-block block-code">
    <pre><code>systemctl stop zabbix-proxy</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V případě, že chceme, aby data a&nbsp;aktivní konfigurace ze Zabbix serveru byla na&nbsp;Zabbix proxy serverech zachována, pak <strong>před aktualizací</strong> doporučujeme změnit konfiguraci Zabbix proxy a&nbsp;převést je na&nbsp;MySQL nebo PostgreSQL databázi. Tento postup je dopodrobna popsán v&nbsp;oficiální dokumentaci Zabbix. </p>



<p>Po tomto zásahu nebude nutné jednotlivé Zabbix proxy servery po&nbsp;dobu aktualizace Zabbix serveru vypínat a&nbsp;můžeme je nechat sbírat a&nbsp;ukládat data <strong>i v&nbsp;době nedostupnosti </strong>Zabbix serveru. </p>



<p>Služby jednotlivých Zabbix proxy zastavíme <strong>až přímo před aktualizací</strong> repozitářů a&nbsp;balíčků zabbix-proxy.</p>



<h2 class="wp-block-heading">Aktualizace PHP</h2>



<p>Nová verze Zabbix 6.4 vyžaduje pro svůj chod i&nbsp;PHP v&nbsp;rozmezí verzí 7.4.0 až 8.2.x (Zabbix od verze 6.2.8 podporuje PHP verze 8.2.x).</p>



<p>Dle našich zkušeností doporučujeme nainstalovat PHP 8.0, ve verzi PHP novější než 7.6 je již podpora pro PCRE2, kterou Zabbix využívá.</p>



<p>Případnou aktualizaci pak jednoduše provedeme změnou nastavení balíčkovacího systému <code>dnf</code> na&nbsp;úrovni OS.</p>


<section id="block-code-block_783ace751161f6b7fb508e9dd9268efb" data-id="block-code-block_783ace751161f6b7fb508e9dd9268efb" class="gt-block block-code">
    <pre><code>dnf module switch-to php:8.0 -y</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Aktualizace databáze</h2>



<p>Nejprve zastavíme aktuálně běžící službu PostgreSQL.</p>


<section id="block-code-block_f4abe604170cbb482edaf97fd526b410" data-id="block-code-block_f4abe604170cbb482edaf97fd526b410" class="gt-block block-code">
    <pre><code>systemctl stop postgresql-11</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Následně nainstalujeme konkrétně podporovanou verzi, v&nbsp;našem případě PostgreSQL verze 15:</p>


<section id="block-code-block_06c425ba78b8d7da41f4fe7c37456735" data-id="block-code-block_06c425ba78b8d7da41f4fe7c37456735" class="gt-block block-code">
    <pre><code>dnf install -y postgresql15-server</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nyní můžeme přistoupit k&nbsp;inicializaci databáze nové verze PostgreSQL:</p>


<section id="block-code-block_f91c2f12e4251346e614875081f71db6" data-id="block-code-block_f91c2f12e4251346e614875081f71db6" class="gt-block block-code">
    <pre><code>/usr/pgsql-15/bin/postgresql-15-setup initdb</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Po úspěšné instalaci všech závislostí spustíme dodaný aktualizační skript, který kvůli kompatibilitě zkontroluje a&nbsp;případně i&nbsp;opraví interní tabulky a&nbsp;schémata oproti změnám mezi verzemi (pod uživatelem postgres):</p>


<section id="block-code-block_f8525df72ab21f1fac7bdfcd4e8944f3" data-id="block-code-block_f8525df72ab21f1fac7bdfcd4e8944f3" class="gt-block block-code">
    <pre><code>su - postgres
/usr/pgsql-15/bin/pg_upgrade -b /usr/pgsql-11/bin -B /usr/pgsql-15/bin -d /var/lib/pgsql/11/data -D /var/lib/pgsql/15/data -k</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Přeneseme konfiguraci oprávnění (<code>pg_hba.conf</code>) ze staré verze na&nbsp;novou:</p>


<section id="block-code-block_894a06b355ff6d52ad522418a3a121bf" data-id="block-code-block_894a06b355ff6d52ad522418a3a121bf" class="gt-block block-code">
    <pre><code>cat /var/lib/pgsql/11/data/pg_hba.conf &gt; /var/lib/pgsql/15/data/pg_hba.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Případně pak i&nbsp;konfiguraci samotného databázového serveru (kompatibilitu jednotlivých konfiguračních direktiv mezi verzemi si předem ověřte):</p>


<section id="block-code-block_790c92f79c95bec36be547d35cd5fed2" data-id="block-code-block_790c92f79c95bec36be547d35cd5fed2" class="gt-block block-code">
    <pre><code>cat /var/lib/pgsql/11/data/postgresql.conf &gt; /var/lib/pgsql/15/data/postgresql.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nyní lze zakázat automatické spouštění staré služby po&nbsp;startu, a&nbsp;to příkazem:</p>


<section id="block-code-block_e75c6f9f2bf914715c9fd85fbf8d2010" data-id="block-code-block_e75c6f9f2bf914715c9fd85fbf8d2010" class="gt-block block-code">
    <pre><code>systemctl disable postgresql-11.service</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A nastartovat novou verzi databázového serveru PostgreSQL, včetně jejího automatického spouštění po&nbsp;startu systému.</p>


<section id="block-code-block_5ab5a9ccce6241a03f0b30805ab3df60" data-id="block-code-block_5ab5a9ccce6241a03f0b30805ab3df60" class="gt-block block-code">
    <pre><code>systemctl enable postgresql-15.service --now</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Po úspěšném spuštění Zabbix serveru doporučujeme provést <code>VACUUM</code> a&nbsp;reindexaci databází, toto provedeme následujícími příkazy:</p>


<section id="block-code-block_97eefa95d5be6679ced57a860450e8fd" data-id="block-code-block_97eefa95d5be6679ced57a860450e8fd" class="gt-block block-code">
    <pre><code>su - postgres
/usr/pgsql-15/bin/vacuumdb --all --analyze-in-stages
reindexdb</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Dalším krokem je smazání starého PostgreSQL clusteru.</p>


<section id="block-code-block_d6898c54c0bb8df8c64b5b6c820493b8" data-id="block-code-block_d6898c54c0bb8df8c64b5b6c820493b8" class="gt-block block-code">
    <pre><code>./delete_old_cluster.sh
rm -rf 11 delete_old_cluster.sh</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nyní můžeme odebrat staré verze balíčků.</p>


<section id="block-code-block_83a7e3ecdeed68c3f559e9873a6573ed" data-id="block-code-block_83a7e3ecdeed68c3f559e9873a6573ed" class="gt-block block-code">
    <pre><code>dnf remove postgresql11-*</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A v&nbsp;posledním kroku již lze smazat složku obsahující konfigurační soubory staré verze:</p>


<section id="block-code-block_a3a33a186b2f8721b0f1cf8a35838c5e" data-id="block-code-block_a3a33a186b2f8721b0f1cf8a35838c5e" class="gt-block block-code">
    <pre><code>rm -rf /usr/pgsql-11/</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Aktualizace Zabbix</h2>



<p>Vše jsme úspěšně zazálohovali a&nbsp;zaktualizovali všechny verze návazných komponent dle oficiální matice kompatibility nové verze Zabbixu.</p>



<p>Nyní přejdeme k&nbsp;aktualizaci samotného Zabbixu a&nbsp;všech jeho součástí.</p>



<p>Nejprve si stáhneme instalační balíčky pro repozitáře nové verze Zabbixu a&nbsp;smažeme instalační cache.</p>


<section id="block-code-block_41055c3dc75338447bcb826d188af876" data-id="block-code-block_41055c3dc75338447bcb826d188af876" class="gt-block block-code">
    <pre><code>rpm -Uvh https://repo.zabbix.com/zabbix/6.4/rhel/8/x86_64/zabbix-release-6.4-1.el8.noarch.rpm
dnf clean all</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Po tomto úkonu máme dostupné repozitáře nové verze a&nbsp;můžeme tedy zaktualizovat veškeré další komponenty Zabbix, a&nbsp;to postupně i&nbsp;na&nbsp;všech Zabbix Proxy:</p>


<section id="block-code-block_43affe6804c1699c8c03350475e6a40e" data-id="block-code-block_43affe6804c1699c8c03350475e6a40e" class="gt-block block-code">
    <pre><code>dnf upgrade zabbix* -y</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Ve verzi Zabbix 6.4 je nyní konfigurační soubor pro web server Apache oddělen z&nbsp;balíčků <code>zabbix-web-service</code> a&nbsp;existuje nyní jako balíček samostatný, s&nbsp;názvem <code>zabbix-apache-conf</code>.</p>



<p>V případě použití Apache jako web serveru pro provozování front-endu tedy tento nově-vzniknuvší balíček nainstalujeme.</p>



<p>Zároveň je nezbytné zaktualizovat i&nbsp;balíček pro <code>zabbix-web-service</code> na&nbsp;nejnovější verzi 6.4, které následně povolíme automatický start po&nbsp;spuštění systému.</p>


<section id="block-code-block_d2ec1ca070785b102aec229f032799c0" data-id="block-code-block_d2ec1ca070785b102aec229f032799c0" class="gt-block block-code">
    <pre><code>dnf install zabbix-web-service zabbix-apache-conf -y
systemctl enable zabbix-web-service</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Otevřeme konfigurační soubor Zabbix serveru, upravíme v&nbsp;něm následující řádky tak, jak vidíte níže. </p>



<p>Soubor následně uložíme a&nbsp;můžeme zavřít.</p>


<section id="block-code-block_5bd4454d7e1032383e63171e470a42e3" data-id="block-code-block_5bd4454d7e1032383e63171e470a42e3" class="gt-block block-code">
    <pre><code>nano /etc/zabbix/zabbix_server.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>



<section id="block-code-block_45c242292936925a815916f9fa0a074a" data-id="block-code-block_45c242292936925a815916f9fa0a074a" class="gt-block block-code">
    <pre><code>DBHost=127.0.0.1
DBPassword=&lt;heslo_do_databáze&gt;
StartReportWriters=1
WebServiceURL=http://localhost:10053/report</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Po úspěšném dokončení aktualizace Zabbix serveru a&nbsp;všech jeho součástí můžeme službu znovu spustit:</p>


<section id="block-code-block_e4577077999a3fccb5a38038d26cc298" data-id="block-code-block_e4577077999a3fccb5a38038d26cc298" class="gt-block block-code">
    <pre><code>systemctl start zabbix-server</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Pokud jako backend pro Zabbix proxy používáme databázi <strong>SQLite</strong>, pak nejprve obsah současné databáze smažeme následujícím příkazem:</p>


<section id="block-code-block_bf14eb4dde09288decaff023a8dd3ddb" data-id="block-code-block_bf14eb4dde09288decaff023a8dd3ddb" class="gt-block block-code">
    <pre><code>rm /tmp/zabbix_proxy.db</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V opačném případě lze po&nbsp;úspěšném dokončení aktualizace Zabbix proxy opětovně spustit i&nbsp;tuto službu:</p>


<section id="block-code-block_fbc09fc27233fd04b29906d45fe60c56" data-id="block-code-block_fbc09fc27233fd04b29906d45fe60c56" class="gt-block block-code">
    <pre><code>systemctl start zabbix-proxy</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Postupné činnosti i&nbsp;celý proces aktualizace, včetně případných zásahů do&nbsp;struktury databázového schématu lze sledovat v&nbsp;log souboru Zabbix serveru:</p>


<section id="block-code-block_2231bc6745ccf334b3b7c964130f2277" data-id="block-code-block_2231bc6745ccf334b3b7c964130f2277" class="gt-block block-code">
    <pre><code>tail -f /var/log/zabbix/zabbix_server.log</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Případně pro jednotlivé Zabbix proxy pak zase v&nbsp;souboru:</p>


<section id="block-code-block_46a340e643bdf744558e88e4328d3d14" data-id="block-code-block_46a340e643bdf744558e88e4328d3d14" class="gt-block block-code">
    <pre><code>tail -f /var/log/zabbix/zabbix_proxy.log</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Aktualizace databáze pro float64 a&nbsp;primární klíče</h2>



<p>Od major verze Zabbix 6.0 jsou v&nbsp;rámci značného navýšení databázového výkonu použity pro tabulky primární klíče. Toto má zároveň příznivý vliv i&nbsp;na&nbsp;funkcionalitu HA.</p>



<p>V případě použití režimu HA (například <code>Patroni</code>) se v&nbsp;distribuovaném úložišti zrcadlí hodnoty key-value. Na&nbsp;základě informací existujících v&nbsp;tomto úložišti se všechny instance clusteru dohodnou například na&nbsp;tom, která replika se má zpropagovat jako aktuálně produkční, pokud primární instance selže. Toto napomáhá celé funkční logice clusteru v&nbsp;následném určení konsenzu toho, který &#8222;node&#8220; je v&nbsp;danou dobu kritický tak, aby byla možnost vyhnout se případnému &#8222;split-brain&#8220; scénáři.</p>



<p>Na následujícím odkazu z&nbsp;oficiální dokumentace se dozvíte více: <a rel="noreferrer noopener" href="https://www.zabbix.com/documentation/6.4/en/manual/appendix/install/db_primary_keys" target="_blank">https://www.zabbix.com/documentation/6.4/en/manual/appendix/install/db_primary_keys</a>.</p>



<p>Pro tento úkon nejprve zastavíme Zabbix server.</p>


<section id="block-code-block_36ce523e4f8daeb83d2847ae7ee07a7b" data-id="block-code-block_36ce523e4f8daeb83d2847ae7ee07a7b" class="gt-block block-code">
    <pre><code>systemctl stop zabbix-server</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Následně nainstalujeme nový balíček obsahující databázové skripty pro Zabbix, který obsahuje i&nbsp;tutu samotnou aktualizaci.</p>


<section id="block-code-block_ddb1a48ed41c8516aca8d02c5ec1c818" data-id="block-code-block_ddb1a48ed41c8516aca8d02c5ec1c818" class="gt-block block-code">
    <pre><code>dnf install zabbix-sql-scripts</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nyní do&nbsp;databáze aplikujeme SQL patch-e určené k&nbsp;přípravě právě pro tuto aktualizaci, které nám jednotlivé tabulky přejmenují.</p>



<p><strong>Pozor!</strong> Ve starších verzích Zabbix je tato cesta jiná, a&nbsp;to <code>/usr/share/doc/zabbix-sql-scripts/</code> !</p>


<section id="block-code-block_4754d4efb4e2af09f8a8be4f9f61b518" data-id="block-code-block_4754d4efb4e2af09f8a8be4f9f61b518" class="gt-block block-code">
    <pre><code>cat /usr/share/zabbix-sql-scripts/postgresql/double.sql | sudo -u zabbix psql zabbix
cat /usr/share/zabbix-sql-scripts/postgresql/history_pk_prepare.sql | sudo -u zabbix psql zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Na úrovni databáze pak spustíme následující SQL skript, který nám exportuje současné tabulky s&nbsp;historickými daty a&nbsp;vloží tato data do&nbsp;tabulek nových.</p>


<section id="block-code-block_13c7cf4a2e6e1991a5f4d2dfc58d5273" data-id="block-code-block_13c7cf4a2e6e1991a5f4d2dfc58d5273" class="gt-block block-code">
    <pre><code>INSERT INTO history SELECT * FROM history_old ON CONFLICT (itemid,clock,ns) DO NOTHING;
INSERT INTO history_uint SELECT * FROM history_uint_old ON CONFLICT (itemid,clock,ns) DO NOTHING;
INSERT INTO history_str SELECT * FROM history_str_old ON CONFLICT (itemid,clock,ns) DO NOTHING;
INSERT INTO history_log SELECT * FROM history_log_old ON CONFLICT (itemid,clock,ns) DO NOTHING;
INSERT INTO history_text SELECT * FROM history_text_old ON CONFLICT (itemid,clock,ns) DO NOTHING;</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Tímto jsme dokončili přípravy pro aktualizaci databázového schématu a&nbsp;opětovně nastartujeme Zabbix server, který při&nbsp;svém spuštění provede samotné změny v&nbsp;databázi.</p>


<section id="block-code-block_e4577077999a3fccb5a38038d26cc298" data-id="block-code-block_e4577077999a3fccb5a38038d26cc298" class="gt-block block-code">
    <pre><code>systemctl start zabbix-server</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Po dokončení aktualizace, změně schématu a&nbsp;úspěšném nastartování Zabbix serveru lze ze Zabbix databáze smazat přípravné tabulky vytvořené skriptem výše.</p>



<p>To provedeme následovně:</p>


<section id="block-code-block_ee018f34ef49de0dfe4c607fc32df581" data-id="block-code-block_ee018f34ef49de0dfe4c607fc32df581" class="gt-block block-code">
    <pre><code>sudo -u zabbix psql zabbix

DROP TABLE history_old;
DROP TABLE history_uint_old;
DROP TABLE history_str_old;
DROP TABLE history_log_old;
DROP TABLE history_text_old;</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Instalace TimescaleDB (volitelné)</h2>



<p>Následující kroky nás provedou instalací PostgreSQL doplňku TimescaleDB.</p>



<p>Tyto činnosti jsou zcela volitelné, avšak mohou rapidně zvýšit výkon celého Zabbix monitoringu.</p>



<p>Předtím, než započne samotná instalace zastavíme Zabbix server tak, aby do&nbsp;databáze již nic nezapisoval:</p>


<section id="block-code-block_341d5cd0a4d703e3dbebf9738abb1468" data-id="block-code-block_341d5cd0a4d703e3dbebf9738abb1468" class="gt-block block-code">
    <pre><code>systemctl stop zabbix-server.service</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nyní nainstalujeme oficiální repozitáře TimescaleDB dle dokumentace na&nbsp;tomto odkazu: </p>



<p><a href="https://docs.timescale.com/self-hosted/latest/install/">http</a><a href="https://docs.timescale.com/self-hosted/latest/install/" target="_blank" rel="noreferrer noopener nofollow">s://docs.timescale.com/self-hosted/latest/install/</a>.</p>



<p>Po úspěšné instalaci repozitářů lze přikročit k&nbsp;samotné instalaci doplňku TimescaleDB:</p>


<section id="block-code-block_65215fcb7d3d49a40c9b7f9ff37f81d0" data-id="block-code-block_65215fcb7d3d49a40c9b7f9ff37f81d0" class="gt-block block-code">
    <pre><code>dnf install timescaledb-2-postgresql-15</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Následně pak překročíme k&nbsp;nastavení optimálních parametrů pro běh PostgreSQL s&nbsp;TimescaleDB za pomoci příkazu <code>timescaledb-tune</code>. </p>



<p>Jako parametry tohoto příkazu zvolíme cestu ke konfiguračnímu souboru PostgreSQL a&nbsp;zároveň zvýšíme omezení na&nbsp;maximální počet příchozích spojení do&nbsp;databáze, který je implicitně pro potřeby monitoringu příliš nízký.</p>


<section id="block-code-block_a9ca7a08816b5cde5c5b8cd04054ba21" data-id="block-code-block_a9ca7a08816b5cde5c5b8cd04054ba21" class="gt-block block-code">
    <pre><code>timescaledb-tune --pg-config=/usr/pgsql-15/bin/pg_config --max-conns=100</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Pro aplikaci nově nastavených konfiguračních parametrů zrestartujeme službu PostgreSQL:</p>


<section id="block-code-block_bed88f2af25bbd144bcc46b8dd6bcd2b" data-id="block-code-block_bed88f2af25bbd144bcc46b8dd6bcd2b" class="gt-block block-code">
    <pre><code>systemctl restart postgresql-15.service</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Následně musíme TimescaleDB vytvořit, to provedeme pomocí tohoto příkazu:</p>


<section id="block-code-block_58dcba9958229a83d0d4ca0e17c51505" data-id="block-code-block_58dcba9958229a83d0d4ca0e17c51505" class="gt-block block-code">
    <pre><code>echo &quot;CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;&quot; | sudo -u postgres psql zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Pak stačí již jen spustit oficiální SQL skripty přímo dodané Zabbixem, které nám předpřipraví potřebné tabulky a&nbsp;schémata.</p>



<p><strong>Pozor!</strong> Ve starších verzích Zabbix je tato cesta jiná, a&nbsp;to <code>/usr/share/doc/zabbix-sql-scripts/</code> !</p>


<section id="block-code-block_12a579ef5811ea94179366fcbcdb1956" data-id="block-code-block_12a579ef5811ea94179366fcbcdb1956" class="gt-block block-code">
    <pre><code>cat /usr/share/zabbix-sql-scripts/postgresql/timescaledb.sql | sudo -u zabbix psql zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Jako poslední krok je opětovné spuštění služby Zabbix serveru:</p>


<section id="block-code-block_ce009f90540409d4fc7d4136c1799a3d" data-id="block-code-block_ce009f90540409d4fc7d4136c1799a3d" class="gt-block block-code">
    <pre><code>systemctl start zabbix-server.service</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p><strong>Poznámka:</strong> V&nbsp;případě, že se po&nbsp;opětovném spuštění Zabbix serveru objeví chyba ohledně kombatibility databáze, pak stačí v&nbsp;konfiguračním souboru Zabbix serveru upravit následující direktivu.</p>



<p><strong>V této verzi Zabbix toto není chyba kompatibility, ale pouze chybějící číslo TimescaleDB v&nbsp;samotném zdrojovém kódu Zabbixu!</strong> </p>



<p>Odpovídající verze databáze pak vždy hledejte v&nbsp;matici kompatibility v&nbsp;oficiální dokumentaci Zabbixu pro vaši konkrétní verzi.</p>


<section id="block-code-block_6156a4570ec7bc143bdf5a8ecabd88b2" data-id="block-code-block_6156a4570ec7bc143bdf5a8ecabd88b2" class="gt-block block-code">
    <pre><code>AllowUnsupportedDBVersions=1</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A nakonec restartujeme službu Zabbix serveru.</p>


<section id="block-code-block_2bba297d9d0db30b5ad8b2444217d030" data-id="block-code-block_2bba297d9d0db30b5ad8b2444217d030" class="gt-block block-code">
    <pre><code>systemctl restart zabbix-server.service</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Dokončovací práce</h2>



<ul class="wp-block-list">
<li>Zkontrolujte, že správně běží Zabbix server, databázový server a&nbsp;mají správnou verzi</li>



<li>Zkontrolujte, že běží všechny Zabbix proxy a&nbsp;mají správnou verzi</li>



<li>Zkontrolujte výkon Zabbix serveru a&nbsp;Zabbix proxy (log soubory, nepodporované položky, fronty, monitorovací skripty, atd.).</li>



<li>Zkontrolujte, zda vaše servery mají přiděleny poslední verze oficiálních šablon od Zabbixu. [ <a rel="noreferrer noopener" href="https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates" target="_blank">Zabbix GIT</a> ]</li>
</ul>



<h2 class="wp-block-heading">Konfigurace Zabbixu pro reporting</h2>



<p>Pro potřeby funkcí reportingu nejprve nainstalujeme Google Chrome.</p>



<p>Nejprve stáhneme instalační balíček, který následně také nainstalujeme:</p>


<section id="block-code-block_a6b7531fd68da8e0551d2a814e6c9b91" data-id="block-code-block_a6b7531fd68da8e0551d2a814e6c9b91" class="gt-block block-code">
    <pre><code>wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
dnf localinstall google-chrome-stable_current_x86_64.rpm</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V konfiguraci Zabbix frontendu pak upravíme parametr &#8222;Frontend URL&#8220; na&nbsp;aktuálně platnou hodnotu, toto nastavení se nachází v&nbsp;následující cestě v&nbsp;menu:</p>


<section id="block-code-block_158521d2d1e9920e1eb470db7e5f853e" data-id="block-code-block_158521d2d1e9920e1eb470db7e5f853e" class="gt-block block-code">
    <pre><code>Administration -&gt; General -&gt; Other</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Příklad nastavení můžete vidět na&nbsp;obrázku níže.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="567" src="https://www.initmax.cz/wp-content/uploads/2023/07/upgrade-6-4-1024x567.png" alt="Konfigurace reportingu Zabbix 6.4" class="wp-image-12479" srcset="https://www.initmax.cz/wp-content/uploads/2023/07/upgrade-6-4-1024x567.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/07/upgrade-6-4-300x166.png 300w, https://www.initmax.cz/wp-content/uploads/2023/07/upgrade-6-4-768x426.png 768w, https://www.initmax.cz/wp-content/uploads/2023/07/upgrade-6-4-1536x851.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/07/upgrade-6-4.png 1718w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>A to je vše! Nyní můžete začít využívat váš nově zaktualizovaný Zabbix ve verzi 6.4 se všemi jeho opravami i&nbsp;novinkami.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>


<section id="block-newsletter-block_d1a006a0e9916d3dff329c439f7c2fe8" data-id="block-newsletter-block_d1a006a0e9916d3dff329c439f7c2fe8" class="gt-block block-newsletter">
    <section id="newsletter" class="newsletter">
	<div class="gradient basic">
		<div class="newsletter__inner width width--general">
			<div class="col left">
									<h2 class="newsletter__title">Buďte v&nbsp;obraze s&nbsp;naším newsletterem</h2>
													<div class="newsletter__content"><p>Díky initMAX newsletteru Vám neunikne žádná z&nbsp;pozvánek na&nbsp;akce a&nbsp;webináře, žádný z&nbsp;tipů, jak dostat ze svého IT MAXimum, ani ověřené informace o&nbsp;novinkách ze světa Zabbix a&nbsp;dalších technologií.</p>
</div>
							</div>
			<div class="col right form-wrapper">
				<div class="newsletter-form">
	<form method="post" action="/wiki/kapitola/zabbix/feed/" enctype="multipart/form-data">
		<input type="hidden" name="url" value="https://www.initmax.cz/wiki/kapitola/zabbix/feed/">

		<div class="inputs">

			<label for="newsletter-form_contact_email" class="top">Vaše e-mailová adresa:</label>
			<div class="df">

				<div class="input">
					<input type="text" id="newsletter-form_contact_email" name="newsletter_email" placeholder="@" data-format="email" data-required="1">
									</div><!-- /.input -->

				<a href="#" class="btn btn--white sendBtn">Odeslat</a>

			</div>

			<div class="bottom nm">
				<label for="newsletter-form_gdpr" class="checkbox gdpr">
					<input type="checkbox" id="newsletter-form_gdpr" name="newsletter_gdpr">
					<span>Souhlasím se&nbsp;<a href="https://www.initmax.cz/ochrana-osobnich-udaju/" target="_blank">zpracováním osobních údajů</a>.</span>
				</label>
			</div>

		</div><!-- /.inputs -->
		<div class="sent hidden">
			<div class="iconOk"><h3>Děkujeme, že jste se přihlásili k&nbsp;odběru našeho newsletteru.</h3>
</div>
			<button class="sent__close" title="Zavřít" onclick="closeFormMessage(this,event)"><svg data-name="Group 3602" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 3272" d="M0,0H24V24H0Z" fill="none"/><line data-name="Line 98" y2="14" transform="translate(7.05 7.05) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 99" x2="14" transform="translate(7.05 16.95) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</button>
		</div><!-- /.sent -->
	</form>
</div>			</div>
		</div>
	</div>
</section></section>



<section id="social-links-block_67f8df35c7170f1a6d31db449f2102de" data-id="social-links-block_67f8df35c7170f1a6d31db449f2102de" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>

<p>The post <a href="https://www.initmax.cz/wiki/zabbix-aktualizace-na-posledni-verzi-6-4/">Zabbix &#8211; aktualizace na&nbsp;poslední verzi 6.4</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Zabbix 6.4 &#8211; návod na&#160;instalaci v&#160;5 minutách</title>
		<link>https://www.initmax.cz/wiki/zabbix-6-4-navod-na-instalaci-v-5-minutach/</link>
		
		<dc:creator><![CDATA[Karolína Vrtalová]]></dc:creator>
		<pubDate>Fri, 21 Jul 2023 11:53:08 +0000</pubDate>
				<guid isPermaLink="false">https://www.initmax.cz/?post_type=wiki&#038;p=12465</guid>

					<description><![CDATA[<p>Tentokrát si ukážeme, jak nainstalovat a nakonfigurovat Zabbix 6.4 s databází PostgreSQL 15 a jejím doplňkem TimescaleDB v linux distribuci Debian 11. Front-end nám ...</p>
<p>The post <a href="https://www.initmax.cz/wiki/zabbix-6-4-navod-na-instalaci-v-5-minutach/">Zabbix 6.4 &#8211; návod na&nbsp;instalaci v&nbsp;5 minutách</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Tentokrát si ukážeme, jak nainstalovat a&nbsp;nakonfigurovat Zabbix 6.4 s&nbsp;databází PostgreSQL 15 a&nbsp;jejím doplňkem TimescaleDB v&nbsp;linux distribuci Debian 11. </p>



<p>Front-end nám poběží na&nbsp;nginx za pomocí php-fpm verze 7.4, a&nbsp;to vše během pěti minut!</p>


<section id="block-webinar-block_4a63ddb12045cc5faba189d2fcc6294a" data-id="block-webinar-block_4a63ddb12045cc5faba189d2fcc6294a" class="gt-block block-webinar">
    <div class="connected-webinars__grid">
        <a href="https://www.initmax.cz/webinar/instalace-zabbixu-v-5-minutach-6-4/" class="grid-item">
	<article class="webinar-promotion">
		<div class="webinar-promotion__thumbnail-wrap">
			<figure class="webinar-promotion__thumbnail">
					<img decoding="async" src="https://www.initmax.cz/wp-content/uploads/2022/12/ilustrace_webinare_6.4_01_thumbnail_web.png"
				 width="400"
		 height="250"
		 class=""
		 alt="Instalace Zabbixu 6.4 v&nbsp;5 minutách"
		 loading="lazy"	>
									<div class="webinar-promotion__tags">
						<span class="tag tag--small" style="color:#ffffff;background-color:#d40000;">Zabbix</span>					</div>
							</figure>
		</div>
		<div class="webinar-promotion__text">
			<div>
									<time datetime="2023-02-02">2.&nbsp;2.&nbsp;2023</time>
							</div>
			<h3 class="webinar-promotion__title">Instalace Zabbixu 6.4 v&nbsp;5 minutách</h3>
			<div class="icon-link">
				<figure class="icon-wrap icon-wrap--primary"><svg data-name="Group 3411" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 455" d="M0,0H24V24H0Z" fill="none"/><path data-name="Path 456" d="M15,10l4.553-2.276A1,1,0,0,1,21,8.618v6.764a1,1,0,0,1-1.447.894L15,14V10Z" transform="translate(0 0)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><rect data-name="Rectangle 1286" width="12" height="12" rx="2" transform="translate(3.112 6)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</figure>
				<span>Zhlédnout záznam</span>
			</div>
		</div>
	</article>
</a>    </div>
</section>


<section id="social-links-block_329521a8c3a47a60d8a6a9d9619efa7b" data-id="social-links-block_329521a8c3a47a60d8a6a9d9619efa7b" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>




<h2 class="wp-block-heading">Než začneme</h2>



<p>Nejprve nainstalujeme GNU PG, to provedeme následujícím příkazem.</p>


<section id="block-code-block_8253339f093b83ba4177a3eb4f7a0ab2" data-id="block-code-block_8253339f093b83ba4177a3eb4f7a0ab2" class="gt-block block-code">
    <pre><code>apt install gnupg2</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Instalace PostgreSQL</h2>



<p>Pro instalaci databázového serveru si nejprve vytvoříme konfigurační soubor oficiálních repozitářů PostgreSQL:</p>


<section id="block-code-block_c3da2da3599732f9393b5e6b11979fc9" data-id="block-code-block_c3da2da3599732f9393b5e6b11979fc9" class="gt-block block-code">
    <pre><code>sh -c &#039;echo &quot;deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main&quot; &gt; /etc/apt/sources.list.d/pgdg.list&#039;</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Pak stáhneme ověřovací klíč a&nbsp;zaktualizujeme cache všech existujících repozitářů:</p>


<section id="block-code-block_070e013824d573e6bdf4dff365f92426" data-id="block-code-block_070e013824d573e6bdf4dff365f92426" class="gt-block block-code">
    <pre><code>wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
apt update</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Následně nainstalujeme balíčky databázového serveru PostgreSQL, v&nbsp;tomto případě ve verzi 15:</p>


<section id="block-code-block_cc55aa37eaa6988daf4573264eb84c24" data-id="block-code-block_cc55aa37eaa6988daf4573264eb84c24" class="gt-block block-code">
    <pre><code>apt-get -y install postgresql-15</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Instalace TimescaleDB</h2>



<p>Začneme tím, že nainstalujeme veškeré balíčky potřebné pro následnou instalaci:</p>


<section id="block-code-block_8df591298bfffb42dc0d3582750fd2b3" data-id="block-code-block_8df591298bfffb42dc0d3582750fd2b3" class="gt-block block-code">
    <pre><code>apt install gnupg postgresql-common apt-transport-https lsb-release wget</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A následujícím příkazem vytvoříme konfigurační soubor oficiálních repozitářů TimescaleDB.</p>


<section id="block-code-block_93fdd1f6a97b581f08e981ec8b738fd9" data-id="block-code-block_93fdd1f6a97b581f08e981ec8b738fd9" class="gt-block block-code">
    <pre><code>echo &quot;deb https://packagecloud.io/timescale/timescaledb/debian/ $(lsb_release -c -s) main&quot; | sudo tee /etc/apt/sources.list.d/timescaledb.list</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>I pro tento repozitář stáhneme platný ověřovací klíč a&nbsp;zaktualizujeme APT cache:</p>


<section id="block-code-block_36f1f4f6bbcdd06df074a8d801819790" data-id="block-code-block_36f1f4f6bbcdd06df074a8d801819790" class="gt-block block-code">
    <pre><code>wget --quiet -O - https://packagecloud.io/timescale/timescaledb/gpgkey | sudo apt-key add -
apt update</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Po těchto úkonech už můžeme přistoupit k&nbsp;samotné instalaci TimescaleDB pro naši konkrétní verzi PostgreSQL.</p>


<section id="block-code-block_6548738f86a0f23213b87a1fe362bfe1" data-id="block-code-block_6548738f86a0f23213b87a1fe362bfe1" class="gt-block block-code">
    <pre><code>apt install timescaledb-2-postgresql-15</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Po úspěšné instalaci všech závislých balíčků spustíme optimalizační program <code>timescaledb-tune</code>, který nám pomůže nastavit parametry PostgreSQL pro TimescaleDB vůčihledně aktuálně používanému hardware.</p>


<section id="block-code-block_8c7e5dd18c108119fa9f93199fee252a" data-id="block-code-block_8c7e5dd18c108119fa9f93199fee252a" class="gt-block block-code">
    <pre><code>timescaledb-tune --quiet --yes</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Výše zmíněný příkaz na&nbsp;optimalizaci PostgreSQL pro TimescaleDB bohužel implicitně omezuje počet příchozích spojení do&nbsp;databáze na&nbsp;25. </p>



<p>Toto je ovšem pro potřeby Zabbixu zcela nevhodné a&nbsp;tak tuto hodnotu pro účely této ukázky upravíme na&nbsp;125. </p>



<p>Toto je možné upravit i&nbsp;pomocí zadání parametru <code>--max-conns</code> s&nbsp;výslednou hodnotou, tedy například <code>--max-conns=125</code>. </p>



<p><strong>Omezení na&nbsp;počet databázových spojení je však nutné nastavit vždy tak, aby odpovídalo vaší konkrétní infrastruktuře, i&nbsp;vašim požadavkům na&nbsp;monitoring, který bude Zabbix zprostředkovávat.</strong></p>


<section id="block-code-block_49902af93d1a51fb01f0f46bf9741348" data-id="block-code-block_49902af93d1a51fb01f0f46bf9741348" class="gt-block block-code">
    <pre><code>nano /etc/postgresql/15/main/postgresql.conf

max_connections = 125</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Po těchto krocích zrestartujeme službu databázového serveru PostgreSQL:</p>


<section id="block-code-block_4bbfb11b02bff66498a8a14270913844" data-id="block-code-block_4bbfb11b02bff66498a8a14270913844" class="gt-block block-code">
    <pre><code>systemctl restart postgresql</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Instalace Zabbix serveru a&nbsp;jeho součástí</h2>



<p>Databázi máme nainstalovanou, pojďme tedy na&nbsp;instalaci Zabbix serveru a&nbsp;jeho součástí.<br>Stáhneme si instalační balíček s&nbsp;repozitáři Zabbixu, ručně ho nainstalujeme a&nbsp;zaktualizujeme APT cache:</p>


<section id="block-code-block_40a7f86f5a7c9ddab91b9252fd7b0153" data-id="block-code-block_40a7f86f5a7c9ddab91b9252fd7b0153" class="gt-block block-code">
    <pre><code>wget https://repo.zabbix.com/zabbix/6.4/debian/pool/main/z/zabbix-release/zabbix-release_6.4-1+debian11_all.deb
dpkg -i zabbix-release_6.4-1+debian11_all.deb
apt update</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nyní můžeme přistoupit k&nbsp;instalaci samotného Zabbix serveru a&nbsp;všech závislých komponent:</p>


<section id="block-code-block_41afec51e4854cb22299e469bc3d83b1" data-id="block-code-block_41afec51e4854cb22299e469bc3d83b1" class="gt-block block-code">
    <pre><code>apt install zabbix-server-pgsql zabbix-frontend-php php7.4-pgsql zabbix-nginx-conf zabbix-sql-scripts zabbix-agent2</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Inicializace databáze</h2>



<p>V tomto kroku vytvoříme na&nbsp;úrovni databázového serveru uživatele pro Zabbix. </p>



<p>Budeme vyzváni k&nbsp;zadání hesla.</p>


<section id="block-code-block_c763328c42014f28a12986c2e8129247" data-id="block-code-block_c763328c42014f28a12986c2e8129247" class="gt-block block-code">
    <pre><code>cd /tmp
sudo -u postgres createuser --pwprompt zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Potom vytvoříme samotnou databázi pro Zabbix. Budeme vyzváni k&nbsp;zadání hesla, které jsme vytvořili v&nbsp;předchozím kroku.</p>


<section id="block-code-block_6e2920abc80d4353f365d20d77488ca1" data-id="block-code-block_6e2920abc80d4353f365d20d77488ca1" class="gt-block block-code">
    <pre><code>sudo -u postgres createdb -O zabbix zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Do této nově vytvořené databáze následně naimportujeme schéma a&nbsp;výchozí data. Tento SQL skript je pro každou konkrétní databází dodaný samotným Zabbixem v&nbsp;balíčku <code>zabbix-sql-scripts</code>.</p>



<p><strong>Pozor!</strong> Ve starších verzích Zabbix je tato cesta jiná, a&nbsp;to <code>/usr/share/doc/zabbix-sql-scripts/</code> !</p>


<section id="block-code-block_7a2ecd7d9229c23d1c305ebc758a83ae" data-id="block-code-block_7a2ecd7d9229c23d1c305ebc758a83ae" class="gt-block block-code">
    <pre><code>zcat /usr/share/zabbix-sql-scripts/postgresql/server.sql.gz | sudo -u zabbix psql zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Zbývá již jen aktivovat TimescaleDB a&nbsp;nahrát dodaný skript, který nám vytvoří databázové schéma.</p>



<p><strong>Pozor!</strong> Ve starších verzích Zabbix je tato cesta jiná, a&nbsp;to <code>/usr/share/doc/zabbix-sql-scripts/</code> !</p>


<section id="block-code-block_42ecd8c0a102df9f34db8c588b00636b" data-id="block-code-block_42ecd8c0a102df9f34db8c588b00636b" class="gt-block block-code">
    <pre><code>echo &quot;CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;&quot; | sudo -u postgres psql zabbix
cat /usr/share/zabbix-sql-scripts/postgresql/timescaledb.sql | sudo -u zabbix psql zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Konfigurace Zabbix serveru</h2>



<p>Pro potřeby funkčnosti front-endu Zabbix v&nbsp;konfiguračním souboru Zabbix serveru nastavíme heslo do&nbsp;databáze, které jsme vytvořili v&nbsp;předcházejích krocích.</p>



<p>Otevřeme tedy konfigurační soubor Zabbix serveru v&nbsp;cestě:</p>


<section id="block-code-block_081f3bd4111c13b944da2a08e5de06e1" data-id="block-code-block_081f3bd4111c13b944da2a08e5de06e1" class="gt-block block-code">
    <pre><code>nano /etc/zabbix/zabbix_server.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A zde upravíme následující direktivu.</p>


<section id="block-code-block_2c3926f898f707285e5f360cd6c60d9e" data-id="block-code-block_2c3926f898f707285e5f360cd6c60d9e" class="gt-block block-code">
    <pre><code>DBPassword=&lt;heslo_do_databáze&gt;</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Konfigurace nginx</h2>



<p>Proxy server nginx spolu s&nbsp;php-fpm budeme pro potřeby této ukázky využívat jako aplikační server pro chod samotného Zabbix front-endu.</p>



<p>Pro tyto potřeby je součástí Zabbix instalace i&nbsp;dodaný přednastavený konfigurační soubor pro <code>nginx</code> na&nbsp;následující cestě:</p>


<section id="block-code-block_d478d0c9ba15f2e2bf62925bc2ca3d64" data-id="block-code-block_d478d0c9ba15f2e2bf62925bc2ca3d64" class="gt-block block-code">
    <pre><code>nano /etc/zabbix/nginx.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V tomto souboru nastavíme hostname serveru, a&nbsp;také TCP port, na&nbsp;kterém bude nginx naslouchat pro příchozí spojení.</p>



<p>Toto nastavíme <strong>kupříkladu </strong>následovně:</p>


<section id="block-code-block_bffaf165d54484cbd29ed0236eaf33b2" data-id="block-code-block_bffaf165d54484cbd29ed0236eaf33b2" class="gt-block block-code">
    <pre><code>listen 80;
server_name initmax.cz;</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Soubor uložíme, zavřeme a&nbsp;následně smažeme implicitní konfigurační soubor <code>nginx </code>tak, aby nám nastavení nekolidovala.</p>


<section id="block-code-block_34f836def3686f4f84db82f51019fb20" data-id="block-code-block_34f836def3686f4f84db82f51019fb20" class="gt-block block-code">
    <pre><code>rm /etc/nginx/sites-enabled/default</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nyní stačí pouze zrestartovat jak samotný Zabbix server a&nbsp;Zabbix agent, tak i&nbsp;nginx a&nbsp;php-fpm, které využíváme pro chod Zabbix front-endu.</p>


<section id="block-code-block_00b75685fd902de297c5edce79b43a19" data-id="block-code-block_00b75685fd902de297c5edce79b43a19" class="gt-block block-code">
    <pre><code>systemctl restart zabbix-server zabbix-agent2 nginx php7.4-fpm</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nesmíme také zapomenout na&nbsp;automatické spouštění těchto služeb po&nbsp;startu:</p>


<section id="block-code-block_0bf8b1c5c6f2c8283d6b9ba391d472b7" data-id="block-code-block_0bf8b1c5c6f2c8283d6b9ba391d472b7" class="gt-block block-code">
    <pre><code>systemctl enable zabbix-server zabbix-agent2 nginx php7.4-fpm</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Konfigurace Zabbix front-endu</h2>



<p>V okně prohlížeče si otevřeme url na&nbsp;které nám Zabbix běží. <strong>Například</strong> <code>http://172.23.0.175</code> a&nbsp;přivítá nás instalační průvodce.</p>



<p>Kliknutím na&nbsp;tlačítko <code>Next step</code> se posuneme na&nbsp;stránku s&nbsp;kontrolou minimálních požadavků.</p>



<figure class="wp-block-image size-full is-style-default"><img loading="lazy" decoding="async" width="873" height="544" src="https://www.initmax.cz/wp-content/uploads/2023/07/zabbix_6.4_intro.png" alt="První krok instalace Zabbix 6.4 a nastavení jazyka" class="wp-image-12466" srcset="https://www.initmax.cz/wp-content/uploads/2023/07/zabbix_6.4_intro.png 873w, https://www.initmax.cz/wp-content/uploads/2023/07/zabbix_6.4_intro-300x187.png 300w, https://www.initmax.cz/wp-content/uploads/2023/07/zabbix_6.4_intro-768x479.png 768w" sizes="auto, (max-width: 873px) 100vw, 873px" /></figure>



<p>Vše je v&nbsp;pořádku, můžeme tedy kliknout na&nbsp;<code>Next step</code> a&nbsp;posunout se na&nbsp;další stránku s&nbsp;nastavením připojení do&nbsp;databáze.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="868" height="547" src="https://www.initmax.cz/wp-content/uploads/2023/07/zabbix_6.4_prereq.png" alt="Druhý krok instalace Zabbix 6.4 a kontrola minimálních požadavků" class="wp-image-12468" srcset="https://www.initmax.cz/wp-content/uploads/2023/07/zabbix_6.4_prereq.png 868w, https://www.initmax.cz/wp-content/uploads/2023/07/zabbix_6.4_prereq-300x189.png 300w, https://www.initmax.cz/wp-content/uploads/2023/07/zabbix_6.4_prereq-768x484.png 768w" sizes="auto, (max-width: 868px) 100vw, 868px" /></figure>



<p>Na této stránce vyplníme pouze políčko <strong>Password</strong>, nic dalšího není třeba měnit, a&nbsp;klikneme na&nbsp;<code>Next step</code>.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="568" src="https://www.initmax.cz/wp-content/uploads/2023/03/configure-db-connection-1024x568.png" alt="Třetím krokem průvodce instalace Zabbix 6.4 je nastavení připojení do databáze." class="wp-image-11815" srcset="https://www.initmax.cz/wp-content/uploads/2023/03/configure-db-connection-1024x568.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/03/configure-db-connection-300x166.png 300w, https://www.initmax.cz/wp-content/uploads/2023/03/configure-db-connection-768x426.png 768w, https://www.initmax.cz/wp-content/uploads/2023/03/configure-db-connection.png 1198w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Zde vyplníme základní nastavení, tedy název serveru a&nbsp;časové pásmo, a&nbsp;kliknutím na&nbsp;<code>Next step</code> pokračujeme k&nbsp;souhrnu konfigurace.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="569" src="https://www.initmax.cz/wp-content/uploads/2023/03/settings-1024x569.png" alt="Čtvrtým krokem průvodce instalace je nastavení serveru a výběr časové zóny." class="wp-image-11817" srcset="https://www.initmax.cz/wp-content/uploads/2023/03/settings-1024x569.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/03/settings-300x167.png 300w, https://www.initmax.cz/wp-content/uploads/2023/03/settings-768x427.png 768w, https://www.initmax.cz/wp-content/uploads/2023/03/settings.png 1198w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Zkontrolujeme zadané hodnoty a&nbsp;kliknutím na&nbsp;<code>Next step</code> dokončíme instalaci.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="565" src="https://www.initmax.cz/wp-content/uploads/2023/03/pre-installation-summary-1024x565.png" alt="Pátý krok instalace Zabbix 6.4 a kontrola hodnot před instalací" class="wp-image-11819" srcset="https://www.initmax.cz/wp-content/uploads/2023/03/pre-installation-summary-1024x565.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/03/pre-installation-summary-300x166.png 300w, https://www.initmax.cz/wp-content/uploads/2023/03/pre-installation-summary-768x424.png 768w, https://www.initmax.cz/wp-content/uploads/2023/03/pre-installation-summary.png 1199w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Kliknutím na&nbsp;<code>Finish</code> již přejdeme na&nbsp;přihlašovací obrazovku.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="566" src="https://www.initmax.cz/wp-content/uploads/2023/03/install-1024x566.png" alt="Po úspěšné instalaci můžeme přejít k přihlášení kliknutím na tlačítko &quot;Finish&quot;." class="wp-image-11821" srcset="https://www.initmax.cz/wp-content/uploads/2023/03/install-1024x566.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/03/install-300x166.png 300w, https://www.initmax.cz/wp-content/uploads/2023/03/install-768x425.png 768w, https://www.initmax.cz/wp-content/uploads/2023/03/install.png 1199w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Přihlásíme se a&nbsp;můžeme Zabbix 6.4 začít používat. </p>



<p>Výchozí údaje pro přihlášení jsou: <code>Admin/zabbix</code></p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="554" src="https://www.initmax.cz/wp-content/uploads/2023/03/login-1024x554.png" alt="Pro přihlášení v dialogovém okně uvedeme přihlašovací jméno a heslo." class="wp-image-11823" srcset="https://www.initmax.cz/wp-content/uploads/2023/03/login-1024x554.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/03/login-300x162.png 300w, https://www.initmax.cz/wp-content/uploads/2023/03/login-768x415.png 768w, https://www.initmax.cz/wp-content/uploads/2023/03/login.png 1215w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Po přihlášení na&nbsp;Vás čeká nový Zabbix 6.4. </p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="460" src="https://www.initmax.cz/wp-content/uploads/2023/07/install-in-5-min-6-4-1-1024x460.png" alt="Po přihlášení se zobrazí nová verze Zabbix 6.4" class="wp-image-12483" srcset="https://www.initmax.cz/wp-content/uploads/2023/07/install-in-5-min-6-4-1-1024x460.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/07/install-in-5-min-6-4-1-300x135.png 300w, https://www.initmax.cz/wp-content/uploads/2023/07/install-in-5-min-6-4-1-768x345.png 768w, https://www.initmax.cz/wp-content/uploads/2023/07/install-in-5-min-6-4-1-1536x691.png 1536w, https://www.initmax.cz/wp-content/uploads/2023/07/install-in-5-min-6-4-1-2048x921.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<hr class="wp-block-separator has-alpha-channel-opacity"/>


<section id="block-newsletter-block_b06322fde2053a3749ed5d0a1981158a" data-id="block-newsletter-block_b06322fde2053a3749ed5d0a1981158a" class="gt-block block-newsletter">
    <section id="newsletter" class="newsletter">
	<div class="gradient basic">
		<div class="newsletter__inner width width--general">
			<div class="col left">
									<h2 class="newsletter__title">Buďte v&nbsp;obraze s&nbsp;naším newsletterem</h2>
													<div class="newsletter__content"><p>Díky initMAX newsletteru Vám neunikne žádná z&nbsp;pozvánek na&nbsp;akce a&nbsp;webináře, žádný z&nbsp;tipů, jak dostat ze svého IT MAXimum, ani ověřené informace o&nbsp;novinkách ze světa Zabbix a&nbsp;dalších technologií.</p>
</div>
							</div>
			<div class="col right form-wrapper">
				<div class="newsletter-form">
	<form method="post" action="/wiki/kapitola/zabbix/feed/" enctype="multipart/form-data">
		<input type="hidden" name="url" value="https://www.initmax.cz/wiki/kapitola/zabbix/feed/">

		<div class="inputs">

			<label for="newsletter-form_contact_email" class="top">Vaše e-mailová adresa:</label>
			<div class="df">

				<div class="input">
					<input type="text" id="newsletter-form_contact_email" name="newsletter_email" placeholder="@" data-format="email" data-required="1">
									</div><!-- /.input -->

				<a href="#" class="btn btn--white sendBtn">Odeslat</a>

			</div>

			<div class="bottom nm">
				<label for="newsletter-form_gdpr" class="checkbox gdpr">
					<input type="checkbox" id="newsletter-form_gdpr" name="newsletter_gdpr">
					<span>Souhlasím se&nbsp;<a href="https://www.initmax.cz/ochrana-osobnich-udaju/" target="_blank">zpracováním osobních údajů</a>.</span>
				</label>
			</div>

		</div><!-- /.inputs -->
		<div class="sent hidden">
			<div class="iconOk"><h3>Děkujeme, že jste se přihlásili k&nbsp;odběru našeho newsletteru.</h3>
</div>
			<button class="sent__close" title="Zavřít" onclick="closeFormMessage(this,event)"><svg data-name="Group 3602" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 3272" d="M0,0H24V24H0Z" fill="none"/><line data-name="Line 98" y2="14" transform="translate(7.05 7.05) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 99" x2="14" transform="translate(7.05 16.95) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</button>
		</div><!-- /.sent -->
	</form>
</div>			</div>
		</div>
	</div>
</section></section>



<section id="social-links-block_329521a8c3a47a60d8a6a9d9619efa7b" data-id="social-links-block_329521a8c3a47a60d8a6a9d9619efa7b" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>

<p>The post <a href="https://www.initmax.cz/wiki/zabbix-6-4-navod-na-instalaci-v-5-minutach/">Zabbix 6.4 &#8211; návod na&nbsp;instalaci v&nbsp;5 minutách</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Zabbix &#8211; aktualizace na&#160;poslední verzi 6.2 (nepodporováno)</title>
		<link>https://www.initmax.cz/wiki/zabbix-aktualizace-na-posledni-verzi-6-2/</link>
		
		<dc:creator><![CDATA[Tomáš Heřmánek]]></dc:creator>
		<pubDate>Fri, 14 Jul 2023 15:53:38 +0000</pubDate>
				<guid isPermaLink="false">https://www.initmax.cz/?post_type=wiki&#038;p=12348</guid>

					<description><![CDATA[<p>V tomto článku si ukážeme, jak zaktualizovat Zabbix na poslední verzi 6.2 a začít naplno využívat všechna vylepšení a technické novinky, které přináší. ...</p>
<p>The post <a href="https://www.initmax.cz/wiki/zabbix-aktualizace-na-posledni-verzi-6-2/">Zabbix &#8211; aktualizace na&nbsp;poslední verzi 6.2 (nepodporováno)</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>V tomto článku si ukážeme, jak zaktualizovat Zabbix na&nbsp;poslední verzi 6.2 a&nbsp;začít naplno využívat všechna vylepšení a&nbsp;technické novinky, které přináší.</p>


<section id="block-webinar-block_fee7694117fb844c5e7fc1f3316fe4f9" data-id="block-webinar-block_fee7694117fb844c5e7fc1f3316fe4f9" class="gt-block block-webinar">
    <div class="connected-webinars__grid">
        <a href="https://www.initmax.cz/webinar/aktualizace-na-posledni-verzi/" class="grid-item">
	<article class="webinar-promotion">
		<div class="webinar-promotion__thumbnail-wrap">
			<figure class="webinar-promotion__thumbnail">
					<img decoding="async" src="https://www.initmax.cz/wp-content/uploads/2022/07/03_thumbnail_web.png"
				 width="400"
		 height="250"
		 class=""
		 alt="Aktualizace na&nbsp;poslední verzi 6.2"
		 loading="lazy"	>
									<div class="webinar-promotion__tags">
						<span class="tag tag--small" style="color:#ffffff;background-color:#d40000;">Zabbix</span>					</div>
							</figure>
		</div>
		<div class="webinar-promotion__text">
			<div>
									<time datetime="2022-07-14">14.&nbsp;7.&nbsp;2022</time>
							</div>
			<h3 class="webinar-promotion__title">Aktualizace na&nbsp;poslední verzi 6.2</h3>
			<div class="icon-link">
				<figure class="icon-wrap icon-wrap--primary"><svg data-name="Group 3411" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 455" d="M0,0H24V24H0Z" fill="none"/><path data-name="Path 456" d="M15,10l4.553-2.276A1,1,0,0,1,21,8.618v6.764a1,1,0,0,1-1.447.894L15,14V10Z" transform="translate(0 0)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><rect data-name="Rectangle 1286" width="12" height="12" rx="2" transform="translate(3.112 6)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</figure>
				<span>Zhlédnout záznam</span>
			</div>
		</div>
	</article>
</a>    </div>
</section>


<section id="social-links-block_a793d3bdab273c4e4fd000dee24e8519" data-id="social-links-block_a793d3bdab273c4e4fd000dee24e8519" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>




<h2 class="wp-block-heading">Přípravné kroky</h2>



<ul class="wp-block-list">
<li>Přečtěte si &#8222;poznámky k&nbsp;vydané verzi&#8220; (release notes) [ <a href="https://www.zabbix.com/rn/rn6.2.9" target="_blank" rel="noreferrer noopener">Official release notes for Zabbix 6.2</a> ]</li>



<li>Přečtěte si důkladně dokument &#8222;poznámky k&nbsp;aktualizaci&#8220; (upgrade notes) [ <a href="https://www.zabbix.com/documentation/6.2/en/manual/installation/upgrade_notes_620" target="_blank" rel="noreferrer noopener">Official upgrade notes for Zabbix 6.2</a> ] </li>



<li>Zkontrolujte a&nbsp;případně optimalizujte výkon současné databáze dle doporučení vendora a&nbsp;s&nbsp;ohledem na&nbsp;požadavky Zabbix instance</li>



<li>Zkontrolujte, zda verze veškerých komponent odpovídají matici kompatiblity nové verze Zabbix</li>



<li>Zazálohovat konfigurační soubory Zabbix serveru a&nbsp;Zabbix proxy</li>



<li>Zázálohovat databáze Zabbix serveru, případně Zabbix proxy</li>



<li>Zazálohovat veškeré možné úpravy &#8222;na&nbsp;míru&#8220;, které byly na&nbsp;úrovni Zabbix ručně provedeny</li>
</ul>



<h3 class="wp-block-heading">Kontrola verzí</h3>



<p>Nejprve je nutné zkontrolovat verze všech komponent, na&nbsp;kterých je běh Zabbixu a&nbsp;jeho součástí závislý tak, aby <strong>přesně </strong>odpovídal oficiální matici kompatibility pro Zabbix 6.2.</p>


<section id="block-code-block_52805a3fde21100f38b7489b7010df9f" data-id="block-code-block_52805a3fde21100f38b7489b7010df9f" class="gt-block block-code">
    <pre><code>php-fpm -v
mysql -V</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h3 class="wp-block-heading">Záloha konfiguračních souborů Zabbix</h3>



<p>Než se pustíme do&nbsp;dalších kroků, je vždy velice důležité si pro jistotu zazálohovat i&nbsp;veškeré konfigurační soubory Zabbix serveru a&nbsp;Zabbix Proxy, případné zvažte také zálohu konfiguračních souborů web serveru.</p>


<section id="block-code-block_396b9d2e8313b35f640314dbd5b13e12" data-id="block-code-block_396b9d2e8313b35f640314dbd5b13e12" class="gt-block block-code">
    <pre><code>cp /etc/zabbix/zabbix_server.conf /&lt;backup directory&gt;/
cp /etc/zabbix/zabbix_agentd.conf /&lt;backup directory&gt;/
cp /usr/share/zabbix/alertscripts/* /&lt;backup directory&gt;/
cp /usr/share/zabbix/externalscripts/* /&lt;backup directory&gt;/
cp -R /usr/share/zabbix/ /&lt;backup directory&gt;/
cp /etc/httpd/conf/httpd.conf /&lt;backup directory&gt;/
cp /etc/httpd/conf.d/zabbix.conf /&lt;backup directory&gt;/
cp /etc/zabbix/web/zabbix.conf.php /&lt;backup directory&gt;/</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h3 class="wp-block-heading">Zastavení služeb</h3>



<p>Nejprve zastavíme Zabbix server, aby do&nbsp;databáze již nic nezapisoval.</p>


<section id="block-code-block_256713e8d7a407c62ce6255d07d27460" data-id="block-code-block_256713e8d7a407c62ce6255d07d27460" class="gt-block block-code">
    <pre><code>systemctl stop zabbix-server</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Pokud jako backend Zabbix proxy používáme <strong>SQLite</strong>, pak zastavíme i&nbsp;jednotlivé Zabbix proxy, jelikož jejich databázi po&nbsp;aktualizaci budeme v&nbsp;tomto případě muset <strong>smazat</strong>.</p>


<section id="block-code-block_2ffd8894f1d428972e1ddbfca215e9f0" data-id="block-code-block_2ffd8894f1d428972e1ddbfca215e9f0" class="gt-block block-code">
    <pre><code>systemctl stop zabbix-proxy</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V případě, že chceme, aby data a&nbsp;aktivní konfigurace ze Zabbix serveru byla na&nbsp;Zabbix proxy serverech zachována, pak <strong>před aktualizací</strong> doporučujeme změnit konfiguraci Zabbix proxy a&nbsp;převést je na&nbsp;MySQL nebo PostgreSQL databázi. Tento postup je dopodrobna popsán v&nbsp;oficiální dokumentaci Zabbix. </p>



<p>Po tomto zásahu nebude nutné jednotlivé Zabbix proxy servery po&nbsp;dobu aktualizace Zabbix serveru vypínat a&nbsp;můžeme je nechat sbírat a&nbsp;ukládat data <strong>i v&nbsp;době nedostupnosti </strong>Zabbix serveru. </p>



<p>Služby jednotlivých Zabbix proxy bude třeba zastavit <strong>až přímo před aktualizací</strong> repozitářů a&nbsp;balíčků zabbix-proxy.</p>



<h3 class="wp-block-heading">Záloha databáze</h3>



<p>Následně spustíme zálohu databáze (následující příklady se týkají MySQL). </p>



<p>V případě, že je databáze malá (do&nbsp;desítek GB) a&nbsp;nepoužíváme partitioning, pak záloha nebude trvat tak dlouho. </p>



<p>Provedeme tedy zálohu celé databáze Zabbix:</p>


<section id="block-code-block_e1d264e962964079a3cb37050b2e7128" data-id="block-code-block_e1d264e962964079a3cb37050b2e7128" class="gt-block block-code">
    <pre><code>screen -S backup
mysqldump -uroot -p zabbix --extended-insert --single-transaction | bzip2 -9 &gt; /&lt;backup directory&gt;/zabbix_db_backup-$(date &quot;+%Y-%m-%d_%H.%M.%S&quot;).sql.bz2</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Pokud je databáze větší anebo používáte partitioning, pak nejprve z&nbsp;databáze zazálohujeme pouze konfigurační tabulky:</p>


<section id="block-code-block_4623e87d812cf545889bfc52821e0b67" data-id="block-code-block_4623e87d812cf545889bfc52821e0b67" class="gt-block block-code">
    <pre><code>mysqldump –uroot -p zabbix --ignore-table=zabbix.history \
--ignore-table=zabbix.history_uint --ignore-table=zabbix.history_str \
--ignore-table=zabbix.history_log --ignore-table=zabbix.history_text \
--ignore-table=zabbix.trends --ignore-table=zabbix.trends_uint &gt; zabbix_config_dump-$(date &quot;+%Y-%m-%d_%H.%M.%S&quot;)sql</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A následně až zazálohujeme zbytek databázových dat, a&nbsp;to s&nbsp;pomocí <code>innobackupex</code>, který zálohuje i&nbsp;transakční logy a&nbsp;umožňuje tak dělat inkrementální zálohy:</p>


<section id="block-code-block_dcda6570306e7731f5bc1133faf38113" data-id="block-code-block_dcda6570306e7731f5bc1133faf38113" class="gt-block block-code">
    <pre><code>screen -S backup
innobackupex -p&lt;password&gt; /&lt;backup_directory&gt;/
innobackupex -p&lt;password&gt; --apply-log --use-memory=4G /&lt;backup_directory&gt;/`date`/</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Pro značné urychlení procesu aktualizace je také možné smazat veškeré předchozí události (events), v&nbsp;případě MySQL např.&nbsp;takto:</p>


<section id="block-code-block_2581a43b02c9ecbed85c7bb363fcea3f" data-id="block-code-block_2581a43b02c9ecbed85c7bb363fcea3f" class="gt-block block-code">
    <pre><code>mysql -uroot -p zabbix
mysql&gt; DELETE from events where source &gt; 0 limit 10000;</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Aktualizace PHP</h2>



<p>Nová verze Zabbix 6.2 vyžaduje pro svůj chod i&nbsp;PHP v&nbsp;rozmezí verzí 7.4.0 až 8.2.x (Zabbix od verze 6.2.8 podporuje PHP verze 8.2.x).</p>



<p>Dle našich zkušeností doporučujeme nainstalovat PHP 8.0, ve verzi PHP novější než 7.6 je již podpora pro PCRE2, kterou Zabbix využívá.</p>



<p>Případnou aktualizaci pak jednoduše provedeme změnou nastavení balíčkovacího systému <code>dnf</code> na&nbsp;úrovni OS.</p>


<section id="block-code-block_b2770b4b19f85ac2e9d5e080dfe1e415" data-id="block-code-block_b2770b4b19f85ac2e9d5e080dfe1e415" class="gt-block block-code">
    <pre><code>dnf module switch-to php:8.0 -y</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Aktualizace databáze</h2>



<p>Nejprve smažeme aktuální verzi MariaDB</p>


<section id="block-code-block_3744ea1a0c373ee95e659ef8418306f9" data-id="block-code-block_3744ea1a0c373ee95e659ef8418306f9" class="gt-block block-code">
    <pre><code>dnf remove mariadb-*</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Následně stáhneme pomocný skript pro instalaci konkrétní verze MariaDB repozitářů:</p>


<section id="block-code-block_db0d4f95a6d323df49a8fe7665666443" data-id="block-code-block_db0d4f95a6d323df49a8fe7665666443" class="gt-block block-code">
    <pre><code>cd /tmp
curl -LsS -O https://downloads.mariadb.com/MariaDB/mariadb_repo_setup</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Tento skript pak spustíme s&nbsp;parametrem <code>--mariadb-server-version</code>, ve kterém definujeme konkrétní, Zabbixem podporovanou verzi MariaDB.</p>



<p>V případě Zabbix 6.2 je to verze MariaDB 10.7:</p>


<section id="block-code-block_38f7503856cdb70180200a25dbd1b47c" data-id="block-code-block_38f7503856cdb70180200a25dbd1b47c" class="gt-block block-code">
    <pre><code>bash mariadb_repo_setup --mariadb-server-version=10.7</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nyní je nutné zresetovat module stream balíčkovacího systému <code>dnf</code> tak, aby si uvědomil změnu ve zdroji instalovaných balíků pro daný software (v&nbsp;našem případě pro MariaDB):</p>


<section id="block-code-block_33dbb6a1f5f6e5a60ab97a017205bff4" data-id="block-code-block_33dbb6a1f5f6e5a60ab97a017205bff4" class="gt-block block-code">
    <pre><code>dnf -y module reset mariadb</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Posléze již přistoupíme k&nbsp;samotné instalaci spávné verze MariaDB, službu spustíme a&nbsp;nastavíme její automatické spouštění po&nbsp;startu.</p>


<section id="block-code-block_97bf88d9080e714f0c3e0cf3ab5c2d49" data-id="block-code-block_97bf88d9080e714f0c3e0cf3ab5c2d49" class="gt-block block-code">
    <pre><code>dnf install MariaDB-server MariaDB-client MariaDB-backup -y
systemctl enable mysqld.service --now</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Po úspěšné aktualizaci balíčků MariaDB spustíme dodaný aktualizační skript, který kvůli kompatibilitě zkontroluje a&nbsp;případně i&nbsp;opraví interní tabulky a&nbsp;schémata oproti změnám mezi verzemi:</p>


<section id="block-code-block_9c86236fdb0dea5999ab5b863465b2d9" data-id="block-code-block_9c86236fdb0dea5999ab5b863465b2d9" class="gt-block block-code">
    <pre><code>mysql_upgrade</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nyní už jen zkontrolujeme aktuální verzi MariaDB.</p>


<section id="block-code-block_719b77ae22861be50317559342abe824" data-id="block-code-block_719b77ae22861be50317559342abe824" class="gt-block block-code">
    <pre><code>mysql -V</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Aktualizace Zabbix</h2>



<p>Potom, co jsme vše úspěšně zazálohovali a&nbsp;zaktualizovali všechny verze návazných komponent dle oficiální matice kompatibility nové verze Zabbixu, přejdeme k&nbsp;aktualizaci samotného Zabbixu a&nbsp;všech jeho součástí.</p>



<p>Nejprve si stáhneme instalační balíčky pro repozitáře nové verze Zabbixu a&nbsp;smažeme instalační cache.</p>


<section id="block-code-block_39cae062dd661e701fefa3a8cafb3ac1" data-id="block-code-block_39cae062dd661e701fefa3a8cafb3ac1" class="gt-block block-code">
    <pre><code>rpm -Uvh https://repo.zabbix.com/zabbix/6.2/rhel/8/x86_64/zabbix-release-6.2-1.el8.noarch.rpm
dnf clean all</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Po tomto úkonu máme dostupné repozitáře nové verze a&nbsp;můžeme tedy zaktualizovat veškeré další komponenty Zabbix, a&nbsp;to postupně i&nbsp;na&nbsp;všech Zabbix Proxy:</p>


<section id="block-code-block_0cb9c086eaf48a37810ae59b74562a6f" data-id="block-code-block_0cb9c086eaf48a37810ae59b74562a6f" class="gt-block block-code">
    <pre><code>dnf upgrade zabbix* -y</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Následně nainstalujeme balíček <code>zabbix-web-service</code> ve verzi pro Zabbix 6.2 a&nbsp;nastavíme jí automatické spouštění po&nbsp;startu:</p>


<section id="block-code-block_9bf54fe4f566f05dd6911d4b36b2b656" data-id="block-code-block_9bf54fe4f566f05dd6911d4b36b2b656" class="gt-block block-code">
    <pre><code>dnf install zabbix-web-service -y
systemctl enable zabbix-web-service --now</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Otevřeme konfigurační soubor Zabbix serveru, upravíme v&nbsp;něm následující řádky tak, jak vidíte níže. Soubor uložíme a&nbsp;můžeme zavřít.</p>


<section id="block-code-block_6012873fe971428fb6e62b0f08ce9ba8" data-id="block-code-block_6012873fe971428fb6e62b0f08ce9ba8" class="gt-block block-code">
    <pre><code>nano /etc/zabbix/zabbix_server.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>



<section id="block-code-block_d1842c71acae6f612a7dc5e09caacf47" data-id="block-code-block_d1842c71acae6f612a7dc5e09caacf47" class="gt-block block-code">
    <pre><code>StartReportWriters=1
WebServiceURL=http://localhost:10053/report</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nyní můžeme zaktualizovat veškeré další komponenty, a&nbsp;to postupně i&nbsp;na&nbsp;všech Zabbix Proxy:</p>


<section id="block-code-block_16e285c752041d58d101f4f784eb59a0" data-id="block-code-block_16e285c752041d58d101f4f784eb59a0" class="gt-block block-code">
    <pre><code>dnf upgrade zabbix*</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Po úspěšném dokončení aktualizace Zabbix serveru a&nbsp;všech jeho součástí můžeme službu znovu spustit:</p>


<section id="block-code-block_b801887420bc6552ec5e4a0bcbb9beb5" data-id="block-code-block_b801887420bc6552ec5e4a0bcbb9beb5" class="gt-block block-code">
    <pre><code>systemctl start zabbix-server</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Pokud je jako backend pro Zabbix proxy použita databáze <strong>SQLite</strong>, pak nejprve obsah současné databáze smažeme následujícím příkazem:</p>


<section id="block-code-block_576a4dca841164e25b0dbcd7cf4823e5" data-id="block-code-block_576a4dca841164e25b0dbcd7cf4823e5" class="gt-block block-code">
    <pre><code>rm /tmp/zabbix_proxy.db</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V opačném případě lze po&nbsp;úspěšném dokončení aktualizace Zabbix proxy opětovně spustit i&nbsp;tuto službu:</p>


<section id="block-code-block_9790d29e213bf002be068e7f9450b94e" data-id="block-code-block_9790d29e213bf002be068e7f9450b94e" class="gt-block block-code">
    <pre><code>systemctl start zabbix-proxy</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Postupné činnosti i&nbsp;celý proces aktualizace, včetně případných úprav do&nbsp;struktury databázového schématu lze sledovat v&nbsp;log souboru Zabbix serveru:</p>


<section id="block-code-block_7c444703ca0345a29bd7b0123d128e7b" data-id="block-code-block_7c444703ca0345a29bd7b0123d128e7b" class="gt-block block-code">
    <pre><code>tail -f /var/log/zabbix/zabbix_server.log</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Případně pro jednotlivé Zabbix proxy zase v&nbsp;souboru:</p>


<section id="block-code-block_1c3e233d8cf77be0acda8684e0d015d6" data-id="block-code-block_1c3e233d8cf77be0acda8684e0d015d6" class="gt-block block-code">
    <pre><code>tail -f /var/log/zabbix/zabbix_proxy.log</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Aktualizace databáze pro primární klíče</h2>



<p>Od major verze Zabbix 6.0 jsou v&nbsp;rámci značného navýšení databázového výkonu použity pro tabulky primární klíče.</p>



<p>Na následujícím odkazu z&nbsp;oficiální dokumentace se dozvíte více: <a href="https://www.zabbix.com/documentation/6.2/en/manual/appendix/install/db_primary_keys" target="_blank" rel="noreferrer noopener">https://www.zabbix.com/documentation/6.2/en/manual/appendix/install/db_primary_keys</a></p>



<p>Pro tento úkon nejprve zastavíme Zabbix server.</p>


<section id="block-code-block_256713e8d7a407c62ce6255d07d27460" data-id="block-code-block_256713e8d7a407c62ce6255d07d27460" class="gt-block block-code">
    <pre><code>systemctl stop zabbix-server</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Následně nainstalujeme nový balíček obsahující databázové skripty pro Zabbix, který obsahuje i&nbsp;tutu samotnou aktualizaci.</p>


<section id="block-code-block_3fbe5d649e0a66203f9691dcdec99a9f" data-id="block-code-block_3fbe5d649e0a66203f9691dcdec99a9f" class="gt-block block-code">
    <pre><code>dnf install zabbix-sql-scripts</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nyní do&nbsp;databáze aplikujeme SQL patch určený k&nbsp;přípravě právě pro tuto aktualizaci, který nám jednotlivé tabulky přejmenuje.</p>



<p><strong>Pozor!</strong> V&nbsp;novějších verzích Zabbix je tato cesta jiná, a&nbsp;to <code>/usr/share/zabbix-sql-scripts/</code> !</p>


<section id="block-code-block_2f6a942ead11697672461fbce08b51ad" data-id="block-code-block_2f6a942ead11697672461fbce08b51ad" class="gt-block block-code">
    <pre><code>mysql -uzabbix -p zabbix &lt; /usr/share/doc/zabbix-sql-scripts/mysql/history_pk_prepare.sql</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Databázovému serveru nastavíme napevno fyzickou cestu, kde se nachází databázová data. </p>



<p>Nejprve se k&nbsp;serveru připojíme pomocí příkazu <code>mysql</code> a&nbsp;v&nbsp;této konzoli následně zjistíme, co má server v&nbsp;této proměnné nastaveno:</p>


<section id="block-code-block_32aaeceaaecc091cf0dcafc8a6facaf3" data-id="block-code-block_32aaeceaaecc091cf0dcafc8a6facaf3" class="gt-block block-code">
    <pre><code>SELECT @@secure_file_priv;
</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Pokud je výsledná hodnota prázdná (jako na&nbsp;příkladu výše), pak odejdeme z&nbsp;konzole <code>mysql</code> a&nbsp;provedeme potřebné úpravy na&nbsp;úrovni OS.</p>



<p>V případě, že cesta neexistuje, pak ji nejprve musíme vytvořit a&nbsp;nastavit korektní oprávnění:</p>


<section id="block-code-block_d5578069a428727b075a5506a25ee2f3" data-id="block-code-block_d5578069a428727b075a5506a25ee2f3" class="gt-block block-code">
    <pre><code>mkdir /var/lib/mysql-files/
chown mysql:mysql /var/lib/mysql-files/</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Následně otevřeme konfigurační soubor databázového serveru:</p>


<section id="block-code-block_edf884fa01e449d6a033cf0740be1b27" data-id="block-code-block_edf884fa01e449d6a033cf0740be1b27" class="gt-block block-code">
    <pre><code>nano /etc/my.cnf.d/server.cnf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A upravíme hodnotu této konfigurační direktivy na&nbsp;požadovanou cestu (níže je příklad implicitní hodnoty).</p>


<section id="block-code-block_9d5587fcce479276f8637a937fbfa139" data-id="block-code-block_9d5587fcce479276f8637a937fbfa139" class="gt-block block-code">
    <pre><code>secure_file_priv = &quot;/var/lib/mysql-files/&quot;</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Soubor uložíme a&nbsp;zrestartujeme službu databázového serveru.</p>


<section id="block-code-block_cd68ba35e51a2883b5ffa73c6ddc95a4" data-id="block-code-block_cd68ba35e51a2883b5ffa73c6ddc95a4" class="gt-block block-code">
    <pre><code>systemctl restart mysql</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nyní si můžeme ověřit to, že databázový server novou cestu skutečně bere v&nbsp;potaz. Opět se připojíme k&nbsp;databázové konzoli příkazem <code>mysql</code> a&nbsp;spustíme následující dotaz.</p>


<section id="block-code-block_32aaeceaaecc091cf0dcafc8a6facaf3" data-id="block-code-block_32aaeceaaecc091cf0dcafc8a6facaf3" class="gt-block block-code">
    <pre><code>SELECT @@secure_file_priv;
</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Po těchto úkonech můžeme překročit k&nbsp;samotné aplikaci aktualizačního patche databázového schématu.</p>



<p>Opět se připojíme k&nbsp;DB serveru pomocí příkazu <code>mysql</code> a&nbsp;nastavíme nezbytnou proměnnou <code>max_statement_time</code> na&nbsp;nekonečno (nula) a&nbsp;pro další činnosti vybereme databázi &#8218;zabbix&#8216;.</p>


<section id="block-code-block_fc46ef4aebb01f3e5606537ebe38087f" data-id="block-code-block_fc46ef4aebb01f3e5606537ebe38087f" class="gt-block block-code">
    <pre><code>mysql
mysql&gt; SET @@max_statement_time=0;
mysql&gt; use zabbix;</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Zde pak spustíme níže zmíněný SQL skript, který nám připraví tabulky pro následnou změnu schématu.</p>


<section id="block-code-block_592ec4c26fc6bfc0c524542d32d445b7" data-id="block-code-block_592ec4c26fc6bfc0c524542d32d445b7" class="gt-block block-code">
    <pre><code>SELECT * INTO OUTFILE &#039;/var/lib/mysql-files/history.csv&#039; FIELDS TERMINATED BY &#039;,&#039; ESCAPED BY &#039;&quot;&#039; LINES TERMINATED BY &#039;\n&#039; FROM history_old;
LOAD DATA INFILE &#039;/var/lib/mysql-files/history.csv&#039; IGNORE INTO TABLE history FIELDS TERMINATED BY &#039;,&#039; ESCAPED BY &#039;&quot;&#039; LINES TERMINATED BY &#039;\n&#039;;

SELECT * INTO OUTFILE &#039;/var/lib/mysql-files/history_uint.csv&#039; FIELDS TERMINATED BY &#039;,&#039; ESCAPED BY &#039;&quot;&#039; LINES TERMINATED BY &#039;\n&#039; FROM history_uint_old;
LOAD DATA INFILE &#039;/var/lib/mysql-files/history_uint.csv&#039; IGNORE INTO TABLE history_uint FIELDS TERMINATED BY &#039;,&#039; ESCAPED BY &#039;&quot;&#039; LINES TERMINATED BY &#039;\n&#039;;

SELECT * INTO OUTFILE &#039;/var/lib/mysql-files/history_str.csv&#039; FIELDS TERMINATED BY &#039;,&#039; ESCAPED BY &#039;&quot;&#039; LINES TERMINATED BY &#039;\n&#039; FROM history_str_old;
LOAD DATA INFILE &#039;/var/lib/mysql-files/history_str.csv&#039; IGNORE INTO TABLE history_str FIELDS TERMINATED BY &#039;,&#039; ESCAPED BY &#039;&quot;&#039; LINES TERMINATED BY &#039;\n&#039;;

SELECT * INTO OUTFILE &#039;/var/lib/mysql-files/history_log.csv&#039; FIELDS TERMINATED BY &#039;,&#039; ESCAPED BY &#039;&quot;&#039; LINES TERMINATED BY &#039;\n&#039; FROM history_log_old;
LOAD DATA INFILE &#039;/var/lib/mysql-files/history_log.csv&#039; IGNORE INTO TABLE history_log FIELDS TERMINATED BY &#039;,&#039; ESCAPED BY &#039;&quot;&#039; LINES TERMINATED BY &#039;\n&#039;;

SELECT * INTO OUTFILE &#039;/var/lib/mysql-files/history_text.csv&#039; FIELDS TERMINATED BY &#039;,&#039; ESCAPED BY &#039;&quot;&#039; LINES TERMINATED BY &#039;\n&#039; FROM history_text_old;
LOAD DATA INFILE &#039;/var/lib/mysql-files/history_text.csv&#039; IGNORE INTO TABLE history_text FIELDS TERMINATED BY &#039;,&#039; ESCAPED BY &#039;&quot;&#039; LINES TERMINATED BY &#039;\n&#039;;
</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Tímto je příprava pro aktualizaci databázového schématu ukončena a&nbsp;můžeme opětovně nastartovat Zabbix server, který při&nbsp;svém spuštění samotné změny v&nbsp;databázi provede.</p>


<section id="block-code-block_b801887420bc6552ec5e4a0bcbb9beb5" data-id="block-code-block_b801887420bc6552ec5e4a0bcbb9beb5" class="gt-block block-code">
    <pre><code>systemctl start zabbix-server</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Po dokončení aktualizace, změně schématu a&nbsp;úspěšném nastartování Zabbix serveru lze ze Zabbix databáze smazat přípravné tabulky vytvořené skriptem výše.</p>



<p>To provedeme následovně:</p>


<section id="block-code-block_69020185d6d97b36aa31016968ccbad9" data-id="block-code-block_69020185d6d97b36aa31016968ccbad9" class="gt-block block-code">
    <pre><code>mysql
use zabbix;
DROP TABLE history_old; 
DROP TABLE history_uint_old; 
DROP TABLE history_str_old; 
DROP TABLE history_log_old; 
DROP TABLE history_text_old;</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Dokončovací práce</h2>



<ul class="wp-block-list">
<li>Zkontrolujte, že správně běží Zabbix server, databázový server a&nbsp;mají správnou verzi</li>



<li>Zkontrolujte, že běží všechny Zabbix proxy a&nbsp;mají správnou verzi</li>



<li>Zkontrolujte výkon Zabbix serveru a&nbsp;Zabbix proxy (log soubory, nepodporované položky, fronty, monitorovací skripty, atd.).</li>



<li>Zkontrolujte, zda vaše servery mají přiděleny poslední verze oficiálních šablon od Zabbixu. [ <a rel="noreferrer noopener" href="https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates" target="_blank">Zabbix GIT</a> ]</li>
</ul>



<h2 class="wp-block-heading">Konfigurace Zabbixu pro reporting</h2>



<p>Pro potřeby funkcí reportingu je nejprve nainstalujeme Google Chrome.</p>



<p>Nejprve stáhneme instalační balíček, který následně také nainstalujeme:</p>


<section id="block-code-block_ccff2a6b2e6142739aa31258cdc981f0" data-id="block-code-block_ccff2a6b2e6142739aa31258cdc981f0" class="gt-block block-code">
    <pre><code>wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
dnf localinstall google-chrome-stable_current_x86_64.rpm</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V konfiguraci Zabbix frontendu je upravíme parametr &#8222;Frontend URL&#8220; na&nbsp;aktuálně platnou hodnotu, toto nastavení se nachází v&nbsp;následující cestě v&nbsp;menu:</p>


<section id="block-code-block_e9d60d158d6d48f85e2183100b9fcb3a" data-id="block-code-block_e9d60d158d6d48f85e2183100b9fcb3a" class="gt-block block-code">
    <pre><code>Administration -&gt; General -&gt; Other</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Příklad nastavení můžete vidět na&nbsp;obrázku níže.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="385" src="https://www.initmax.cz/wp-content/uploads/2023/07/zabbix_6.0_frontend_url-1-1024x385.png" alt="Aktualizace - Konfigurace reportingu Zabbix 6.2" class="wp-image-12235" srcset="https://www.initmax.cz/wp-content/uploads/2023/07/zabbix_6.0_frontend_url-1-1024x385.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/07/zabbix_6.0_frontend_url-1-300x113.png 300w, https://www.initmax.cz/wp-content/uploads/2023/07/zabbix_6.0_frontend_url-1-768x289.png 768w, https://www.initmax.cz/wp-content/uploads/2023/07/zabbix_6.0_frontend_url-1.png 1508w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>A to je vše! Nyní můžete začít využívat váš nově zaktualizovaný Zabbix ve verzi 6.2 se všemi jeho novými opravami a&nbsp;technologickými vylepšeními.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>


<section id="block-newsletter-block_35fafe4079d47022d20c704dd16ad6a2" data-id="block-newsletter-block_35fafe4079d47022d20c704dd16ad6a2" class="gt-block block-newsletter">
    <section id="newsletter" class="newsletter">
	<div class="gradient basic">
		<div class="newsletter__inner width width--general">
			<div class="col left">
									<h2 class="newsletter__title">Buďte v&nbsp;obraze s&nbsp;naším newsletterem</h2>
													<div class="newsletter__content"><p>Díky initMAX newsletteru Vám neunikne žádná z&nbsp;pozvánek na&nbsp;akce a&nbsp;webináře, žádný z&nbsp;tipů, jak dostat ze svého IT MAXimum, ani ověřené informace o&nbsp;novinkách ze světa Zabbix a&nbsp;dalších technologií.</p>
</div>
							</div>
			<div class="col right form-wrapper">
				<div class="newsletter-form">
	<form method="post" action="/wiki/kapitola/zabbix/feed/" enctype="multipart/form-data">
		<input type="hidden" name="url" value="https://www.initmax.cz/wiki/kapitola/zabbix/feed/">

		<div class="inputs">

			<label for="newsletter-form_contact_email" class="top">Vaše e-mailová adresa:</label>
			<div class="df">

				<div class="input">
					<input type="text" id="newsletter-form_contact_email" name="newsletter_email" placeholder="@" data-format="email" data-required="1">
									</div><!-- /.input -->

				<a href="#" class="btn btn--white sendBtn">Odeslat</a>

			</div>

			<div class="bottom nm">
				<label for="newsletter-form_gdpr" class="checkbox gdpr">
					<input type="checkbox" id="newsletter-form_gdpr" name="newsletter_gdpr">
					<span>Souhlasím se&nbsp;<a href="https://www.initmax.cz/ochrana-osobnich-udaju/" target="_blank">zpracováním osobních údajů</a>.</span>
				</label>
			</div>

		</div><!-- /.inputs -->
		<div class="sent hidden">
			<div class="iconOk"><h3>Děkujeme, že jste se přihlásili k&nbsp;odběru našeho newsletteru.</h3>
</div>
			<button class="sent__close" title="Zavřít" onclick="closeFormMessage(this,event)"><svg data-name="Group 3602" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 3272" d="M0,0H24V24H0Z" fill="none"/><line data-name="Line 98" y2="14" transform="translate(7.05 7.05) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 99" x2="14" transform="translate(7.05 16.95) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</button>
		</div><!-- /.sent -->
	</form>
</div>			</div>
		</div>
	</div>
</section></section>



<section id="social-links-block_a793d3bdab273c4e4fd000dee24e8519" data-id="social-links-block_a793d3bdab273c4e4fd000dee24e8519" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>

<p>The post <a href="https://www.initmax.cz/wiki/zabbix-aktualizace-na-posledni-verzi-6-2/">Zabbix &#8211; aktualizace na&nbsp;poslední verzi 6.2 (nepodporováno)</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Zabbix &#8211; aktualizace na&#160;poslední verzi 6.0</title>
		<link>https://www.initmax.cz/wiki/zabbix-aktualizace-na-posledni-verzi-6-0/</link>
		
		<dc:creator><![CDATA[Karolína Vrtalová]]></dc:creator>
		<pubDate>Fri, 07 Jul 2023 11:11:59 +0000</pubDate>
				<guid isPermaLink="false">https://www.initmax.cz/?post_type=wiki&#038;p=12213</guid>

					<description><![CDATA[<p>V tomto článku si ukážeme, jak zaktualizovat Zabbix na poslední verzi 6.0 a naplno tak využít jeho potenciál, se všemi novými funkcemi, ...</p>
<p>The post <a href="https://www.initmax.cz/wiki/zabbix-aktualizace-na-posledni-verzi-6-0/">Zabbix &#8211; aktualizace na&nbsp;poslední verzi 6.0</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>V tomto článku si ukážeme, jak zaktualizovat Zabbix na&nbsp;poslední verzi 6.0 a&nbsp;naplno tak využít jeho potenciál, se všemi novými funkcemi, které přináší.</p>


<section id="block-webinar-block_8da3dd2ca017badb036cf2bc6579bd94" data-id="block-webinar-block_8da3dd2ca017badb036cf2bc6579bd94" class="gt-block block-webinar">
    <div class="connected-webinars__grid">
        <a href="https://www.initmax.cz/webinar/aktualizace-na-posledni-verzi-6-0/" class="grid-item">
	<article class="webinar-promotion">
		<div class="webinar-promotion__thumbnail-wrap">
			<figure class="webinar-promotion__thumbnail">
					<img decoding="async" src="https://www.initmax.cz/wp-content/uploads/2022/03/02_thumbnail_web.png"
				 width="400"
		 height="250"
		 class=""
		 alt="Aktualizace na&nbsp;poslední verzi 6.0"
		 loading="lazy"	>
									<div class="webinar-promotion__tags">
						<span class="tag tag--small" style="color:#ffffff;background-color:#d40000;">Zabbix</span>					</div>
							</figure>
		</div>
		<div class="webinar-promotion__text">
			<div>
									<time datetime="2022-03-29">29.&nbsp;3.&nbsp;2022</time>
							</div>
			<h3 class="webinar-promotion__title">Aktualizace na&nbsp;poslední verzi 6.0</h3>
			<div class="icon-link">
				<figure class="icon-wrap icon-wrap--primary"><svg data-name="Group 3411" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 455" d="M0,0H24V24H0Z" fill="none"/><path data-name="Path 456" d="M15,10l4.553-2.276A1,1,0,0,1,21,8.618v6.764a1,1,0,0,1-1.447.894L15,14V10Z" transform="translate(0 0)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><rect data-name="Rectangle 1286" width="12" height="12" rx="2" transform="translate(3.112 6)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</figure>
				<span>Zhlédnout záznam</span>
			</div>
		</div>
	</article>
</a>    </div>
</section>


<section id="social-links-block_4341b31117d1db54b237d5fcd00baea3" data-id="social-links-block_4341b31117d1db54b237d5fcd00baea3" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>




<h2 class="wp-block-heading">Přípravné kroky</h2>



<ul class="wp-block-list">
<li>Přečtěte si &#8222;poznámky k&nbsp;vydané verzi&#8220; (release notes) [ <a rel="noreferrer noopener" href="https://www.zabbix.com/rn/rn6.0.17" target="_blank">Official release notes for Zabbix 6.0</a> ]</li>



<li>Přečtěte si důkladně dokument &#8222;poznámky k&nbsp;aktualizaci&#8220; (upgrade notes) [ <a rel="noreferrer noopener" href="https://www.zabbix.com/documentation/6.0/en/manual/installation/upgrade_notes_600" target="_blank">Official upgrade notes for Zabbix 6.0</a> ]</li>



<li>Zkontrolujte a&nbsp;případně optimalizujte výkon současné databáze dle doporučení vendora a&nbsp;s&nbsp;ohledem na&nbsp;požadavky Zabbix instance</li>



<li>Zkontrolujte, zda verze OS i&nbsp;veškerých návazných komponent odpovídají matici kompatiblity nové verze Zabbix</li>



<li>Zazálohovat konfigurační soubory Zabbix serveru a&nbsp;Zabbix proxy</li>



<li>Zázálohovat databáze Zabbix serveru, případně Zabbix proxy</li>



<li>Zazálohovat veškeré možné úpravy &#8222;na&nbsp;míru&#8220;, které byly na&nbsp;úrovni Zabbix ručně provedeny</li>
</ul>



<h2 class="wp-block-heading">Kontrola verzí</h2>



<p>Nejprve zkontrolujeme verzi Operačního Systému, jakož i&nbsp;verze všech komponent, na&nbsp;kterých je běh Zabbixu a&nbsp;jeho součástí závislý tak, aby <strong>přesně </strong>odpovídal oficiální matici kompatibility pro Zabbix 6.0.</p>


<section id="block-code-block_f1d3631c502c3c77c9a0610f807742cc" data-id="block-code-block_f1d3631c502c3c77c9a0610f807742cc" class="gt-block block-code">
    <pre><code>httpd -V
php-fpm -v
mysql -V
cat /etc/redhat-release</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Záloha konfiguračních souborů Zabbix</h2>



<p>Než se pustíme do&nbsp;dalších kroků, zazálohujte si pro jistotu i&nbsp;veškeré konfigurační soubory Zabbix serveru a&nbsp;Zabbix Proxy.</p>



<p>Případně zvažte také zálohu konfiguračních souborů web serveru.</p>


<section id="block-code-block_0d761e1a251c4b6a0027d2b805469d91" data-id="block-code-block_0d761e1a251c4b6a0027d2b805469d91" class="gt-block block-code">
    <pre><code>cp /etc/zabbix/zabbix_server.conf /&lt;backup directory&gt;/
cp /etc/zabbix/zabbix_agentd.conf /&lt;backup directory&gt;/
cp /usr/share/zabbix/alertscripts/* /&lt;backup directory&gt;/
cp /usr/share/zabbix/externalscripts/* /&lt;backup directory&gt;/
cp -R /usr/share/zabbix/ /&lt;backup directory&gt;/
cp /etc/httpd/conf/httpd.conf /&lt;backup directory&gt;/
cp /etc/httpd/conf.d/zabbix.conf /&lt;backup directory&gt;/
cp /etc/zabbix/web/zabbix.conf.php /&lt;backup directory&gt;/</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Zastavení služeb</h2>



<p>Nejprve zastavíme Zabbix server, aby do&nbsp;databáze již nic nezapisoval.</p>


<section id="block-code-block_f433e4b2e3e099f792a8aeaab284d851" data-id="block-code-block_f433e4b2e3e099f792a8aeaab284d851" class="gt-block block-code">
    <pre><code>systemctl stop zabbix-server</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Pokud jako backend Zabbix proxy používáme <strong>SQLite</strong>, pak zastavíme i&nbsp;jednotlivé Zabbix proxy, jelikož jejich databáze se po&nbsp;aktualizaci v&nbsp;tomto případě bude muset <strong>smazat</strong>.</p>


<section id="block-code-block_e5272d08563cbb0aa802d8b58d9fac10" data-id="block-code-block_e5272d08563cbb0aa802d8b58d9fac10" class="gt-block block-code">
    <pre><code>systemctl stop zabbix-proxy</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V případě, že chceme, aby data a&nbsp;aktivní konfigurace ze Zabbix serveru byla na&nbsp;Zabbix proxy serverech zachována, pak <strong>před aktualizací</strong> doporučujeme změnit konfiguraci Zabbix proxy a&nbsp;převést je na&nbsp;MySQL nebo PostgreSQL databázi. Tento postup je dopodrobna popsán v&nbsp;oficiální dokumentaci Zabbix. </p>



<p>Po tomto zásahu nebude nutné jednotlivé Zabbix proxy servery po&nbsp;dobu aktualizace Zabbix serveru vypínat a&nbsp;můžeme je nechat sbírat a&nbsp;ukládat data <strong>i v&nbsp;době nedostupnosti </strong>Zabbix serveru. </p>



<p>Služby jednotlivých Zabbix proxy bude třeba zastavit <strong>až přímo před aktualizací</strong> repozitářů a&nbsp;balíčků zabbix-proxy.</p>



<h2 class="wp-block-heading">Záloha databáze</h2>



<p>Následně spustíme zálohu databáze (následující příklady se týkají MySQL). </p>



<p>V případě, že je databáze malá (do&nbsp;desítek GB) a&nbsp;nepoužíváte partitioning, pak záloha nebude trvat tak dlouho.</p>



<p>V tomto případě provedem zálohu celé databáze Zabbix:</p>


<section id="block-code-block_45d9789a3077192e4c947362fe827400" data-id="block-code-block_45d9789a3077192e4c947362fe827400" class="gt-block block-code">
    <pre><code>screen -S backup
mysqldump -uroot -p zabbix --extended-insert --single-transaction | bzip2 -9 &gt; /&lt;backup directory&gt;/zabbix_db_backup-$(date &quot;+%Y-%m-%d_%H.%M.%S&quot;).sql.bz2</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Pokud je databáze větší anebo používáte partitioning, pak nejprve z&nbsp;databáze zazálohujeme pouze konfigurační tabulky:</p>


<section id="block-code-block_bad2078e9e64a2c0fa393534475e38de" data-id="block-code-block_bad2078e9e64a2c0fa393534475e38de" class="gt-block block-code">
    <pre><code>mysqldump –uroot -p zabbix --ignore-table=zabbix.history \
--ignore-table=zabbix.history_uint --ignore-table=zabbix.history_str \
--ignore-table=zabbix.history_log --ignore-table=zabbix.history_text \
--ignore-table=zabbix.trends --ignore-table=zabbix.trends_uint &gt; zabbix_config_dump-$(date &quot;+%Y-%m-%d_%H.%M.%S&quot;)sql</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A následně až zazálohujeme zbytek databázových dat, a&nbsp;to s&nbsp;pomocí &#8218;innobackupex&#8216;, který zálohuje i&nbsp;transakční logy a&nbsp;umožňuje tak dělat inkrementální zálohy:</p>


<section id="block-code-block_99b74943633be3ea4be9b3449338c8e6" data-id="block-code-block_99b74943633be3ea4be9b3449338c8e6" class="gt-block block-code">
    <pre><code>screen -S backup
innobackupex -p&lt;password&gt; /&lt;backup directory&gt;/
innobackupex -p&lt;password&gt; --apply-log --use-memory=4G /&lt;backup directory&gt;/`date`/</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Pro značné urychlení procesu aktualizace je také možné smazat veškeré předchozí události (events), v&nbsp;případě MySQL např.&nbsp;takto:</p>


<section id="block-code-block_24807325c97954954750fc192cc9ce70" data-id="block-code-block_24807325c97954954750fc192cc9ce70" class="gt-block block-code">
    <pre><code>mysql -uroot -p zabbix
mysql&gt; DELETE from events where source &gt; 0 limit 10000;</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Aktualizace OS</h2>



<p>V tomto kroku zaktualizujeme Operační Systém z&nbsp;již nepodporovaného CentOS 8.5 na&nbsp;podporovaný Rock Linux 8.</p>



<p>Níže můžeme vidět spuštění přípravného skriptu, který se o&nbsp;celý proces migrace na&nbsp;Rocky Linux postará za nás.</p>


<section id="block-code-block_e81cb820e303b4ed347d69e67ef85b1b" data-id="block-code-block_e81cb820e303b4ed347d69e67ef85b1b" class="gt-block block-code">
    <pre><code>curl https://raw.githubusercontent.com/rocky-linux/rocky-tools/main/migrate2rocky/migrate2rocky.sh -o migrate2rocky.sh
chmod u+x migrate2rocky.sh
./migrate2rocky.sh -r
</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Aktualizace databáze</h2>



<p>Stáhneme instalační balíčky pro repozitáře nové verze MySQL a&nbsp;smažeme instalační cache.</p>


<section id="block-code-block_f3ebe0154c08c146748e4475c300629a" data-id="block-code-block_f3ebe0154c08c146748e4475c300629a" class="gt-block block-code">
    <pre><code>rpm -i https://repo.mysql.com//mysql80-community-release-el8-3.noarch.rpm
dnf clean all</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Obsahem nově vzniklého konfigurační souboru s&nbsp;repozitářem nahradíme nastavení repozitáře stávajícího tak, aby to <code>dnf</code> bral v&nbsp;potaz.</p>


<section id="block-code-block_add2f34bffc3417f1a0beaf37a2ba217" data-id="block-code-block_add2f34bffc3417f1a0beaf37a2ba217" class="gt-block block-code">
    <pre><code>cat /etc/yum.repos.d/mysql-community.repo.rpmnew &gt; /etc/yum.repos.d/mysql-community.repo</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Zastavíme službu databázového serveru MySQL:</p>


<section id="block-code-block_174c8260ed8e55adc53cf33030337445" data-id="block-code-block_174c8260ed8e55adc53cf33030337445" class="gt-block block-code">
    <pre><code>systemctl stop mysqld.service</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A nyní již můžeme spustit upgrade z&nbsp;nových repozitářů.</p>


<section id="block-code-block_d649b6f198057b1d22c996f0670eeb0c" data-id="block-code-block_d649b6f198057b1d22c996f0670eeb0c" class="gt-block block-code">
    <pre><code>dnf upgrade</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Po úspěšné aktualizaci MySQL tento databázový server spustíme a&nbsp;zkontrolujeme aktuální verzi.</p>


<section id="block-code-block_f494a5c709c8e28aef711c627a746764" data-id="block-code-block_f494a5c709c8e28aef711c627a746764" class="gt-block block-code">
    <pre><code>systemctl start mysqld.service
mysql -V</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Aktualizace Zabbix</h2>



<p>Potom, co jsme vše úspěšně zazálohovali a&nbsp;zaktualizovali všechny verze návazných komponent dle oficiální matice kompatibility nové verze Zabbixu, přejdeme k&nbsp;aktualizaci samotného Zabbixu a&nbsp;všech jeho součástí.</p>



<p>Nejprve si stáhneme instalační balíčky pro repozitáře nové verze Zabbixu a&nbsp;smažeme instalační cache.</p>


<section id="block-code-block_b63cfef7f79288e771df654870849b3d" data-id="block-code-block_b63cfef7f79288e771df654870849b3d" class="gt-block block-code">
    <pre><code>rpm -Uvh https://repo.zabbix.com/zabbix/6.0/rhel/8/x86_64/zabbix-release-6.0-1.el8.noarch.rpm
dnf clean all</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nyní nainstalujeme balíček <code>zabbix-web-service</code> ve verzi pro Zabbix 6.0 a&nbsp;nastavíme této službě automatické spouštění po&nbsp;startu:</p>


<section id="block-code-block_084364b79ad1bbf1632f5574af7e66ec" data-id="block-code-block_084364b79ad1bbf1632f5574af7e66ec" class="gt-block block-code">
    <pre><code>dnf install zabbix-web-service
systemctl enable zabbix-web-service --now</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Otevřeme konfigurační soubor Zabbix serveru, upravíme v&nbsp;něm následující řádky tak, jak vidíte níže, soubor uložíme a&nbsp;můžeme zavřít.</p>


<section id="block-code-block_6a512b7e87e0d1d19500d8036ad831e7" data-id="block-code-block_6a512b7e87e0d1d19500d8036ad831e7" class="gt-block block-code">
    <pre><code>nano /etc/zabbix/zabbix_server.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>



<section id="block-code-block_b91907ce5246f0668827993eca03cd10" data-id="block-code-block_b91907ce5246f0668827993eca03cd10" class="gt-block block-code">
    <pre><code>StartReportWriters=1
WebServiceURL=http://localhost:10053/report</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nyní můžeme zaktualizovat veškeré další komponenty, a&nbsp;to postupně i&nbsp;na&nbsp;všech Zabbix Proxy:</p>


<section id="block-code-block_25528ad5dcb282bf4d6148182b316ede" data-id="block-code-block_25528ad5dcb282bf4d6148182b316ede" class="gt-block block-code">
    <pre><code>dnf upgrade zabbix*</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Po úspěšném dokončení aktualizace Zabbix serveru a&nbsp;všech jeho součástí můžeme službu znovu spustit:</p>


<section id="block-code-block_19b8a2a5916cdb1cf459f843c24b8943" data-id="block-code-block_19b8a2a5916cdb1cf459f843c24b8943" class="gt-block block-code">
    <pre><code>systemctl start zabbix-server</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Pokud je jako backend pro Zabbix proxy použita databáze <strong>SQLite</strong>, pak nejprve obsah současné databáze smažeme následujícím příkazem:</p>


<section id="block-code-block_6565548045bacdcae2ec971c75437792" data-id="block-code-block_6565548045bacdcae2ec971c75437792" class="gt-block block-code">
    <pre><code>rm /tmp/zabbix_proxy.db</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V opačném případě lze po&nbsp;úspěšném dokončení aktualizace Zabbix proxy opětovně spustit i&nbsp;tuto službu:</p>


<section id="block-code-block_e41b8858662f21d5eef534a46e52184b" data-id="block-code-block_e41b8858662f21d5eef534a46e52184b" class="gt-block block-code">
    <pre><code>systemctl start zabbix-proxy</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Postupné činnosti i&nbsp;celý proces aktualizace, včetně změn databázového schématu lze sledovat v&nbsp;log souboru Zabbix serveru:</p>


<section id="block-code-block_36187869566553139413cd6ccd361ac1" data-id="block-code-block_36187869566553139413cd6ccd361ac1" class="gt-block block-code">
    <pre><code>tail -f /var/log/zabbix/zabbix_server.log</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Případně pro jednotlivé Zabbix proxy zase v&nbsp;souboru:</p>


<section id="block-code-block_9b3fc14777198833355125d23a703311" data-id="block-code-block_9b3fc14777198833355125d23a703311" class="gt-block block-code">
    <pre><code>tail -f /var/log/zabbix/zabbix_proxy.log</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Aktualizace databáze pro primární klíče</h2>



<p>Od verze Zabbix 6.0 jsou v&nbsp;rámci značného navýšení databázového výkonu použity pro tabulky primární klíče.</p>



<p>Na následujícím odkazu z&nbsp;oficiální dokumentace se dozvíte více: <a rel="noreferrer noopener" href="https://www.zabbix.com/documentation/6.0/en/manual/appendix/install/db_primary_keys" target="_blank">https://www.zabbix.com/documentation/6.0/en/manual/appendix/install/db_primary_keys</a></p>



<p>Pro toto nejprve zastavíme Zabbix server.</p>


<section id="block-code-block_f433e4b2e3e099f792a8aeaab284d851" data-id="block-code-block_f433e4b2e3e099f792a8aeaab284d851" class="gt-block block-code">
    <pre><code>systemctl stop zabbix-server</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Následně nainstalujeme MySQL shell a&nbsp;nový balíček obsahující databázové skripty pro Zabbix, který obsahuje i&nbsp;tutu samotnou aktualizaci.</p>


<section id="block-code-block_5f0c7ad0a6e9906e2b8d2ae3f5b74b8e" data-id="block-code-block_5f0c7ad0a6e9906e2b8d2ae3f5b74b8e" class="gt-block block-code">
    <pre><code>dnf install mysql-shell zabbix-sql-scripts</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nyní do&nbsp;databáze aplikujeme SQL patch určený k&nbsp;přípravě právě pro tuto aktualizaci, který nám jednotlivé tabulky přejmenuje.</p>



<p><strong>Pozor!</strong> V&nbsp;novějších verzích Zabbix je tato cesta jiná, a&nbsp;to <code>/usr/share/zabbix-sql-scripts/</code> !</p>


<section id="block-code-block_d809be77f1f69166a3979aa838f1a155" data-id="block-code-block_d809be77f1f69166a3979aa838f1a155" class="gt-block block-code">
    <pre><code>mysql -uzabbix -p zabbix &lt; /usr/share/doc/zabbix-sql-scripts/mysql/history_pk_prepare.sql</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Databázovému serveru povolíme vytváření lokálních souboru. To nastavíme následujícím příkazem:</p>


<section id="block-code-block_3b0868a5ac395d2e578dc2dedf03377e" data-id="block-code-block_3b0868a5ac395d2e578dc2dedf03377e" class="gt-block block-code">
    <pre><code>mysql -p -e &quot;set global local_infile=ON;&quot;</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Pomocí nainstalované utility <code>mysql shell</code> se připojíme k&nbsp;databázi Zabbix.</p>


<section id="block-code-block_c3471444af9ce484626eab700bde32ce" data-id="block-code-block_c3471444af9ce484626eab700bde32ce" class="gt-block block-code">
    <pre><code>mysqlsh --mysql -u root -h localhost -Dzabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Výsledkem by měl být &#8222;shell&#8220; odpovídající tomuto obrázku:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="914" height="159" src="https://www.initmax.cz/wp-content/uploads/2023/07/mysqlsh.jpg" alt="Připojení k databázi Zabbix pomocí nainstalované utility mysql shell" class="wp-image-12233" srcset="https://www.initmax.cz/wp-content/uploads/2023/07/mysqlsh.jpg 914w, https://www.initmax.cz/wp-content/uploads/2023/07/mysqlsh-300x52.jpg 300w, https://www.initmax.cz/wp-content/uploads/2023/07/mysqlsh-768x134.jpg 768w" sizes="auto, (max-width: 914px) 100vw, 914px" /></figure>



<p>Stále připojení do&nbsp;Zabbix databáze z&nbsp;tohoto <code>mysql shell</code> spustíme následující SQL skript:</p>


<section id="block-code-block_e4cf40f5489bb8a222375ba3781d28af" data-id="block-code-block_e4cf40f5489bb8a222375ba3781d28af" class="gt-block block-code">
    <pre><code>CSVPATH=&quot;/var/lib/mysql-files&quot;; 

util.exportTable(&quot;history_old&quot;, CSVPATH + &quot;/history.csv&quot;, { dialect: &quot;csv&quot; }); 
util.importTable(CSVPATH + &quot;/history.csv&quot;, {&quot;dialect&quot;: &quot;csv&quot;, &quot;table&quot;: &quot;history&quot; });

util.exportTable(&quot;history_uint_old&quot;, CSVPATH + &quot;/history_uint.csv&quot;, { dialect: &quot;csv&quot; }); 
util.importTable(CSVPATH + &quot;/history_uint.csv&quot;, {&quot;dialect&quot;: &quot;csv&quot;, &quot;table&quot;: &quot;history_uint&quot; });

util.exportTable(&quot;history_str_old&quot;, CSVPATH + &quot;/history_str.csv&quot;, { dialect: &quot;csv&quot; });
util.importTable(CSVPATH + &quot;/history_str.csv&quot;, {&quot;dialect&quot;: &quot;csv&quot;, &quot;table&quot;: &quot;history_str&quot; });

util.exportTable(&quot;history_log_old&quot;, CSVPATH + &quot;/history_log.csv&quot;, { dialect: &quot;csv&quot; });
util.importTable(CSVPATH + &quot;/history_log.csv&quot;, {&quot;dialect&quot;: &quot;csv&quot;, &quot;table&quot;: &quot;history_log&quot; });

util.exportTable(&quot;history_text_old&quot;, CSVPATH + &quot;/history_text.csv&quot;, { dialect: &quot;csv&quot; });
util.importTable(CSVPATH + &quot;/history_text.csv&quot;, {&quot;dialect&quot;: &quot;csv&quot;, &quot;table&quot;: &quot;history_text&quot; });</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Tímto jsme dokončili aktualizaci databázového schématu a&nbsp;můžeme opětovně nastartovat Zabbix server.</p>


<section id="block-code-block_19b8a2a5916cdb1cf459f843c24b8943" data-id="block-code-block_19b8a2a5916cdb1cf459f843c24b8943" class="gt-block block-code">
    <pre><code>systemctl start zabbix-server</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Dokončovací práce</h2>



<ul class="wp-block-list">
<li>Zkontrolujte, že správně běží Zabbix server, databázový server a&nbsp;mají správnou verzi</li>



<li>Zkontrolujte, že běží všechny Zabbix proxy a&nbsp;mají správnou verzi</li>



<li>Zkontrolujte výkon Zabbix serveru a&nbsp;Zabbix proxy (log soubory, nepodporované položky, fronty, monitorovací skripty, atd.).</li>



<li>Zkontrolujte, zda vaše servery mají přiděleny poslední verze oficiálních šablon od Zabbixu. [ <a rel="noreferrer noopener" href="https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates" target="_blank">Zabbix GIT</a> ]</li>
</ul>



<h2 class="wp-block-heading">Konfigurace Zabbix pro reporting</h2>



<p>Pro potřeby funkcí reportingu nejprve musíme nainstalovat Google Chrome.</p>



<p>Nejprve stáhneme instalační balíček, který následně také nainstalujeme:</p>


<section id="block-code-block_2e2878cc25572b59bd57102307c4649c" data-id="block-code-block_2e2878cc25572b59bd57102307c4649c" class="gt-block block-code">
    <pre><code>wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
dnf localinstall google-chrome-stable_current_x86_64.rpm</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>V konfiguraci Zabbix frontendu pak upravíme parametr &#8222;Frontend URL&#8220; na&nbsp;aktuálně platnou hodnotu, toto nastavení se nachází v&nbsp;následující cestě v&nbsp;menu:</p>


<section id="block-code-block_9733ce98192731030ceca062b830b3d6" data-id="block-code-block_9733ce98192731030ceca062b830b3d6" class="gt-block block-code">
    <pre><code>Administration -&gt; General -&gt; Other</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Příklad nastavení můžete vidět na&nbsp;obrázku níže.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="385" src="https://www.initmax.cz/wp-content/uploads/2023/07/zabbix_6.0_frontend_url-1-1024x385.png" alt="Aktualizace - Konfigurace reportingu Zabbix 6.0" class="wp-image-12235" srcset="https://www.initmax.cz/wp-content/uploads/2023/07/zabbix_6.0_frontend_url-1-1024x385.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/07/zabbix_6.0_frontend_url-1-300x113.png 300w, https://www.initmax.cz/wp-content/uploads/2023/07/zabbix_6.0_frontend_url-1-768x289.png 768w, https://www.initmax.cz/wp-content/uploads/2023/07/zabbix_6.0_frontend_url-1.png 1508w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>A to je vše! Nyní můžete začít využívat váš nově zaktualizovaný Zabbix ve verzi 6.0 se všemi jeho novými funkcionalitami.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>


<section id="block-newsletter-block_f9ccd56424b40b1dd40e198288398bd5" data-id="block-newsletter-block_f9ccd56424b40b1dd40e198288398bd5" class="gt-block block-newsletter">
    <section id="newsletter" class="newsletter">
	<div class="gradient basic">
		<div class="newsletter__inner width width--general">
			<div class="col left">
									<h2 class="newsletter__title">Buďte v&nbsp;obraze s&nbsp;naším newsletterem</h2>
													<div class="newsletter__content"><p>Díky initMAX newsletteru Vám neunikne žádná z&nbsp;pozvánek na&nbsp;akce a&nbsp;webináře, žádný z&nbsp;tipů, jak dostat ze svého IT MAXimum, ani ověřené informace o&nbsp;novinkách ze světa Zabbix a&nbsp;dalších technologií.</p>
</div>
							</div>
			<div class="col right form-wrapper">
				<div class="newsletter-form">
	<form method="post" action="/wiki/kapitola/zabbix/feed/" enctype="multipart/form-data">
		<input type="hidden" name="url" value="https://www.initmax.cz/wiki/kapitola/zabbix/feed/">

		<div class="inputs">

			<label for="newsletter-form_contact_email" class="top">Vaše e-mailová adresa:</label>
			<div class="df">

				<div class="input">
					<input type="text" id="newsletter-form_contact_email" name="newsletter_email" placeholder="@" data-format="email" data-required="1">
									</div><!-- /.input -->

				<a href="#" class="btn btn--white sendBtn">Odeslat</a>

			</div>

			<div class="bottom nm">
				<label for="newsletter-form_gdpr" class="checkbox gdpr">
					<input type="checkbox" id="newsletter-form_gdpr" name="newsletter_gdpr">
					<span>Souhlasím se&nbsp;<a href="https://www.initmax.cz/ochrana-osobnich-udaju/" target="_blank">zpracováním osobních údajů</a>.</span>
				</label>
			</div>

		</div><!-- /.inputs -->
		<div class="sent hidden">
			<div class="iconOk"><h3>Děkujeme, že jste se přihlásili k&nbsp;odběru našeho newsletteru.</h3>
</div>
			<button class="sent__close" title="Zavřít" onclick="closeFormMessage(this,event)"><svg data-name="Group 3602" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 3272" d="M0,0H24V24H0Z" fill="none"/><line data-name="Line 98" y2="14" transform="translate(7.05 7.05) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 99" x2="14" transform="translate(7.05 16.95) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</button>
		</div><!-- /.sent -->
	</form>
</div>			</div>
		</div>
	</div>
</section></section>



<section id="social-links-block_4341b31117d1db54b237d5fcd00baea3" data-id="social-links-block_4341b31117d1db54b237d5fcd00baea3" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>

<p>The post <a href="https://www.initmax.cz/wiki/zabbix-aktualizace-na-posledni-verzi-6-0/">Zabbix &#8211; aktualizace na&nbsp;poslední verzi 6.0</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Zabbix 6.2 &#8211; návod na&#160;instalaci v&#160;5 minutách (nepodporováno)</title>
		<link>https://www.initmax.cz/wiki/zabbix-6-2-navod-na-instalaci-v-5-minutach/</link>
		
		<dc:creator><![CDATA[Tomáš Heřmánek]]></dc:creator>
		<pubDate>Fri, 07 Jul 2023 06:43:00 +0000</pubDate>
				<guid isPermaLink="false">https://www.initmax.cz/?post_type=wiki&#038;p=11110</guid>

					<description><![CDATA[<p>V tomto článku si ukážeme, jak nainstalovat a nakonfigurovat Zabbix 6.2 s databází PostgreSQL 15 na Rocky Linux 9 během pěti minut. Než ...</p>
<p>The post <a href="https://www.initmax.cz/wiki/zabbix-6-2-navod-na-instalaci-v-5-minutach/">Zabbix 6.2 &#8211; návod na&nbsp;instalaci v&nbsp;5 minutách (nepodporováno)</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>V tomto článku si ukážeme, jak nainstalovat a&nbsp;nakonfigurovat Zabbix 6.2 s&nbsp;databází PostgreSQL 15 na&nbsp;Rocky Linux 9 během pěti minut.</p>


<section id="block-webinar-block_bc77ec0a01b00d353640841ba063dbaf" data-id="block-webinar-block_bc77ec0a01b00d353640841ba063dbaf" class="gt-block block-webinar">
    <div class="connected-webinars__grid">
        <a href="https://www.initmax.cz/webinar/instalace-zabbixu-v-5-minutach/" class="grid-item">
	<article class="webinar-promotion">
		<div class="webinar-promotion__thumbnail-wrap">
			<figure class="webinar-promotion__thumbnail">
					<img decoding="async" src="https://www.initmax.cz/wp-content/uploads/2022/06/ilustrace_webinare_6.2_01_thumbnail_web-1.png"
				 width="400"
		 height="250"
		 class=""
		 alt="Instalace Zabbixu v&nbsp;5 minutách"
		 loading="lazy"	>
									<div class="webinar-promotion__tags">
						<span class="tag tag--small" style="color:#ffffff;background-color:#d40000;">Zabbix</span>					</div>
							</figure>
		</div>
		<div class="webinar-promotion__text">
			<div>
									<time datetime="2022-06-17">17.&nbsp;6.&nbsp;2022</time>
							</div>
			<h3 class="webinar-promotion__title">Instalace Zabbixu v&nbsp;5 minutách</h3>
			<div class="icon-link">
				<figure class="icon-wrap icon-wrap--primary"><svg data-name="Group 3411" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 455" d="M0,0H24V24H0Z" fill="none"/><path data-name="Path 456" d="M15,10l4.553-2.276A1,1,0,0,1,21,8.618v6.764a1,1,0,0,1-1.447.894L15,14V10Z" transform="translate(0 0)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><rect data-name="Rectangle 1286" width="12" height="12" rx="2" transform="translate(3.112 6)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</figure>
				<span>Zhlédnout záznam</span>
			</div>
		</div>
	</article>
</a>    </div>
</section>


<section id="social-links-block_9f16e9ed2227945db22b7252bf0a4464" data-id="social-links-block_9f16e9ed2227945db22b7252bf0a4464" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>




<h2 class="wp-block-heading">Než začneme</h2>



<p>Pro účely této <strong>ukázky</strong> si nejdříve přepneme SELinux do&nbsp;Permissive módu.</p>



<p>Pokud plánujete SELinux trvale deaktivovat, můžete tak učinit úpravou konfiguračního souboru. Nicméně, doporučujeme zvážit možnost naučit se s&nbsp;SELinuxem pracovat a&nbsp;využít jeho bezpečnostní výhody. Podrobné informace o&nbsp;správném nastavení a&nbsp;monitorování SELinuxu naleznete <a href="https://www.initmax.cz/wiki/selinux-integrace-se-zabbixem-a-dalsimi-nastroji/">v našem samostatném článku.​</a></p>


<section id="block-code-block_a3469dc60fa3db02dca4f5517d462558" data-id="block-code-block_a3469dc60fa3db02dca4f5517d462558" class="gt-block block-code">
    <pre><code>setenforce 0</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Instalace PostgreSQL</h2>



<p>Nejprve si naistalujeme repozitáře pro PostgreSQL a&nbsp;disablujeme výchozí systémové PostgeSQL repozitáře.</p>


<section id="block-code-block_3043500f3c3f392f65d69ea94e4f2b09" data-id="block-code-block_3043500f3c3f392f65d69ea94e4f2b09" class="gt-block block-code">
    <pre><code>dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm
dnf -qy module disable postgresql</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A nyní se můžeme pustit do&nbsp;instalace PostgreSQL, v&nbsp;tomto případě to bude PostgreSQL 15</p>


<section id="block-code-block_52fae9f4dc3b20353c96a8031a9a904a" data-id="block-code-block_52fae9f4dc3b20353c96a8031a9a904a" class="gt-block block-code">
    <pre><code>dnf install -y postgresql15-server</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Teď už zbývá jen iniciovat databázi a&nbsp;nastavit automatické spouštění.</p>


<section id="block-code-block_60102f00ed2a86209effb77e9d4a06c4" data-id="block-code-block_60102f00ed2a86209effb77e9d4a06c4" class="gt-block block-code">
    <pre><code>/usr/pgsql-15/bin/postgresql-15-setup initdb
systemctl enable postgresql-15 --now</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Instalace Zabbix serveru a&nbsp;jeho součástí</h2>



<p>Databázi máme nainstalovanou, pojďme tedy na&nbsp;instalaci Zabbix serveru a&nbsp;jeho součástí.<br>Nejprve si z&nbsp;repozitáře EPEL vyloučíme jakékoliv instalační balíčky týkající se Zabbixu. Za předpokladu, že je nainstalován.</p>



<p>To provedeme tak, že na&nbsp;konec souboru <code>/etc/yum.repos.d/epel.repo</code> vložíme následující řádek:</p>


<section id="block-code-block_349fdf85392a677ec8d3535ea72949ac" data-id="block-code-block_349fdf85392a677ec8d3535ea72949ac" class="gt-block block-code">
    <pre><code>[epel]
...
excludepkgs=zabbix*</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Přidáme si repozitáře Zabbixu a&nbsp;vyčistíme instalační cache.</p>


<section id="block-code-block_1db2fdc23953b435b639a741346b05e5" data-id="block-code-block_1db2fdc23953b435b639a741346b05e5" class="gt-block block-code">
    <pre><code>rpm -Uvh https://repo.zabbix.com/zabbix/6.2/rhel/9/x86_64/zabbix-release-6.2-3.el9.noarch.rpm
dnf clean all</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A naistalujeme všechny potřebné součásti Zabbixu.</p>


<section id="block-code-block_91844a28132685cad7ef320e82cd73e4" data-id="block-code-block_91844a28132685cad7ef320e82cd73e4" class="gt-block block-code">
    <pre><code>dnf install zabbix-server-pgsql zabbix-web-pgsql zabbix-apache-conf zabbix-sql-scripts zabbix-agent2 zabbix-web-service</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nakonec ještě povolíme potřebné porty na&nbsp;firewallu.</p>


<section id="block-code-block_5a7ed345a5718c7abc5d27abc1ef1c2e" data-id="block-code-block_5a7ed345a5718c7abc5d27abc1ef1c2e" class="gt-block block-code">
    <pre><code>firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-port=10051/tcp
firewall-cmd --reload</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Inicializace databáze</h2>



<p>V dalším kroku vytvoříme pro Zabbix uživatele v&nbsp;databázi a&nbsp;budeme vyzváni k&nbsp;zadání hesla.</p>


<section id="block-code-block_546f779fb18abe5b818ee4f49bc3ff3f" data-id="block-code-block_546f779fb18abe5b818ee4f49bc3ff3f" class="gt-block block-code">
    <pre><code>cd /tmp
sudo -u postgres createuser --pwprompt zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Založíme databázi a&nbsp;importujeme výchozí schéma a&nbsp;data. Opět budeme vyzváni k&nbsp;zadání hesla. <br>Zde použijeme heslo z&nbsp;předchozího kroku.</p>



<p><strong>Pozor!</strong> Ve starších verzích Zabbix je tato cesta jiná, a&nbsp;to <code>/usr/share/<strong>doc</strong>/zabbix-sql-scripts/</code> !</p>


<section id="block-code-block_f3d26a3d57a501ae7fe060fe422aebb6" data-id="block-code-block_f3d26a3d57a501ae7fe060fe422aebb6" class="gt-block block-code">
    <pre><code>sudo -u postgres createdb -O zabbix zabbix
zcat /usr/share/zabbix-sql-scripts/postgresql/server.sql.gz | sudo -u zabbix psql zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Instalace TimescaleDB</h2>



<p>Nyní se pustíme do&nbsp;instalace TimescaleDB. <br>Přidáme repozitář.</p>


<section id="block-code-block_f7997eac510d347cd45368a90a87b046" data-id="block-code-block_f7997eac510d347cd45368a90a87b046" class="gt-block block-code">
    <pre><code>tee /etc/yum.repos.d/timescale_timescaledb.repo &lt;&lt;EOL
[timescale_timescaledb]
name=timescale_timescaledb
baseurl=https://packagecloud.io/timescale/timescaledb/el/$(rpm -E %{rhel})/\$basearch
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/timescale/timescaledb/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
EOL</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nainstalujme TimescaleDB.</p>


<section id="block-code-block_003246c3e7dfbcbcc1f84f4e30799f86" data-id="block-code-block_003246c3e7dfbcbcc1f84f4e30799f86" class="gt-block block-code">
    <pre><code>dnf install timescaledb-2-postgresql-15-2.10.3 timescaledb-2-loader-postgresql-15-2.10.3 -y</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Spustíme utilitu <code>timescaledb-tune</code> a&nbsp;jako parametr jí předáme vyšší hodnotu maximálního množství připojení (<code>--max-conns</code>), které pro tyto testovací účely nastavíme na&nbsp;<code>125</code>.</p>



<p>Tato utilita slouží k&nbsp;přizpůsobení výchozího nastavení PostgreSQL vůčihledně výkonu a&nbsp;adekvátnímu nastavení parametrů PostgreSQL pro fungování s&nbsp;TimescaleDB.</p>



<p>Zároveň nám tato utilit pomocí instalačního průvodce pomůže vybrat aktuální a&nbsp;platný konfigurační soubor PostgreSQL a&nbsp;nastaví i&nbsp;automatické načítání knihoven TimescaleDB.</p>



<p>Prosím, odpovídejte &#8222;ano&#8220; (y) na&nbsp;všechny otázky. Pozor, automatický tuner předpokládá, že PostgreSQL běží na&nbsp;samostatném serveru, a&nbsp;proto může být potřeba případně upravit parametry.</p>


<section id="block-code-block_3cf91872ae7d8989fbef5fe532b658ca" data-id="block-code-block_3cf91872ae7d8989fbef5fe532b658ca" class="gt-block block-code">
    <pre><code>timescaledb-tune --pg-config /usr/pgsql-15/bin --max-conns=125</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1392" height="592" src="https://www.initmax.cz/wp-content/uploads/2023/07/zabbix-62-pgtune.png" alt="" class="wp-image-16570" srcset="https://www.initmax.cz/wp-content/uploads/2023/07/zabbix-62-pgtune.png 1392w, https://www.initmax.cz/wp-content/uploads/2023/07/zabbix-62-pgtune-300x128.png 300w, https://www.initmax.cz/wp-content/uploads/2023/07/zabbix-62-pgtune-1024x435.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/07/zabbix-62-pgtune-768x327.png 768w, https://www.initmax.cz/wp-content/uploads/2023/07/zabbix-62-pgtune-608x259.png 608w, https://www.initmax.cz/wp-content/uploads/2023/07/zabbix-62-pgtune-1216x517.png 1216w" sizes="auto, (max-width: 1392px) 100vw, 1392px" /></figure>



<p>Následně restartujeme systémovou službu pro PostgreSQL:</p>


<section id="block-code-block_0c2c61ce158cb202738e8a586aff927a" data-id="block-code-block_0c2c61ce158cb202738e8a586aff927a" class="gt-block block-code">
    <pre><code>systemctl restart postgresql-15.service</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Zbývá jen aktivovat TimescaleDB.</p>



<p><strong>Pozor!</strong> Ve starších verzích Zabbix je tato cesta jiná, a&nbsp;to <code>/usr/share/<strong>doc</strong>/zabbix-sql-scripts/</code> !</p>


<section id="block-code-block_93edcc2589c649a3703089ded534239b" data-id="block-code-block_93edcc2589c649a3703089ded534239b" class="gt-block block-code">
    <pre><code>echo &quot;CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;&quot; | sudo -u postgres psql zabbix
cat /usr/share/zabbix-sql-scripts/postgresql/timescaledb.sql | sudo -u zabbix psql zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Konfigurace Zabbix serveru</h2>



<p>Otevřeme konfigurační soubor Zabbix serveru</p>


<section id="block-code-block_52ff3befc69dd06f67f41846aba95501" data-id="block-code-block_52ff3befc69dd06f67f41846aba95501" class="gt-block block-code">
    <pre><code>nano /etc/zabbix/zabbix_server.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Upravíme jednotlivé parametry podle následující předlohy.</p>


<section id="block-code-block_c8b5d8b5530a7ddd4c9f32d0310272b6" data-id="block-code-block_c8b5d8b5530a7ddd4c9f32d0310272b6" class="gt-block block-code">
    <pre><code>DBPassword=&lt;heslo do databáze&gt;
StartReportWriters=1
WebServiceURL=http://localhost:10053/report
HANodeName=initMAX</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nakonec doinstalujeme jazykové balíčky pro češtinu a&nbsp;slovenštinu, restartujeme všechny související služby a&nbsp;nastavíme aby se spouštěly automaticky.</p>


<section id="block-code-block_a2f60f986829057b8834cb27f469b5f7" data-id="block-code-block_a2f60f986829057b8834cb27f469b5f7" class="gt-block block-code">
    <pre><code>dnf install glibc-langpack-cs.x86_64 glibc-langpack-sk.x86_64
systemctl restart zabbix-server zabbix-web-service zabbix-agent2 httpd php-fpm
systemctl enable zabbix-server zabbix-web-service zabbix-agent2 httpd php-fpm
less /var/log/zabbix/zabbix_server.log</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Konfigurace Zabbix frontendu</h2>



<p>V okně prohlížeče si otevřeme url na&nbsp;které nám Zabbix běží. Například http://192.168.0.50/zabbix a&nbsp;přivítá nás instalace.</p>



<p>Kliknutím na&nbsp;tlačítko Next step se posuneme na&nbsp;stránku s&nbsp;kontrolou minimálních požadavků.</p>



<figure class="wp-block-image size-full is-style-default"><img loading="lazy" decoding="async" width="1199" height="667" src="https://www.initmax.cz/wp-content/uploads/2023/03/welcome.png" alt="Před zahájením instalace Zabbix 6.2 zvolíme náš preferovaný jazyk." class="wp-image-11811" srcset="https://www.initmax.cz/wp-content/uploads/2023/03/welcome.png 1199w, https://www.initmax.cz/wp-content/uploads/2023/03/welcome-300x167.png 300w, https://www.initmax.cz/wp-content/uploads/2023/03/welcome-1024x570.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/03/welcome-768x427.png 768w" sizes="auto, (max-width: 1199px) 100vw, 1199px" /></figure>



<p>Vše je v&nbsp;pořádku, můžeme tedy kliknout na&nbsp;Next step a&nbsp;posunout se na&nbsp;další stránku s&nbsp;nastavením připojení do&nbsp;databáze.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1200" height="668" src="https://www.initmax.cz/wp-content/uploads/2023/03/check-of-pre-requisites.png" alt="Druhým krokem průvodce instalace je kontrola minimálních požadavků." class="wp-image-11813" srcset="https://www.initmax.cz/wp-content/uploads/2023/03/check-of-pre-requisites.png 1200w, https://www.initmax.cz/wp-content/uploads/2023/03/check-of-pre-requisites-300x167.png 300w, https://www.initmax.cz/wp-content/uploads/2023/03/check-of-pre-requisites-1024x570.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/03/check-of-pre-requisites-768x428.png 768w" sizes="auto, (max-width: 1200px) 100vw, 1200px" /></figure>



<p>Na této stránce vyplníme pouze políčko <strong>Password</strong>, nic dalšího není třeba měnit, a&nbsp;klikneme na&nbsp;Next step.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1198" height="664" src="https://www.initmax.cz/wp-content/uploads/2023/03/configure-db-connection.png" alt="Třetím krokem průvodce instalace je nastavení připojení do databáze." class="wp-image-11815" srcset="https://www.initmax.cz/wp-content/uploads/2023/03/configure-db-connection.png 1198w, https://www.initmax.cz/wp-content/uploads/2023/03/configure-db-connection-300x166.png 300w, https://www.initmax.cz/wp-content/uploads/2023/03/configure-db-connection-1024x568.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/03/configure-db-connection-768x426.png 768w" sizes="auto, (max-width: 1198px) 100vw, 1198px" /></figure>



<p>Zde vyplníme základní nastavení, tedy název serveru a&nbsp;časové pásmo, a&nbsp;kliknutím na&nbsp;Next step pokračujeme k&nbsp;souhrnu konfigurace.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1198" height="666" src="https://www.initmax.cz/wp-content/uploads/2023/03/settings.png" alt="Čtvrtým krokem průvodce instalace je nastavení serveru a výběr časové zóny." class="wp-image-11817" srcset="https://www.initmax.cz/wp-content/uploads/2023/03/settings.png 1198w, https://www.initmax.cz/wp-content/uploads/2023/03/settings-300x167.png 300w, https://www.initmax.cz/wp-content/uploads/2023/03/settings-1024x569.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/03/settings-768x427.png 768w" sizes="auto, (max-width: 1198px) 100vw, 1198px" /></figure>



<p>Zkontrolujeme zadané hodnoty a&nbsp;kliknutím na&nbsp;Next step dokončíme instalaci.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1199" height="662" src="https://www.initmax.cz/wp-content/uploads/2023/03/pre-installation-summary.png" alt="Pátý krok instalace Zabbix 6.2 a kontrola hodnot před instalací" class="wp-image-11819" srcset="https://www.initmax.cz/wp-content/uploads/2023/03/pre-installation-summary.png 1199w, https://www.initmax.cz/wp-content/uploads/2023/03/pre-installation-summary-300x166.png 300w, https://www.initmax.cz/wp-content/uploads/2023/03/pre-installation-summary-1024x565.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/03/pre-installation-summary-768x424.png 768w" sizes="auto, (max-width: 1199px) 100vw, 1199px" /></figure>



<p>Kliknutím na&nbsp;Finish již přejdeme na&nbsp;přihlašovací obrazovku.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1199" height="663" src="https://www.initmax.cz/wp-content/uploads/2023/03/install.png" alt="Po úspěšné instalaci můžeme přejít k přihlášení kliknutím na tlačítko &quot;Finish&quot;." class="wp-image-11821" srcset="https://www.initmax.cz/wp-content/uploads/2023/03/install.png 1199w, https://www.initmax.cz/wp-content/uploads/2023/03/install-300x166.png 300w, https://www.initmax.cz/wp-content/uploads/2023/03/install-1024x566.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/03/install-768x425.png 768w" sizes="auto, (max-width: 1199px) 100vw, 1199px" /></figure>



<p>Přihlásíme se a&nbsp;můžeme Zabbix 6.2 začít používat. (Admin/zabbix)</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1215" height="657" src="https://www.initmax.cz/wp-content/uploads/2023/03/login.png" alt="Pro přihlášení v dialogovém okně uvedeme přihlašovací jméno a heslo." class="wp-image-11823" srcset="https://www.initmax.cz/wp-content/uploads/2023/03/login.png 1215w, https://www.initmax.cz/wp-content/uploads/2023/03/login-300x162.png 300w, https://www.initmax.cz/wp-content/uploads/2023/03/login-1024x554.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/03/login-768x415.png 768w" sizes="auto, (max-width: 1215px) 100vw, 1215px" /></figure>



<p>Po přihlášení na&nbsp;Vás čeká nový Zabbix 6.2. </p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1894" height="957" src="https://www.initmax.cz/wp-content/uploads/2022/12/frontend-gui.png" alt="Po přihlášení se dostanete do administrace Zabbix 6.2" class="wp-image-11125" srcset="https://www.initmax.cz/wp-content/uploads/2022/12/frontend-gui.png 1894w, https://www.initmax.cz/wp-content/uploads/2022/12/frontend-gui-300x152.png 300w, https://www.initmax.cz/wp-content/uploads/2022/12/frontend-gui-1024x517.png 1024w, https://www.initmax.cz/wp-content/uploads/2022/12/frontend-gui-768x388.png 768w, https://www.initmax.cz/wp-content/uploads/2022/12/frontend-gui-1536x776.png 1536w" sizes="auto, (max-width: 1894px) 100vw, 1894px" /></figure>



<h2 class="wp-block-heading">Konfigurace Zabbix reportingu</h2>



<p>Pro potřeby funkcí reportingu je nejprvé nutné nainstalovat Google Chrome.</p>



<p>Nejprve stáhneme instalační balíček, který následně také nainstalujeme:</p>


<section id="block-code-block_7829a56d7f1eb6ac6d74aec53d768960" data-id="block-code-block_7829a56d7f1eb6ac6d74aec53d768960" class="gt-block block-code">
    <pre><code>wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
dnf localinstall google-chrome-stable_current_x86_64.rpm</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Následně je nutné upravit v&nbsp;konfiguraci Zabbix frontendu parametr &#8222;Frontend URL&#8220; na&nbsp;aktuálně platnou hodnotu, toto nastavení se nachází v&nbsp;následující cestě v&nbsp;menu:</p>


<section id="block-code-block_144d3ad5318886a53db251117470d13f" data-id="block-code-block_144d3ad5318886a53db251117470d13f" class="gt-block block-code">
    <pre><code>Administration -&gt; General -&gt; Other</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Příklad nastavení můžete vidět na&nbsp;obrázku níže.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1606" height="692" src="https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-9.png" alt="" class="wp-image-16546" srcset="https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-9.png 1606w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-9-300x129.png 300w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-9-1024x441.png 1024w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-9-768x331.png 768w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-9-1536x662.png 1536w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-9-608x262.png 608w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-9-1216x524.png 1216w" sizes="auto, (max-width: 1606px) 100vw, 1606px" /></figure>



<hr class="wp-block-separator has-alpha-channel-opacity"/>


<section id="block-newsletter-block_514f7071a29a4e3481ea2f931d82f40d" data-id="block-newsletter-block_514f7071a29a4e3481ea2f931d82f40d" class="gt-block block-newsletter">
    <section id="newsletter" class="newsletter">
	<div class="gradient basic">
		<div class="newsletter__inner width width--general">
			<div class="col left">
									<h2 class="newsletter__title">Buďte v&nbsp;obraze s&nbsp;naším newsletterem</h2>
													<div class="newsletter__content"><p>Díky initMAX newsletteru Vám neunikne žádná z&nbsp;pozvánek na&nbsp;akce a&nbsp;webináře, žádný z&nbsp;tipů, jak dostat ze svého IT MAXimum, ani ověřené informace o&nbsp;novinkách ze světa Zabbix a&nbsp;dalších technologií.</p>
</div>
							</div>
			<div class="col right form-wrapper">
				<div class="newsletter-form">
	<form method="post" action="/wiki/kapitola/zabbix/feed/" enctype="multipart/form-data">
		<input type="hidden" name="url" value="https://www.initmax.cz/wiki/kapitola/zabbix/feed/">

		<div class="inputs">

			<label for="newsletter-form_contact_email" class="top">Vaše e-mailová adresa:</label>
			<div class="df">

				<div class="input">
					<input type="text" id="newsletter-form_contact_email" name="newsletter_email" placeholder="@" data-format="email" data-required="1">
									</div><!-- /.input -->

				<a href="#" class="btn btn--white sendBtn">Odeslat</a>

			</div>

			<div class="bottom nm">
				<label for="newsletter-form_gdpr" class="checkbox gdpr">
					<input type="checkbox" id="newsletter-form_gdpr" name="newsletter_gdpr">
					<span>Souhlasím se&nbsp;<a href="https://www.initmax.cz/ochrana-osobnich-udaju/" target="_blank">zpracováním osobních údajů</a>.</span>
				</label>
			</div>

		</div><!-- /.inputs -->
		<div class="sent hidden">
			<div class="iconOk"><h3>Děkujeme, že jste se přihlásili k&nbsp;odběru našeho newsletteru.</h3>
</div>
			<button class="sent__close" title="Zavřít" onclick="closeFormMessage(this,event)"><svg data-name="Group 3602" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 3272" d="M0,0H24V24H0Z" fill="none"/><line data-name="Line 98" y2="14" transform="translate(7.05 7.05) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 99" x2="14" transform="translate(7.05 16.95) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</button>
		</div><!-- /.sent -->
	</form>
</div>			</div>
		</div>
	</div>
</section></section>



<section id="social-links-block_9f16e9ed2227945db22b7252bf0a4464" data-id="social-links-block_9f16e9ed2227945db22b7252bf0a4464" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>

<p>The post <a href="https://www.initmax.cz/wiki/zabbix-6-2-navod-na-instalaci-v-5-minutach/">Zabbix 6.2 &#8211; návod na&nbsp;instalaci v&nbsp;5 minutách (nepodporováno)</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Zabbix 6.0 &#8211; návod na&#160;instalaci v&#160;5 minutách</title>
		<link>https://www.initmax.cz/wiki/zabbix-6-0-navod-na-instalaci-v-5-minutach/</link>
		
		<dc:creator><![CDATA[Tomáš Heřmánek]]></dc:creator>
		<pubDate>Mon, 19 Dec 2022 10:31:00 +0000</pubDate>
				<guid isPermaLink="false">https://www.initmax.cz/?post_type=wiki&#038;p=12191</guid>

					<description><![CDATA[<p>V tomto článku si ukážeme, jak nainstalovat a nakonfigurovat Zabbix 6.0 s databází PostgreSQL 16 na Rocky Linux 9, a to během pěti minut. ...</p>
<p>The post <a href="https://www.initmax.cz/wiki/zabbix-6-0-navod-na-instalaci-v-5-minutach/">Zabbix 6.0 &#8211; návod na&nbsp;instalaci v&nbsp;5 minutách</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>V tomto článku si ukážeme, jak nainstalovat a&nbsp;nakonfigurovat Zabbix 6.0 s&nbsp;databází PostgreSQL 16 na&nbsp;Rocky Linux 9, a&nbsp;to během pěti minut.</p>


<section id="block-webinar-block_432f8a03af35c12aefd21126788e56a2" data-id="block-webinar-block_432f8a03af35c12aefd21126788e56a2" class="gt-block block-webinar">
    <div class="connected-webinars__grid">
        <a href="https://www.initmax.cz/webinar/instalace-zabbixu-v-5-minutach-6-0/" class="grid-item">
	<article class="webinar-promotion">
		<div class="webinar-promotion__thumbnail-wrap">
			<figure class="webinar-promotion__thumbnail">
					<img decoding="async" src="https://www.initmax.cz/wp-content/uploads/2022/03/03_thumbnail_web.png"
				 width="400"
		 height="250"
		 class=""
		 alt="Instalace Zabbixu v&nbsp;5 minutách 6.0"
		 loading="lazy"	>
									<div class="webinar-promotion__tags">
						<span class="tag tag--small" style="color:#ffffff;background-color:#d40000;">Zabbix</span>					</div>
							</figure>
		</div>
		<div class="webinar-promotion__text">
			<div>
									<time datetime="2022-03-22">22.&nbsp;3.&nbsp;2022</time>
							</div>
			<h3 class="webinar-promotion__title">Instalace Zabbixu v&nbsp;5 minutách 6.0</h3>
			<div class="icon-link">
				<figure class="icon-wrap icon-wrap--primary"><svg data-name="Group 3411" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 455" d="M0,0H24V24H0Z" fill="none"/><path data-name="Path 456" d="M15,10l4.553-2.276A1,1,0,0,1,21,8.618v6.764a1,1,0,0,1-1.447.894L15,14V10Z" transform="translate(0 0)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><rect data-name="Rectangle 1286" width="12" height="12" rx="2" transform="translate(3.112 6)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</figure>
				<span>Zhlédnout záznam</span>
			</div>
		</div>
	</article>
</a>    </div>
</section>


<section id="social-links-block_adc545d3a9fd39aa2fb3dc3246e65934" data-id="social-links-block_adc545d3a9fd39aa2fb3dc3246e65934" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>




<h2 class="wp-block-heading">Než začneme</h2>



<p>Pro účely této <strong>ukázky</strong> si nejdříve přepneme SELinux do&nbsp;Permissive módu.</p>



<p>Pokud plánujete SELinux trvale deaktivovat, můžete tak učinit úpravou konfiguračního souboru. Nicméně, doporučujeme zvážit možnost naučit se s&nbsp;SELinuxem pracovat a&nbsp;využít jeho bezpečnostní výhody. Podrobné informace o&nbsp;správném nastavení a&nbsp;monitorování SELinuxu naleznete <a href="https://www.initmax.cz/wiki/selinux-integrace-se-zabbixem-a-dalsimi-nastroji/">v našem samostatném článku.​</a></p>


<section id="block-code-block_14fe42fe950f19f08acafccc744faed9" data-id="block-code-block_14fe42fe950f19f08acafccc744faed9" class="gt-block block-code">
    <pre><code>setenforce 0</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Instalace PostgreSQL</h2>



<p>Nejprve si naistalujeme repozitáře pro PostgreSQL a&nbsp;zakážeme výchozí, systémové PostgreSQL repozitáře.</p>


<section id="block-code-block_19819f8a14dd3837d208801a600c99ad" data-id="block-code-block_19819f8a14dd3837d208801a600c99ad" class="gt-block block-code">
    <pre><code>dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm
dnf -qy module disable postgresql</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A nyní se můžeme pustit do&nbsp;instalace PostgreSQL, v&nbsp;tomto případě to bude PostgreSQL 16</p>


<section id="block-code-block_ab88f2a4a807c0f8c6b749bb33cea5be" data-id="block-code-block_ab88f2a4a807c0f8c6b749bb33cea5be" class="gt-block block-code">
    <pre><code>dnf install -y postgresql16-server</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Teď už zbývá jen inicializovat databázi a&nbsp;nastavit automatické spouštění.</p>


<section id="block-code-block_5667336c7a8b73293652254c2300f96d" data-id="block-code-block_5667336c7a8b73293652254c2300f96d" class="gt-block block-code">
    <pre><code>/usr/pgsql-16/bin/postgresql-16-setup initdb
systemctl enable postgresql-16 --now</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Instalace Zabbix serveru a&nbsp;jeho součástí</h2>



<p>Databázi máme nainstalovanou, pojďme tedy na&nbsp;instalaci Zabbix serveru a&nbsp;jeho součástí.</p>



<p>Nejprve si z&nbsp;repozitáře EPEL vyloučíme jakékoliv instalační balíčky týkající se Zabbixu. Za předpokladu, že je nainstalován.To provedeme tak, že na&nbsp;konec souboru&nbsp;/etc/yum.repos.d/epel.repo&nbsp;vložíme následující řádek:</p>


<section id="block-code-block_8371bf864829c233efe8e63c24c6c7ce" data-id="block-code-block_8371bf864829c233efe8e63c24c6c7ce" class="gt-block block-code">
    <pre><code>[epel]
...
excludepkgs=zabbix*</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Přidáme si repozitáře Zabbixu a&nbsp;vyčistíme instalační cache.</p>


<section id="block-code-block_0b78b9d1f618b7566b9e2ddb1a1f76cf" data-id="block-code-block_0b78b9d1f618b7566b9e2ddb1a1f76cf" class="gt-block block-code">
    <pre><code>rpm -Uvh https://repo.zabbix.com/zabbix/6.0/rhel/9/x86_64/zabbix-release-latest.el9.noarch.rpm 
dnf clean all</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>A naistalujeme všechny potřebné součásti Zabbixu.</p>


<section id="block-code-block_3311bf02059428154c4fc18a7e57e238" data-id="block-code-block_3311bf02059428154c4fc18a7e57e238" class="gt-block block-code">
    <pre><code>dnf install zabbix-server-pgsql zabbix-web-pgsql zabbix-apache-conf zabbix-sql-scripts zabbix-agent zabbix-web-service</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Inicializace databáze</h2>



<p>V dalším kroku vytvoříme pro Zabbix uživatele v&nbsp;databázi a&nbsp;budeme vyzváni k&nbsp;zadání hesla.</p>


<section id="block-code-block_5479088a0c30a750787ad2b80f166c3e" data-id="block-code-block_5479088a0c30a750787ad2b80f166c3e" class="gt-block block-code">
    <pre><code>cd /tmp
sudo -u postgres createuser --pwprompt zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Založíme databázi a&nbsp;importujeme výchozí schéma a&nbsp;data. Opět budeme vyzváni k&nbsp;zadání hesla. <br>Zde použijeme heslo z&nbsp;předchozího kroku.</p>



<p><strong>Pozor!</strong> V&nbsp;starších verzích Zabbix je tato cesta jiná, a&nbsp;to <code>/usr/share/doc/zabbix-sql-scripts/postgresql/</code> !</p>


<section id="block-code-block_db367e91aaeebdffb64d9d29c305bb7e" data-id="block-code-block_db367e91aaeebdffb64d9d29c305bb7e" class="gt-block block-code">
    <pre><code>sudo -u postgres createdb -O zabbix zabbix
zcat /usr/share/zabbix-sql-scripts/postgresql/server.sql.gz | sudo -u zabbix psql zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Nastavení firewallu</h2>



<p>Nakonec ještě povolíme porty potřebné pro běh Zabbix serveru na&nbsp;firewallu.</p>


<section id="block-code-block_eca661420bb2b7f276d0d61967f92de2" data-id="block-code-block_eca661420bb2b7f276d0d61967f92de2" class="gt-block block-code">
    <pre><code>firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-port=10051/tcp
firewall-cmd --reload</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Instalace TimescaleDB</h2>



<p>Nyní se pustíme do&nbsp;instalace TimescaleDB. <br>Přidáme repozitář.</p>


<section id="block-code-block_6bc3ad6e31d00fc753018c79d5d7a84c" data-id="block-code-block_6bc3ad6e31d00fc753018c79d5d7a84c" class="gt-block block-code">
    <pre><code>tee /etc/yum.repos.d/timescale_timescaledb.repo &lt;&lt;EOL
[timescale_timescaledb]
name=timescale_timescaledb
baseurl=https://packagecloud.io/timescale/timescaledb/el/$(rpm -E %{rhel})/\$basearch
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/timescale/timescaledb/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
EOL</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nainstalujme TimescaleDB.</p>


<section id="block-code-block_78bd0dca2430161149699c7cf27578bc" data-id="block-code-block_78bd0dca2430161149699c7cf27578bc" class="gt-block block-code">
    <pre><code>dnf -y install timescaledb-2-postgresql-16-2.16.1 timescaledb-2-loader-postgresql-16-2.16.1</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Spustíme utilitu <code>timescaledb-tune</code> a&nbsp;jako parametr jí předáme vyšší hodnotu maximálního množství připojení (<code>--max-conns</code>), které pro tyto testovací účely nastavíme na&nbsp;<code>125</code>.</p>



<p>Tato utilita slouží k&nbsp;přizpůsobení výchozího nastavení PostgreSQL vůčihledně výkonu a&nbsp;adekvátnímu nastavení parametrů PostgreSQL pro fungování s&nbsp;TimescaleDB.</p>



<p>Zároveň nám tato utilit pomocí instalačního průvodce pomůže vybrat aktuální a&nbsp;platný konfigurační soubor PostgreSQL a&nbsp;nastaví i&nbsp;automatické načítání knihoven TimescaleDB.</p>



<p>Prosím, odpovídejte &#8222;ano&#8220; (y) na&nbsp;všechny otázky. Pozor, automatický tuner předpokládá, že PostgreSQL běží na&nbsp;samostatném serveru, a&nbsp;proto může být potřeba případně upravit parametry.</p>


<section id="block-code-block_d0e7a29eca93cb11c9c838ff6c03e4b9" data-id="block-code-block_d0e7a29eca93cb11c9c838ff6c03e4b9" class="gt-block block-code">
    <pre><code>timescaledb-tune --pg-config /usr/pgsql-16/bin --max-conns=125</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1254" height="528" src="https://www.initmax.cz/wp-content/uploads/2023/10/postgresql16-timescaledb.png" alt="" class="wp-image-13933" srcset="https://www.initmax.cz/wp-content/uploads/2023/10/postgresql16-timescaledb.png 1254w, https://www.initmax.cz/wp-content/uploads/2023/10/postgresql16-timescaledb-300x126.png 300w, https://www.initmax.cz/wp-content/uploads/2023/10/postgresql16-timescaledb-1024x431.png 1024w, https://www.initmax.cz/wp-content/uploads/2023/10/postgresql16-timescaledb-768x323.png 768w" sizes="auto, (max-width: 1254px) 100vw, 1254px" /></figure>



<p>Následně restartujeme systémovou službu pro PostgreSQL:</p>


<section id="block-code-block_c9dc4a21e484488162042e7ada994c50" data-id="block-code-block_c9dc4a21e484488162042e7ada994c50" class="gt-block block-code">
    <pre><code>systemctl restart postgresql-16.service</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Zbývá již jen vytvořit a&nbsp;aktivovat TimescaleDB:</p>



<p><strong>Pozor!</strong> V&nbsp;starších verzích Zabbix je tato cesta jiná, a&nbsp;to <code>/usr/share/doc/zabbix-sql-scripts/</code> !</p>


<section id="block-code-block_7652f8e153f75164df95f2ce8ad2e94a" data-id="block-code-block_7652f8e153f75164df95f2ce8ad2e94a" class="gt-block block-code">
    <pre><code>echo &quot;CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;&quot; | sudo -u postgres psql zabbix
cat /usr/share/zabbix-sql-scripts/postgresql/timescaledb.sql | sudo -u zabbix psql zabbix</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Konfigurace Zabbix serveru</h2>



<p>Otevřeme konfigurační soubor Zabbix serveru.</p>


<section id="block-code-block_42620d461b3996f25130b3e941ed52ee" data-id="block-code-block_42620d461b3996f25130b3e941ed52ee" class="gt-block block-code">
    <pre><code>nano /etc/zabbix/zabbix_server.conf</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Upravíme jednotlivé parametry podle následující předlohy.</p>


<section id="block-code-block_e9fedb4edb856d74f602631b32d4dd7a" data-id="block-code-block_e9fedb4edb856d74f602631b32d4dd7a" class="gt-block block-code">
    <pre><code>DBPassword=&lt;heslo_do_databaze&gt;
StartReportWriters=1
WebServiceURL=http://localhost:10053/report
HANodeName=initMAX</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Nakonec doinstalujeme jazykové balíčky pro češtinu a&nbsp;slovenštinu:</p>


<section id="block-code-block_a5c1cc0cdca5e6aac4c149394e17da24" data-id="block-code-block_a5c1cc0cdca5e6aac4c149394e17da24" class="gt-block block-code">
    <pre><code>dnf install glibc-langpack-cs.x86_64 glibc-langpack-sk.x86_64</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Na závěr restartujeme všechny související služby a&nbsp;nastavíme je tak, aby se spouštěly automaticky:</p>


<section id="block-code-block_0047ed969e0a010255f8652a626996af" data-id="block-code-block_0047ed969e0a010255f8652a626996af" class="gt-block block-code">
    <pre><code>systemctl restart zabbix-server zabbix-web-service zabbix-agent httpd php-fpm
systemctl enable zabbix-server zabbix-web-service zabbix-agent httpd php-fpm</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Pro ověření stavu, že nám Zabbix server nastartoval v&nbsp;pořádku můžeme kromě jiného zkontrolovat i&nbsp;jeho log soubor:</p>


<section id="block-code-block_99e9fe76fc32924d1ed6e2e21ba1b034" data-id="block-code-block_99e9fe76fc32924d1ed6e2e21ba1b034" class="gt-block block-code">
    <pre><code>less /var/log/zabbix/zabbix_server.log</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<h2 class="wp-block-heading">Konfigurace Zabbix frontendu</h2>



<p>V okně prohlížeče si otevřeme url na&nbsp;které nám Zabbix běží. Například <code>http://192.168.0.50/zabbix</code> a&nbsp;přivítá nás instalace.</p>



<p>Kliknutím na&nbsp;tlačítko <code>Next step</code> se posuneme na&nbsp;stránku s&nbsp;kontrolou minimálních požadavků.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1794" height="1130" src="https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-1.png" alt="" class="wp-image-16521" srcset="https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-1.png 1794w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-1-300x189.png 300w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-1-1024x645.png 1024w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-1-768x484.png 768w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-1-1536x967.png 1536w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-1-608x383.png 608w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-1-1216x766.png 1216w" sizes="auto, (max-width: 1794px) 100vw, 1794px" /></figure>



<p>Vše je v&nbsp;pořádku, můžeme tedy kliknout na&nbsp;<code>Next step</code> a&nbsp;posunout se na&nbsp;další stránku s&nbsp;nastavením připojení do&nbsp;databáze.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1790" height="1140" src="https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-2.png" alt="" class="wp-image-16525" srcset="https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-2.png 1790w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-2-300x191.png 300w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-2-1024x652.png 1024w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-2-768x489.png 768w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-2-1536x978.png 1536w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-2-608x387.png 608w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-2-1216x774.png 1216w" sizes="auto, (max-width: 1790px) 100vw, 1790px" /></figure>



<p>Na této stránce vyplníme pouze políčko <strong>Password</strong>, nic dalšího není třeba měnit, a&nbsp;klikneme na&nbsp;<code>Next step</code>.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1802" height="1140" src="https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-3.png" alt="" class="wp-image-16529" srcset="https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-3.png 1802w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-3-300x190.png 300w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-3-1024x648.png 1024w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-3-768x486.png 768w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-3-1536x972.png 1536w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-3-608x385.png 608w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-3-1216x769.png 1216w" sizes="auto, (max-width: 1802px) 100vw, 1802px" /></figure>



<p>Zde vyplníme základní nastavení, tedy název serveru a&nbsp;časové pásmo, a&nbsp;kliknutím na&nbsp;<code>Next step</code> pokračujeme k&nbsp;souhrnu konfigurace.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1794" height="1130" src="https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-4.png" alt="" class="wp-image-16534" srcset="https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-4.png 1794w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-4-300x189.png 300w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-4-1024x645.png 1024w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-4-768x484.png 768w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-4-1536x967.png 1536w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-4-608x383.png 608w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-4-1216x766.png 1216w" sizes="auto, (max-width: 1794px) 100vw, 1794px" /></figure>



<p>Zkontrolujeme zadané hodnoty a&nbsp;kliknutím na&nbsp;<code>Next step</code> dokončíme instalaci.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1794" height="1140" src="https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-5.png" alt="" class="wp-image-16532" srcset="https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-5.png 1794w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-5-300x191.png 300w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-5-1024x651.png 1024w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-5-768x488.png 768w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-5-1536x976.png 1536w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-5-608x386.png 608w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-5-1216x773.png 1216w" sizes="auto, (max-width: 1794px) 100vw, 1794px" /></figure>



<p>Kliknutím na&nbsp;<code>Finish</code> již přejdeme na&nbsp;přihlašovací obrazovku.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1794" height="1144" src="https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-6.png" alt="" class="wp-image-16536" srcset="https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-6.png 1794w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-6-300x191.png 300w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-6-1024x653.png 1024w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-6-768x490.png 768w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-6-1536x979.png 1536w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-6-608x388.png 608w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-6-1216x775.png 1216w" sizes="auto, (max-width: 1794px) 100vw, 1794px" /></figure>



<p>Přihlásíme se a&nbsp;můžeme Zabbix 6.0 začít používat. (<code>Admin/zabbix</code>)</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2438" height="1158" src="https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-7.png" alt="" class="wp-image-16543" srcset="https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-7.png 2438w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-7-300x142.png 300w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-7-1024x486.png 1024w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-7-768x365.png 768w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-7-1536x730.png 1536w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-7-2048x973.png 2048w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-7-608x289.png 608w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-7-1216x578.png 1216w" sizes="auto, (max-width: 2438px) 100vw, 2438px" /></figure>



<p>Po přihlášení na&nbsp;Vás čeká nový Zabbix 6.0. </p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2814" height="1494" src="https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-8.png" alt="" class="wp-image-16541" srcset="https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-8.png 2814w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-8-300x159.png 300w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-8-1024x544.png 1024w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-8-768x408.png 768w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-8-1536x815.png 1536w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-8-2048x1087.png 2048w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-8-608x323.png 608w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-8-1216x646.png 1216w" sizes="auto, (max-width: 2814px) 100vw, 2814px" /></figure>



<h2 class="wp-block-heading">Konfigurace Zabbix reportingu</h2>



<p>Pro potřeby funkcí reportingu je nejprve nutné nainstalovat Google Chrome.</p>



<p>Nejprve stáhneme instalační balíček, který následně také nainstalujeme:</p>


<section id="block-code-block_4d42e81dc06fbd823f0f1c20678dceb6" data-id="block-code-block_4d42e81dc06fbd823f0f1c20678dceb6" class="gt-block block-code">
    <pre><code>wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
dnf localinstall google-chrome-stable_current_x86_64.rpm</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Následně je nutné upravit v&nbsp;konfiguraci Zabbix frontendu parametr &#8222;Frontend URL&#8220; na&nbsp;aktuálně platnou hodnotu, toto nastavení se nachází v&nbsp;následující cestě v&nbsp;menu:</p>


<section id="block-code-block_564b8b981eb8b48a9b623290e032a5aa" data-id="block-code-block_564b8b981eb8b48a9b623290e032a5aa" class="gt-block block-code">
    <pre><code>Administration -&gt; General -&gt; Other</code></pre>
    <a onclick="copyCode(this)" class="block-code__copy" title="Kopírovat"><svg data-name="Group 3002" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect data-name="Rectangle 2035" width="12" height="12" rx="2" transform="translate(8 8)" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 607" d="M16,8V6a2,2,0,0,0-2-2H6A2,2,0,0,0,4,6v8a2,2,0,0,0,2,2H8" fill="none" stroke="#1f65f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</a>
</section>




<p>Příklad nastavení můžete vidět na&nbsp;obrázku níže.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1606" height="692" src="https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-9.png" alt="" class="wp-image-16546" srcset="https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-9.png 1606w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-9-300x129.png 300w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-9-1024x441.png 1024w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-9-768x331.png 768w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-9-1536x662.png 1536w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-9-608x262.png 608w, https://www.initmax.cz/wp-content/uploads/2022/12/zabbix-install-9-1216x524.png 1216w" sizes="auto, (max-width: 1606px) 100vw, 1606px" /></figure>



<hr class="wp-block-separator has-alpha-channel-opacity"/>


<section id="block-newsletter-block_81f3022fcaa604c1e0949cba9bc305d5" data-id="block-newsletter-block_81f3022fcaa604c1e0949cba9bc305d5" class="gt-block block-newsletter">
    <section id="newsletter" class="newsletter">
	<div class="gradient basic">
		<div class="newsletter__inner width width--general">
			<div class="col left">
									<h2 class="newsletter__title">Buďte v&nbsp;obraze s&nbsp;naším newsletterem</h2>
													<div class="newsletter__content"><p>Díky initMAX newsletteru Vám neunikne žádná z&nbsp;pozvánek na&nbsp;akce a&nbsp;webináře, žádný z&nbsp;tipů, jak dostat ze svého IT MAXimum, ani ověřené informace o&nbsp;novinkách ze světa Zabbix a&nbsp;dalších technologií.</p>
</div>
							</div>
			<div class="col right form-wrapper">
				<div class="newsletter-form">
	<form method="post" action="/wiki/kapitola/zabbix/feed/" enctype="multipart/form-data">
		<input type="hidden" name="url" value="https://www.initmax.cz/wiki/kapitola/zabbix/feed/">

		<div class="inputs">

			<label for="newsletter-form_contact_email" class="top">Vaše e-mailová adresa:</label>
			<div class="df">

				<div class="input">
					<input type="text" id="newsletter-form_contact_email" name="newsletter_email" placeholder="@" data-format="email" data-required="1">
									</div><!-- /.input -->

				<a href="#" class="btn btn--white sendBtn">Odeslat</a>

			</div>

			<div class="bottom nm">
				<label for="newsletter-form_gdpr" class="checkbox gdpr">
					<input type="checkbox" id="newsletter-form_gdpr" name="newsletter_gdpr">
					<span>Souhlasím se&nbsp;<a href="https://www.initmax.cz/ochrana-osobnich-udaju/" target="_blank">zpracováním osobních údajů</a>.</span>
				</label>
			</div>

		</div><!-- /.inputs -->
		<div class="sent hidden">
			<div class="iconOk"><h3>Děkujeme, že jste se přihlásili k&nbsp;odběru našeho newsletteru.</h3>
</div>
			<button class="sent__close" title="Zavřít" onclick="closeFormMessage(this,event)"><svg data-name="Group 3602" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path data-name="Path 3272" d="M0,0H24V24H0Z" fill="none"/><line data-name="Line 98" y2="14" transform="translate(7.05 7.05) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 99" x2="14" transform="translate(7.05 16.95) rotate(-45)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>
</button>
		</div><!-- /.sent -->
	</form>
</div>			</div>
		</div>
	</div>
</section></section>



<section id="social-links-block_adc545d3a9fd39aa2fb3dc3246e65934" data-id="social-links-block_adc545d3a9fd39aa2fb3dc3246e65934" class="gt-block social-links">
			<div class="social-links__content"><p><strong>Dejte nám Like, sdílejte nás nebo nás sledujte 😍</strong><br />
Ať vám nic neunikne:</p>
</div>
		<div class="socials df df--fw-w df--ai-c df--jc-c">
					<a href="https://twitter.com/initmax" title="Odkaz na Twitter" class="social-link social-link--colored twitter-x" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4l11.733 16h4.267l-11.733 -16z" /><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" /></svg>


</a>
							<a href="https://www.linkedin.com/company/initmax/" title="Odkaz na Linkedin" class="social-link social-link--colored linkedin" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3318" transform="translate(-4214 7797)"><g data-name="Group 2185" transform="translate(4214 -7797)"><path data-name="Path 524" d="M0,0H24V24H0Z" fill="none"/><rect data-name="Rectangle 1825" width="16" height="16" rx="2" transform="translate(4 4)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 64" y2="5" transform="translate(8 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 65" y2="0.01" transform="translate(8 8)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 66" y1="5" transform="translate(12 11)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path data-name="Path 525" d="M16,16V13a2,2,0,0,0-4,0" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
									<a href="https://www.youtube.com/@initmax1" title="Odkaz na Youtube" class="social-link social-link--colored youtube" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5m0 4a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z" /><path d="M10 9l5 3l-5 3z" /></svg>


</a>
										<a href="https://github.com/initmax" title="Odkaz na GitHub" class="social-link social-link--colored github" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>


</a>
								<a href="https://www.facebook.com/initmax" title="Odkaz na Facebook" class="social-link social-link--colored facebook" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3193" transform="translate(-4286 7797)"><g data-name="Group 3189"><path data-name="Path 515" d="M0,0H24V24H0Z" transform="translate(4286 -7797)" fill="none"/><path data-name="Path 516" d="M7,10v4h3v7h4V14h3l1-4H14V8a1,1,0,0,1,1-1h3V3H15a5,5,0,0,0-5,5v2H7" transform="translate(4286 -7797)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
							<a href="https://www.instagram.com/initmax/" title="Odkaz na Instagram" class="social-link social-link--colored instagram" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g data-name="Group 3194" transform="translate(-4358 7797)"><g data-name="Group 3190"><path data-name="Path 517" d="M0,0H24V24H0Z" transform="translate(4358 -7797)" fill="none"/><rect data-name="Rectangle 1783" width="16" height="16" rx="4" transform="translate(4362 -7793)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><circle data-name="Ellipse 51" cx="3" cy="3" r="3" transform="translate(4367 -7788)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><line data-name="Line 63" y2="0.001" transform="translate(4374.5 -7789.5)" fill="none" stroke="var(--icon-color,#1F65F4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g></g></svg>
</a>
			</div>
</section>

<p>The post <a href="https://www.initmax.cz/wiki/zabbix-6-0-navod-na-instalaci-v-5-minutach/">Zabbix 6.0 &#8211; návod na&nbsp;instalaci v&nbsp;5 minutách</a> appeared first on <a href="https://www.initmax.cz">initMAX s.r.o.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
