<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.dhits.nl/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tony</id>
	<title>DWIKI - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.dhits.nl/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tony"/>
	<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/Special:Contributions/Tony"/>
	<updated>2026-06-13T13:15:25Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Zabbix_tags&amp;diff=10508</id>
		<title>Zabbix tags</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Zabbix_tags&amp;diff=10508"/>
		<updated>2026-06-12T14:48:54Z</updated>

		<summary type="html">&lt;p&gt;Tony: /* component: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Links=&lt;br /&gt;
*[ https://www.zabbix.com/documentation/current/en/manual/config/tagging Tagging]&lt;br /&gt;
=Items=&lt;br /&gt;
*[https://www.zabbix.com/documentation/guidelines/en/thosts/configuration/template_items#tags Item tags]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==component:==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Component tags&lt;br /&gt;
! Value !! Description !! Example&lt;br /&gt;
|-&lt;br /&gt;
| application || app&lt;br /&gt;
|- &lt;br /&gt;
| business || internal information || number of company branches&lt;br /&gt;
|- &lt;br /&gt;
| cpu || cpu&lt;br /&gt;
|-&lt;br /&gt;
| device || A device || Disk, ether port, fan?&lt;br /&gt;
|-&lt;br /&gt;
| environment || ??&lt;br /&gt;
|- &lt;br /&gt;
| health || health || alive?&lt;br /&gt;
|- &lt;br /&gt;
| interface || Network interface&lt;br /&gt;
|-&lt;br /&gt;
| memory || memory &lt;br /&gt;
|-&lt;br /&gt;
| network || xx&lt;br /&gt;
|-&lt;br /&gt;
| power || W&lt;br /&gt;
|-&lt;br /&gt;
| process || like proc.num ||&lt;br /&gt;
|-&lt;br /&gt;
| storage || sto&lt;br /&gt;
|-&lt;br /&gt;
| os || os&lt;br /&gt;
|- &lt;br /&gt;
| system || low-level and system metrics not related to OS, unless a more specific component is defined || serial number, uptime, proc.num&lt;br /&gt;
|- &lt;br /&gt;
| raw || technical metric || master item&lt;br /&gt;
|-&lt;br /&gt;
| kpi || internal information || monthly returned customers&lt;br /&gt;
|-&lt;br /&gt;
| sensor || internal information || pressure in a column still&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Custom tags===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Other useful item tags&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Description !! Example&lt;br /&gt;
|-&lt;br /&gt;
| interface || network interface || speed, traffic, mac address&lt;br /&gt;
|-&lt;br /&gt;
| Example || Example || Example&lt;br /&gt;
|-&lt;br /&gt;
| Example || Example || Example&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Triggers=&lt;br /&gt;
* [https://www.zabbix.com/documentation/guidelines/en/thosts/configuration/template_triggers#trigger-tags Trigger tags]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Templates=&lt;br /&gt;
* [https://www.zabbix.com/documentation/guidelines/en/thosts/configuration/templates#tags Template tags]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Zabbix]]&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Zabbix_tags&amp;diff=10507</id>
		<title>Zabbix tags</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Zabbix_tags&amp;diff=10507"/>
		<updated>2026-06-12T14:45:42Z</updated>

		<summary type="html">&lt;p&gt;Tony: /* component: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Links=&lt;br /&gt;
*[ https://www.zabbix.com/documentation/current/en/manual/config/tagging Tagging]&lt;br /&gt;
=Items=&lt;br /&gt;
*[https://www.zabbix.com/documentation/guidelines/en/thosts/configuration/template_items#tags Item tags]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==component:==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Component tags&lt;br /&gt;
! Value !! Description !! Example&lt;br /&gt;
|-&lt;br /&gt;
| application || app&lt;br /&gt;
|- &lt;br /&gt;
| business || internal information || number of company branches&lt;br /&gt;
|- &lt;br /&gt;
| cpu || cpu&lt;br /&gt;
|-&lt;br /&gt;
| device || A device || Disk, ether port, fan?&lt;br /&gt;
|-&lt;br /&gt;
| environment || ??&lt;br /&gt;
|- &lt;br /&gt;
| health || health || alive?&lt;br /&gt;
|- &lt;br /&gt;
| interface || Network interface&lt;br /&gt;
|-&lt;br /&gt;
| memory || memory &lt;br /&gt;
|-&lt;br /&gt;
| network || xx&lt;br /&gt;
|-&lt;br /&gt;
| power || W&lt;br /&gt;
|-&lt;br /&gt;
| storage || sto&lt;br /&gt;
|-&lt;br /&gt;
| os || os&lt;br /&gt;
|- &lt;br /&gt;
| system || low-level and system metrics not related to OS, unless a more specific component is defined || serial number, uptime, proc.num&lt;br /&gt;
|- &lt;br /&gt;
| raw || technical metric || master item&lt;br /&gt;
|-&lt;br /&gt;
| kpi || internal information || monthly returned customers&lt;br /&gt;
|-&lt;br /&gt;
| sensor || internal information || pressure in a column still&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Custom tags===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Other useful item tags&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Description !! Example&lt;br /&gt;
|-&lt;br /&gt;
| interface || network interface || speed, traffic, mac address&lt;br /&gt;
|-&lt;br /&gt;
| Example || Example || Example&lt;br /&gt;
|-&lt;br /&gt;
| Example || Example || Example&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Triggers=&lt;br /&gt;
* [https://www.zabbix.com/documentation/guidelines/en/thosts/configuration/template_triggers#trigger-tags Trigger tags]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Templates=&lt;br /&gt;
* [https://www.zabbix.com/documentation/guidelines/en/thosts/configuration/templates#tags Template tags]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Zabbix]]&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Zabbix&amp;diff=10506</id>
		<title>Zabbix</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Zabbix&amp;diff=10506"/>
		<updated>2026-06-12T13:39:18Z</updated>

		<summary type="html">&lt;p&gt;Tony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
*[http://www.zabbix.org/ Homepage] &lt;br /&gt;
*[https://zabbix.org/wiki/Docs/DB_schema/4.0 zabbix 4 database schema] &lt;br /&gt;
*[https://www.zabbix.com/documentation/current/en/manual/appendix/compatibility Zabbix compatibility matrix]&lt;br /&gt;
*[https://www.digitalocean.com/community/tutorials/introduction-to-queries-mysql https://www.digitalocean.com/community/tutorials/introduction-to-queries-mysql] &lt;br /&gt;
*[http://zabbix.org/wiki/Compilation_instructions compilation instructions] &lt;br /&gt;
*[http://www.zabbix.com/documentation Documentation] &lt;br /&gt;
*[https://dev.mysql.com/doc/mysql-tutorial-excerpt/8.0/en/examples.html Examples of Common Queries] &lt;br /&gt;
*[http://zabbixzone.com/zabbix/easy-update-on-custom-scripts/ Custom scripts] &lt;br /&gt;
*[https://github.com/q1x/zabbix-gnomes Various scripts to automate tasks in Zabbix] &lt;br /&gt;
*[https://www.percona.com/blog/2014/11/14/optimizing-mysql-zabbix/ Tuning mysql for zabbix] &lt;br /&gt;
*[https://huyabbix.com https://huyabbix.com] &lt;br /&gt;
*[http://techblog.procurios.nl/k/n618/news/view/56429/14863/how-to-migrate-mysql-databases-without-downtime.html Migrating zabbix database with minimal downtime] &lt;br /&gt;
*[https://support.zabbix.com/browse/ZBX/ Zabbix Bug tracker] &lt;br /&gt;
*[http://www.michaelfoster82.co.uk/zabbix-database-cleanup-delete-old-data/ Clean up database] &lt;br /&gt;
*[https://linux.die.net/man/8/zabbix_selinux Zabbix and selinux] &lt;br /&gt;
*[https://github.com/a-schild/zabbix-ssl Apache/SSL checks] &lt;br /&gt;
*[[Zabbix_on_RHEL/Centos|Zabbix on RHEL/Centos]] &lt;br /&gt;
*[[Grafana|Grafana]] &lt;br /&gt;
*[https://blog.zabbix.com/zabbix-ha-cluster-setups/8264/ https://blog.zabbix.com/zabbix-ha-cluster-setups/8264/] Zabbix HA cluster] &lt;br /&gt;
*[https://blog.zabbix.com/zabbix-agent-active-vs-passive/9207/ Active vs Passive]&lt;br /&gt;
*[https://blog.zabbix.com/fighting-notification-floods-and-misleading-alerts-in-distributed-zabbix-deployments/11600/ Fighting zabbix alert floods] &lt;br /&gt;
*[https://github.com/unioslo/zabbix-cli zabbix-cli]&lt;br /&gt;
&lt;br /&gt;
=Documentation=&lt;br /&gt;
==Triggers==&lt;br /&gt;
*[https://www.zabbix.com/documentation/current/en/manual/appendix/functions Trigger functions]&lt;br /&gt;
Function str() searches for substrings&lt;br /&gt;
&lt;br /&gt;
==AND OR case==&lt;br /&gt;
not, and and or operators are case-sensitive and must be in lowercase. They also must be surrounded by spaces or parentheses.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Installing zabbix==&lt;br /&gt;
*[https://www.zabbix.com/download Download and install zabbix]&lt;br /&gt;
*[https://repo.zabbix.com/ Zabbix repositories]&lt;br /&gt;
*[https://wiki.gentoo.org/wiki/User:MalakymR/Zabbix Zabbix on Gentoo]&lt;br /&gt;
&lt;br /&gt;
== Installing Zabbix from git ==&lt;br /&gt;
&lt;br /&gt;
 git clone [https://github.com/zabbix/zabbix.git https://github.com/zabbix/zabbix.git]&lt;br /&gt;
 cd zabbix &lt;br /&gt;
 ./bootstrap.sh&lt;br /&gt;
 ./configure --help&lt;br /&gt;
 autoreconf -fvi&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t have a Makefile, try&lt;br /&gt;
 ./config.status Makefile&lt;br /&gt;
and then&lt;br /&gt;
 ./configure&lt;br /&gt;
again&lt;br /&gt;
&lt;br /&gt;
== Zabbix API ==&lt;br /&gt;
&lt;br /&gt;
*[https://www.zabbix.com/documentation/current/manual/api The Zabbix API] &lt;br /&gt;
*[https://www.zabbix.com/integrations/python API and python]&lt;br /&gt;
&lt;br /&gt;
===FAQ===&lt;br /&gt;
====Error: Zabbix API library must be installed.====&lt;br /&gt;
It wants the OTHER zabbix API, so&lt;br /&gt;
 pip install zabbix-api&lt;br /&gt;
&lt;br /&gt;
==Zabbix agent paths==&lt;br /&gt;
===Ubuntu===&lt;br /&gt;
 /etc/zabbix/zabbix_agentd.conf.d/&lt;br /&gt;
 /etc/zabbix/zabbix_agentd.conf&lt;br /&gt;
&lt;br /&gt;
===Ubuntu 24.04===&lt;br /&gt;
 /etc/zabbix/zabbix_agentd.d&lt;br /&gt;
&lt;br /&gt;
==Simple check==&lt;br /&gt;
*[https://www.zabbix.com/documentation/6.4/en/manual/config/items/itemtypes/simple_checks Simple checks]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Zabbix and SNMP==&lt;br /&gt;
===Links===&lt;br /&gt;
*[https://www.zabbix.com/integrations/snmp#interfaces_snmp Interfaces by SNMP]&lt;br /&gt;
*[https://www.zabbix.com/documentation/5.0/en/manual/discovery/low_level_discovery/snmp_oids Discovery of SNMP OIDs]&lt;br /&gt;
&lt;br /&gt;
On proxy/server:&lt;br /&gt;
 apt install snmp-mibs-downloader&lt;br /&gt;
 download-mibs&lt;br /&gt;
&lt;br /&gt;
*[https://bestmonitoringtools.com/tutorial-snmp-traps-on-zabbix/ Zabbix SNMP Traps: A Step-by-Step Guide]&lt;br /&gt;
&lt;br /&gt;
==External check==&lt;br /&gt;
*[https://www.zabbix.com/documentation/current/en/manual/config/items/itemtypes/external External checks]&lt;br /&gt;
Scripts usually in &#039;&#039;&#039;/usr/lib/zabbix/externalscripts/&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Tagging==&lt;br /&gt;
* [https://www.zabbix.com/documentation/guidelines/en/thosts/configuration/template_items#tags Item tags]&lt;br /&gt;
* [https://www.zabbix.com/documentation/guidelines/en/thosts/configuration/templates#tag-name-and-value-format Template tags]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Web monitoring==&lt;br /&gt;
* https://www.zabbix.com/documentation/current/en/manual/web_monitoring&lt;br /&gt;
&lt;br /&gt;
= Tools =&lt;br /&gt;
==zabbix_get==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Zabbix error codes =&lt;br /&gt;
&lt;br /&gt;
== Z3005 ==&lt;br /&gt;
&lt;br /&gt;
Database issue&lt;br /&gt;
&lt;br /&gt;
= Zabbix Items =&lt;br /&gt;
[https://www.zabbix.com/documentation/6.0/en/manual/config/items/itemtypes/zabbix_agent Agent item keys]&lt;br /&gt;
==Item dialog==&lt;br /&gt;
*[https://www.zabbix.com/documentation/5.4/en/manual/config/items/item Item documentation]&lt;br /&gt;
*[https://www.zabbix.com/documentation/5.4/en/manual/config/items/itemtypes/zabbix_agent Zabbix agent items]&lt;br /&gt;
===Type of information===&lt;br /&gt;
====Numeric(unsigned)====&lt;br /&gt;
====Character====&lt;br /&gt;
character (string) data limited to 255 bytes&lt;br /&gt;
====Text====&lt;br /&gt;
Text of any size&lt;br /&gt;
&lt;br /&gt;
===Units===&lt;br /&gt;
&lt;br /&gt;
*B&lt;br /&gt;
*uptime&lt;br /&gt;
*unixtime&lt;br /&gt;
*s&lt;br /&gt;
&lt;br /&gt;
== proc.mem ==&lt;br /&gt;
*[https://www.zabbix.com/documentation/current/en/manual/config/items/itemtypes/zabbix_agent#proc.mem zabbix agent proc.mem]&lt;br /&gt;
&lt;br /&gt;
proc.mem[&amp;lt;name&amp;gt;,&amp;lt;user&amp;gt;,&amp;lt;mode&amp;gt;,&amp;lt;cmdline&amp;gt;,&amp;lt;memtype&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=== name ===&lt;br /&gt;
process name&lt;br /&gt;
&lt;br /&gt;
=== cmdline ===&lt;br /&gt;
&lt;br /&gt;
regex like php-fpm:&lt;br /&gt;
&lt;br /&gt;
===memtype===&lt;br /&gt;
On linux default is vsize (VmSize)&lt;br /&gt;
*[https://www.zabbix.com/documentation/5.0/en/manual/appendix/items/proc_mem_notes Notes on proc.mem memtypes]&lt;br /&gt;
&lt;br /&gt;
==proc.num==&lt;br /&gt;
*[https://www.zabbix.com/documentation/current/en/manual/config/items/itemtypes/zabbix_agent#proc.num proc.num]&lt;br /&gt;
===Get proc.num of java process===&lt;br /&gt;
 proc.num[java,,,mongodb]&lt;br /&gt;
&lt;br /&gt;
==Item preprocessing==&lt;br /&gt;
===Preprocessing regular expressions===&lt;br /&gt;
See [https://www.zabbix.com/documentation/current/en/manual/regular_expressions#example Regular expressions: example]&lt;br /&gt;
&lt;br /&gt;
===XML/xpath preprocessing===&lt;br /&gt;
https://blog.zabbix.com/zabbix-xpath-preprocessing/7936/&lt;br /&gt;
&lt;br /&gt;
NOTE xq -x does not want the number() bit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Incorrect value for field &amp;quot;Prev. time&amp;quot;: a relative time is expected.===&lt;br /&gt;
Prev. Time should be something like&lt;br /&gt;
 now-30s&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Monitoring incremental/counters===&lt;br /&gt;
 Preprocessing -&amp;gt; Change per second&lt;br /&gt;
&lt;br /&gt;
==Windows performance counters==&lt;br /&gt;
https://www.zabbix.com/documentation/current/en/manual/config/items/perfcounters&lt;br /&gt;
&lt;br /&gt;
= Templates =&lt;br /&gt;
*[https://www.zabbix.com/integrations?cat=official_templates Zabbix Offical Templates]&lt;br /&gt;
*[https://github.com/zabbix/community-templates/ Community templates]&lt;br /&gt;
&lt;br /&gt;
==Template App MySQL==&lt;br /&gt;
https://github.com/tiramiseb/zabbix-templates/blob/master/Template%20App%20MySQL.txt&lt;br /&gt;
TODO shouldn&#039;t this be user zabbix?&lt;br /&gt;
&lt;br /&gt;
mysql user account:&lt;br /&gt;
 create user &#039;monitor&#039;@&#039;localhost&#039; identified by auth_socket;&lt;br /&gt;
 grant PROCESS,SHOW DATABASES,SHOW VIEW on *.* to &#039;monitor&#039;@&#039;localhost&#039;;&lt;br /&gt;
 flush privileges;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Monitoring sensors==&lt;br /&gt;
Template https://github.com/blind-oracle/zabbix-sensors for sensors discovery.&lt;br /&gt;
See also https://www.zabbix.com/documentation/current/en/manual/appendix/items/sensor&lt;br /&gt;
&lt;br /&gt;
= Configuration =&lt;br /&gt;
&lt;br /&gt;
== Zabbix agent active ==&lt;br /&gt;
&lt;br /&gt;
=== On client ===&lt;br /&gt;
Have port 10051 open and:&lt;br /&gt;
 ActiveServer zabbix.ser.ver&lt;br /&gt;
&lt;br /&gt;
=== On server ===&lt;br /&gt;
&lt;br /&gt;
Set Agent IP to 0.0.0.0&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
=Zabbix and SQL=&lt;br /&gt;
==Find hosts with hostmacro defined== &lt;br /&gt;
 select h.host, m.macro, m.value from hosts h, hostmacro m where macro like &#039;%FOO%&#039; and h.hostid = m.hostid;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==most frequent items in history_uint==&lt;br /&gt;
 select itemid,count(itemid) as freq from history_uint group by itemid order by freq desc limit 5;&lt;br /&gt;
&lt;br /&gt;
and then&lt;br /&gt;
 select name from items where itemid = whateveryoufind;&lt;br /&gt;
&lt;br /&gt;
= HOWTO =&lt;br /&gt;
==Mysql command line==&lt;br /&gt;
===Use custom variables===&lt;br /&gt;
 set @foo=12;&lt;br /&gt;
 select * from items where id &amp;lt; @foo;&lt;br /&gt;
&lt;br /&gt;
==Useful queries==&lt;br /&gt;
===Find most items filling up history===&lt;br /&gt;
 SELECT itemid, count(*) AS cnt FROM history GROUP BY itemid ORDER BY cnt DESC limit 30;&lt;br /&gt;
&lt;br /&gt;
===Find host and item by itemid===&lt;br /&gt;
 select h.name,i.hostid,i.name from hosts h,items i where i.itemid = 212624 and i.hostid = h.hostid;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Define discovery filters==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== LLD with JSON ==&lt;br /&gt;
*[https://blog.zabbix.com/low-level-discovery-with-dependent-items/13634/ LLD with JSON and dependent items]&lt;br /&gt;
*https://www.zabbix.com/forum/zabbix-help/383827-json-and-lld-understanding &lt;br /&gt;
*https://www.zabbix.com/forum/zabbix-troubleshooting-and-problems/456663-lld-macros-with-json&lt;br /&gt;
&lt;br /&gt;
if you want multiple keys, use jsonpath like &lt;br /&gt;
 $[?(@.share==&#039;{#FSTYPE}&#039; &amp;amp;&amp;amp; @.name==&#039;{#NAME}&#039;)].size.first()&lt;br /&gt;
===testing jsonpath preprocessing===&lt;br /&gt;
In Value paste valid json, then name {#NAME} value somevalue&lt;br /&gt;
&lt;br /&gt;
== Test trapper ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Reset admin password==&lt;br /&gt;
Mysql prompt:&lt;br /&gt;
 select * from user where username=&#039;Admin&#039;;&lt;br /&gt;
bcrypt your new password:&lt;br /&gt;
 htpasswd -nbBC 10 USER YOURPASSWORD|awk -F &#039;:&#039; &#039;{ print $2 }&#039;&lt;br /&gt;
Mysql prompt:&lt;br /&gt;
 update user set passwd = &#039;your bcrypted pass&#039; where userid = 1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Zabbix and PSK==&lt;br /&gt;
See:&lt;br /&gt;
*[https://www.zabbix.com/documentation/5.2/en/manual/encryption/using_pre_shared_keys  Using pre-shared keys]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Updating multiple triggers/alerts==&lt;br /&gt;
Select them via &#039;&#039;&#039;Monitoring-&amp;gt;Problems&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Testing javascript==&lt;br /&gt;
 zabbix_js&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Zabbix maps==&lt;br /&gt;
* [https://www.zabbix.com/documentation/8.0/en/manual/config/visualization/maps/map maps]&lt;br /&gt;
===Add link===&lt;br /&gt;
&amp;quot;Two map elements should be selected&amp;quot;&lt;br /&gt;
Select one, hold control and select the other&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
==macro naming convention==&lt;br /&gt;
{$SOME.NAME} is better than {$SOME_NAME}&lt;br /&gt;
&lt;br /&gt;
==cannot convert value to numeric type==&lt;br /&gt;
Some javascript :)&lt;br /&gt;
&lt;br /&gt;
==Failed: cannot calculate delta (speed per second) for value of type &amp;quot;none&amp;quot;==&lt;br /&gt;
In preprocessing use Javascript to&lt;br /&gt;
 if ( &amp;quot;&amp;quot; == value ) { return 0; } else { return value; }&lt;br /&gt;
&lt;br /&gt;
==Handling division by zero==&lt;br /&gt;
In preprocessing find &amp;quot;Check for not supported&amp;quot;, &amp;quot;error matches&amp;quot; and add &amp;quot;division by zero&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==zabbix[proxy_buffer,state,current] not supported==&lt;br /&gt;
Zabbix proxy must be monitored by itself, not by server&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==What is this &amp;quot;$1&amp;quot; in item name?==&lt;br /&gt;
In older versions of zabbix this was first parameter of key, use the macros like {#SNMPVALUE}, {#FSNAME}, or {#IFNAME} now&lt;br /&gt;
&lt;br /&gt;
==Locations of Userparameters==&lt;br /&gt;
===Ubuntu===&lt;br /&gt;
 /etc/zabbix/agentd.d/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==What takes most space in the database?==&lt;br /&gt;
*[https://blog.zabbix.com/what-takes-disk-space/13349/ What takes disk space]&lt;br /&gt;
&lt;br /&gt;
==forced reloading of the snmp cache==&lt;br /&gt;
looks like nothing to worry about&lt;br /&gt;
&lt;br /&gt;
==Where is last userid stored?==&lt;br /&gt;
ids:&lt;br /&gt;
 table_name: users&lt;br /&gt;
 field_name: userid&lt;br /&gt;
 nextid: the next id &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SERVER ==&lt;br /&gt;
==Which items using most data in database?==&lt;br /&gt;
*[https://serverfault.com/questions/749397/zabbix-determine-what-item-checks-are-responsible-for-storing-the-most-data determine what item checks are responsible for storing the most data]&lt;br /&gt;
&lt;br /&gt;
 SELECT itemid, count(*) AS cnt FROM history GROUP BY itemid ORDER BY cnt DESC LIMIT 20;&lt;br /&gt;
or maybe&lt;br /&gt;
 SELECT h.itemid, i.name, count(*) AS cnt FROM history h, items i where h.itemid = i.itemid GROUP BY itemid ORDER BY cnt DESC limit 20;&lt;br /&gt;
=== Adjust loglevel ===&lt;br /&gt;
&lt;br /&gt;
 zabbix_server --runtime-control log_level_increase=trapper&lt;br /&gt;
       &lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== Reload zabbix server configuration ===&lt;br /&gt;
&lt;br /&gt;
You can&#039;t, but you might want&lt;br /&gt;
&lt;br /&gt;
 zabbix_server -c /etc/zabbix/zabbix_server.conf -R config_cache_reload&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== No media defined for user ===&lt;br /&gt;
&lt;br /&gt;
=== The frontend does not match Zabbix database. ===&lt;br /&gt;
&lt;br /&gt;
Probably version conflict between frontend and server&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== value cache working in low memory mode ===&lt;br /&gt;
&lt;br /&gt;
Increase ValueCacheSize&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Message from 1.2.3.4 is missing header. Message ignored. ===&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== PROXY ==&lt;br /&gt;
&lt;br /&gt;
[[ Zabbix Proxy ]]&lt;br /&gt;
&lt;br /&gt;
===cannot send proxy data to server===&lt;br /&gt;
empty string received&lt;br /&gt;
&lt;br /&gt;
===failed to update local proxy configuration copy: unexpected field &amp;quot;host_inventory.type&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Front end ==&lt;br /&gt;
&lt;br /&gt;
===Round numbers===&lt;br /&gt;
Preprocessing javascript&lt;br /&gt;
2 decimals:&lt;br /&gt;
 return Math.round(value* 100) / 100&lt;br /&gt;
0 decimals:&lt;br /&gt;
 return Math.round(value)&lt;br /&gt;
&lt;br /&gt;
=== Visable name vs hostname ===&lt;br /&gt;
&lt;br /&gt;
Visible name: {HOST.NAME}&lt;br /&gt;
&lt;br /&gt;
Hostname: {HOST.HOST}&lt;br /&gt;
&lt;br /&gt;
Host IP: (as defined in Interface-&amp;gt;IP/DNS) {HOST.CONN}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Acknowledge multiple items ===&lt;br /&gt;
&lt;br /&gt;
Monitor-&amp;gt;Problems apply filters, select all, mass update&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== No permissions to referred object or it does not exist! ===&lt;br /&gt;
&lt;br /&gt;
Graph no longer exists. Probably items no longer discovered&lt;br /&gt;
&lt;br /&gt;
Maybe you&#039;ve been editing a template file, remember to replace template name everywhere&lt;br /&gt;
&lt;br /&gt;
=== Cannot add host ===&lt;br /&gt;
&lt;br /&gt;
??&lt;br /&gt;
===match for value of type &amp;quot;none&amp;quot;: pattern does not match===&lt;br /&gt;
Agent returning empty string?&lt;br /&gt;
&lt;br /&gt;
== Monitoring SNMP ==&lt;br /&gt;
===Cannot find module (IF-MIB): At line 1 in (none)===&lt;br /&gt;
 apt install snmp-mibs-downloader&lt;br /&gt;
and restart zabbix-proxy&lt;br /&gt;
&lt;br /&gt;
=== Cannot find host interface on &amp;quot;xxxhost&amp;quot; for item key foo ===&lt;br /&gt;
&lt;br /&gt;
Might mean you&#039;re trying to import an SNMP template before configuring SNMP for the host&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== No SNMP data ===&lt;br /&gt;
&lt;br /&gt;
=== snmp_parse_oid(): cannot parse OID &amp;quot;IF-MIB::ifSpeed.3 ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Timeout while connecting===&lt;br /&gt;
Could be wrong community string, remember delay when using proxy.&lt;br /&gt;
&lt;br /&gt;
== Agent side ping check ==&lt;br /&gt;
&lt;br /&gt;
 UserParameter=pingtime[*],fping -e $1|sed &#039;s/^.*(\([0-9].*\) ms).*$/\1/g&#039;&lt;br /&gt;
 UserParameter=pingalive[*],fping $1|grep -q alive;echo $?&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==LLD/Discovery==&lt;br /&gt;
=== Discover: value must be a JSON object ===&lt;br /&gt;
&lt;br /&gt;
Could mean you need to escape slashes, check output with zabbix_get&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Cannot create item: item with the same key already exists===&lt;br /&gt;
make sure the key contains &amp;quot;{#SOMENAME}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Discovery data example ==&lt;br /&gt;
&lt;br /&gt;
Output of a discovery script should look like:&lt;br /&gt;
&lt;br /&gt;
 {&amp;quot;data&amp;quot;:[&lt;br /&gt;
   {&amp;quot;{#VAR1}&amp;quot;:&amp;quot;value11&amp;quot;,&amp;quot;#{VAR2&amp;quot;:&amp;quot;value12&amp;quot;},&lt;br /&gt;
   {&amp;quot;{#VAR1}&amp;quot;:&amp;quot;value21&amp;quot;,&amp;quot;#{VAR2&amp;quot;:&amp;quot;value22&amp;quot;}&lt;br /&gt;
 ]}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== IPMI ==&lt;br /&gt;
&lt;br /&gt;
=== IPMI Monitoring account for zabbix ===&lt;br /&gt;
&lt;br /&gt;
[https://www.thomas-krenn.com/en/wiki/Configuring_IPMI_under_Linux_using_ipmitool https://www.thomas-krenn.com/en/wiki/Configuring_IPMI_under_Linux_using_ipmitool]&lt;br /&gt;
&lt;br /&gt;
 ipmitool user set name 3 monitor&lt;br /&gt;
 ipmitool user set password 3&lt;br /&gt;
 ipmitool channel setaccess 1 3 link=on ipmi=on callin=on privilege=2&lt;br /&gt;
 ipmitool user enable 3&lt;br /&gt;
&lt;br /&gt;
To test these:&lt;br /&gt;
 ipmitool -I lanplus -H &amp;lt;host&amp;gt; -L USER -U monitor sdr elist full&lt;br /&gt;
&lt;br /&gt;
===Zabbix credentials===&lt;br /&gt;
====Privilege Level====&lt;br /&gt;
 User&lt;br /&gt;
&lt;br /&gt;
====Authentication algorithm====&lt;br /&gt;
 Default&lt;br /&gt;
but what is that?&lt;br /&gt;
&lt;br /&gt;
=== cannot connect to IPMI host: [22] Operation canceled ===&lt;br /&gt;
&lt;br /&gt;
Usually temporary because of broken ipmi lib, ignore it&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== cannot connect to IPMI host: [16777411] Unknown error 16777411 ===&lt;br /&gt;
&lt;br /&gt;
classic, probably authentication problem&lt;br /&gt;
&lt;br /&gt;
=== cannot connect to IPMI host: [22] Invalid argument ===&lt;br /&gt;
wrong password/credentials?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===IPMI pollers are disabled in configuration===&lt;br /&gt;
Check&lt;br /&gt;
 StartIPMIPollers&lt;br /&gt;
in server/proxy configuration&lt;br /&gt;
&lt;br /&gt;
=== Cannot connect to IPMI host: [2] No such file or directory===&lt;br /&gt;
??&lt;br /&gt;
&lt;br /&gt;
== zabbix_sender ==&lt;br /&gt;
&lt;br /&gt;
=== processed: 0; failed: 1 ===&lt;br /&gt;
&lt;br /&gt;
Possible causes:&lt;br /&gt;
&lt;br /&gt;
*incorrect hostname &lt;br /&gt;
*incorrect item key &lt;br /&gt;
*item not in the server configuration cache yet &lt;br /&gt;
*Allowed hosts in trapper item &lt;br /&gt;
*phase of moon &lt;br /&gt;
*aliens &lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== Testing zabbix_sender ===&lt;br /&gt;
&lt;br /&gt;
 zabbix_sender stuff&lt;br /&gt;
&lt;br /&gt;
== Filters ==&lt;br /&gt;
&lt;br /&gt;
The regular expressions referred to in discovery are found under Administration-&amp;gt;General, and then &amp;quot;Regular expressions&amp;quot; in the dropdown at top right of the page&lt;br /&gt;
&lt;br /&gt;
=== cannot connect to IPMI host: [125] Operation canceled ===&lt;br /&gt;
&lt;br /&gt;
possibly authentication method issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
== Calculated items ==&lt;br /&gt;
See [https://blog.zabbix.com/zabbix-monitoring-with-calculated-items-explained/9950/ Calculated items explained]&lt;br /&gt;
=== Cannot create item: Invalid first parameter ===&lt;br /&gt;
For calculated items use last(&amp;quot;youritemkey&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
=== Cannot create item, error in formula ===&lt;br /&gt;
Problably a calculated item, try doublequoting the item key:&lt;br /&gt;
&lt;br /&gt;
 last(&amp;quot;foo[bar]&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
===Invalid parameter &amp;quot;/1/params&amp;quot;===&lt;br /&gt;
Maybe forgot to use last()?&lt;br /&gt;
You might need to doublequote your items, or prepend with double slashes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Reset trigger/alert ==&lt;br /&gt;
For example when you changed the settings &lt;br /&gt;
Just disable, wait a bit and enable again.&lt;br /&gt;
== Install recent zabbix on CentOS/RHEL ==&lt;br /&gt;
&lt;br /&gt;
 rpm -ivh [https://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm https://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm]&lt;br /&gt;
 yum install zabbix-agent&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Backing up tables ==&lt;br /&gt;
&lt;br /&gt;
[https://www.zabbix.org/wiki/Docs/howto/mysql_backup_script https://www.zabbix.org/wiki/Docs/howto/mysql_backup_script]&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== cannot send list of active checks ==&lt;br /&gt;
Verify hostname:&lt;br /&gt;
 /usr/sbin/zabbix_agentd -t &#039;agent.hostname&#039;&lt;br /&gt;
&lt;br /&gt;
If in agent log: most likely ServerActive is defined in agent config, while not used at all&lt;br /&gt;
&lt;br /&gt;
It is also possible agent is sending some active check to server while host is monitored via proxy.&lt;br /&gt;
&lt;br /&gt;
In proxy/server log:&lt;br /&gt;
most likely &#039;&#039;&#039;Hostname&#039;&#039;&#039; in agent config does not match hostname used on server.&lt;br /&gt;
&lt;br /&gt;
==cannot send list of active checks to &amp;quot;127.0.0.1&amp;quot;: host [Zabbix server] not found==&lt;br /&gt;
??&lt;br /&gt;
&lt;br /&gt;
== active check configuration update started to fail ==&lt;br /&gt;
&lt;br /&gt;
??&lt;br /&gt;
&lt;br /&gt;
== Latest 20 issues ==&lt;br /&gt;
&lt;br /&gt;
DEFAULT_LATEST_ISSUES_CNT in/usr/share/zabbix/include/defines.inc.php&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== Zabbix unreachable poller processes more than 75% busy ==&lt;br /&gt;
&lt;br /&gt;
Increase &#039;&#039;&#039;StartPollersUnreachable&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== Zabbix poller processes more than 75% busy ==&lt;br /&gt;
&lt;br /&gt;
Maybe StartPollersUnreachable?&lt;br /&gt;
&lt;br /&gt;
== More than 100 items having missing data for more than 10 minutes ==&lt;br /&gt;
&lt;br /&gt;
Could be high load. Also check Administration-&amp;gt;Queue&lt;br /&gt;
&lt;br /&gt;
== Zabbix escalator processes more than 75% busy ==&lt;br /&gt;
&lt;br /&gt;
probably high system load overall&lt;br /&gt;
&lt;br /&gt;
== Check agent ==&lt;br /&gt;
&lt;br /&gt;
 zabbix_get -s my.host.com -k agent.version&lt;br /&gt;
&lt;br /&gt;
== ZBX_NOTSUPPORTED ==&lt;br /&gt;
&lt;br /&gt;
Could be anything, enable logging on agent. It could be version mismatch. Check&lt;br /&gt;
&lt;br /&gt;
 zabbix_get -s yourhost -k agent.version&lt;br /&gt;
&lt;br /&gt;
If that works, you&#039;re calling for an undefined or unsupported key.&lt;br /&gt;
&lt;br /&gt;
== Incorrect trigger expression. Host &amp;quot;xx&amp;quot; does not exist or you have no access to this host. ==&lt;br /&gt;
&lt;br /&gt;
Means there&#039;s no related item.&lt;br /&gt;
&lt;br /&gt;
== zabbix_get returns nothing ==&lt;br /&gt;
&lt;br /&gt;
best look at log on agent side&lt;br /&gt;
&lt;br /&gt;
== run playbook on single host ==&lt;br /&gt;
&lt;br /&gt;
 ansible_playbook -l somehost somplay.yml&lt;br /&gt;
&lt;br /&gt;
[[:Category:Monitoring]]&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== Zabbix server is not running: the information displayed may not be current ==&lt;br /&gt;
&lt;br /&gt;
Might be selinux: [http://sysads.co.uk/2013/11/zabbix-server-running-alert/ http://sysads.co.uk/2013/11/zabbix-server-running-alert/]&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== Monitoring vmware ==&lt;br /&gt;
&lt;br /&gt;
=== vmware.hv.cpu.usage[{$URL},{HOST.HOST}]&amp;quot; became not supported: Couldn&#039;t resolve host name ===&lt;br /&gt;
&lt;br /&gt;
 Set macro {$URL} to [https://your.ip/sdk/ https://your.ip/sdk/] (shouldn&#039;t discovery figure that out from {$HOST}&amp;amp;nbsp;?&lt;br /&gt;
       &lt;br /&gt;
&lt;br /&gt;
=== Couldn&#039;t resolve host name ===&lt;br /&gt;
&lt;br /&gt;
Sometimes it&#039;s a matter of waiting a few hours&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== vmware events collector returned empty result ===&lt;br /&gt;
&lt;br /&gt;
???&lt;br /&gt;
&lt;br /&gt;
=== No &amp;quot;vmware collector&amp;quot; processes started. ===&lt;br /&gt;
&lt;br /&gt;
Check StartVMwareCollectors on server or proxy&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== unsupported item key ==&lt;br /&gt;
&lt;br /&gt;
This might mean it&#039;s expecting a value from the script you&#039;re calling.&lt;br /&gt;
&lt;br /&gt;
 echo 1&lt;br /&gt;
remember: not supported is not disabled, server/proxy will try again after interval &lt;br /&gt;
&lt;br /&gt;
=== became not supported: Not supported by Zabbix Agent ===&lt;br /&gt;
&lt;br /&gt;
probably output by userparameter/script&lt;br /&gt;
&lt;br /&gt;
== ansible or API not showing host groups ==&lt;br /&gt;
&lt;br /&gt;
Permissions!! See Administration-&amp;gt;User Groups&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== failed to update local proxy configuration copy: invalid field name &amp;quot;items.lastlogsize&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
check everything&amp;amp;nbsp;:)&lt;br /&gt;
&lt;br /&gt;
== Received value [11] is not suitable for value type [Numeric (unsigned)] and data type [Decimal] ==&lt;br /&gt;
&lt;br /&gt;
 This probably means the agent returned 1\n1&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== database is down: retrying in 10 seconds ==&lt;br /&gt;
&lt;br /&gt;
try upping max_connections&lt;br /&gt;
&lt;br /&gt;
== [Incorrect key file for table &#039;items&#039;; try to repair it ==&lt;br /&gt;
&lt;br /&gt;
Could be something /tmp related&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== another network error, wait for 8 seconds ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;UnreachableDelay&#039;&#039;&#039;=8&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== failed: first network error, wait for XY seconds ==&lt;br /&gt;
&lt;br /&gt;
Waits for UnreachableDelay seconds before trying again&lt;br /&gt;
&lt;br /&gt;
Loglevel LOG_LEVEL_WARNING&lt;br /&gt;
&lt;br /&gt;
== no active checks on server ==&lt;br /&gt;
*Hostname in agent config (-kagent.hostname) must match name on server&lt;br /&gt;
*simple no connection possible? firewall?&lt;br /&gt;
*maybe the host was configured to be monitored by (another) proxy?&lt;br /&gt;
&lt;br /&gt;
== show cpu utilization ==&lt;br /&gt;
&lt;br /&gt;
Monitoring-&amp;gt;host-&amp;gt;graphs&lt;br /&gt;
&lt;br /&gt;
===fuzzytime on command line===&lt;br /&gt;
 TS=lotsofseconds&lt;br /&gt;
#output in hours&lt;br /&gt;
 echo $(( ($(date +%s) - $TS) / 3600 ))&lt;br /&gt;
&lt;br /&gt;
==duplicate entry adding user/group==&lt;br /&gt;
Check table &#039;ids&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
===zabbix_get: no route to host===&lt;br /&gt;
Check the firewall&lt;br /&gt;
&lt;br /&gt;
=Error messages=&lt;br /&gt;
==Error: Zabbix API library must be installed==&lt;br /&gt;
 pip install zabbix_utils&lt;br /&gt;
OR&lt;br /&gt;
 pip install zabbix-api&lt;br /&gt;
&lt;br /&gt;
==Get value from agent failed: cannot connect to [[xx]:10050]: [4] Interrupted system call==&lt;br /&gt;
Check firewall?&lt;br /&gt;
&lt;br /&gt;
==connection error (POLLERR,POLLHUP)==&lt;br /&gt;
probably firewall&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Agent error messages==&lt;br /&gt;
===unspecified certificate verification error: TLS handshake set result code to 5:===&lt;br /&gt;
Try restarting agent.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==zabbix : problem with defaults entries ==&lt;br /&gt;
Could be sudo/resolving problem&lt;br /&gt;
&lt;br /&gt;
[[Category:Monitoring]]&lt;br /&gt;
[[Category:Zabbix]]&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Zabbix&amp;diff=10505</id>
		<title>Zabbix</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Zabbix&amp;diff=10505"/>
		<updated>2026-06-12T13:27:37Z</updated>

		<summary type="html">&lt;p&gt;Tony: /* proc.num */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
*[http://www.zabbix.org/ Homepage] &lt;br /&gt;
*[https://zabbix.org/wiki/Docs/DB_schema/4.0 zabbix 4 database schema] &lt;br /&gt;
*[https://www.zabbix.com/documentation/current/en/manual/appendix/compatibility Zabbix compatibility matrix]&lt;br /&gt;
*[https://www.digitalocean.com/community/tutorials/introduction-to-queries-mysql https://www.digitalocean.com/community/tutorials/introduction-to-queries-mysql] &lt;br /&gt;
*[http://zabbix.org/wiki/Compilation_instructions compilation instructions] &lt;br /&gt;
*[http://www.zabbix.com/documentation Documentation] &lt;br /&gt;
*[https://dev.mysql.com/doc/mysql-tutorial-excerpt/8.0/en/examples.html Examples of Common Queries] &lt;br /&gt;
*[http://zabbixzone.com/zabbix/easy-update-on-custom-scripts/ Custom scripts] &lt;br /&gt;
*[https://github.com/q1x/zabbix-gnomes Various scripts to automate tasks in Zabbix] &lt;br /&gt;
*[https://www.percona.com/blog/2014/11/14/optimizing-mysql-zabbix/ Tuning mysql for zabbix] &lt;br /&gt;
*[https://huyabbix.com https://huyabbix.com] &lt;br /&gt;
*[http://techblog.procurios.nl/k/n618/news/view/56429/14863/how-to-migrate-mysql-databases-without-downtime.html Migrating zabbix database with minimal downtime] &lt;br /&gt;
*[https://support.zabbix.com/browse/ZBX/ Zabbix Bug tracker] &lt;br /&gt;
*[http://www.michaelfoster82.co.uk/zabbix-database-cleanup-delete-old-data/ Clean up database] &lt;br /&gt;
*[https://linux.die.net/man/8/zabbix_selinux Zabbix and selinux] &lt;br /&gt;
*[https://github.com/a-schild/zabbix-ssl Apache/SSL checks] &lt;br /&gt;
*[[Zabbix_on_RHEL/Centos|Zabbix on RHEL/Centos]] &lt;br /&gt;
*[[Grafana|Grafana]] &lt;br /&gt;
*[https://blog.zabbix.com/zabbix-ha-cluster-setups/8264/ https://blog.zabbix.com/zabbix-ha-cluster-setups/8264/] Zabbix HA cluster] &lt;br /&gt;
*[https://blog.zabbix.com/zabbix-agent-active-vs-passive/9207/ Active vs Passive]&lt;br /&gt;
*[https://blog.zabbix.com/fighting-notification-floods-and-misleading-alerts-in-distributed-zabbix-deployments/11600/ Fighting zabbix alert floods] &lt;br /&gt;
*[https://github.com/unioslo/zabbix-cli zabbix-cli]&lt;br /&gt;
&lt;br /&gt;
=Documentation=&lt;br /&gt;
==Triggers==&lt;br /&gt;
*[https://www.zabbix.com/documentation/current/en/manual/appendix/functions Trigger functions]&lt;br /&gt;
Function str() searches for substrings&lt;br /&gt;
&lt;br /&gt;
==AND OR case==&lt;br /&gt;
not, and and or operators are case-sensitive and must be in lowercase. They also must be surrounded by spaces or parentheses.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Installing zabbix==&lt;br /&gt;
*[https://www.zabbix.com/download Download and install zabbix]&lt;br /&gt;
*[https://repo.zabbix.com/ Zabbix repositories]&lt;br /&gt;
*[https://wiki.gentoo.org/wiki/User:MalakymR/Zabbix Zabbix on Gentoo]&lt;br /&gt;
&lt;br /&gt;
== Installing Zabbix from git ==&lt;br /&gt;
&lt;br /&gt;
 git clone [https://github.com/zabbix/zabbix.git https://github.com/zabbix/zabbix.git]&lt;br /&gt;
 cd zabbix &lt;br /&gt;
 ./bootstrap.sh&lt;br /&gt;
 ./configure --help&lt;br /&gt;
 autoreconf -fvi&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t have a Makefile, try&lt;br /&gt;
 ./config.status Makefile&lt;br /&gt;
and then&lt;br /&gt;
 ./configure&lt;br /&gt;
again&lt;br /&gt;
&lt;br /&gt;
== Zabbix API ==&lt;br /&gt;
&lt;br /&gt;
*[https://www.zabbix.com/documentation/current/manual/api The Zabbix API] &lt;br /&gt;
*[https://www.zabbix.com/integrations/python API and python]&lt;br /&gt;
&lt;br /&gt;
===FAQ===&lt;br /&gt;
====Error: Zabbix API library must be installed.====&lt;br /&gt;
It wants the OTHER zabbix API, so&lt;br /&gt;
 pip install zabbix-api&lt;br /&gt;
&lt;br /&gt;
==Zabbix agent paths==&lt;br /&gt;
===Ubuntu===&lt;br /&gt;
 /etc/zabbix/zabbix_agentd.conf.d/&lt;br /&gt;
 /etc/zabbix/zabbix_agentd.conf&lt;br /&gt;
&lt;br /&gt;
===Ubuntu 24.04===&lt;br /&gt;
 /etc/zabbix/zabbix_agentd.d&lt;br /&gt;
&lt;br /&gt;
==Simple check==&lt;br /&gt;
*[https://www.zabbix.com/documentation/6.4/en/manual/config/items/itemtypes/simple_checks Simple checks]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Zabbix and SNMP==&lt;br /&gt;
===Links===&lt;br /&gt;
*[https://www.zabbix.com/integrations/snmp#interfaces_snmp Interfaces by SNMP]&lt;br /&gt;
*[https://www.zabbix.com/documentation/5.0/en/manual/discovery/low_level_discovery/snmp_oids Discovery of SNMP OIDs]&lt;br /&gt;
&lt;br /&gt;
On proxy/server:&lt;br /&gt;
 apt install snmp-mibs-downloader&lt;br /&gt;
 download-mibs&lt;br /&gt;
&lt;br /&gt;
*[https://bestmonitoringtools.com/tutorial-snmp-traps-on-zabbix/ Zabbix SNMP Traps: A Step-by-Step Guide]&lt;br /&gt;
&lt;br /&gt;
==External check==&lt;br /&gt;
*[https://www.zabbix.com/documentation/current/en/manual/config/items/itemtypes/external External checks]&lt;br /&gt;
Scripts usually in &#039;&#039;&#039;/usr/lib/zabbix/externalscripts/&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Tagging==&lt;br /&gt;
* [https://www.zabbix.com/documentation/guidelines/en/thosts/configuration/template_items#tags Item tags]&lt;br /&gt;
* [https://www.zabbix.com/documentation/guidelines/en/thosts/configuration/templates#tag-name-and-value-format Template tags]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Web monitoring==&lt;br /&gt;
* https://www.zabbix.com/documentation/current/en/manual/web_monitoring&lt;br /&gt;
&lt;br /&gt;
= Zabbix error codes =&lt;br /&gt;
&lt;br /&gt;
== Z3005 ==&lt;br /&gt;
&lt;br /&gt;
Database issue&lt;br /&gt;
&lt;br /&gt;
= Zabbix Items =&lt;br /&gt;
[https://www.zabbix.com/documentation/6.0/en/manual/config/items/itemtypes/zabbix_agent Agent item keys]&lt;br /&gt;
==Item dialog==&lt;br /&gt;
*[https://www.zabbix.com/documentation/5.4/en/manual/config/items/item Item documentation]&lt;br /&gt;
*[https://www.zabbix.com/documentation/5.4/en/manual/config/items/itemtypes/zabbix_agent Zabbix agent items]&lt;br /&gt;
===Type of information===&lt;br /&gt;
====Numeric(unsigned)====&lt;br /&gt;
====Character====&lt;br /&gt;
character (string) data limited to 255 bytes&lt;br /&gt;
====Text====&lt;br /&gt;
Text of any size&lt;br /&gt;
&lt;br /&gt;
===Units===&lt;br /&gt;
&lt;br /&gt;
*B&lt;br /&gt;
*uptime&lt;br /&gt;
*unixtime&lt;br /&gt;
*s&lt;br /&gt;
&lt;br /&gt;
== proc.mem ==&lt;br /&gt;
*[https://www.zabbix.com/documentation/current/en/manual/config/items/itemtypes/zabbix_agent#proc.mem zabbix agent proc.mem]&lt;br /&gt;
&lt;br /&gt;
proc.mem[&amp;lt;name&amp;gt;,&amp;lt;user&amp;gt;,&amp;lt;mode&amp;gt;,&amp;lt;cmdline&amp;gt;,&amp;lt;memtype&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=== name ===&lt;br /&gt;
process name&lt;br /&gt;
&lt;br /&gt;
=== cmdline ===&lt;br /&gt;
&lt;br /&gt;
regex like php-fpm:&lt;br /&gt;
&lt;br /&gt;
===memtype===&lt;br /&gt;
On linux default is vsize (VmSize)&lt;br /&gt;
*[https://www.zabbix.com/documentation/5.0/en/manual/appendix/items/proc_mem_notes Notes on proc.mem memtypes]&lt;br /&gt;
&lt;br /&gt;
==proc.num==&lt;br /&gt;
*[https://www.zabbix.com/documentation/current/en/manual/config/items/itemtypes/zabbix_agent#proc.num proc.num]&lt;br /&gt;
===Get proc.num of java process===&lt;br /&gt;
 proc.num[java,,,mongodb]&lt;br /&gt;
&lt;br /&gt;
==Item preprocessing==&lt;br /&gt;
===Preprocessing regular expressions===&lt;br /&gt;
See [https://www.zabbix.com/documentation/current/en/manual/regular_expressions#example Regular expressions: example]&lt;br /&gt;
&lt;br /&gt;
===XML/xpath preprocessing===&lt;br /&gt;
https://blog.zabbix.com/zabbix-xpath-preprocessing/7936/&lt;br /&gt;
&lt;br /&gt;
NOTE xq -x does not want the number() bit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Incorrect value for field &amp;quot;Prev. time&amp;quot;: a relative time is expected.===&lt;br /&gt;
Prev. Time should be something like&lt;br /&gt;
 now-30s&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Monitoring incremental/counters===&lt;br /&gt;
 Preprocessing -&amp;gt; Change per second&lt;br /&gt;
&lt;br /&gt;
==Windows performance counters==&lt;br /&gt;
https://www.zabbix.com/documentation/current/en/manual/config/items/perfcounters&lt;br /&gt;
&lt;br /&gt;
= Templates =&lt;br /&gt;
*[https://www.zabbix.com/integrations?cat=official_templates Zabbix Offical Templates]&lt;br /&gt;
*[https://github.com/zabbix/community-templates/ Community templates]&lt;br /&gt;
&lt;br /&gt;
==Template App MySQL==&lt;br /&gt;
https://github.com/tiramiseb/zabbix-templates/blob/master/Template%20App%20MySQL.txt&lt;br /&gt;
TODO shouldn&#039;t this be user zabbix?&lt;br /&gt;
&lt;br /&gt;
mysql user account:&lt;br /&gt;
 create user &#039;monitor&#039;@&#039;localhost&#039; identified by auth_socket;&lt;br /&gt;
 grant PROCESS,SHOW DATABASES,SHOW VIEW on *.* to &#039;monitor&#039;@&#039;localhost&#039;;&lt;br /&gt;
 flush privileges;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Monitoring sensors==&lt;br /&gt;
Template https://github.com/blind-oracle/zabbix-sensors for sensors discovery.&lt;br /&gt;
See also https://www.zabbix.com/documentation/current/en/manual/appendix/items/sensor&lt;br /&gt;
&lt;br /&gt;
= Configuration =&lt;br /&gt;
&lt;br /&gt;
== Zabbix agent active ==&lt;br /&gt;
&lt;br /&gt;
=== On client ===&lt;br /&gt;
Have port 10051 open and:&lt;br /&gt;
 ActiveServer zabbix.ser.ver&lt;br /&gt;
&lt;br /&gt;
=== On server ===&lt;br /&gt;
&lt;br /&gt;
Set Agent IP to 0.0.0.0&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
=Zabbix and SQL=&lt;br /&gt;
==Find hosts with hostmacro defined== &lt;br /&gt;
 select h.host, m.macro, m.value from hosts h, hostmacro m where macro like &#039;%FOO%&#039; and h.hostid = m.hostid;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==most frequent items in history_uint==&lt;br /&gt;
 select itemid,count(itemid) as freq from history_uint group by itemid order by freq desc limit 5;&lt;br /&gt;
&lt;br /&gt;
and then&lt;br /&gt;
 select name from items where itemid = whateveryoufind;&lt;br /&gt;
&lt;br /&gt;
= HOWTO =&lt;br /&gt;
==Mysql command line==&lt;br /&gt;
===Use custom variables===&lt;br /&gt;
 set @foo=12;&lt;br /&gt;
 select * from items where id &amp;lt; @foo;&lt;br /&gt;
&lt;br /&gt;
==Useful queries==&lt;br /&gt;
===Find most items filling up history===&lt;br /&gt;
 SELECT itemid, count(*) AS cnt FROM history GROUP BY itemid ORDER BY cnt DESC limit 30;&lt;br /&gt;
&lt;br /&gt;
===Find host and item by itemid===&lt;br /&gt;
 select h.name,i.hostid,i.name from hosts h,items i where i.itemid = 212624 and i.hostid = h.hostid;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Define discovery filters==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== LLD with JSON ==&lt;br /&gt;
*[https://blog.zabbix.com/low-level-discovery-with-dependent-items/13634/ LLD with JSON and dependent items]&lt;br /&gt;
*https://www.zabbix.com/forum/zabbix-help/383827-json-and-lld-understanding &lt;br /&gt;
*https://www.zabbix.com/forum/zabbix-troubleshooting-and-problems/456663-lld-macros-with-json&lt;br /&gt;
&lt;br /&gt;
if you want multiple keys, use jsonpath like &lt;br /&gt;
 $[?(@.share==&#039;{#FSTYPE}&#039; &amp;amp;&amp;amp; @.name==&#039;{#NAME}&#039;)].size.first()&lt;br /&gt;
===testing jsonpath preprocessing===&lt;br /&gt;
In Value paste valid json, then name {#NAME} value somevalue&lt;br /&gt;
&lt;br /&gt;
== Test trapper ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Reset admin password==&lt;br /&gt;
Mysql prompt:&lt;br /&gt;
 select * from user where username=&#039;Admin&#039;;&lt;br /&gt;
bcrypt your new password:&lt;br /&gt;
 htpasswd -nbBC 10 USER YOURPASSWORD|awk -F &#039;:&#039; &#039;{ print $2 }&#039;&lt;br /&gt;
Mysql prompt:&lt;br /&gt;
 update user set passwd = &#039;your bcrypted pass&#039; where userid = 1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Zabbix and PSK==&lt;br /&gt;
See:&lt;br /&gt;
*[https://www.zabbix.com/documentation/5.2/en/manual/encryption/using_pre_shared_keys  Using pre-shared keys]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Updating multiple triggers/alerts==&lt;br /&gt;
Select them via &#039;&#039;&#039;Monitoring-&amp;gt;Problems&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Testing javascript==&lt;br /&gt;
 zabbix_js&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Zabbix maps==&lt;br /&gt;
* [https://www.zabbix.com/documentation/8.0/en/manual/config/visualization/maps/map maps]&lt;br /&gt;
===Add link===&lt;br /&gt;
&amp;quot;Two map elements should be selected&amp;quot;&lt;br /&gt;
Select one, hold control and select the other&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
==macro naming convention==&lt;br /&gt;
{$SOME.NAME} is better than {$SOME_NAME}&lt;br /&gt;
&lt;br /&gt;
==cannot convert value to numeric type==&lt;br /&gt;
Some javascript :)&lt;br /&gt;
&lt;br /&gt;
==Failed: cannot calculate delta (speed per second) for value of type &amp;quot;none&amp;quot;==&lt;br /&gt;
In preprocessing use Javascript to&lt;br /&gt;
 if ( &amp;quot;&amp;quot; == value ) { return 0; } else { return value; }&lt;br /&gt;
&lt;br /&gt;
==Handling division by zero==&lt;br /&gt;
In preprocessing find &amp;quot;Check for not supported&amp;quot;, &amp;quot;error matches&amp;quot; and add &amp;quot;division by zero&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==zabbix[proxy_buffer,state,current] not supported==&lt;br /&gt;
Zabbix proxy must be monitored by itself, not by server&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==What is this &amp;quot;$1&amp;quot; in item name?==&lt;br /&gt;
In older versions of zabbix this was first parameter of key, use the macros like {#SNMPVALUE}, {#FSNAME}, or {#IFNAME} now&lt;br /&gt;
&lt;br /&gt;
==Locations of Userparameters==&lt;br /&gt;
===Ubuntu===&lt;br /&gt;
 /etc/zabbix/agentd.d/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==What takes most space in the database?==&lt;br /&gt;
*[https://blog.zabbix.com/what-takes-disk-space/13349/ What takes disk space]&lt;br /&gt;
&lt;br /&gt;
==forced reloading of the snmp cache==&lt;br /&gt;
looks like nothing to worry about&lt;br /&gt;
&lt;br /&gt;
==Where is last userid stored?==&lt;br /&gt;
ids:&lt;br /&gt;
 table_name: users&lt;br /&gt;
 field_name: userid&lt;br /&gt;
 nextid: the next id &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SERVER ==&lt;br /&gt;
==Which items using most data in database?==&lt;br /&gt;
*[https://serverfault.com/questions/749397/zabbix-determine-what-item-checks-are-responsible-for-storing-the-most-data determine what item checks are responsible for storing the most data]&lt;br /&gt;
&lt;br /&gt;
 SELECT itemid, count(*) AS cnt FROM history GROUP BY itemid ORDER BY cnt DESC LIMIT 20;&lt;br /&gt;
or maybe&lt;br /&gt;
 SELECT h.itemid, i.name, count(*) AS cnt FROM history h, items i where h.itemid = i.itemid GROUP BY itemid ORDER BY cnt DESC limit 20;&lt;br /&gt;
=== Adjust loglevel ===&lt;br /&gt;
&lt;br /&gt;
 zabbix_server --runtime-control log_level_increase=trapper&lt;br /&gt;
       &lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== Reload zabbix server configuration ===&lt;br /&gt;
&lt;br /&gt;
You can&#039;t, but you might want&lt;br /&gt;
&lt;br /&gt;
 zabbix_server -c /etc/zabbix/zabbix_server.conf -R config_cache_reload&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== No media defined for user ===&lt;br /&gt;
&lt;br /&gt;
=== The frontend does not match Zabbix database. ===&lt;br /&gt;
&lt;br /&gt;
Probably version conflict between frontend and server&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== value cache working in low memory mode ===&lt;br /&gt;
&lt;br /&gt;
Increase ValueCacheSize&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Message from 1.2.3.4 is missing header. Message ignored. ===&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== PROXY ==&lt;br /&gt;
&lt;br /&gt;
[[ Zabbix Proxy ]]&lt;br /&gt;
&lt;br /&gt;
===cannot send proxy data to server===&lt;br /&gt;
empty string received&lt;br /&gt;
&lt;br /&gt;
===failed to update local proxy configuration copy: unexpected field &amp;quot;host_inventory.type&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Front end ==&lt;br /&gt;
&lt;br /&gt;
===Round numbers===&lt;br /&gt;
Preprocessing javascript&lt;br /&gt;
2 decimals:&lt;br /&gt;
 return Math.round(value* 100) / 100&lt;br /&gt;
0 decimals:&lt;br /&gt;
 return Math.round(value)&lt;br /&gt;
&lt;br /&gt;
=== Visable name vs hostname ===&lt;br /&gt;
&lt;br /&gt;
Visible name: {HOST.NAME}&lt;br /&gt;
&lt;br /&gt;
Hostname: {HOST.HOST}&lt;br /&gt;
&lt;br /&gt;
Host IP: (as defined in Interface-&amp;gt;IP/DNS) {HOST.CONN}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Acknowledge multiple items ===&lt;br /&gt;
&lt;br /&gt;
Monitor-&amp;gt;Problems apply filters, select all, mass update&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== No permissions to referred object or it does not exist! ===&lt;br /&gt;
&lt;br /&gt;
Graph no longer exists. Probably items no longer discovered&lt;br /&gt;
&lt;br /&gt;
Maybe you&#039;ve been editing a template file, remember to replace template name everywhere&lt;br /&gt;
&lt;br /&gt;
=== Cannot add host ===&lt;br /&gt;
&lt;br /&gt;
??&lt;br /&gt;
===match for value of type &amp;quot;none&amp;quot;: pattern does not match===&lt;br /&gt;
Agent returning empty string?&lt;br /&gt;
&lt;br /&gt;
== Monitoring SNMP ==&lt;br /&gt;
===Cannot find module (IF-MIB): At line 1 in (none)===&lt;br /&gt;
 apt install snmp-mibs-downloader&lt;br /&gt;
and restart zabbix-proxy&lt;br /&gt;
&lt;br /&gt;
=== Cannot find host interface on &amp;quot;xxxhost&amp;quot; for item key foo ===&lt;br /&gt;
&lt;br /&gt;
Might mean you&#039;re trying to import an SNMP template before configuring SNMP for the host&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== No SNMP data ===&lt;br /&gt;
&lt;br /&gt;
=== snmp_parse_oid(): cannot parse OID &amp;quot;IF-MIB::ifSpeed.3 ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Timeout while connecting===&lt;br /&gt;
Could be wrong community string, remember delay when using proxy.&lt;br /&gt;
&lt;br /&gt;
== Agent side ping check ==&lt;br /&gt;
&lt;br /&gt;
 UserParameter=pingtime[*],fping -e $1|sed &#039;s/^.*(\([0-9].*\) ms).*$/\1/g&#039;&lt;br /&gt;
 UserParameter=pingalive[*],fping $1|grep -q alive;echo $?&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==LLD/Discovery==&lt;br /&gt;
=== Discover: value must be a JSON object ===&lt;br /&gt;
&lt;br /&gt;
Could mean you need to escape slashes, check output with zabbix_get&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Cannot create item: item with the same key already exists===&lt;br /&gt;
make sure the key contains &amp;quot;{#SOMENAME}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Discovery data example ==&lt;br /&gt;
&lt;br /&gt;
Output of a discovery script should look like:&lt;br /&gt;
&lt;br /&gt;
 {&amp;quot;data&amp;quot;:[&lt;br /&gt;
   {&amp;quot;{#VAR1}&amp;quot;:&amp;quot;value11&amp;quot;,&amp;quot;#{VAR2&amp;quot;:&amp;quot;value12&amp;quot;},&lt;br /&gt;
   {&amp;quot;{#VAR1}&amp;quot;:&amp;quot;value21&amp;quot;,&amp;quot;#{VAR2&amp;quot;:&amp;quot;value22&amp;quot;}&lt;br /&gt;
 ]}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== IPMI ==&lt;br /&gt;
&lt;br /&gt;
=== IPMI Monitoring account for zabbix ===&lt;br /&gt;
&lt;br /&gt;
[https://www.thomas-krenn.com/en/wiki/Configuring_IPMI_under_Linux_using_ipmitool https://www.thomas-krenn.com/en/wiki/Configuring_IPMI_under_Linux_using_ipmitool]&lt;br /&gt;
&lt;br /&gt;
 ipmitool user set name 3 monitor&lt;br /&gt;
 ipmitool user set password 3&lt;br /&gt;
 ipmitool channel setaccess 1 3 link=on ipmi=on callin=on privilege=2&lt;br /&gt;
 ipmitool user enable 3&lt;br /&gt;
&lt;br /&gt;
To test these:&lt;br /&gt;
 ipmitool -I lanplus -H &amp;lt;host&amp;gt; -L USER -U monitor sdr elist full&lt;br /&gt;
&lt;br /&gt;
===Zabbix credentials===&lt;br /&gt;
====Privilege Level====&lt;br /&gt;
 User&lt;br /&gt;
&lt;br /&gt;
====Authentication algorithm====&lt;br /&gt;
 Default&lt;br /&gt;
but what is that?&lt;br /&gt;
&lt;br /&gt;
=== cannot connect to IPMI host: [22] Operation canceled ===&lt;br /&gt;
&lt;br /&gt;
Usually temporary because of broken ipmi lib, ignore it&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== cannot connect to IPMI host: [16777411] Unknown error 16777411 ===&lt;br /&gt;
&lt;br /&gt;
classic, probably authentication problem&lt;br /&gt;
&lt;br /&gt;
=== cannot connect to IPMI host: [22] Invalid argument ===&lt;br /&gt;
wrong password/credentials?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===IPMI pollers are disabled in configuration===&lt;br /&gt;
Check&lt;br /&gt;
 StartIPMIPollers&lt;br /&gt;
in server/proxy configuration&lt;br /&gt;
&lt;br /&gt;
=== Cannot connect to IPMI host: [2] No such file or directory===&lt;br /&gt;
??&lt;br /&gt;
&lt;br /&gt;
== zabbix_sender ==&lt;br /&gt;
&lt;br /&gt;
=== processed: 0; failed: 1 ===&lt;br /&gt;
&lt;br /&gt;
Possible causes:&lt;br /&gt;
&lt;br /&gt;
*incorrect hostname &lt;br /&gt;
*incorrect item key &lt;br /&gt;
*item not in the server configuration cache yet &lt;br /&gt;
*Allowed hosts in trapper item &lt;br /&gt;
*phase of moon &lt;br /&gt;
*aliens &lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== Testing zabbix_sender ===&lt;br /&gt;
&lt;br /&gt;
 zabbix_sender stuff&lt;br /&gt;
&lt;br /&gt;
== Filters ==&lt;br /&gt;
&lt;br /&gt;
The regular expressions referred to in discovery are found under Administration-&amp;gt;General, and then &amp;quot;Regular expressions&amp;quot; in the dropdown at top right of the page&lt;br /&gt;
&lt;br /&gt;
=== cannot connect to IPMI host: [125] Operation canceled ===&lt;br /&gt;
&lt;br /&gt;
possibly authentication method issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
== Calculated items ==&lt;br /&gt;
See [https://blog.zabbix.com/zabbix-monitoring-with-calculated-items-explained/9950/ Calculated items explained]&lt;br /&gt;
=== Cannot create item: Invalid first parameter ===&lt;br /&gt;
For calculated items use last(&amp;quot;youritemkey&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
=== Cannot create item, error in formula ===&lt;br /&gt;
Problably a calculated item, try doublequoting the item key:&lt;br /&gt;
&lt;br /&gt;
 last(&amp;quot;foo[bar]&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
===Invalid parameter &amp;quot;/1/params&amp;quot;===&lt;br /&gt;
Maybe forgot to use last()?&lt;br /&gt;
You might need to doublequote your items, or prepend with double slashes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Reset trigger/alert ==&lt;br /&gt;
For example when you changed the settings &lt;br /&gt;
Just disable, wait a bit and enable again.&lt;br /&gt;
== Install recent zabbix on CentOS/RHEL ==&lt;br /&gt;
&lt;br /&gt;
 rpm -ivh [https://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm https://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm]&lt;br /&gt;
 yum install zabbix-agent&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Backing up tables ==&lt;br /&gt;
&lt;br /&gt;
[https://www.zabbix.org/wiki/Docs/howto/mysql_backup_script https://www.zabbix.org/wiki/Docs/howto/mysql_backup_script]&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== cannot send list of active checks ==&lt;br /&gt;
Verify hostname:&lt;br /&gt;
 /usr/sbin/zabbix_agentd -t &#039;agent.hostname&#039;&lt;br /&gt;
&lt;br /&gt;
If in agent log: most likely ServerActive is defined in agent config, while not used at all&lt;br /&gt;
&lt;br /&gt;
It is also possible agent is sending some active check to server while host is monitored via proxy.&lt;br /&gt;
&lt;br /&gt;
In proxy/server log:&lt;br /&gt;
most likely &#039;&#039;&#039;Hostname&#039;&#039;&#039; in agent config does not match hostname used on server.&lt;br /&gt;
&lt;br /&gt;
==cannot send list of active checks to &amp;quot;127.0.0.1&amp;quot;: host [Zabbix server] not found==&lt;br /&gt;
??&lt;br /&gt;
&lt;br /&gt;
== active check configuration update started to fail ==&lt;br /&gt;
&lt;br /&gt;
??&lt;br /&gt;
&lt;br /&gt;
== Latest 20 issues ==&lt;br /&gt;
&lt;br /&gt;
DEFAULT_LATEST_ISSUES_CNT in/usr/share/zabbix/include/defines.inc.php&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== Zabbix unreachable poller processes more than 75% busy ==&lt;br /&gt;
&lt;br /&gt;
Increase &#039;&#039;&#039;StartPollersUnreachable&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== Zabbix poller processes more than 75% busy ==&lt;br /&gt;
&lt;br /&gt;
Maybe StartPollersUnreachable?&lt;br /&gt;
&lt;br /&gt;
== More than 100 items having missing data for more than 10 minutes ==&lt;br /&gt;
&lt;br /&gt;
Could be high load. Also check Administration-&amp;gt;Queue&lt;br /&gt;
&lt;br /&gt;
== Zabbix escalator processes more than 75% busy ==&lt;br /&gt;
&lt;br /&gt;
probably high system load overall&lt;br /&gt;
&lt;br /&gt;
== Check agent ==&lt;br /&gt;
&lt;br /&gt;
 zabbix_get -s my.host.com -k agent.version&lt;br /&gt;
&lt;br /&gt;
== ZBX_NOTSUPPORTED ==&lt;br /&gt;
&lt;br /&gt;
Could be anything, enable logging on agent. It could be version mismatch. Check&lt;br /&gt;
&lt;br /&gt;
 zabbix_get -s yourhost -k agent.version&lt;br /&gt;
&lt;br /&gt;
If that works, you&#039;re calling for an undefined or unsupported key.&lt;br /&gt;
&lt;br /&gt;
== Incorrect trigger expression. Host &amp;quot;xx&amp;quot; does not exist or you have no access to this host. ==&lt;br /&gt;
&lt;br /&gt;
Means there&#039;s no related item.&lt;br /&gt;
&lt;br /&gt;
== zabbix_get returns nothing ==&lt;br /&gt;
&lt;br /&gt;
best look at log on agent side&lt;br /&gt;
&lt;br /&gt;
== run playbook on single host ==&lt;br /&gt;
&lt;br /&gt;
 ansible_playbook -l somehost somplay.yml&lt;br /&gt;
&lt;br /&gt;
[[:Category:Monitoring]]&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== Zabbix server is not running: the information displayed may not be current ==&lt;br /&gt;
&lt;br /&gt;
Might be selinux: [http://sysads.co.uk/2013/11/zabbix-server-running-alert/ http://sysads.co.uk/2013/11/zabbix-server-running-alert/]&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== Monitoring vmware ==&lt;br /&gt;
&lt;br /&gt;
=== vmware.hv.cpu.usage[{$URL},{HOST.HOST}]&amp;quot; became not supported: Couldn&#039;t resolve host name ===&lt;br /&gt;
&lt;br /&gt;
 Set macro {$URL} to [https://your.ip/sdk/ https://your.ip/sdk/] (shouldn&#039;t discovery figure that out from {$HOST}&amp;amp;nbsp;?&lt;br /&gt;
       &lt;br /&gt;
&lt;br /&gt;
=== Couldn&#039;t resolve host name ===&lt;br /&gt;
&lt;br /&gt;
Sometimes it&#039;s a matter of waiting a few hours&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== vmware events collector returned empty result ===&lt;br /&gt;
&lt;br /&gt;
???&lt;br /&gt;
&lt;br /&gt;
=== No &amp;quot;vmware collector&amp;quot; processes started. ===&lt;br /&gt;
&lt;br /&gt;
Check StartVMwareCollectors on server or proxy&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== unsupported item key ==&lt;br /&gt;
&lt;br /&gt;
This might mean it&#039;s expecting a value from the script you&#039;re calling.&lt;br /&gt;
&lt;br /&gt;
 echo 1&lt;br /&gt;
remember: not supported is not disabled, server/proxy will try again after interval &lt;br /&gt;
&lt;br /&gt;
=== became not supported: Not supported by Zabbix Agent ===&lt;br /&gt;
&lt;br /&gt;
probably output by userparameter/script&lt;br /&gt;
&lt;br /&gt;
== ansible or API not showing host groups ==&lt;br /&gt;
&lt;br /&gt;
Permissions!! See Administration-&amp;gt;User Groups&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== failed to update local proxy configuration copy: invalid field name &amp;quot;items.lastlogsize&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
check everything&amp;amp;nbsp;:)&lt;br /&gt;
&lt;br /&gt;
== Received value [11] is not suitable for value type [Numeric (unsigned)] and data type [Decimal] ==&lt;br /&gt;
&lt;br /&gt;
 This probably means the agent returned 1\n1&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== database is down: retrying in 10 seconds ==&lt;br /&gt;
&lt;br /&gt;
try upping max_connections&lt;br /&gt;
&lt;br /&gt;
== [Incorrect key file for table &#039;items&#039;; try to repair it ==&lt;br /&gt;
&lt;br /&gt;
Could be something /tmp related&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== another network error, wait for 8 seconds ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;UnreachableDelay&#039;&#039;&#039;=8&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== failed: first network error, wait for XY seconds ==&lt;br /&gt;
&lt;br /&gt;
Waits for UnreachableDelay seconds before trying again&lt;br /&gt;
&lt;br /&gt;
Loglevel LOG_LEVEL_WARNING&lt;br /&gt;
&lt;br /&gt;
== no active checks on server ==&lt;br /&gt;
*Hostname in agent config (-kagent.hostname) must match name on server&lt;br /&gt;
*simple no connection possible? firewall?&lt;br /&gt;
*maybe the host was configured to be monitored by (another) proxy?&lt;br /&gt;
&lt;br /&gt;
== show cpu utilization ==&lt;br /&gt;
&lt;br /&gt;
Monitoring-&amp;gt;host-&amp;gt;graphs&lt;br /&gt;
&lt;br /&gt;
===fuzzytime on command line===&lt;br /&gt;
 TS=lotsofseconds&lt;br /&gt;
#output in hours&lt;br /&gt;
 echo $(( ($(date +%s) - $TS) / 3600 ))&lt;br /&gt;
&lt;br /&gt;
==duplicate entry adding user/group==&lt;br /&gt;
Check table &#039;ids&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
===zabbix_get: no route to host===&lt;br /&gt;
Check the firewall&lt;br /&gt;
&lt;br /&gt;
=Error messages=&lt;br /&gt;
==Error: Zabbix API library must be installed==&lt;br /&gt;
 pip install zabbix_utils&lt;br /&gt;
OR&lt;br /&gt;
 pip install zabbix-api&lt;br /&gt;
&lt;br /&gt;
==Get value from agent failed: cannot connect to [[xx]:10050]: [4] Interrupted system call==&lt;br /&gt;
Check firewall?&lt;br /&gt;
&lt;br /&gt;
==connection error (POLLERR,POLLHUP)==&lt;br /&gt;
probably firewall&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Agent error messages==&lt;br /&gt;
===unspecified certificate verification error: TLS handshake set result code to 5:===&lt;br /&gt;
Try restarting agent.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==zabbix : problem with defaults entries ==&lt;br /&gt;
Could be sudo/resolving problem&lt;br /&gt;
&lt;br /&gt;
[[Category:Monitoring]]&lt;br /&gt;
[[Category:Zabbix]]&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Matomo&amp;diff=10504</id>
		<title>Matomo</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Matomo&amp;diff=10504"/>
		<updated>2026-06-12T09:02:20Z</updated>

		<summary type="html">&lt;p&gt;Tony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Links=&lt;br /&gt;
*[https://matomo.org/ Matomo Homepage]&lt;br /&gt;
&lt;br /&gt;
=Documentation=&lt;br /&gt;
==On Premise==&lt;br /&gt;
*[https://matomo.org/faq/on-premise/matomo-core-and-plugin-configuration-files/ Matomo Core and Plugin Configuration files]&lt;br /&gt;
&lt;br /&gt;
=FAQ=&lt;br /&gt;
==Error messages==&lt;br /&gt;
===Error when connecting to Matomo===&lt;br /&gt;
?&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Matomo&amp;diff=10503</id>
		<title>Matomo</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Matomo&amp;diff=10503"/>
		<updated>2026-06-12T07:22:34Z</updated>

		<summary type="html">&lt;p&gt;Tony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Links=&lt;br /&gt;
*[https://matomo.org/ Matomo Homepage]&lt;br /&gt;
&lt;br /&gt;
=FAQ=&lt;br /&gt;
==Error messages==&lt;br /&gt;
===Error when connecting to Matomo===&lt;br /&gt;
?&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=WKD&amp;diff=10502</id>
		<title>WKD</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=WKD&amp;diff=10502"/>
		<updated>2026-06-11T12:49:56Z</updated>

		<summary type="html">&lt;p&gt;Tony: /* Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;W&#039;&#039;&#039;eb &#039;&#039;&#039;K&#039;&#039;&#039;ey &#039;&#039;&#039;D&#039;&#039;&#039;irectory&lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
*[https://www.webkeydirectory.com/set-up-wkd Set up WKD]&lt;br /&gt;
&lt;br /&gt;
=FAQ=&lt;br /&gt;
&lt;br /&gt;
==The Access-Control-Allow-Origin: * header is needed to allow OpenPGP==&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=WKD&amp;diff=10501</id>
		<title>WKD</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=WKD&amp;diff=10501"/>
		<updated>2026-06-11T12:45:02Z</updated>

		<summary type="html">&lt;p&gt;Tony: Created page with &amp;quot;&amp;#039;&amp;#039;&amp;#039;W&amp;#039;&amp;#039;&amp;#039;eb &amp;#039;&amp;#039;&amp;#039;K&amp;#039;&amp;#039;&amp;#039;ey &amp;#039;&amp;#039;&amp;#039;D&amp;#039;&amp;#039;&amp;#039;irectory  =Links= *[https://www.webkeydirectory.com/set-up-wkd Set up WKD] *[  =FAQ=  ==The Access-Control-Allow-Origin: * header is needed to allow OpenPGP==&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;W&#039;&#039;&#039;eb &#039;&#039;&#039;K&#039;&#039;&#039;ey &#039;&#039;&#039;D&#039;&#039;&#039;irectory&lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
*[https://www.webkeydirectory.com/set-up-wkd Set up WKD]&lt;br /&gt;
*[&lt;br /&gt;
&lt;br /&gt;
=FAQ=&lt;br /&gt;
&lt;br /&gt;
==The Access-Control-Allow-Origin: * header is needed to allow OpenPGP==&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Matomo&amp;diff=10500</id>
		<title>Matomo</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Matomo&amp;diff=10500"/>
		<updated>2026-06-11T07:58:10Z</updated>

		<summary type="html">&lt;p&gt;Tony: Created page with &amp;quot;=FAQ= ==Error messages== ===Error when connecting to Matomo=== ?&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=FAQ=&lt;br /&gt;
==Error messages==&lt;br /&gt;
===Error when connecting to Matomo===&lt;br /&gt;
?&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Bash&amp;diff=10499</id>
		<title>Bash</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Bash&amp;diff=10499"/>
		<updated>2026-06-10T11:49:28Z</updated>

		<summary type="html">&lt;p&gt;Tony: /* Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Links=&lt;br /&gt;
*[http://www.gnu.org/software/bash/bash.html Homepage] &lt;br /&gt;
&lt;br /&gt;
*[http://www.linuxdoc.org/HOWTO/Bash-Prog-Intro-HOWTO.html http://www.linuxdoc.org/HOWTO/Bash-Prog-Intro-HOWTO.html] &lt;br /&gt;
*[http://en.tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html Bash Guide for Beginners] &lt;br /&gt;
*[http://www.ling.helsinki.fi/users/reriksso/unix/shell.html http://www.ling.helsinki.fi/users/reriksso/unix/shell.html] &lt;br /&gt;
*[http://en.tldp.org/LDP/abs/html/ Advanced Bash Scripting Guide] &lt;br /&gt;
*[http://www.freeos.com/guides/lsst/ Linux Shell Scripting Tutorial] &lt;br /&gt;
*[http://subsignal.org/doc/AliensBashTutorial.html Aliens Bash Tutorial] &lt;br /&gt;
&lt;br /&gt;
*[https://www.cyberciti.biz/faq/bash-shell-change-the-color-of-my-shell-prompt-under-linux-or-unix/ Change colour of bash prompt]&lt;br /&gt;
&lt;br /&gt;
==Keyboard shortcuts==&lt;br /&gt;
*[http://teohm.com/blog/shortcuts-to-move-faster-in-bash-command-line/ Shortcuts to move faster in Bash command line] &lt;br /&gt;
*[http://www.skorks.com/2009/09/bash-shortcuts-for-maximum-productivity/ http://www.skorks.com/2009/09/bash-shortcuts-for-maximum-productivity/] &lt;br /&gt;
*[https://ss64.com/bash/syntax-keyboard.html Bash Keyboard Shortcuts]&lt;br /&gt;
*[https://gist.github.com/memphys/2225770 Command Editing Shortcuts]&lt;br /&gt;
&lt;br /&gt;
=HOWTO=&lt;br /&gt;
==alias==&lt;br /&gt;
&lt;br /&gt;
= Tips and tricks =&lt;br /&gt;
&lt;br /&gt;
==Check if script is running as root==&lt;br /&gt;
 if [ $EUID -eq 0 ];then&lt;br /&gt;
&lt;br /&gt;
==Globbing==&lt;br /&gt;
===Globbing except strings===&lt;br /&gt;
 GLOBIGNORE=&amp;quot;*.error.log&amp;quot;&lt;br /&gt;
===List only dot files===&lt;br /&gt;
To show only files or directories with names starting with &#039;.&#039;:&lt;br /&gt;
 ls .?*&lt;br /&gt;
&lt;br /&gt;
== String manipulation ==&lt;br /&gt;
&lt;br /&gt;
=== Remove character from string ===&lt;br /&gt;
&lt;br /&gt;
 VERSION=&#039;2.3.3&#039;&lt;br /&gt;
 echo &amp;quot;${VERSION//.}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Replace all characters in a string===&lt;br /&gt;
Replace all x,y,z with _:&lt;br /&gt;
 &amp;quot;${var//+([xyz])/_}&amp;quot;&lt;br /&gt;
requires extended pattern matching&lt;br /&gt;
 shopt -s extglob&lt;br /&gt;
&lt;br /&gt;
=== check if var contains substring ===&lt;br /&gt;
&lt;br /&gt;
 if &amp;amp;#91;&amp;amp;#91; &amp;quot;$foo&amp;quot; =~ &amp;quot;.*sub.*&amp;quot; &amp;amp;#93;&amp;amp;#93;&lt;br /&gt;
&lt;br /&gt;
=== get first character of a string ===&lt;br /&gt;
&lt;br /&gt;
 FIRST=${STRING:0:1}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Split string to words===&lt;br /&gt;
 read -ra words &amp;lt;&amp;lt;&amp;lt; &amp;quot;$string&amp;quot;&lt;br /&gt;
 echo ${words[2]}&lt;br /&gt;
&lt;br /&gt;
== Date manipulation ==&lt;br /&gt;
===Age of a file ===&lt;br /&gt;
 stat -C %Y $FILE&lt;br /&gt;
&lt;br /&gt;
== read without while loop ==&lt;br /&gt;
&lt;br /&gt;
The problem is scope, try&lt;br /&gt;
&lt;br /&gt;
 echo foo bar | { read a b;echo $b; }&lt;br /&gt;
&lt;br /&gt;
== check if variable is integer ==&lt;br /&gt;
&lt;br /&gt;
 if [[$foo =~ ^[0-9]+$]]&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== move cursor ==&lt;br /&gt;
&lt;br /&gt;
 ^b move back 1 char&lt;br /&gt;
 ^f move forward 1 char&lt;br /&gt;
 alt-b move back 1 word&lt;br /&gt;
 alf-f move forward 1 word&lt;br /&gt;
&lt;br /&gt;
== loops ==&lt;br /&gt;
&lt;br /&gt;
=== loop through range of numbers ===&lt;br /&gt;
&lt;br /&gt;
 for i in {0..10};do echo $i;done&lt;br /&gt;
or with variable&lt;br /&gt;
 M=10&lt;br /&gt;
 for i in $(seq 0 $M);do echo $i;done&lt;br /&gt;
&lt;br /&gt;
=== exit while loop ===&lt;br /&gt;
&lt;br /&gt;
 break&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== skip one in loop ===&lt;br /&gt;
&lt;br /&gt;
 continue&lt;br /&gt;
&lt;br /&gt;
== bash history timestamp ==&lt;br /&gt;
&lt;br /&gt;
 HISTTIMEFORMAT=&amp;quot;%y/%m/%d %T &amp;quot;&lt;br /&gt;
&lt;br /&gt;
== screen and bash history ==&lt;br /&gt;
&lt;br /&gt;
To make sure all screens write to same history (at least on CentOS and RHEL):&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;history -a;history -r&amp;quot; &amp;gt; /etc/sysconfig/bash-prompt-screen&lt;br /&gt;
 chmod +x /etc/sysconfig/bash-prompt-screen&lt;br /&gt;
&lt;br /&gt;
In general:&lt;br /&gt;
&lt;br /&gt;
 export PROMPT_COMMAND=&#039;history -n&#039;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 export PROMPT_COMMAND=&amp;quot;history -a; history -c; history -r; ${PROMPT_COMMAND}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== add extensions to filenames ==&lt;br /&gt;
&lt;br /&gt;
 find . -type f |while read i;do if [[!_$i_=~_.*.txt|! $i =~ .*.txt]];then mv -v $i $i.txt;fi;done&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== bash functions ==&lt;br /&gt;
&lt;br /&gt;
 function foo() {&lt;br /&gt;
    echo &amp;quot;one: $1 two: $2&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
 foo &amp;quot;first param&amp;quot; 2&lt;br /&gt;
&lt;br /&gt;
=== convert units ===&lt;br /&gt;
&lt;br /&gt;
 function convertunits() {&lt;br /&gt;
&lt;br /&gt;
        C=&amp;quot;$1&amp;quot;&lt;br /&gt;
        U=&amp;quot;$2&amp;quot;&lt;br /&gt;
        debug &amp;quot;converting $C $U&amp;quot;&lt;br /&gt;
        case $U in&lt;br /&gt;
                &amp;quot;KiB&amp;quot;) O=$((C*1000))&amp;amp;nbsp;;;&lt;br /&gt;
                &amp;quot;MiB&amp;quot;) O=$((C*1000*1000))&amp;amp;nbsp;;;&lt;br /&gt;
                &amp;quot;GiB&amp;quot;) O=$((C*1000*1000*1000))&amp;amp;nbsp;;;&lt;br /&gt;
                &amp;quot;TiB&amp;quot;) O=$((C*1000*1000*1000*1000))&amp;amp;nbsp;;;&lt;br /&gt;
                *) O=&amp;quot;convert error in $U&amp;quot;&amp;amp;nbsp;;;&lt;br /&gt;
        esac&lt;br /&gt;
        if [ -z &amp;quot;$O&amp;quot; ];then O=&amp;quot;convert_error for unit $U&amp;quot;;fi&lt;br /&gt;
        echo &amp;quot;$O&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Check if disk is mounted ==&lt;br /&gt;
&lt;br /&gt;
 mountpoint /mnt/foo&lt;br /&gt;
== Get local IP address ==&lt;br /&gt;
 ip route get 1 | awk &#039;{print $NF;exit}&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Find depth of a directory ==&lt;br /&gt;
 find /foo -type d | awk -F&amp;quot;/&amp;quot; &#039;NF &amp;gt; max {max = NF} END {print max}&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==List only directories==&lt;br /&gt;
 ls -d */&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Small random number==&lt;br /&gt;
 echo $((RANDOM/100+1))&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
==Login shell vs interactive shell==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== unary operator expected ==&lt;br /&gt;
&lt;br /&gt;
try qouting your vars&lt;br /&gt;
  [[Category:Scripting]] [[Category:Programming]] [[Category:Shell]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== failing I-search backward ==&lt;br /&gt;
When stuck at that, try&lt;br /&gt;
 ^g&lt;br /&gt;
==bash: printf: 60.29: invalid number==&lt;br /&gt;
Check $LC_NUMERIC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Variable scope in while loop==&lt;br /&gt;
 N=0&lt;br /&gt;
 shopt -s lastpipe&lt;br /&gt;
 foo | while read i&lt;br /&gt;
 do&lt;br /&gt;
  N=$((N+1))&lt;br /&gt;
 etc&lt;br /&gt;
 done&lt;br /&gt;
 echo $N&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Docker&amp;diff=10498</id>
		<title>Docker</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Docker&amp;diff=10498"/>
		<updated>2026-06-10T09:14:01Z</updated>

		<summary type="html">&lt;p&gt;Tony: /* HOWTO */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Links=&lt;br /&gt;
*[https://www.docker.com/ Homepage]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Docs=&lt;br /&gt;
*[https://docs.docker.com/manuals/ The Docker Manuals]&lt;br /&gt;
*[https://docs.docker.com/compose Docker-compose]&lt;br /&gt;
*https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-centos-7&lt;br /&gt;
*[https://www.digitalocean.com/community/tutorials/how-to-remove-docker-images-containers-and-volumes Removing images, containers and volumes]&lt;br /&gt;
*[https://training.play-with-docker.com/beginner-linux/ Docker for beginners]&lt;br /&gt;
*[https://runnable.com/docker/basic-docker-networking Docker networking]&lt;br /&gt;
*[https://docs.docker.com/config/pruning/ Docker pruning]&lt;br /&gt;
*[https://www.virtualizationhowto.com/2023/11/docker-overlay2-cleanup-5-ways-to-reclaim-disk-space/ Docker Overlay2 Cleanup: 5 Ways to Reclaim Disk Space]&lt;br /&gt;
&lt;br /&gt;
=HOWTO=&lt;br /&gt;
==Run container==&lt;br /&gt;
 docker run &amp;lt;IMAGE ID&amp;gt;&lt;br /&gt;
==List running containers==&lt;br /&gt;
 docker ps&lt;br /&gt;
&lt;br /&gt;
==List containers==&lt;br /&gt;
 docker ps -a&lt;br /&gt;
&lt;br /&gt;
==Start container==&lt;br /&gt;
 docker start &amp;lt;name&amp;gt;&lt;br /&gt;
name as found with docker ps -a&lt;br /&gt;
==Add parameter to existing container==&lt;br /&gt;
 docker update --my-param 1234 mycontainer&lt;br /&gt;
&lt;br /&gt;
==Show log==&lt;br /&gt;
 docker logs &amp;lt;container&amp;gt;&lt;br /&gt;
or to follow:&lt;br /&gt;
 docker logs -f &amp;lt;container&amp;gt;&lt;br /&gt;
==Show disk usage==&lt;br /&gt;
*https://niklasmtj.de/blog/understand-docker-storage/&lt;br /&gt;
&lt;br /&gt;
 docker system df&lt;br /&gt;
&lt;br /&gt;
outputs:&lt;br /&gt;
 TYPE            TOTAL     ACTIVE    SIZE      RECLAIMABLE&lt;br /&gt;
 Images          27        10        11.35GB   5.72GB (50%)&lt;br /&gt;
 Containers      12        12        123.6MB   0B (0%)&lt;br /&gt;
 Local Volumes   0         0         0B        0B&lt;br /&gt;
 Build Cache     0         0         0B        0B&lt;br /&gt;
===RECLAIMABLE===&lt;br /&gt;
Is what you get back when running&lt;br /&gt;
 docker system prune -a&lt;br /&gt;
&lt;br /&gt;
==List images==&lt;br /&gt;
 docker images&lt;br /&gt;
&lt;br /&gt;
==Remove image==&lt;br /&gt;
===docker rm===&lt;br /&gt;
removes container&lt;br /&gt;
 docker ps -a&lt;br /&gt;
and then&lt;br /&gt;
 docker rm &amp;lt;container id&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===docker rmi===&lt;br /&gt;
alias for &#039;&#039;&#039;docker image rm&#039;&#039;&#039;&lt;br /&gt;
 docker image ls&lt;br /&gt;
and then&lt;br /&gt;
 docker rmi &amp;lt;ID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Export image==&lt;br /&gt;
 docker save &amp;lt;image name&amp;gt; &amp;gt; imagename.tar&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Update image==&lt;br /&gt;
 docker pull imagename&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Get shell in running container==&lt;br /&gt;
To get image name&lt;br /&gt;
 docker ps&lt;br /&gt;
then&lt;br /&gt;
 docker exec -it &amp;lt;image-id&amp;gt; bash&lt;br /&gt;
&lt;br /&gt;
==Network==&lt;br /&gt;
 docker network ls&lt;br /&gt;
 docker network inspect&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==image has dependent child images==&lt;br /&gt;
 docker inspect --format=&#039;{{.Id}} {{.Parent}}&#039; $(docker images --filter since=&amp;lt;image_id&amp;gt; -q)&lt;br /&gt;
or get [https://github.com/justone/dockviz dockviz] and run&lt;br /&gt;
 dockviz images --tree -l&lt;br /&gt;
&lt;br /&gt;
==Dangling images==&lt;br /&gt;
===list dangling images===&lt;br /&gt;
 docker images -f dangling=true&lt;br /&gt;
&lt;br /&gt;
===Remove dangling image===&lt;br /&gt;
 docker rmi image-id&lt;br /&gt;
====Errors/warnings====&lt;br /&gt;
=====Error response from daemon: conflict: unable to delete 9e82ccb228df (must be forced) - image is being used by stopped container a14fb2b549f1=====&lt;br /&gt;
Find the culprit with&lt;br /&gt;
 docker ps -a&lt;br /&gt;
and then&lt;br /&gt;
 docker rm &amp;lt;id you find&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Remove all dangling images===&lt;br /&gt;
 docker rmi $(docker images -f dangling=true -q)&lt;br /&gt;
&lt;br /&gt;
==image is being used by stopped container xyz==&lt;br /&gt;
 docker rm xyz&lt;br /&gt;
and try again&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Backups==&lt;br /&gt;
*https://linuxconfig.org/docker-container-backup-and-recovery&lt;br /&gt;
*[https://bobcares.com/blog/docker-backup/ Docker - Easy backup &amp;amp; restore]&lt;br /&gt;
&lt;br /&gt;
=FAQ=&lt;br /&gt;
==Error messages==&lt;br /&gt;
===The container name &amp;quot;/mycontainer&amp;quot; is already in use by container===&lt;br /&gt;
It already exists, so use&lt;br /&gt;
 docker start &amp;lt;container id&amp;gt;&lt;br /&gt;
instead of&lt;br /&gt;
 docker run&lt;br /&gt;
&lt;br /&gt;
OR find the culprit&lt;br /&gt;
 docker ps -a&lt;br /&gt;
and then&lt;br /&gt;
 docker rm container/name&lt;br /&gt;
etc&lt;br /&gt;
&lt;br /&gt;
===ERROR: failed to solve: failed to read dockerfile: open Dockerfile: no such file or directory===&lt;br /&gt;
It really wants a file called &#039;&#039;&#039;Dockerfile&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===docker.service: Start request repeated too quickly===&lt;br /&gt;
Try&lt;br /&gt;
 dockerd --debug&lt;br /&gt;
&lt;br /&gt;
===dial unix /var/run/docker.sock: connect: permission denied===&lt;br /&gt;
You&#039;re not in group &#039;&#039;&#039;docker&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===docker rmi===&lt;br /&gt;
 Error response from daemon: reference does not exist&lt;br /&gt;
See https://www.baeldung.com/linux/docker-image-deletion-problem-fix&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Address already in use===&lt;br /&gt;
First try&lt;br /&gt;
 lsof -i:8080&lt;br /&gt;
&lt;br /&gt;
==Compose==&lt;br /&gt;
===unknown shorthand flag: &#039;d&#039; in -d===&lt;br /&gt;
docker-compose is probably a script/wrapper.&lt;br /&gt;
Install the https://docs.docker.com/engine/install/debian/&lt;br /&gt;
&lt;br /&gt;
===docker: &#039;compose&#039; is not a docker command.===&lt;br /&gt;
Check https://docs.docker.com/engine/install/debian/&lt;br /&gt;
&lt;br /&gt;
===unknown flag: --detach===&lt;br /&gt;
 apt install docker-compose-v2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== image is being used by stopped container===&lt;br /&gt;
use the force&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Docker rmi not freeing space==&lt;br /&gt;
Correct, you need&lt;br /&gt;
 docker image prune&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Apt&amp;diff=10497</id>
		<title>Apt</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Apt&amp;diff=10497"/>
		<updated>2026-06-09T14:30:33Z</updated>

		<summary type="html">&lt;p&gt;Tony: /* Extract files from .deb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
Debian/Ubuntu package manager&lt;br /&gt;
&lt;br /&gt;
=Documentation=&lt;br /&gt;
==Phased Packages==&lt;br /&gt;
* [https://documentation.ubuntu.com/server/explanation/software/about-apt-upgrade-and-phased-updates/index.html About apt upgrade and phased updates]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Unattended upgrades=&lt;br /&gt;
==Links==&lt;br /&gt;
*https://help.ubuntu.com/community/AutomaticSecurityUpdates&lt;br /&gt;
*[https://pimylifeup.com/unattended-upgrades-debian-ubuntu/ Using Unattended-Upgrades on Debian and Ubuntu]&lt;br /&gt;
*https://wiki.debian.org/UnattendedUpgrades&lt;br /&gt;
*https://linuxblog.io/how-to-enable-unattended-upgrades-on-ubuntu-debian/&lt;br /&gt;
*[https://gist.github.com/CodingKoopa/3b30afe8c91e3950f6b124cd2abe3b6b the apt manpage you were looking for]&lt;br /&gt;
&lt;br /&gt;
==Enabling/disabling unattended upgrades==&lt;br /&gt;
Maybe install it first&lt;br /&gt;
 apt install unattended-upgrades&lt;br /&gt;
that will most likely also enable unattended upgrades&lt;br /&gt;
then&lt;br /&gt;
 dpkg-reconfigure unattended-upgrades&lt;br /&gt;
The dialog will show which option is selected now.&lt;br /&gt;
&lt;br /&gt;
==The relevant systemd service==&lt;br /&gt;
 apt-daily-upgrade.service&lt;br /&gt;
&lt;br /&gt;
==Disable unattended upgrades==&lt;br /&gt;
In /etc/apt/apt.conf.d/20auto-upgrades&lt;br /&gt;
 APT::Periodic::Unattended-Upgrade &amp;quot;0&amp;quot;;&lt;br /&gt;
==The logs==&lt;br /&gt;
 /var/log/unattended-upgrades/*.log&lt;br /&gt;
&lt;br /&gt;
==FAQ==&lt;br /&gt;
===Unattended-upgrade is not upgrading all packages===&lt;br /&gt;
That&#039;s normal, it defaults to upgrading only security updates.&lt;br /&gt;
&lt;br /&gt;
===Unattended-Upgrade::DevRelease &amp;quot;auto&amp;quot;;===&lt;br /&gt;
Only works on &amp;quot;dev releases&amp;quot;, which is any not .04&lt;br /&gt;
&lt;br /&gt;
==What is this Allowed-Origins about?==&lt;br /&gt;
Check output of &lt;br /&gt;
 apt -s upgrade&lt;br /&gt;
&lt;br /&gt;
you might see something like&lt;br /&gt;
&lt;br /&gt;
 Conf cloud-init (25.1.2-0ubuntu0~22.04.2 &#039;&#039;&#039;Ubuntu:22.04/jammy-updates&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
which will match&lt;br /&gt;
 ${distro_id}:${distro_codename}-updates&lt;br /&gt;
&lt;br /&gt;
==No packages found that can be upgraded unattended==&lt;br /&gt;
By default &#039;&#039;&#039;&amp;quot;${distro_id}:${distro_codename}-updates&amp;quot;;&#039;&#039;&#039; is commented out in &#039;&#039;&#039;/etc/apt/apt.conf.d/50unattended-upgrades&#039;&#039;&#039;, so to get those updated as well, uncomment that line.&lt;br /&gt;
&lt;br /&gt;
=HOWTO=&lt;br /&gt;
==Extract files from .deb==&lt;br /&gt;
 dpkg -x foo.deb ~/foo&lt;br /&gt;
also&lt;br /&gt;
 mkdir tmp&lt;br /&gt;
 dpkg-deb -R original.deb tmp&lt;br /&gt;
&lt;br /&gt;
==Pin a version==&lt;br /&gt;
*[https://help.ubuntu.com/community/PinningHowto Pinning Howto]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==List installed packages==&lt;br /&gt;
 apt list --installed&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Upgrade just one package==&lt;br /&gt;
 apt-get install --only-upgrade &amp;lt;packagename&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==exclude package from upgrade==&lt;br /&gt;
 apt-mark hold somepackage&lt;br /&gt;
and to undo&lt;br /&gt;
 apt-mark unhold somepackage&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Disable source in deb822 source file==&lt;br /&gt;
add&lt;br /&gt;
 Enabled: no&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
==What is new style sources files called?==&lt;br /&gt;
deb822&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== the following packages have been kept back: ==&lt;br /&gt;
&lt;br /&gt;
Time to apt-get dist-upgrade ( but check [https://askubuntu.com/questions/194651/why-use-apt-get-upgrade-instead-of-apt-get-dist-upgrade/226213#226213 ]first But it could be different things.&lt;br /&gt;
See https://askubuntu.com/questions/601/the-following-packages-have-been-kept-back-why-and-how-do-i-solve-it&lt;br /&gt;
Perhaps:&lt;br /&gt;
 apt-get upgrade package-that-is-kept-back&lt;br /&gt;
or try&lt;br /&gt;
 apt install package-that-is-kept-back&lt;br /&gt;
&lt;br /&gt;
==What version of a package is going to be installed?==&lt;br /&gt;
 apt-cache policy &amp;lt;package&amp;gt;&lt;br /&gt;
==What package does a file belong to?==&lt;br /&gt;
 dpkg -S /path/to/file&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
&lt;br /&gt;
===InRelease doesn&#039;t support architecture &#039;i386&#039;===&lt;br /&gt;
set &#039;&#039;arch=amd64&#039;&#039;&#039; in sources old style or &#039;&#039;&#039;Architectures: amd64&#039;&#039; new style&lt;br /&gt;
&lt;br /&gt;
===E: Could not get lock /var/lib/apt/lists/lock. It is held by process 1538337 (apt-get)===&lt;br /&gt;
&lt;br /&gt;
Try&lt;br /&gt;
 systemctl restart packagekit&lt;br /&gt;
and check&lt;br /&gt;
 fuser /var/lib/apt/lists/lock &lt;br /&gt;
again&lt;br /&gt;
&lt;br /&gt;
===Repository changed its &#039;Version&#039; value===&lt;br /&gt;
Try &lt;br /&gt;
 apt-get --allow-releaseinfo-change update&lt;br /&gt;
&lt;br /&gt;
===The repository &#039;http://security.debian.org buster/updates Release&#039; no longer has a Release file===&lt;br /&gt;
time to upgrade entire system&lt;br /&gt;
&lt;br /&gt;
==Unable to correct problems, you have held broken packages.==&lt;br /&gt;
Try&lt;br /&gt;
 dpkg --get-selections | grep hold&lt;br /&gt;
&lt;br /&gt;
==What packages depend on package==&lt;br /&gt;
 apt-cache rdepends --installed libc6-dev&lt;br /&gt;
&lt;br /&gt;
=== Clear cache ===&lt;br /&gt;
&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
==Could not handshake: The TLS connection was non-properly terminated.==&lt;br /&gt;
try http instead of https&lt;br /&gt;
&lt;br /&gt;
==Depends: but it is not going to be installed==&lt;br /&gt;
First try&lt;br /&gt;
 apt-get update &amp;amp;&amp;amp; apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
==E: Unable to correct problems, you have held broken packages.==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Which services should be restarted?==&lt;br /&gt;
That&#039;s from &#039;&#039;&#039;needrestart&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Prevent restarting all services when installing a package==&lt;br /&gt;
 NEEDRESTART_MODE=i apt install somepackage&lt;br /&gt;
&lt;br /&gt;
==What repository provides package==&lt;br /&gt;
 apt policy &amp;lt;packagename&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===Key is stored in legacy trusted.gpg keyring===&lt;br /&gt;
Check [https://itsfoss.com/apt-key-deprecated/  apt-key is deprecated]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Certificate verification failed: The certificate is NOT trusted.===&lt;br /&gt;
try&lt;br /&gt;
 deb [trusted=yes] ...&lt;br /&gt;
in sources.list, but things might be worse than that, in case of launchpad change to&lt;br /&gt;
 https://ppa.launchpadcontent.net/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===apt-key is deprecated. Manage keyring files in trusted.gpg.d instead===&lt;br /&gt;
See [https://itsfoss.com/apt-key-deprecated/ apt-key is deprecated]&lt;br /&gt;
&lt;br /&gt;
==The following upgrades have been deferred due to phasing==&lt;br /&gt;
apt install &amp;lt;whatever package it lists&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==needrestart==&lt;br /&gt;
===Show which services need restarting===&lt;br /&gt;
 needrestart -rl&lt;br /&gt;
===Service restarts being deferred===&lt;br /&gt;
Probably services like &#039;&#039;&#039;networkd-dispatcher.service&#039;&#039;&#039;.&lt;br /&gt;
Check &#039;&#039;&#039;/etc/needrestart/needrestart.conf&#039;&#039;&#039; for &#039;&#039;&#039;$nrconf{override_rc}&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Apt&amp;diff=10496</id>
		<title>Apt</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Apt&amp;diff=10496"/>
		<updated>2026-06-09T12:43:05Z</updated>

		<summary type="html">&lt;p&gt;Tony: /* Extract files from .deb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
Debian/Ubuntu package manager&lt;br /&gt;
&lt;br /&gt;
=Documentation=&lt;br /&gt;
==Phased Packages==&lt;br /&gt;
* [https://documentation.ubuntu.com/server/explanation/software/about-apt-upgrade-and-phased-updates/index.html About apt upgrade and phased updates]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Unattended upgrades=&lt;br /&gt;
==Links==&lt;br /&gt;
*https://help.ubuntu.com/community/AutomaticSecurityUpdates&lt;br /&gt;
*[https://pimylifeup.com/unattended-upgrades-debian-ubuntu/ Using Unattended-Upgrades on Debian and Ubuntu]&lt;br /&gt;
*https://wiki.debian.org/UnattendedUpgrades&lt;br /&gt;
*https://linuxblog.io/how-to-enable-unattended-upgrades-on-ubuntu-debian/&lt;br /&gt;
*[https://gist.github.com/CodingKoopa/3b30afe8c91e3950f6b124cd2abe3b6b the apt manpage you were looking for]&lt;br /&gt;
&lt;br /&gt;
==Enabling/disabling unattended upgrades==&lt;br /&gt;
Maybe install it first&lt;br /&gt;
 apt install unattended-upgrades&lt;br /&gt;
that will most likely also enable unattended upgrades&lt;br /&gt;
then&lt;br /&gt;
 dpkg-reconfigure unattended-upgrades&lt;br /&gt;
The dialog will show which option is selected now.&lt;br /&gt;
&lt;br /&gt;
==The relevant systemd service==&lt;br /&gt;
 apt-daily-upgrade.service&lt;br /&gt;
&lt;br /&gt;
==Disable unattended upgrades==&lt;br /&gt;
In /etc/apt/apt.conf.d/20auto-upgrades&lt;br /&gt;
 APT::Periodic::Unattended-Upgrade &amp;quot;0&amp;quot;;&lt;br /&gt;
==The logs==&lt;br /&gt;
 /var/log/unattended-upgrades/*.log&lt;br /&gt;
&lt;br /&gt;
==FAQ==&lt;br /&gt;
===Unattended-upgrade is not upgrading all packages===&lt;br /&gt;
That&#039;s normal, it defaults to upgrading only security updates.&lt;br /&gt;
&lt;br /&gt;
===Unattended-Upgrade::DevRelease &amp;quot;auto&amp;quot;;===&lt;br /&gt;
Only works on &amp;quot;dev releases&amp;quot;, which is any not .04&lt;br /&gt;
&lt;br /&gt;
==What is this Allowed-Origins about?==&lt;br /&gt;
Check output of &lt;br /&gt;
 apt -s upgrade&lt;br /&gt;
&lt;br /&gt;
you might see something like&lt;br /&gt;
&lt;br /&gt;
 Conf cloud-init (25.1.2-0ubuntu0~22.04.2 &#039;&#039;&#039;Ubuntu:22.04/jammy-updates&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
which will match&lt;br /&gt;
 ${distro_id}:${distro_codename}-updates&lt;br /&gt;
&lt;br /&gt;
==No packages found that can be upgraded unattended==&lt;br /&gt;
By default &#039;&#039;&#039;&amp;quot;${distro_id}:${distro_codename}-updates&amp;quot;;&#039;&#039;&#039; is commented out in &#039;&#039;&#039;/etc/apt/apt.conf.d/50unattended-upgrades&#039;&#039;&#039;, so to get those updated as well, uncomment that line.&lt;br /&gt;
&lt;br /&gt;
=HOWTO=&lt;br /&gt;
==Extract files from .deb==&lt;br /&gt;
 dpkg -x foo.deb ~/foo&lt;br /&gt;
&lt;br /&gt;
==Pin a version==&lt;br /&gt;
*[https://help.ubuntu.com/community/PinningHowto Pinning Howto]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==List installed packages==&lt;br /&gt;
 apt list --installed&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Upgrade just one package==&lt;br /&gt;
 apt-get install --only-upgrade &amp;lt;packagename&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==exclude package from upgrade==&lt;br /&gt;
 apt-mark hold somepackage&lt;br /&gt;
and to undo&lt;br /&gt;
 apt-mark unhold somepackage&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Disable source in deb822 source file==&lt;br /&gt;
add&lt;br /&gt;
 Enabled: no&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
==What is new style sources files called?==&lt;br /&gt;
deb822&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== the following packages have been kept back: ==&lt;br /&gt;
&lt;br /&gt;
Time to apt-get dist-upgrade ( but check [https://askubuntu.com/questions/194651/why-use-apt-get-upgrade-instead-of-apt-get-dist-upgrade/226213#226213 ]first But it could be different things.&lt;br /&gt;
See https://askubuntu.com/questions/601/the-following-packages-have-been-kept-back-why-and-how-do-i-solve-it&lt;br /&gt;
Perhaps:&lt;br /&gt;
 apt-get upgrade package-that-is-kept-back&lt;br /&gt;
or try&lt;br /&gt;
 apt install package-that-is-kept-back&lt;br /&gt;
&lt;br /&gt;
==What version of a package is going to be installed?==&lt;br /&gt;
 apt-cache policy &amp;lt;package&amp;gt;&lt;br /&gt;
==What package does a file belong to?==&lt;br /&gt;
 dpkg -S /path/to/file&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
&lt;br /&gt;
===InRelease doesn&#039;t support architecture &#039;i386&#039;===&lt;br /&gt;
set &#039;&#039;arch=amd64&#039;&#039;&#039; in sources old style or &#039;&#039;&#039;Architectures: amd64&#039;&#039; new style&lt;br /&gt;
&lt;br /&gt;
===E: Could not get lock /var/lib/apt/lists/lock. It is held by process 1538337 (apt-get)===&lt;br /&gt;
&lt;br /&gt;
Try&lt;br /&gt;
 systemctl restart packagekit&lt;br /&gt;
and check&lt;br /&gt;
 fuser /var/lib/apt/lists/lock &lt;br /&gt;
again&lt;br /&gt;
&lt;br /&gt;
===Repository changed its &#039;Version&#039; value===&lt;br /&gt;
Try &lt;br /&gt;
 apt-get --allow-releaseinfo-change update&lt;br /&gt;
&lt;br /&gt;
===The repository &#039;http://security.debian.org buster/updates Release&#039; no longer has a Release file===&lt;br /&gt;
time to upgrade entire system&lt;br /&gt;
&lt;br /&gt;
==Unable to correct problems, you have held broken packages.==&lt;br /&gt;
Try&lt;br /&gt;
 dpkg --get-selections | grep hold&lt;br /&gt;
&lt;br /&gt;
==What packages depend on package==&lt;br /&gt;
 apt-cache rdepends --installed libc6-dev&lt;br /&gt;
&lt;br /&gt;
=== Clear cache ===&lt;br /&gt;
&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
==Could not handshake: The TLS connection was non-properly terminated.==&lt;br /&gt;
try http instead of https&lt;br /&gt;
&lt;br /&gt;
==Depends: but it is not going to be installed==&lt;br /&gt;
First try&lt;br /&gt;
 apt-get update &amp;amp;&amp;amp; apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
==E: Unable to correct problems, you have held broken packages.==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Which services should be restarted?==&lt;br /&gt;
That&#039;s from &#039;&#039;&#039;needrestart&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Prevent restarting all services when installing a package==&lt;br /&gt;
 NEEDRESTART_MODE=i apt install somepackage&lt;br /&gt;
&lt;br /&gt;
==What repository provides package==&lt;br /&gt;
 apt policy &amp;lt;packagename&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===Key is stored in legacy trusted.gpg keyring===&lt;br /&gt;
Check [https://itsfoss.com/apt-key-deprecated/  apt-key is deprecated]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Certificate verification failed: The certificate is NOT trusted.===&lt;br /&gt;
try&lt;br /&gt;
 deb [trusted=yes] ...&lt;br /&gt;
in sources.list, but things might be worse than that, in case of launchpad change to&lt;br /&gt;
 https://ppa.launchpadcontent.net/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===apt-key is deprecated. Manage keyring files in trusted.gpg.d instead===&lt;br /&gt;
See [https://itsfoss.com/apt-key-deprecated/ apt-key is deprecated]&lt;br /&gt;
&lt;br /&gt;
==The following upgrades have been deferred due to phasing==&lt;br /&gt;
apt install &amp;lt;whatever package it lists&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==needrestart==&lt;br /&gt;
===Show which services need restarting===&lt;br /&gt;
 needrestart -rl&lt;br /&gt;
===Service restarts being deferred===&lt;br /&gt;
Probably services like &#039;&#039;&#039;networkd-dispatcher.service&#039;&#039;&#039;.&lt;br /&gt;
Check &#039;&#039;&#039;/etc/needrestart/needrestart.conf&#039;&#039;&#039; for &#039;&#039;&#039;$nrconf{override_rc}&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Proxmox_Backup_Server&amp;diff=10495</id>
		<title>Proxmox Backup Server</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Proxmox_Backup_Server&amp;diff=10495"/>
		<updated>2026-06-09T12:29:41Z</updated>

		<summary type="html">&lt;p&gt;Tony: /* Garbage collection */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Links=&lt;br /&gt;
*[https://www.proxmox.com/en/proxmox-backup-server/overview PBS Homepage]&lt;br /&gt;
*[https://pypi.org/project/pbs-monitoring-tools/ PBS monitoring tools]&lt;br /&gt;
&lt;br /&gt;
= Documentation =&lt;br /&gt;
*[https://pbs.proxmox.com/docs/ PBS documentation]&lt;br /&gt;
*[https://pbs.proxmox.com/docs/technical-overview.html PBS Technical overview]&lt;br /&gt;
*[https://pbs.proxmox.com/docs/managing-remotes.html Managing PBS remotes &amp;amp; sync]&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
*[https://pbs.proxmox.com/docs/installation.html Installing PBS]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Upgrading PBS==&lt;br /&gt;
*[https://pbs.proxmox.com/wiki/index.php/Upgrade_from_2_to_3 Upgrading PBS 2 to 3]&lt;br /&gt;
&lt;br /&gt;
=Processes=&lt;br /&gt;
==Service daemons==&lt;br /&gt;
See [https://pbs.proxmox.com/docs/sysadmin.html#service-daemons Service Daemons]&lt;br /&gt;
&lt;br /&gt;
==Command line tools==&lt;br /&gt;
See [https://pbs.proxmox.com/docs/sysadmin.html#command-line-tools Command-line Tools]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Under the hood==&lt;br /&gt;
Structure of datastore:&lt;br /&gt;
 /mnt/datastore/yourDS&lt;br /&gt;
contains:&lt;br /&gt;
===.chunks===&lt;br /&gt;
The actual data&lt;br /&gt;
===.lock===&lt;br /&gt;
===vm===&lt;br /&gt;
Metadata per vm:&lt;br /&gt;
client.log.blob  drive-scsi0.img.fidx  index.json.blob  qemu-server.conf.blob &lt;br /&gt;
===.gc-status===&lt;br /&gt;
&lt;br /&gt;
=Configuration files=&lt;br /&gt;
==/etc/proxmox/remote.cfg==&lt;br /&gt;
In WebUI under Configuration-&amp;gt;Remotes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Notifications==&lt;br /&gt;
===Notification system===&lt;br /&gt;
====/etc/backup-server/notifications.cfg====&lt;br /&gt;
Contains the default settings, managed via Configuration-&amp;gt;Notifications&lt;br /&gt;
=HOWTO=&lt;br /&gt;
&lt;br /&gt;
==Move datastore==&lt;br /&gt;
*Make sure there is no activity on that datastore, i suggest using rsync. As i can tell it should be safe to use rsync option &#039;&#039;&#039;--ignore-existing&#039;&#039;&#039; when updating a copy.&lt;br /&gt;
*Edit &#039;/etc/proxmox-backup/datastore.cfg&#039; to change path to datastore.&lt;br /&gt;
*Reload configuration (&#039;&#039;&#039;this will interrupt running garbage collectors&#039;&#039;&#039;) :&lt;br /&gt;
 systemctl reload proxmox-backup-proxy&lt;br /&gt;
&lt;br /&gt;
==Upgrade proxmox 6 to 7==&lt;br /&gt;
https://pve.proxmox.com/wiki/Upgrade_from_6.x_to_7.0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===WARN: &#039;noout&#039; flag not set - recommended to prevent rebalancing during cluster-wide upgrades===&lt;br /&gt;
https://docs.ceph.com/en/quincy/rados/troubleshooting/troubleshooting-osd/&lt;br /&gt;
 ceph osd set noout&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Restore disk from PBS==&lt;br /&gt;
Use [[pbs-restore]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==What&#039;s so busy?==&lt;br /&gt;
 proxmox-backup-manager list&lt;br /&gt;
and then&lt;br /&gt;
 proxmox-backup-manager task log &amp;lt;everying from and including &amp;quot;UPID:&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Show some logs==&lt;br /&gt;
 proxmox-backup-manager task list --all&lt;br /&gt;
&lt;br /&gt;
or perhaps&lt;br /&gt;
 proxmox-backup-debug api get /nodes/{node}/tasks --typefilter=backup&lt;br /&gt;
where {node} can be found with&lt;br /&gt;
 proxmox-backup-debug api get /nodes/&lt;br /&gt;
OR&lt;br /&gt;
 proxmox-backup-debug api get /nodes/localhost/tasks --typefilter=backup --start=0 --limit=500 --output-format json-pretty&lt;br /&gt;
&lt;br /&gt;
==List the vms in a datastore==&lt;br /&gt;
 proxmox-backup-client list&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Show cluster status==&lt;br /&gt;
 pvecm status&lt;br /&gt;
&lt;br /&gt;
=PBS Backups=&lt;br /&gt;
&lt;br /&gt;
==Create new backup repository==&lt;br /&gt;
===On PBS server:===&lt;br /&gt;
====Create account==== &lt;br /&gt;
&lt;br /&gt;
Configuration-&amp;gt;Access Control-&amp;gt;User Management-&amp;gt;Add&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Create datastore====&lt;br /&gt;
Create space, normally something like&lt;br /&gt;
 zfs create pbspool/mystore&lt;br /&gt;
&lt;br /&gt;
 Datastore-&amp;gt;Add Datastore&lt;br /&gt;
New subdirectory will be created &lt;br /&gt;
&lt;br /&gt;
Backup path must be full path to storage + datastore name&lt;br /&gt;
 Configuration-&amp;gt;Access Control-&amp;gt;Permissions&lt;br /&gt;
 Datastore-&amp;gt;yournewstore-&amp;gt;Permissions&lt;br /&gt;
to give the user access, Role is usually DatastoreBackup&lt;br /&gt;
&lt;br /&gt;
===On PBS guest:===&lt;br /&gt;
 Datacenter-&amp;gt;Storage-&amp;gt;Add-&amp;gt;Proxmox backup server&lt;br /&gt;
For &amp;quot;Datastore&amp;quot; enter the name as used on the PBS.&lt;br /&gt;
For fingerprint (on pbs server):&lt;br /&gt;
 proxmox-backup-manager cert info | grep Fingerprint&lt;br /&gt;
&lt;br /&gt;
Then:&lt;br /&gt;
 Backup-&amp;gt;Add storage: your-pbs&lt;br /&gt;
&lt;br /&gt;
==Remove PBS datastore==&lt;br /&gt;
 proxmox-backup-manager datastore remove yourdatastore&lt;br /&gt;
this does not delete the data!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Move a PBS datastore===&lt;br /&gt;
 rsync -auv /mnt/datastore/old /mnt/datastore/new&lt;br /&gt;
 systemctl stop proxmox-backup-proxy&lt;br /&gt;
 rsync -auv /mnt/datastore/old /mnt/datastore/new&lt;br /&gt;
 vi /etc/proxmox-backup/datastore.cfg&lt;br /&gt;
 systemctl start proxmox-backup-proxy&lt;br /&gt;
and after checking everything you can&lt;br /&gt;
 rm -vf /mnt/datastore/old&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Move vm data to another datastore==&lt;br /&gt;
=== Create local sync user ===&lt;br /&gt;
 localsync@pbs&lt;br /&gt;
Permissions: datastorereader on source, datastorebackup on target&lt;br /&gt;
&lt;br /&gt;
== PBS API ==&lt;br /&gt;
*[https://pbs.proxmox.com/docs/user-management.html?highlight=token#api-tokens API Tokens]&lt;br /&gt;
*[https://pbs.proxmox.com/docs/api-viewer/ PBS API viewer]&lt;br /&gt;
&lt;br /&gt;
PBS equivalent for &#039;&#039;&#039;pvesh&#039;&#039;&#039;: &lt;br /&gt;
 proxmox-backup-debug &lt;br /&gt;
&lt;br /&gt;
example:&lt;br /&gt;
 proxmox-backup-debug api get /status/datastore-usage&lt;br /&gt;
&lt;br /&gt;
 proxmox-backup-debug api get /nodes/localhost/tasks&lt;br /&gt;
&lt;br /&gt;
===Create cookie===&lt;br /&gt;
 PBS=your.pbs.server&lt;br /&gt;
 curl --silent --insecure --data &amp;quot;username=zabbix@pbs&amp;amp;password=n0tmyp4ss&amp;quot; https://$PBS:8007/api2/json/access/ticket | jq --raw-output &#039;.data.ticket&#039; | sed &#039;s/^/PBSAuthCookie=/&#039; &amp;gt; cookie&lt;br /&gt;
&lt;br /&gt;
Test cookie&lt;br /&gt;
 curl -XGET --silent -k -b $(cat cookie ) https://$PBS:8007/api2/json/&lt;br /&gt;
&lt;br /&gt;
== Recovering files from backup ==&lt;br /&gt;
&lt;br /&gt;
 export PBS_REPOSITORY=mypbs:mydatastore&lt;br /&gt;
 proxmox-backup-client snapshot list&lt;br /&gt;
&lt;br /&gt;
Output like: &#039;&#039;&#039;vm/109/2022-01-25T20:18:02Z │ 200.00 GiB │ client.log drive-ide0.img index.json qemu-server.conf&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 # proxmox-backup-client map vm/109/2022-01-25T20:18:02Z drive-ide0.img&lt;br /&gt;
 &lt;br /&gt;
 Image &#039;data2:vm/109/2022-01-25T20:18:02Z/drive-ide0.img&#039; mapped on /dev/loop0&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 &lt;br /&gt;
 NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT&lt;br /&gt;
 loop0          7:0    0   200G  1 loop&lt;br /&gt;
 ├─loop0p1    259:0    0   251M  1 part&lt;br /&gt;
 ├─loop0p2    259:1    0   3.9G  1 part&lt;br /&gt;
 └─loop0p3    259:2    0 195.9G  1 part&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
 mount /dev/loop0p3 /mnt/loop/&lt;br /&gt;
&lt;br /&gt;
mount: /mnt/loop: cannot mount /dev/loop0p3 read-only.&lt;br /&gt;
&lt;br /&gt;
 mount -o loop,ro,norecovery /dev/loop0p3 /mnt/loop/&lt;br /&gt;
&lt;br /&gt;
and that should be it. After you&#039;re done:&lt;br /&gt;
&lt;br /&gt;
 umount /mnt/loop&lt;br /&gt;
 proxmox-backup-client unmap /dev/loop0&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
TBD: explain how t o use kpartx and friends to acces LVM volumes&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
==Error messages==&lt;br /&gt;
===user account disabled or expired===&lt;br /&gt;
&lt;br /&gt;
===error fetching datastores - 401 Unauthorized (500)===&lt;br /&gt;
Check username/password :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===datastore path not empty===&lt;br /&gt;
When trying to create a datastore.&lt;br /&gt;
https://forum.proxmox.com/threads/bug-when-adding-new-storage-task-error-datastore-path-is-not-empty.157629/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===TASK ERROR: sync failed with some errors===&lt;br /&gt;
??&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===remove the file &#039;/run/proxmox-backup/old-locking&#039;, and reload all PBS daemons===&lt;br /&gt;
When no jobs running:&lt;br /&gt;
 rm /run/proxmox-backup/old-locking&lt;br /&gt;
for me worked:&lt;br /&gt;
 systemctl restart proxmox-backup.service&lt;br /&gt;
 systemctl restart proxmox-backup-proxy.service&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===The devices are not in fstab, where are they configured?===&lt;br /&gt;
See [https://www.man7.org/linux//man-pages/man5/systemd.mount.5.html systemd.mount(5)] and [https://www.man7.org/linux//man-pages/man1/systemd-mount.1.html systemd-mount(5)].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Limit bandwidth==&lt;br /&gt;
===On cluster node===&lt;br /&gt;
In /etc/vzdump.conf&lt;br /&gt;
 # In KB/s&lt;br /&gt;
 bwlimit: 1500&lt;br /&gt;
&lt;br /&gt;
==Garbage collection==&lt;br /&gt;
===What does the &#039;&#039;&#039;Prune all&#039;&#039;&#039; button do?===&lt;br /&gt;
It will give you a dialog with the usual &#039;Keep xxx&#039; options.&lt;br /&gt;
&lt;br /&gt;
=== TASK ERROR: update atime failed, disk full ===&lt;br /&gt;
Try pruning some&lt;br /&gt;
Check if some sync is running&lt;br /&gt;
&lt;br /&gt;
===unable to access non-existent chunk===&lt;br /&gt;
check if this returns?&lt;br /&gt;
===What is this &amp;quot;pending data&amp;quot;?===&lt;br /&gt;
&lt;br /&gt;
=== Pending removals ===&lt;br /&gt;
&lt;br /&gt;
 proxmox-backup-manager garbage-collection status mystore&lt;br /&gt;
&lt;br /&gt;
== error pruning backups - check log (500) ==&lt;br /&gt;
&lt;br /&gt;
Possibly a permissions thing, which is good. Leave pruning to the backup server&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==command error: http upgrade request timed out==&lt;br /&gt;
??&lt;br /&gt;
&lt;br /&gt;
==Connection error - server offline?==&lt;br /&gt;
This can also happen when you can actually connect to server:8007&lt;br /&gt;
Check&lt;br /&gt;
  systemctl status proxmox-backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Connection error 401: No ticket==&lt;br /&gt;
Browser issues, try clearing cache/cookies(?) or another browser.&lt;br /&gt;
&lt;br /&gt;
==Noout flag(s) set==&lt;br /&gt;
 ceph osd unset noout&lt;br /&gt;
&lt;br /&gt;
==qmp command &#039;query-backup&#039; failed - got wrong command id==&lt;br /&gt;
maybe bwlimit?&lt;br /&gt;
&lt;br /&gt;
==create storage failed: mypbs: error fetching datastores - 500 Can&#039;t connect to mypbs:8007 (Connection timed out) (500)==&lt;br /&gt;
&lt;br /&gt;
==Garbage collection failed: unlinking chunk ... ENOENT: No such file or directory==&lt;br /&gt;
Ignore?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Sync errror: owner check failed==&lt;br /&gt;
Check in datastore/yourrepository/vm/*/owner&lt;br /&gt;
&lt;br /&gt;
There&#039;s command&lt;br /&gt;
 proxmox-backup-client change-owner&lt;br /&gt;
&lt;br /&gt;
==Sync remote==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==tcp connect error: deadline has elapsed==&lt;br /&gt;
Probably connection timeout. &lt;br /&gt;
===proxmox-backup-manager remote list not showing remote===&lt;br /&gt;
Try&lt;br /&gt;
 proxmox-backup-manager remote show&lt;br /&gt;
Check&lt;br /&gt;
 /etc/proxmox-backup/remote.cfg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Retrieve PBS password===&lt;br /&gt;
On a pve node check &#039;&#039;&#039;/etc/pve/priv/storage/&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===group lock failed: Permission denied===&lt;br /&gt;
Probably a mismatch between path in /etc/proxmox-backup/datastore.cfg and actual location. &lt;br /&gt;
You also need to restart proxmox-backup-proxy.service after changing either of those.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Where are the devices behind the datastores listed/configured?==&lt;br /&gt;
 systemctl list-units | grep mount&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Backup]]&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Openssl&amp;diff=10494</id>
		<title>Openssl</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Openssl&amp;diff=10494"/>
		<updated>2026-06-08T08:00:05Z</updated>

		<summary type="html">&lt;p&gt;Tony: /* Generate a signing request (CSR) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Links=&lt;br /&gt;
*[https://scotthelme.co.uk/are-ev-certificates-worth-the-paper-theyre-written-on/ Why you don&#039;t want EV certificate]&lt;br /&gt;
*[https://mozilla.github.io/server-side-tls/ssl-config-generator/ SSL confg generator]&lt;br /&gt;
*[http://www.openssl.org/ openssl homepage]&lt;br /&gt;
*[http://gagravarr.org/writing/openssl-certs/index.shtml http://gagravarr.org/writing/openssl-certs/index.shtml]&lt;br /&gt;
*[https://whatsmychaincert.com/ What&#039;s My Chain Cert?]&lt;br /&gt;
&lt;br /&gt;
= Tools =&lt;br /&gt;
*openssl&lt;br /&gt;
*sslscan &lt;br /&gt;
*sclient&lt;br /&gt;
*[[gnutls-cli]]&lt;br /&gt;
&lt;br /&gt;
= Documentation and HOWTOs =&lt;br /&gt;
*[https://docs.openssl.org/1.1.1/man1/pkcs12/ pkcs12]&lt;br /&gt;
*[http://sial.org/howto/openssl/ca/ OpenSSL Certificate Authority Setup] &lt;br /&gt;
*[http://www.herongyang.com/Cryptography/OpenSSL-Certificate-Path-Validation-Tests.html Validating a Certificate Path with OpenSSL] &lt;br /&gt;
*[http://www.techradar.com/news/software/how-ssl-and-tls-works-1047412 How SSL and TLS work] &lt;br /&gt;
*[https://jamielinux.com/docs/openssl-certificate-authority/index.html OpenSSL Certificate Authority] &lt;br /&gt;
*[http://dataslinger.com/index.php?/archives/5-Configuring-SSL-certificates-for-Apache,-Dovecot,-Sendmail,-and-IIS.html http://dataslinger.com/index.php?/archives/5-Configuring-SSL-certificates-for-Apache,-Dovecot,-Sendmail,-and-IIS.html] &lt;br /&gt;
*[http://www.eclectica.ca/howto/ssl-cert-howto.php ssl cert HOWTO] &lt;br /&gt;
*[http://www.madboa.com/geek/openssl/ OpenSSL Command-Line HOWTO] &lt;br /&gt;
*[http://wiki.cacert.org/wiki/VhostTaskForce#head-f7f4c7599aef8b22de373b0922b39f4e75e95db4 1. Way: SubjectAltName Only] &lt;br /&gt;
*[http://www.madboa.com/geek/openssl/ OpenSSL Command-Line HOWTO] &lt;br /&gt;
*[http://www.digicert.com/ssl-support/pem-ssl-creation.htm How to Create a .PEM file for SSL Certificate Installation] &lt;br /&gt;
*[http://www.tc.umn.edu/~brams006/selfsign.html http://www.tc.umn.edu/~brams006/selfsign.html] &lt;br /&gt;
*[https://medium.com/@superseb/get-your-certificate-chain-right-4b117a9c0fce Getting your certificate chain right] &lt;br /&gt;
*[https://stackoverflow.com/questions/25482199/verify-a-certificate-chain-using-openssl-verify Verify certificate chain] &lt;br /&gt;
*[https://whatsmychaincert.com What is my certificate chain?]&lt;br /&gt;
*[https://langui.sh/2009/03/14/checking-a-remote-certificate-chain-with-openssl/ Checking A Remote Certificate Chain With OpenSSL]&lt;br /&gt;
&lt;br /&gt;
*[https://www.howtouselinux.com/post/certificate-chain Check SSL Certificate Chain with OpenSSL Examples]&lt;br /&gt;
=== Dovecot and ssl ===&lt;br /&gt;
&lt;br /&gt;
Networksolutions certs: After creating myserver.key and myserver.csr and obtaining certs: (don&#039;t forget to insert newlines between the blocks!)&lt;br /&gt;
&lt;br /&gt;
 cat OV_NetworkSolutionsOVServerCA2.crt OV_USERTrustRSACertificationAuthority.crt AddTrustExternalCARoot.crt &amp;gt; intermediate.pem&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
In dovecot.conf:&lt;br /&gt;
&lt;br /&gt;
 ssl_cert_file = /usr/local/etc/IMAP.EXAMPLE.COM.crt&lt;br /&gt;
 ssl_key_file = /usr/local/etc/myserver.key&lt;br /&gt;
 #optional, only if you want to require client to provide cert&lt;br /&gt;
 #ssl_ca_file = /usr/local/etc/intermediate.pem&lt;br /&gt;
&lt;br /&gt;
== Courier-imap and ssl ==&lt;br /&gt;
&lt;br /&gt;
*[http://linsec.ca/Using_Courier-IMAP_and_SSL http://linsec.ca/Using_Courier-IMAP_and_SSL] &lt;br /&gt;
*[http://linux.seindal.dk/2005/12/04/making-a-courier-imap-ssl-sertificate/ http://linux.seindal.dk/2005/12/04/making-a-courier-imap-ssl-sertificate/] &lt;br /&gt;
&lt;br /&gt;
Networksolutions certs: After creating myserver.key and myserver.csr and obtaining certs: (don&#039;t forget to insert newlines between the blocks!)&lt;br /&gt;
&lt;br /&gt;
 cat AddTrustExternalCARoot.crt NetworkSolutions_CA.crt &amp;gt; intermediate.pem&lt;br /&gt;
 cat myserver.key &amp;gt;&amp;gt; IMAP.EXAMPLE.COM.crt&lt;br /&gt;
&lt;br /&gt;
In imapd-ssl:&lt;br /&gt;
&lt;br /&gt;
 TLS_CERTFILE=/usr/local/etc/courier-certs/IMAP.EXAMPLE.COM.crt&lt;br /&gt;
 TLS_TRUSTCERTS=/usr/local/etc/courier-certs/intermediate.pem&lt;br /&gt;
&lt;br /&gt;
== Network Solutions certificates bundle ==&lt;br /&gt;
&lt;br /&gt;
See [http://blog.irontechsolutions.com/2008/12/10/ssl-chained-certificates-explained/ http://blog.irontechsolutions.com/2008/12/10/ssl-chained-certificates-explained/]&lt;br /&gt;
&lt;br /&gt;
 cat OV_NetworkSolutionsOVServerCA2.crt OV_USERTrustRSACertificationAuthority.crt AddTrustExternalCARoot.crt &amp;gt; intermediate.txt&lt;br /&gt;
&lt;br /&gt;
=== Comodo bundle order ===&lt;br /&gt;
&lt;br /&gt;
COMODORSAOrganizationValidationSecureServerCA. + COMODO rsa add trust ca ( + addtrustexternalcaroot )&lt;br /&gt;
&lt;br /&gt;
=== Generate a signing request (CSR)===&lt;br /&gt;
 N=my.domain&lt;br /&gt;
 openssl req -nodes -newkey rsa:2048 -keyout $N.key -out $N.csr&lt;br /&gt;
&lt;br /&gt;
 openssl req -utf8 -nodes -sha256 -newkey rsa:2048 -keyout server.key -out server.csr&lt;br /&gt;
The resulting csr is the signing request, my.domain.key is the private key you save not readable for anyone but root!&lt;br /&gt;
&lt;br /&gt;
= HOWTO =&lt;br /&gt;
==Add custom Root CA to your system==&lt;br /&gt;
===On Ubuntu===&lt;br /&gt;
Copy to /usr/local/share/ca-certificates&lt;br /&gt;
 update-ca-certificates --fresh&lt;br /&gt;
&lt;br /&gt;
==Generate PSK ==&lt;br /&gt;
 openssl rand -hex 32&lt;br /&gt;
&lt;br /&gt;
==Converting certificates==&lt;br /&gt;
https://stackoverflow.com/questions/13732826/convert-pem-to-crt-and-key&lt;br /&gt;
&lt;br /&gt;
=== Create private key (using config file) ===&lt;br /&gt;
&lt;br /&gt;
 openssl req (-config /etc/pki/tls/www.example.com.cnf) -newkey rsa:2048 -nodes -keyout domain.key&lt;br /&gt;
&lt;br /&gt;
== Create CSR using config file ==&lt;br /&gt;
&lt;br /&gt;
 openssl req -config /etc/pki/tls/www.example.com.cnf -new -newkey rsa:2048 -noenc -keyout example.com.key -out www.example.com.csr&lt;br /&gt;
&lt;br /&gt;
==Create .p12==&lt;br /&gt;
 openssl pkcs12 -export -out keyStore.p12 -inkey myKey.pem -in myCert.cer&lt;br /&gt;
&lt;br /&gt;
== Convert der to pem ==&lt;br /&gt;
&lt;br /&gt;
 openssl x509 -inform der -in certificate.cer -out certificate.pem&lt;br /&gt;
&lt;br /&gt;
== Creating CSR for multiple hosts ==&lt;br /&gt;
&lt;br /&gt;
For example [http://blog.endpoint.com/2014/10/openssl-csr-with-alternative-names-one.html http://blog.endpoint.com/2014/10/openssl-csr-with-alternative-names-one.html]&lt;br /&gt;
&lt;br /&gt;
=== Remove password from private key ===&lt;br /&gt;
&lt;br /&gt;
[https://wiki.apache.org/httpd/RemoveSSLCertPassPhrase https://wiki.apache.org/httpd/RemoveSSLCertPassPhrase]&lt;br /&gt;
&lt;br /&gt;
== Examining certificates ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.madboa.com/geek/openssl/#verify-standard http://www.madboa.com/geek/openssl/#verify-standard] &lt;br /&gt;
&lt;br /&gt;
 openssl verify cert.pem&lt;br /&gt;
&lt;br /&gt;
 openssl x509 -in cacert.pem -noout -text&lt;br /&gt;
 openssl x509 -in foo.pem  -inform pem -noout -text &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 openssl rsa -noout -text -in server.key&lt;br /&gt;
===Read contents of crt===&lt;br /&gt;
 openssl x509 -noout -text -in ca.crt&lt;br /&gt;
===Read contents of csr===&lt;br /&gt;
 openssl req -noout -text -in server.csr&lt;br /&gt;
&lt;br /&gt;
 openssl rsa -noout -text -in ca.key&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
with expiration date:&lt;br /&gt;
&lt;br /&gt;
 openssl x509 -noout -text -enddate -in ca.crt&lt;br /&gt;
&lt;br /&gt;
#to check CN &lt;br /&gt;
&lt;br /&gt;
 openssl x509 -in server.crt -noout -subject&lt;br /&gt;
&lt;br /&gt;
 openssl pkcs12 -info -in keyStore.p12&lt;br /&gt;
 openssl pkcs12 -info -in keyStore.pfx&lt;br /&gt;
&lt;br /&gt;
== Checking a service ==&lt;br /&gt;
&lt;br /&gt;
#Note -CApath should point to your local collection of public CA certs &lt;br /&gt;
&lt;br /&gt;
 openssl s_client -connect -CApath /etc/ssl/certs host:pop3 -starttls pop3&lt;br /&gt;
 openssl s_client -port 443 -CApath /etc/ssl/certs -host webmail.example.com -prexit&lt;br /&gt;
 openssl s_client -connect imap.example.com:143 -starttls imap&lt;br /&gt;
 openssl s_client -connect web.server:443 -showcerts&lt;br /&gt;
 openssl s_client -connect webmail.example.com:443 -servername vhost.example.com&lt;br /&gt;
&lt;br /&gt;
Just check expiration date:&lt;br /&gt;
&lt;br /&gt;
  openssl s_client -connect imap.example.com:143 -starttls imap 2&amp;gt;/dev/null | openssl x509 -noout -dates&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== Check your site ==&lt;br /&gt;
&lt;br /&gt;
*[https://www.ssllabs.com/ssltest https://www.ssllabs.com/ssltest] &lt;br /&gt;
*[https://www.sslcheck.nl/ https://www.sslcheck.nl/]&lt;br /&gt;
*[https://internet.nl Internet.nl]&lt;br /&gt;
&lt;br /&gt;
==gnutls-cli ==&lt;br /&gt;
 echo quit | gnutls-cli --starttls-proto smtp --port 25 servac.skk | grep Status&lt;br /&gt;
 echo quit | gnutls-cli --port 465 servac.skk | grep Status&lt;br /&gt;
&lt;br /&gt;
== check if certs match ==&lt;br /&gt;
&lt;br /&gt;
TODO: -clr_check too&lt;br /&gt;
&lt;br /&gt;
 openssl pkey -in privateKey.key -pubout -outform pem | sha256sum &lt;br /&gt;
 openssl x509 -in certificate.crt -pubkey -noout -outform pem | sha256sum &lt;br /&gt;
 openssl req -in CSR.csr -pubkey -noout -outform pem | sha256sum&lt;br /&gt;
&lt;br /&gt;
These values show match Also:&lt;br /&gt;
&lt;br /&gt;
 openssl verify -CAfile ca-bundle foo_bar.crt&lt;br /&gt;
&lt;br /&gt;
A script to do these checks: [[https://www.tuxick.net/sslcheck sslcheck]]&lt;br /&gt;
&lt;br /&gt;
== Creating your own CA and signing with it==&lt;br /&gt;
(based on http://www.eclectica.ca/howto/ssl-cert-howto.php#rootc)&lt;br /&gt;
&lt;br /&gt;
 cd /etc/ssl&lt;br /&gt;
 mkdir newcerts&lt;br /&gt;
 (perform secret rituals)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Check which ciphers and tls versions your openssl supports==&lt;br /&gt;
 openssl ciphers -v&lt;br /&gt;
&lt;br /&gt;
==Check if site supports TLS v1.2==&lt;br /&gt;
openssl s_client -connect google.com:443 -servername google.com -tls1_2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Create client key for authentication==&lt;br /&gt;
* https://docs.devolutions.net/workspace/kb/general-knowledge/secure-self-signed-certificates/&lt;br /&gt;
&lt;br /&gt;
Create key&lt;br /&gt;
 openssl -genkey -noout -out my.key&lt;br /&gt;
&lt;br /&gt;
Create cert&lt;br /&gt;
 openssl  req -new -x509 -sha256 -days 180 -key my.key -out my.crt&lt;br /&gt;
&lt;br /&gt;
Convert to p12&lt;br /&gt;
&lt;br /&gt;
==Get issuer==&lt;br /&gt;
 openssl s_client -showcerts -connect &amp;lt;YOURHOST&amp;gt;:443 &amp;lt; /dev/null 2&amp;gt;/dev/null |grep -i issuer&lt;br /&gt;
or better:&lt;br /&gt;
 openssl s_client -showcerts -connect YOURHOST:443 -servername YOURHOST -showcerts &amp;lt;/dev/null | openssl x509 -nouout -issuer&lt;br /&gt;
and even&lt;br /&gt;
 openssl s_client -servername $H -host $H -port 443 -showcerts &amp;lt;/dev/null 2&amp;gt;/dev/null| openssl x509 -noout -issuer | sed &#039;s/.* O = \(.*\), CN.*/\1/&#039;&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
==Should i include the Root CA?==&lt;br /&gt;
Only if server software demands it.&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
=== SSL CTX certificate file error: error:0906D06C:PEM routines:PEM_read_bio:no start line ===&lt;br /&gt;
??&lt;br /&gt;
&lt;br /&gt;
=== 139814102202256:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:707:Expecting: TRUSTED CERTIFICATE ===&lt;br /&gt;
&lt;br /&gt;
i&#039;ve seen this happen when someone deleted the BEGIN/END CERTIFICATE lines&lt;br /&gt;
&lt;br /&gt;
or a file is in DER format&lt;br /&gt;
&lt;br /&gt;
=== error 20 at 0 depth lookup: unable to get local issuer certificate ===&lt;br /&gt;
&lt;br /&gt;
you probably need to provide the right -CAfile maybe self signed?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===self-signed certificate in certificate chain===&lt;br /&gt;
&lt;br /&gt;
===OpenSSL: error:0A000102:SSL routines::unsupported protocol===&lt;br /&gt;
This could becaure you&#039;re trying to an older version of TLS, check &#039;&#039;&#039;openssl.cnf&#039;&#039;&#039; for&lt;br /&gt;
 CipherString = DEFAULT:@SECLEVEL=2&lt;br /&gt;
which means it enforces minimum of TLSv1.2&lt;br /&gt;
&lt;br /&gt;
You might now get&lt;br /&gt;
===OpenSSL: error:0A000152:SSL routines::unsafe legacy renegotiation disabled===&lt;br /&gt;
which means add below the CipherString line:&lt;br /&gt;
 Options = UnsafeLegacyRenegotiation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===SSL: error:13800076:OCSP routines::signer certificate not found===&lt;br /&gt;
?&lt;br /&gt;
&lt;br /&gt;
== Order of certificates in bundle==&lt;br /&gt;
Root CA comes last&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== using s_client ==&lt;br /&gt;
&lt;br /&gt;
=== no client certificate sent ===&lt;br /&gt;
&lt;br /&gt;
try adding -cert&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== Secure Renegotiation IS NOT supported ===&lt;br /&gt;
&lt;br /&gt;
Probably using wrong TLS version&lt;br /&gt;
&lt;br /&gt;
=== Can&#039;t use SSL_get_servername ===&lt;br /&gt;
&lt;br /&gt;
Try using hostname instead of IP address&lt;br /&gt;
&lt;br /&gt;
=== write:errno=104 ===&lt;br /&gt;
&lt;br /&gt;
server reset the connection&lt;br /&gt;
&lt;br /&gt;
===no peer certificate available===&lt;br /&gt;
Could be trying to talk tls to ssl, also check tls version used/enforced.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===socket: Bad file descriptor===&lt;br /&gt;
Most likely you just can&#039;t connect&lt;br /&gt;
&lt;br /&gt;
== unable to load client certificate private key file ==&lt;br /&gt;
&lt;br /&gt;
== Verification error: unable to verify the first certificate ==&lt;br /&gt;
&lt;br /&gt;
problem missing CA cert&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== Verify return code: 21 (unable to verify the first certificate) ==&lt;br /&gt;
&lt;br /&gt;
Probably requires bundle &#039;&#039;including the first cert&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Bad certificate (code 42) ==&lt;br /&gt;
&lt;br /&gt;
Means the server demands you authenticate with a certificate, and you did not do so, and that caused the handshake failure.&lt;br /&gt;
&lt;br /&gt;
== How to check certificate chain? ==&lt;br /&gt;
&lt;br /&gt;
 openssl s_client -connect www.example.com:443 -showcerts&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Some of the output ===&lt;br /&gt;
&lt;br /&gt;
Certificate chain&lt;br /&gt;
&lt;br /&gt;
 0 s:CN = foo.local&lt;br /&gt;
   i:CN = foo.local-CA&lt;br /&gt;
&lt;br /&gt;
0: first in chain&lt;br /&gt;
&lt;br /&gt;
s: subject&amp;amp;nbsp; ( openssl x509 -noout -in foo.crt -subject )&lt;br /&gt;
&lt;br /&gt;
i: issuer ( openssl x509 -noout -in foo.crt -issuer )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
 openssl s_client -showcerts -verify 5 -connect ldap.example.com:636  &amp;lt; /dev/null | awk &#039;/BEGIN/,/END/{ if(/BEGIN/)    {a++}; out=&amp;quot;bluePage-cert&amp;quot;a&amp;quot;.pem&amp;quot;; print &amp;gt;out}&#039; &lt;br /&gt;
or&lt;br /&gt;
 openssl s_client -showcerts -verify 5 -connect ldap.example.com:389 starttls ldap  &amp;lt; /dev/null | awk &#039;/BEGIN/,/END/{ if(/BEGIN/)    {a++}; out=&amp;quot;bluePage-cert&amp;quot;a&amp;quot;.pem&amp;quot;; print &amp;gt;out}&#039;&lt;br /&gt;
&lt;br /&gt;
== check expiration date ==&lt;br /&gt;
&lt;br /&gt;
 echo | openssl s_client -servername NAME -connect HOST:PORT 2&amp;gt;/dev/null | openssl x509 -noout -dates&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 openssl x509 -enddate -noout -in file.pem&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== check if webserver supports old tls ==&lt;br /&gt;
&lt;br /&gt;
 openssl s_client -connect www.example.com:443 -tls1&lt;br /&gt;
 openssl s_client -connect www.example.com:443 -tls1_1&lt;br /&gt;
&lt;br /&gt;
or when vhost:&lt;br /&gt;
&lt;br /&gt;
  openssl s_client -servername vhost.example.com -connect www.example.com:443 -tls1_1&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== ERROR: Certificate verification: Not trusted ==&lt;br /&gt;
&lt;br /&gt;
seems to be an lftp issue&lt;br /&gt;
&lt;br /&gt;
== unsupported certificate purpose ==&lt;br /&gt;
&lt;br /&gt;
??&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== ssllabs checks ==&lt;br /&gt;
&lt;br /&gt;
=== Chain issues: Incorrect order, Contains anchor ===&lt;br /&gt;
&lt;br /&gt;
Could be the topmost cert in the bundle provided, try removing it&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== Chain issues: Contains anchor ===&lt;br /&gt;
&lt;br /&gt;
Seems to mean there&#039;s a root ca in the bundle&lt;br /&gt;
&lt;br /&gt;
== check smtp submission ==&lt;br /&gt;
&lt;br /&gt;
 echo -n &amp;quot;username&amp;quot; | base64&lt;br /&gt;
 echo -n &amp;quot;password&amp;quot; | base64&lt;br /&gt;
&lt;br /&gt;
 openssl s_client -connect mail.host.com:587 -starttls smtp -crlf&lt;br /&gt;
&lt;br /&gt;
 EHLO foo.bar&lt;br /&gt;
 AUTH LOGIN&lt;br /&gt;
&lt;br /&gt;
base64username&lt;br /&gt;
&lt;br /&gt;
base64password&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
&lt;br /&gt;
 echo -ne &#039;\0username\0password&#039;| base64&lt;br /&gt;
 AUTH LOGIN output_of_that_echo&lt;br /&gt;
&lt;br /&gt;
===Peer&#039;s Certificate issuer is not recognized.===&lt;br /&gt;
&lt;br /&gt;
=p12 / pkcs12=&lt;br /&gt;
* https://fileinfo.com/extension/p12&lt;br /&gt;
* [https://www.ssl.com/how-to/export-certificates-private-key-from-pkcs12-file-with-openssl/ Export Certificates and Private Key from a PKCS#12 File with OpenSSL]&lt;br /&gt;
&lt;br /&gt;
== Show info about p12 file==&lt;br /&gt;
 openssl pkcs12 -info -in INFILE.p12 -nodes&lt;br /&gt;
&lt;br /&gt;
== Extract keys from p12 == &lt;br /&gt;
=== Extract private key ===&lt;br /&gt;
 openssl pkcs12 -in yourP12File.pfx -nocerts -out privateKey.pem&lt;br /&gt;
=== Extract client certificate ===&lt;br /&gt;
 openssl pkcs12 -in yourP12File.pfx -clcerts -nokeys -out publicCert.pem&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===server certificate does NOT include an ID which matches the server name===&lt;br /&gt;
todo&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Git&amp;diff=10493</id>
		<title>Git</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Git&amp;diff=10493"/>
		<updated>2026-06-08T07:37:07Z</updated>

		<summary type="html">&lt;p&gt;Tony: /* Error messages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Links=&lt;br /&gt;
*[http://git-scm.com/ Homepage]&lt;br /&gt;
&lt;br /&gt;
==Documentation==&lt;br /&gt;
*[https://git-scm.com/book/en/v1/Getting-Started-First-Time-Git-Setup Getting Started in the Pro Git Book]&lt;br /&gt;
*[https://www.inmotionhosting.com/support/website/git/setting-up-your-remote-repository-with-git/ Setting Up Your Remote Repository With Git]&lt;br /&gt;
*[https://git-scm.com/book/uz/v2/Customizing-Git-Git-Attributes Dealing with binary files]&lt;br /&gt;
*http://gitref.org/basic/&lt;br /&gt;
*http://git-scm.com/book/en&lt;br /&gt;
*http://thelucid.com/2008/12/02/git-setting-up-a-remote-repository-and-doing-an-initial-&lt;br /&gt;
*[https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository Recording Changes to the Repository]&lt;br /&gt;
*[https://raymii.org/s/tutorials/Shared_Git_repository_via_ssh_for_multiple_users.html Shared Git repository over ssh for multiple users]&lt;br /&gt;
&lt;br /&gt;
===Git Tutorials===&lt;br /&gt;
*[https://try.github.io Online git tutorial]&lt;br /&gt;
*[https://www.atlassian.com/git/tutorials Git tutorial at atlassian]&lt;br /&gt;
*[https://docs.gitlab.com/tutorials/learn_git/ Git tutorial at Gitlab]&lt;br /&gt;
&lt;br /&gt;
=Cheat sheet=&lt;br /&gt;
==Show changes in a file==&lt;br /&gt;
  git log --follow -p your.file&lt;br /&gt;
&lt;br /&gt;
==Remove file from repository but not from filesystem==&lt;br /&gt;
 git rm --cached filetokeep&lt;br /&gt;
and add it to .gitignore&lt;br /&gt;
&lt;br /&gt;
==Create repository on server==&lt;br /&gt;
 mkdir -p git/myproject&lt;br /&gt;
 cd git/project&lt;br /&gt;
 git init --bare&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Get git config==&lt;br /&gt;
 git config --list&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
==browse local repository==&lt;br /&gt;
 git ls-tree --full-tree -r HEAD&lt;br /&gt;
&lt;br /&gt;
==push as different user==&lt;br /&gt;
 check .git/config and replace username&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Switch to particular branch==&lt;br /&gt;
 git branch -a&lt;br /&gt;
 git checkout remote/releases/6.4&lt;br /&gt;
and to get back&lt;br /&gt;
 git checkout master&lt;br /&gt;
or was it&lt;br /&gt;
 git checkout&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Git move==&lt;br /&gt;
  git mv file.txt newfile.txt&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
==git pull==&lt;br /&gt;
===You are not currently on a branch.===&lt;br /&gt;
&lt;br /&gt;
==Restore single file==&lt;br /&gt;
Move the file away and&lt;br /&gt;
 git restore yourfile&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===warning: remote HEAD refers to nonexistent ref, unable to checkout===&lt;br /&gt;
You probably need to &lt;br /&gt;
 git check master&lt;br /&gt;
of &lt;br /&gt;
 git checkout main&lt;br /&gt;
&lt;br /&gt;
===error: You have not concluded your merge (MERGE_HEAD exists).===&lt;br /&gt;
&lt;br /&gt;
===error: unknown switch `b&#039;===&lt;br /&gt;
Try &#039;&#039;&#039;--bare&#039;&#039;&#039; instead of &#039;&#039;&#039;-b&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===git checkout errors===&lt;br /&gt;
====error: pathspec &#039;master&#039; did not match any file(s) known to git====&lt;br /&gt;
then you get that from &lt;br /&gt;
 git checkout master&lt;br /&gt;
try&lt;br /&gt;
 git checkout -&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Automatic merge failed; fix conflicts and then commit the result.===&lt;br /&gt;
&lt;br /&gt;
Try&lt;br /&gt;
  git mergetool&lt;br /&gt;
&lt;br /&gt;
=== error: src refspec master does not match any. ===&lt;br /&gt;
&lt;br /&gt;
ye well, screw you. you did something wrong!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Updates were rejected because the remote contains work that you do not have locally.===&lt;br /&gt;
??&lt;br /&gt;
&lt;br /&gt;
== error: Merging is not possible because you have unmerged files. ==&lt;br /&gt;
&lt;br /&gt;
This is not a joke!&lt;br /&gt;
&lt;br /&gt;
For now check https://stackoverflow.com/questions/36086202/git-merge-is-not-possible-because-i-have-unmerged-files&lt;br /&gt;
&lt;br /&gt;
== fatal: cannot do a partial commit during a merge. ==&lt;br /&gt;
&lt;br /&gt;
 git commit -i&lt;br /&gt;
&lt;br /&gt;
== error: Pull is not possible because you have unmerged files ==&lt;br /&gt;
&lt;br /&gt;
== error: Your local changes to the following files would be overwritten by merge:==&lt;br /&gt;
 git stash&lt;br /&gt;
 git pull&lt;br /&gt;
 git stash pop&lt;br /&gt;
&lt;br /&gt;
== list untracked files ==&lt;br /&gt;
&lt;br /&gt;
 git status&lt;br /&gt;
&lt;br /&gt;
== Changes not staged for commit: ==&lt;br /&gt;
&lt;br /&gt;
File has to be added again&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== error: gpg failed to sign the data ==&lt;br /&gt;
&lt;br /&gt;
try&lt;br /&gt;
&lt;br /&gt;
 GIT_TRACE=1 commit ...&lt;br /&gt;
&lt;br /&gt;
and run the command it suggests&lt;br /&gt;
&lt;br /&gt;
but your problably forgot to&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;git config --global user.signingkey&amp;amp;nbsp; XXXXX&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Git error messages==&lt;br /&gt;
===You have divergent branches and need to specify how to reconcile them.===&lt;br /&gt;
First try:&lt;br /&gt;
 git merge&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===fatal: detected dubious ownership in repository ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Merge with strategy ort failed===&lt;br /&gt;
ORT stands for “Ostensibly Recursive Three-way”&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Proxmox_Backup_Server&amp;diff=10492</id>
		<title>Proxmox Backup Server</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Proxmox_Backup_Server&amp;diff=10492"/>
		<updated>2026-06-06T09:40:18Z</updated>

		<summary type="html">&lt;p&gt;Tony: /* FAQ */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Links=&lt;br /&gt;
*[https://www.proxmox.com/en/proxmox-backup-server/overview PBS Homepage]&lt;br /&gt;
*[https://pypi.org/project/pbs-monitoring-tools/ PBS monitoring tools]&lt;br /&gt;
&lt;br /&gt;
= Documentation =&lt;br /&gt;
*[https://pbs.proxmox.com/docs/ PBS documentation]&lt;br /&gt;
*[https://pbs.proxmox.com/docs/technical-overview.html PBS Technical overview]&lt;br /&gt;
*[https://pbs.proxmox.com/docs/managing-remotes.html Managing PBS remotes &amp;amp; sync]&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
*[https://pbs.proxmox.com/docs/installation.html Installing PBS]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Upgrading PBS==&lt;br /&gt;
*[https://pbs.proxmox.com/wiki/index.php/Upgrade_from_2_to_3 Upgrading PBS 2 to 3]&lt;br /&gt;
&lt;br /&gt;
=Processes=&lt;br /&gt;
==Service daemons==&lt;br /&gt;
See [https://pbs.proxmox.com/docs/sysadmin.html#service-daemons Service Daemons]&lt;br /&gt;
&lt;br /&gt;
==Command line tools==&lt;br /&gt;
See [https://pbs.proxmox.com/docs/sysadmin.html#command-line-tools Command-line Tools]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Under the hood==&lt;br /&gt;
Structure of datastore:&lt;br /&gt;
 /mnt/datastore/yourDS&lt;br /&gt;
contains:&lt;br /&gt;
===.chunks===&lt;br /&gt;
The actual data&lt;br /&gt;
===.lock===&lt;br /&gt;
===vm===&lt;br /&gt;
Metadata per vm:&lt;br /&gt;
client.log.blob  drive-scsi0.img.fidx  index.json.blob  qemu-server.conf.blob &lt;br /&gt;
===.gc-status===&lt;br /&gt;
&lt;br /&gt;
=Configuration files=&lt;br /&gt;
==/etc/proxmox/remote.cfg==&lt;br /&gt;
In WebUI under Configuration-&amp;gt;Remotes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Notifications==&lt;br /&gt;
===Notification system===&lt;br /&gt;
====/etc/backup-server/notifications.cfg====&lt;br /&gt;
Contains the default settings, managed via Configuration-&amp;gt;Notifications&lt;br /&gt;
=HOWTO=&lt;br /&gt;
&lt;br /&gt;
==Move datastore==&lt;br /&gt;
*Make sure there is no activity on that datastore, i suggest using rsync. As i can tell it should be safe to use rsync option &#039;&#039;&#039;--ignore-existing&#039;&#039;&#039; when updating a copy.&lt;br /&gt;
*Edit &#039;/etc/proxmox-backup/datastore.cfg&#039; to change path to datastore.&lt;br /&gt;
*Reload configuration (&#039;&#039;&#039;this will interrupt running garbage collectors&#039;&#039;&#039;) :&lt;br /&gt;
 systemctl reload proxmox-backup-proxy&lt;br /&gt;
&lt;br /&gt;
==Upgrade proxmox 6 to 7==&lt;br /&gt;
https://pve.proxmox.com/wiki/Upgrade_from_6.x_to_7.0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===WARN: &#039;noout&#039; flag not set - recommended to prevent rebalancing during cluster-wide upgrades===&lt;br /&gt;
https://docs.ceph.com/en/quincy/rados/troubleshooting/troubleshooting-osd/&lt;br /&gt;
 ceph osd set noout&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Restore disk from PBS==&lt;br /&gt;
Use [[pbs-restore]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==What&#039;s so busy?==&lt;br /&gt;
 proxmox-backup-manager list&lt;br /&gt;
and then&lt;br /&gt;
 proxmox-backup-manager task log &amp;lt;everying from and including &amp;quot;UPID:&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Show some logs==&lt;br /&gt;
 proxmox-backup-manager task list --all&lt;br /&gt;
&lt;br /&gt;
or perhaps&lt;br /&gt;
 proxmox-backup-debug api get /nodes/{node}/tasks --typefilter=backup&lt;br /&gt;
where {node} can be found with&lt;br /&gt;
 proxmox-backup-debug api get /nodes/&lt;br /&gt;
OR&lt;br /&gt;
 proxmox-backup-debug api get /nodes/localhost/tasks --typefilter=backup --start=0 --limit=500 --output-format json-pretty&lt;br /&gt;
&lt;br /&gt;
==List the vms in a datastore==&lt;br /&gt;
 proxmox-backup-client list&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Show cluster status==&lt;br /&gt;
 pvecm status&lt;br /&gt;
&lt;br /&gt;
=PBS Backups=&lt;br /&gt;
&lt;br /&gt;
==Create new backup repository==&lt;br /&gt;
===On PBS server:===&lt;br /&gt;
====Create account==== &lt;br /&gt;
&lt;br /&gt;
Configuration-&amp;gt;Access Control-&amp;gt;User Management-&amp;gt;Add&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Create datastore====&lt;br /&gt;
Create space, normally something like&lt;br /&gt;
 zfs create pbspool/mystore&lt;br /&gt;
&lt;br /&gt;
 Datastore-&amp;gt;Add Datastore&lt;br /&gt;
New subdirectory will be created &lt;br /&gt;
&lt;br /&gt;
Backup path must be full path to storage + datastore name&lt;br /&gt;
 Configuration-&amp;gt;Access Control-&amp;gt;Permissions&lt;br /&gt;
 Datastore-&amp;gt;yournewstore-&amp;gt;Permissions&lt;br /&gt;
to give the user access, Role is usually DatastoreBackup&lt;br /&gt;
&lt;br /&gt;
===On PBS guest:===&lt;br /&gt;
 Datacenter-&amp;gt;Storage-&amp;gt;Add-&amp;gt;Proxmox backup server&lt;br /&gt;
For &amp;quot;Datastore&amp;quot; enter the name as used on the PBS.&lt;br /&gt;
For fingerprint (on pbs server):&lt;br /&gt;
 proxmox-backup-manager cert info | grep Fingerprint&lt;br /&gt;
&lt;br /&gt;
Then:&lt;br /&gt;
 Backup-&amp;gt;Add storage: your-pbs&lt;br /&gt;
&lt;br /&gt;
==Remove PBS datastore==&lt;br /&gt;
 proxmox-backup-manager datastore remove yourdatastore&lt;br /&gt;
this does not delete the data!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Move a PBS datastore===&lt;br /&gt;
 rsync -auv /mnt/datastore/old /mnt/datastore/new&lt;br /&gt;
 systemctl stop proxmox-backup-proxy&lt;br /&gt;
 rsync -auv /mnt/datastore/old /mnt/datastore/new&lt;br /&gt;
 vi /etc/proxmox-backup/datastore.cfg&lt;br /&gt;
 systemctl start proxmox-backup-proxy&lt;br /&gt;
and after checking everything you can&lt;br /&gt;
 rm -vf /mnt/datastore/old&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Move vm data to another datastore==&lt;br /&gt;
=== Create local sync user ===&lt;br /&gt;
 localsync@pbs&lt;br /&gt;
Permissions: datastorereader on source, datastorebackup on target&lt;br /&gt;
&lt;br /&gt;
== PBS API ==&lt;br /&gt;
*[https://pbs.proxmox.com/docs/user-management.html?highlight=token#api-tokens API Tokens]&lt;br /&gt;
*[https://pbs.proxmox.com/docs/api-viewer/ PBS API viewer]&lt;br /&gt;
&lt;br /&gt;
PBS equivalent for &#039;&#039;&#039;pvesh&#039;&#039;&#039;: &lt;br /&gt;
 proxmox-backup-debug &lt;br /&gt;
&lt;br /&gt;
example:&lt;br /&gt;
 proxmox-backup-debug api get /status/datastore-usage&lt;br /&gt;
&lt;br /&gt;
 proxmox-backup-debug api get /nodes/localhost/tasks&lt;br /&gt;
&lt;br /&gt;
===Create cookie===&lt;br /&gt;
 PBS=your.pbs.server&lt;br /&gt;
 curl --silent --insecure --data &amp;quot;username=zabbix@pbs&amp;amp;password=n0tmyp4ss&amp;quot; https://$PBS:8007/api2/json/access/ticket | jq --raw-output &#039;.data.ticket&#039; | sed &#039;s/^/PBSAuthCookie=/&#039; &amp;gt; cookie&lt;br /&gt;
&lt;br /&gt;
Test cookie&lt;br /&gt;
 curl -XGET --silent -k -b $(cat cookie ) https://$PBS:8007/api2/json/&lt;br /&gt;
&lt;br /&gt;
== Recovering files from backup ==&lt;br /&gt;
&lt;br /&gt;
 export PBS_REPOSITORY=mypbs:mydatastore&lt;br /&gt;
 proxmox-backup-client snapshot list&lt;br /&gt;
&lt;br /&gt;
Output like: &#039;&#039;&#039;vm/109/2022-01-25T20:18:02Z │ 200.00 GiB │ client.log drive-ide0.img index.json qemu-server.conf&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 # proxmox-backup-client map vm/109/2022-01-25T20:18:02Z drive-ide0.img&lt;br /&gt;
 &lt;br /&gt;
 Image &#039;data2:vm/109/2022-01-25T20:18:02Z/drive-ide0.img&#039; mapped on /dev/loop0&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 &lt;br /&gt;
 NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT&lt;br /&gt;
 loop0          7:0    0   200G  1 loop&lt;br /&gt;
 ├─loop0p1    259:0    0   251M  1 part&lt;br /&gt;
 ├─loop0p2    259:1    0   3.9G  1 part&lt;br /&gt;
 └─loop0p3    259:2    0 195.9G  1 part&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
 mount /dev/loop0p3 /mnt/loop/&lt;br /&gt;
&lt;br /&gt;
mount: /mnt/loop: cannot mount /dev/loop0p3 read-only.&lt;br /&gt;
&lt;br /&gt;
 mount -o loop,ro,norecovery /dev/loop0p3 /mnt/loop/&lt;br /&gt;
&lt;br /&gt;
and that should be it. After you&#039;re done:&lt;br /&gt;
&lt;br /&gt;
 umount /mnt/loop&lt;br /&gt;
 proxmox-backup-client unmap /dev/loop0&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
TBD: explain how t o use kpartx and friends to acces LVM volumes&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
==Error messages==&lt;br /&gt;
===user account disabled or expired===&lt;br /&gt;
&lt;br /&gt;
===error fetching datastores - 401 Unauthorized (500)===&lt;br /&gt;
Check username/password :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===datastore path not empty===&lt;br /&gt;
When trying to create a datastore.&lt;br /&gt;
https://forum.proxmox.com/threads/bug-when-adding-new-storage-task-error-datastore-path-is-not-empty.157629/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===TASK ERROR: sync failed with some errors===&lt;br /&gt;
??&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===remove the file &#039;/run/proxmox-backup/old-locking&#039;, and reload all PBS daemons===&lt;br /&gt;
When no jobs running:&lt;br /&gt;
 rm /run/proxmox-backup/old-locking&lt;br /&gt;
for me worked:&lt;br /&gt;
 systemctl restart proxmox-backup.service&lt;br /&gt;
 systemctl restart proxmox-backup-proxy.service&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===The devices are not in fstab, where are they configured?===&lt;br /&gt;
See [https://www.man7.org/linux//man-pages/man5/systemd.mount.5.html systemd.mount(5)] and [https://www.man7.org/linux//man-pages/man1/systemd-mount.1.html systemd-mount(5)].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Limit bandwidth==&lt;br /&gt;
===On cluster node===&lt;br /&gt;
In /etc/vzdump.conf&lt;br /&gt;
 # In KB/s&lt;br /&gt;
 bwlimit: 1500&lt;br /&gt;
&lt;br /&gt;
==Garbage collection==&lt;br /&gt;
===What does the &#039;&#039;&#039;Prune all&#039;&#039;&#039; button do?===&lt;br /&gt;
It will give you a dialog with the usual &#039;Keep xxx&#039; options.&lt;br /&gt;
&lt;br /&gt;
=== TASK ERROR: update atime failed, disk full ===&lt;br /&gt;
Try pruning some&lt;br /&gt;
Check if some sync is running&lt;br /&gt;
&lt;br /&gt;
===unable to access non-existent chunk===&lt;br /&gt;
check if this returns?&lt;br /&gt;
&lt;br /&gt;
=== Pending removals ===&lt;br /&gt;
&lt;br /&gt;
 proxmox-backup-manager garbage-collection status mystore&lt;br /&gt;
&lt;br /&gt;
== error pruning backups - check log (500) ==&lt;br /&gt;
&lt;br /&gt;
Possibly a permissions thing, which is good. Leave pruning to the backup server&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==command error: http upgrade request timed out==&lt;br /&gt;
??&lt;br /&gt;
&lt;br /&gt;
==Connection error - server offline?==&lt;br /&gt;
This can also happen when you can actually connect to server:8007&lt;br /&gt;
Check&lt;br /&gt;
  systemctl status proxmox-backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Connection error 401: No ticket==&lt;br /&gt;
Browser issues, try clearing cache/cookies(?) or another browser.&lt;br /&gt;
&lt;br /&gt;
==Noout flag(s) set==&lt;br /&gt;
 ceph osd unset noout&lt;br /&gt;
&lt;br /&gt;
==qmp command &#039;query-backup&#039; failed - got wrong command id==&lt;br /&gt;
maybe bwlimit?&lt;br /&gt;
&lt;br /&gt;
==create storage failed: mypbs: error fetching datastores - 500 Can&#039;t connect to mypbs:8007 (Connection timed out) (500)==&lt;br /&gt;
&lt;br /&gt;
==Garbage collection failed: unlinking chunk ... ENOENT: No such file or directory==&lt;br /&gt;
Ignore?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Sync errror: owner check failed==&lt;br /&gt;
Check in datastore/yourrepository/vm/*/owner&lt;br /&gt;
&lt;br /&gt;
There&#039;s command&lt;br /&gt;
 proxmox-backup-client change-owner&lt;br /&gt;
&lt;br /&gt;
==Sync remote==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==tcp connect error: deadline has elapsed==&lt;br /&gt;
Probably connection timeout. &lt;br /&gt;
===proxmox-backup-manager remote list not showing remote===&lt;br /&gt;
Try&lt;br /&gt;
 proxmox-backup-manager remote show&lt;br /&gt;
Check&lt;br /&gt;
 /etc/proxmox-backup/remote.cfg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Retrieve PBS password===&lt;br /&gt;
On a pve node check &#039;&#039;&#039;/etc/pve/priv/storage/&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===group lock failed: Permission denied===&lt;br /&gt;
Probably a mismatch between path in /etc/proxmox-backup/datastore.cfg and actual location. &lt;br /&gt;
You also need to restart proxmox-backup-proxy.service after changing either of those.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Where are the devices behind the datastores listed/configured?==&lt;br /&gt;
 systemctl list-units | grep mount&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Backup]]&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=ZFS&amp;diff=10491</id>
		<title>ZFS</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=ZFS&amp;diff=10491"/>
		<updated>2026-06-05T14:48:10Z</updated>

		<summary type="html">&lt;p&gt;Tony: /* Add log/cache */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Links =&lt;br /&gt;
*[http://open-zfs.org http://open-zfs.org] &lt;br /&gt;
*[http://www.edplese.com/samba-with-zfs.html http://www.edplese.com/samba-with-zfs.html] &lt;br /&gt;
*[http://wintelguy.com/zfs-calc.pl ZFS calculator] &lt;br /&gt;
*[https://www.raidz-calculator.com/default.aspx another zfs calculator]&lt;br /&gt;
*[https://bm-stor.com/index.php/blog/Linux-cluster-with-ZFS-on-Cluster-in-a-Box/ ZFS clustering] &lt;br /&gt;
*[https://jrs-s.net/2015/02/03/will-zfs-and-non-ecc-ram-kill-your-data/ https://jrs-s.net/2015/02/03/will-zfs-and-non-ecc-ram-kill-your-data/] ZFS and ECC] &lt;br /&gt;
*[https://docs.joyent.com/private-cloud/troubleshooting/disk-replacement ZFS troubleshooting/disk replacement] &lt;br /&gt;
*[https://www.high-availability.com/docs/Quickstart-ZFS-Cluster/ Creating a ZFS HA Cluster using shared or shared-nothing storage]&lt;br /&gt;
*[https://arstechnica.com/information-technology/2020/05/zfs-101-understanding-zfs-storage-and-performance/ ZFS 101]&lt;br /&gt;
*[https://arstechnica.com/gadgets/2021/06/raidz-expansion-code-lands-in-openzfs-master/ Raidz expansion]&lt;br /&gt;
*[https://somedudesays.com/2021/08/the-basic-guide-to-working-with-zfs/ Basic guide to working with zfs]&lt;br /&gt;
*[https://wiki.archlinux.org/title/ZFS Archlinux page on ZFS]&lt;br /&gt;
*[https://openzfs.github.io/openzfs-docs/Basic%20Concepts/RAIDZ.html Raidz basic concepts]&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/openzfs/zfs/commit/a8d83e2a24de6419dc58d2a7b8f38904985726cb#diff-04f1093cc6ee1ece5d6dc700498a8ce9617346e3d2c252f270760103e6ebf399L585 arcstats: p replaced with pm and pd]&lt;br /&gt;
&lt;br /&gt;
=Documentation=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[https://openzfs.github.io/openzfs-docs/man/4/zfs.4.html zfs manpage]&lt;br /&gt;
*[http://zfsonlinux.org/ ZFS on Linux] &lt;br /&gt;
*[https://openzfs.org/wiki/ openzfs wiki]&lt;br /&gt;
*[https://wiki.gentoo.org/wiki/ZFS https://wiki.gentoo.org/wiki/ZFS] &lt;br /&gt;
*[https://blog.programster.org/zfs-cheatsheet ZFS cheatsheet] &lt;br /&gt;
*[http://wiki.freebsd.org/ZFSQuickStartGuide http://wiki.freebsd.org/ZFSQuickStartGuide] &lt;br /&gt;
*[http://www.opensolaris.org/os/community/zfs/intro/ Opensolaris ZFS intro]&lt;br /&gt;
*[http://www.raidz-calculator.com/raidz-types-reference.aspx raidz types reference]&lt;br /&gt;
*[https://utcc.utoronto.ca/~cks/space/blog/solaris/ZFSZpoolFragmentationMeaning ZFS fragmentation]&lt;br /&gt;
*[https://openzfs.github.io/openzfs-docs/Basic%20Concepts/RAIDZ.html raidz]&lt;br /&gt;
&lt;br /&gt;
==ARC/Caching==&lt;br /&gt;
*[https://klarasystems.com/articles/applying-the-arc-algorithm-to-the-arc/ Applying the ARC Algorithm to the ARC]&lt;br /&gt;
*[https://linuxhint.com/configure-zfs-cache-high-speed-io/ Configuring ZFS Cache for High-Speed IO]&lt;br /&gt;
*[https://utcc.utoronto.ca/~cks/space/blog/solaris/ZFSARCItsVariousSizes ZFS Arc various sizes]&lt;br /&gt;
*[http://dtrace.org/blogs/brendan/2012/01/09/activity-of-the-zfs-arc/ Activity of the ZFS ARC]&lt;br /&gt;
*[https://utcc.utoronto.ca/~cks/space/blog/solaris/ZFSUnderstandingARCHits Understanding ARC hits]&lt;br /&gt;
*[https://www.45drives.com/community/articles/zfs-caching/ ZFS Caching]&lt;br /&gt;
*[https://zfs-discuss.opensolaris.narkive.com/D7v2YmjF/raidz-what-is-stored-in-parity What is stored in parity]&lt;br /&gt;
&lt;br /&gt;
===L2ARC===&lt;br /&gt;
*[https://www.brendangregg.com/blog/2008-07-22/zfs-l2arc.html ZFS L2ARC]&lt;br /&gt;
*[https://klarasystems.com/articles/openzfs-all-about-l2arc/ OpenZFS: All about the cache vdev or L2ARC]&lt;br /&gt;
&lt;br /&gt;
 sysctl kstat.zfs.misc.arcstats | egrep &#039;l2_(hits|misses)&#039;&lt;br /&gt;
and&lt;br /&gt;
 egrep &#039;l2_(hits|misses)&#039; /proc/spl/kstat/zfs/arcstats&lt;br /&gt;
&lt;br /&gt;
==ZIL==&lt;br /&gt;
*[https://utcc.utoronto.ca/~cks/space/blog/linux/ZFSGlobalZILInformation What ZIL metrics are exposed by (Open)ZFS on Linux]&lt;br /&gt;
*[http://nex7.blogspot.com/2013/04/zfs-intent-log.html ZFS Intent Log ]&lt;br /&gt;
===Adding ZIL/SLOG===&lt;br /&gt;
 zpool add -f tank log sda3 sdb3&lt;br /&gt;
====adding devices with different physical sector sizes is not allowed====&lt;br /&gt;
 &#039;&#039;&#039;zpool add -f&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Tuning ZFS==&lt;br /&gt;
*[https://openzfs.github.io/openzfs-docs/Performance%20and%20Tuning/index.html ZFS Performance and Tuning]&lt;br /&gt;
*[https://linuxhint.com/configure-zfs-cache-high-speed-io/ Configuring ZFS Cache for High-Speed IO]&lt;br /&gt;
*[https://www.high-availability.com/docs/ZFS-Tuning-Guide/ ZFS Tuning and Optimisation]&lt;br /&gt;
([https://forums.oracle.com/ords/apexds/post/part-10-monitoring-and-tuning-zfs-performance-4977 Monitoring and Tuning ZFS Performance]&lt;br /&gt;
&lt;br /&gt;
==ARC statistics==&lt;br /&gt;
*[https://openzfs.github.io/openzfs-docs/Performance%20and%20Tuning/Module%20Parameters.html Tuning module parameters]&lt;br /&gt;
*[https://openzfs.github.io/openzfs-docs/man/master/4/zfs.4.html ZFS]&lt;br /&gt;
&lt;br /&gt;
===ZFS module parameters===&lt;br /&gt;
 ls /sys/module/zfs/parameters/&lt;br /&gt;
 cat /proc/spl/kstat/zfs/arcstats&lt;br /&gt;
&lt;br /&gt;
===data_size===&lt;br /&gt;
size of cached user data&lt;br /&gt;
&lt;br /&gt;
===dnode_size===&lt;br /&gt;
&lt;br /&gt;
===hdr_size===&lt;br /&gt;
size of L2ARC headers stored in main ARC&lt;br /&gt;
&lt;br /&gt;
===metadata_size===&lt;br /&gt;
size of cached metadata&lt;br /&gt;
&lt;br /&gt;
=Tools=&lt;br /&gt;
*[https://github.com/asomers/ztop ztop]&lt;br /&gt;
*[https://github.com/jimsalterjrs/ioztat ioztat]&lt;br /&gt;
*[https://cuddletech.com/2008/10/explore-your-zfs-adaptive-replacement-cache-arc/ arc_summary]&lt;br /&gt;
*[https://github.com/richardelling/zfs-linux-tools zfs-linux-tools] kstat-analyzer is rather helpful&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==kstat-analyzer==&lt;br /&gt;
&lt;br /&gt;
===prefetch hit rate is low, consider tuning prefetcher===&lt;br /&gt;
Check:&lt;br /&gt;
&lt;br /&gt;
Supposed to leave that at 0:&lt;br /&gt;
 cat /sys/module/zfs/parameters/zfs_vdev_cache_size&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Code: &lt;br /&gt;
 if (float(kstats[&#039;hits&#039;]) / accesses) &amp;lt; PREFETCH_RATIO_OK&lt;br /&gt;
&lt;br /&gt;
Relevant links:&lt;br /&gt;
*https://www.truenas.com/community/threads/notes-on-zfs-prefetch.1076/&lt;br /&gt;
&lt;br /&gt;
*https://www.phoronix.com/news/OpenZFS-Uncached-Prefetch&lt;br /&gt;
*https://utcc.utoronto.ca/~cks/space/blog/solaris/ZFSARCStatsAndPrefetch&lt;br /&gt;
&lt;br /&gt;
===error: arcstats value &amp;quot;p&amp;quot; not found===&lt;br /&gt;
&#039;p&#039; seems to be missing on some systems&lt;br /&gt;
 See [https://github.com/openzfs/zfs/commit/a8d83e2a24de6419dc58d2a7b8f38904985726cb#diff-04f1093cc6ee1ece5d6dc700498a8ce9617346e3d2c252f270760103e6ebf399L585 More adaptive ARC eviction]&lt;br /&gt;
&lt;br /&gt;
==Benchmarking zfs==&lt;br /&gt;
 *[https://github.com/richardelling/zfs-linux-tools/tree/master/fio fio]&lt;br /&gt;
&lt;br /&gt;
=Processes=&lt;br /&gt;
==arc_evict==&lt;br /&gt;
Evict buffers from list until we&#039;ve removed the specified number of&lt;br /&gt;
bytes.  Move the removed buffers to the appropriate evict state.&lt;br /&gt;
If the recycle flag is set, then attempt to &amp;quot;recycle&amp;quot; a buffer:&lt;br /&gt;
- look for a buffer to evict that is `bytes&#039; long.&lt;br /&gt;
- return the data block from this buffer rather than freeing it.&lt;br /&gt;
This flag is used by callers that are trying to make space for a&lt;br /&gt;
new buffer in a full arc cache.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This function makes a &amp;quot;best effort&amp;quot;.  It skips over any buffers&lt;br /&gt;
it can&#039;t get a hash_lock on, and so may not catch all candidates.&lt;br /&gt;
It may also return without evicting as much space as requested.&lt;br /&gt;
&lt;br /&gt;
==arc_prune==&lt;br /&gt;
&lt;br /&gt;
=Commands=&lt;br /&gt;
==Get IO statistics==&lt;br /&gt;
===zapool-iostat===&lt;br /&gt;
*[https://klarasystems.com/articles/openzfs-using-zpool-iostat-to-monitor-pool-perfomance-and-health/ OpenZFS: Using zpool iostat to monitor pool performance and health]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting arc statistics==&lt;br /&gt;
 arcstat&lt;br /&gt;
&lt;br /&gt;
 arc_summary&lt;br /&gt;
Tip, for details use&lt;br /&gt;
 arc_summary -d&lt;br /&gt;
There is also&lt;br /&gt;
 cat /proc/spl/kstat/zfs/arcstats&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
 zfetchstat + kstat-analyzer from zfs-linux-tools&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===zil/slog statistics===&lt;br /&gt;
 arc_summary -s zil&lt;br /&gt;
or&lt;br /&gt;
 cat /proc/spl/kstat/zfs/zil&lt;br /&gt;
or &lt;br /&gt;
 zilstat&lt;br /&gt;
or&lt;br /&gt;
  zpool iostat -v&lt;br /&gt;
&lt;br /&gt;
===l2arc statistics===&lt;br /&gt;
 arc_summary -s l2arc&lt;br /&gt;
&lt;br /&gt;
==Getting IO statistics==&lt;br /&gt;
Also man zpool-iostat &lt;br /&gt;
 zpool iostat -v 300&lt;br /&gt;
&lt;br /&gt;
=Terms and acronyms=&lt;br /&gt;
==vdev==&lt;br /&gt;
&#039;&#039;&#039;V&#039;&#039;&#039;irtual &#039;&#039;&#039;Dev&#039;&#039;&#039;ice.&lt;br /&gt;
&lt;br /&gt;
*[https://wiki.archlinux.org/title/ZFS/Virtual_disks ZFS Virtual disks]&lt;br /&gt;
==ARC==&lt;br /&gt;
&#039;&#039;&#039;A&#039;&#039;&#039;daptive &#039;&#039;&#039;R&#039;&#039;&#039;eplacement &#039;&#039;&#039;C&#039;&#039;&#039;ache&lt;br /&gt;
&lt;br /&gt;
Portion of RAM used to cache data to speed up read performance&lt;br /&gt;
&lt;br /&gt;
==L2ARC==&lt;br /&gt;
&#039;&#039;&#039;L&#039;&#039;&#039;evel &#039;&#039;&#039;2&#039;&#039;&#039; &#039;&#039;&#039;A&#039;&#039;&#039;daptive Replacement &#039;&#039;&#039;C&#039;&#039;&#039;ache&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;L2ARC is usually considered if hit rate for the ARC is below 90% while having 64+ GB of RAM&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SSD cache&lt;br /&gt;
&lt;br /&gt;
==DMU==&lt;br /&gt;
Data Management Unit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==MFU==&lt;br /&gt;
Most Frequently Used&lt;br /&gt;
&lt;br /&gt;
==MRU==&lt;br /&gt;
Most Recently Used&lt;br /&gt;
&lt;br /&gt;
==zvol==&lt;br /&gt;
kind of block device whose space is allocated from the pool, useful for iscsi targets&lt;br /&gt;
&lt;br /&gt;
==Scrubbing==&lt;br /&gt;
Checking disks/data integrity&lt;br /&gt;
 zpool status &amp;lt;poolname&amp;gt; | grep scrub&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
 zpool scrub &amp;lt;poolname&amp;gt;&lt;br /&gt;
probably taken care of by cron.&lt;br /&gt;
&lt;br /&gt;
==SLOG==&lt;br /&gt;
See [ZIL]&lt;br /&gt;
&lt;br /&gt;
==ZIL==&lt;br /&gt;
&#039;&#039;&#039;ZFS Intent Log&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[https://constantin.glez.de/2010/07/20/solaris-zfs-synchronous-writes-and-zil-explained/ ZIL explained]&lt;br /&gt;
&lt;br /&gt;
the space synchronous writes are logged before the confirmation is sent back to the client&lt;br /&gt;
&lt;br /&gt;
==prefetch==&lt;br /&gt;
See /proc/spl/kstat/zfs/zfetchstats&lt;br /&gt;
&lt;br /&gt;
*[https://cuddletech.com/2009/05/understanding-zfs-prefetch/ Understanding ZFS prefetch]&lt;br /&gt;
*[https://svennd.be/tuning-of-zfs-module/ Tuning of the ZFS module]&lt;br /&gt;
*[https://cuddletech.com/2009/05/understanding-zfs-prefetch/ Understanding ZFS prefetch]&lt;br /&gt;
*[https://utcc.utoronto.ca/~cks/space/blog/solaris/ZFSARCStatsAndPrefetch Some basic ZFS ARC statistics and prefetching]&lt;br /&gt;
*[https://utcc.utoronto.ca/~cks/space/blog/solaris/ZFSPrefetchStatsNotes Some notes on ZFS prefetch related stats]&lt;br /&gt;
*[http://dtrace.org/blogs/brendan/2012/01/09/activity-of-the-zfs-arc/ Activity of the ZFS ARC]&lt;br /&gt;
&lt;br /&gt;
= HOWTO =&lt;br /&gt;
== Get zfs version ==&lt;br /&gt;
 cat /sys/module/zfs/version&lt;br /&gt;
&lt;br /&gt;
==Get quota sizes/reservations==&lt;br /&gt;
 zfs get quota,reservation tank/vol1&lt;br /&gt;
or just&lt;br /&gt;
 zfs get quota&lt;br /&gt;
&lt;br /&gt;
==Set maximum size of dataset==&lt;br /&gt;
 zfs set quota=200G tank/myset&lt;br /&gt;
&lt;br /&gt;
==Caching==&lt;br /&gt;
===Add log/cache===&lt;br /&gt;
For l2arc cache mirrors make little sense, just add disks&lt;br /&gt;
 zpool add rpool cache sdf&lt;br /&gt;
or maybe better&lt;br /&gt;
 zpool add rpool cache /dev/disk/by-id/ata-SAMSUNG_MZ7LH960HAJR-00005_S45NNA0N47394&lt;br /&gt;
or simply&lt;br /&gt;
 zpool add rpool cache ata-SAMSUNG_MZ7LH960HAJR-00005_S45NNA0N47394&lt;br /&gt;
&lt;br /&gt;
===Add ZIL/SLOG write cache===&lt;br /&gt;
&lt;br /&gt;
 zpool add rpool log mirror sdk sdl&lt;br /&gt;
&lt;br /&gt;
===Remove ZIl/SLOG mirrored cache===&lt;br /&gt;
 zpool remove mypool mirror-4 sdn1 sdo1&lt;br /&gt;
&lt;br /&gt;
==Getting statistics==&lt;br /&gt;
&lt;br /&gt;
===Show cache activity===&lt;br /&gt;
 dstat --zfs-arc --zfs-l2arc --zfs-zil -d 5&lt;br /&gt;
&lt;br /&gt;
===zpool===&lt;br /&gt;
 zpool iostat&lt;br /&gt;
====More statistics, every 5 seconds====&lt;br /&gt;
 zpool iostat -v 5&lt;br /&gt;
&lt;br /&gt;
===Flush linux caches===&lt;br /&gt;
 echo 3 &amp;gt; /proc/sys/vm/drop_caches&lt;br /&gt;
&lt;br /&gt;
===arc statistics===&lt;br /&gt;
===l2arc statistics===&lt;br /&gt;
&lt;br /&gt;
===ZIL statistics===&lt;br /&gt;
 cat /proc/spl/kstat/zfs/zil&lt;br /&gt;
&lt;br /&gt;
==Create zfs filesystem==&lt;br /&gt;
 zfs create poolname/fsname&lt;br /&gt;
this also creates mountpoint&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Add vdev to pool==&lt;br /&gt;
 zpool add mypool raidz1 sdg sdh sdi&lt;br /&gt;
&lt;br /&gt;
== Replace disk in zfs ==&lt;br /&gt;
&lt;br /&gt;
=== Some links ===&lt;br /&gt;
&lt;br /&gt;
*[https://itectec.com/ubuntu/ubuntu-replacing-a-dead-disk-in-a-zpool/ https://itectec.com/ubuntu/ubuntu-replacing-a-dead-disk-in-a-zpool/] &lt;br /&gt;
&lt;br /&gt;
Get information first:&lt;br /&gt;
&lt;br /&gt;
Name of disk&lt;br /&gt;
&lt;br /&gt;
 zpool status&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Find uid of disk to replace&lt;br /&gt;
&lt;br /&gt;
take it offline&lt;br /&gt;
&lt;br /&gt;
 zpool offline poolname ata-WDC_WD20EFRX-68EUZN0_WD-WCC4M5RLZC6V&lt;br /&gt;
&lt;br /&gt;
Get the disk guid:&lt;br /&gt;
&lt;br /&gt;
 zdb&lt;br /&gt;
&lt;br /&gt;
guid: 15233236897831806877&lt;br /&gt;
&lt;br /&gt;
Get list of disk by id:&lt;br /&gt;
&lt;br /&gt;
 ls -al /dev/disk/by-id&lt;br /&gt;
&lt;br /&gt;
Save the id, shutdown, replace disk, boot:&lt;br /&gt;
&lt;br /&gt;
Find the new disk:&lt;br /&gt;
&lt;br /&gt;
 ls -al /dev/disk/by-id&lt;br /&gt;
&lt;br /&gt;
Run replace command. The id is the guid of the old disk, name is of the new disk&lt;br /&gt;
&lt;br /&gt;
 zpool replace tank /dev/disk/by-id/13450850036953119346 /dev/disk/by-id/ata-ST4000VN000-1H4168_Z302FQVZ&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
or just&lt;br /&gt;
 zpool replace tank /dev/sdi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===If disk is shown as &#039;&#039;&#039;UNAVAIL&#039;&#039;&#039;===&lt;br /&gt;
 zpool offline tank sdi&lt;br /&gt;
&lt;br /&gt;
==Showing information about ZFS pools and datasets==&lt;br /&gt;
===Show pools with sizes===&lt;br /&gt;
 zpool list &lt;br /&gt;
or&lt;br /&gt;
 zpool list -H -o name,size&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Show reservations on datasets===&lt;br /&gt;
 zfs list -o name,reservation&lt;br /&gt;
&lt;br /&gt;
==Swap on zfs==&lt;br /&gt;
https://askubuntu.com/questions/228149/zfs-partition-as-swap&lt;br /&gt;
 zfs create pool/swap -V 4G -b 4K&lt;br /&gt;
 mkswap -f /dev/pool/swap&lt;br /&gt;
 swapon /dev/pool/swap&lt;br /&gt;
and remember fstab&lt;br /&gt;
&lt;br /&gt;
==vdevs==&lt;br /&gt;
===multiple vdevs===&lt;br /&gt;
Multiple vdevs in a zpool get striped.&lt;br /&gt;
What about balance?&lt;br /&gt;
&lt;br /&gt;
===invalid vdev specification===&lt;br /&gt;
Probably means you need -f&lt;br /&gt;
&lt;br /&gt;
===show balance between vdevs===&lt;br /&gt;
 zpool iostat -v &#039;pool&#039; [interval in seconds]&lt;br /&gt;
orjust&lt;br /&gt;
 zpool iostat -vc &#039;pool&#039;&lt;br /&gt;
&lt;br /&gt;
== Tuning arc settings ==&lt;br /&gt;
See [https://openzfs.github.io/openzfs-docs/Performance%20and%20Tuning/Module%20Parameters.html Tuning ZFS modules parameters]&lt;br /&gt;
===zfs_arc_max===&lt;br /&gt;
Linux defaults to giving 50% of RAM to arc, this is when:&lt;br /&gt;
 cat /sys/module/zfs/parameters/zfs_arc_max&lt;br /&gt;
 0&lt;br /&gt;
 grep c_max /proc/spl/kstat/zfs/arcstats&lt;br /&gt;
To change this:&lt;br /&gt;
 echo 5368709120 &amp;gt; /sys/module/zfs/parameters/zfs_arc_max&lt;br /&gt;
and add to /etc/modprobe.d/zfs.conf&lt;br /&gt;
 options zfs zfs_arc_max=5368709120&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE you might need to run (for example when running / on zfs)&#039;&#039;&#039; &lt;br /&gt;
 update-initramfs -u -k all&lt;br /&gt;
&lt;br /&gt;
and perhaps clear caches and reset counters:&lt;br /&gt;
&lt;br /&gt;
 echo 3 &amp;gt; /proc/sys/vm/drop_caches&lt;br /&gt;
&lt;br /&gt;
===Tune zfs_arc_dnode_limit_percent===&lt;br /&gt;
See https://openzfs.github.io/openzfs-docs/man/master/4/zfs.4.html&lt;br /&gt;
&lt;br /&gt;
Whenzfs_arc_dnode_limit = 0, percent will be used&lt;br /&gt;
 echo 20 &amp;gt; /sys/module/zfs/parameters/zfs_arc_dnode_limit_percent&lt;br /&gt;
&lt;br /&gt;
In /etc/modprobe.d/zfs.conf: &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 options zfs zfs_arc_dnode_limit_percent=20&lt;br /&gt;
&lt;br /&gt;
===export iscsi===&lt;br /&gt;
* https://linuxhint.com/share-zfs-volumes-via-iscsi/&lt;br /&gt;
&lt;br /&gt;
==Get all volume info==&lt;br /&gt;
 zfs get all tank/myvol&lt;br /&gt;
==Get volume size==&lt;br /&gt;
 zfs get volsize tank/myvol&lt;br /&gt;
&lt;br /&gt;
==Set volume size==&lt;br /&gt;
 zfs set volsize=200G tank/myvol&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
==No pools available==&lt;br /&gt;
Try&lt;br /&gt;
 zpool import -d /dev/disk/by-id tank&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==arc_summary==&lt;br /&gt;
===VDEV cache disabled, skipping section===&lt;br /&gt;
This is normal, vdev caching is considered bad in current code&lt;br /&gt;
&lt;br /&gt;
==Arc metadata size exceeds maximum==&lt;br /&gt;
So &#039;&#039;&#039;arc_meta_used&#039;&#039;&#039; &amp;gt; &#039;&#039;&#039;arc_meta_limit&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==increasing feed rate==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== show status and disks ==&lt;br /&gt;
&lt;br /&gt;
 zpool status&lt;br /&gt;
&lt;br /&gt;
===show more about disks===&lt;br /&gt;
 zpool status -P&lt;br /&gt;
&lt;br /&gt;
== show drives/pools ==&lt;br /&gt;
&lt;br /&gt;
 zfs list&lt;br /&gt;
       &lt;br /&gt;
== List disk devices in pool ==&lt;br /&gt;
 POOL=rpool&lt;br /&gt;
 zpool list -Pv $POOL |  awk &#039;/^    / {print $1}&#039; | xargs ls -l | awk &#039;{ print $11 }&#039; | sed &#039;s/\.\.\/\.\.\//\/dev\//g&#039;&lt;br /&gt;
== check raid level ==&lt;br /&gt;
&lt;br /&gt;
 zfs list -a&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Estimate raidz speeds==&lt;br /&gt;
 raidz1: N/(N-1) * IOPS&lt;br /&gt;
 raidz2: N/(N-2) * IOPS&lt;br /&gt;
 raidz3: N/(N-3) * IOPS&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==VDEV cache disabled, skipping section==&lt;br /&gt;
Looks like you just don&#039;t have l2arc cache&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==cannot export &#039;tank&#039;: pool is busy==&lt;br /&gt;
After checking stuff like nfs etc try:&lt;br /&gt;
 zfs unshare -a&lt;br /&gt;
 zfs umount -a -f&lt;br /&gt;
 zpool export -f tank&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===One or more devices has experienced an unrecoverable error.===&lt;br /&gt;
&lt;br /&gt;
===The ZFS modules cannot be auto-loaded.===&lt;br /&gt;
&lt;br /&gt;
===modprobe: FATAL: Module zfs not found ===&lt;br /&gt;
Maybe try&lt;br /&gt;
 apt install zfs-dkms&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Quota==&lt;br /&gt;
===size is less than current used or reserved space===&lt;br /&gt;
 zfs get quota,reservation&lt;br /&gt;
for clues&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Proxmox_Backup_Server&amp;diff=10490</id>
		<title>Proxmox Backup Server</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Proxmox_Backup_Server&amp;diff=10490"/>
		<updated>2026-06-05T08:44:50Z</updated>

		<summary type="html">&lt;p&gt;Tony: /* FAQ */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Links=&lt;br /&gt;
*[https://www.proxmox.com/en/proxmox-backup-server/overview PBS Homepage]&lt;br /&gt;
*[https://pypi.org/project/pbs-monitoring-tools/ PBS monitoring tools]&lt;br /&gt;
&lt;br /&gt;
= Documentation =&lt;br /&gt;
*[https://pbs.proxmox.com/docs/ PBS documentation]&lt;br /&gt;
*[https://pbs.proxmox.com/docs/technical-overview.html PBS Technical overview]&lt;br /&gt;
*[https://pbs.proxmox.com/docs/managing-remotes.html Managing PBS remotes &amp;amp; sync]&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
*[https://pbs.proxmox.com/docs/installation.html Installing PBS]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Upgrading PBS==&lt;br /&gt;
*[https://pbs.proxmox.com/wiki/index.php/Upgrade_from_2_to_3 Upgrading PBS 2 to 3]&lt;br /&gt;
&lt;br /&gt;
=Processes=&lt;br /&gt;
==Service daemons==&lt;br /&gt;
See [https://pbs.proxmox.com/docs/sysadmin.html#service-daemons Service Daemons]&lt;br /&gt;
&lt;br /&gt;
==Command line tools==&lt;br /&gt;
See [https://pbs.proxmox.com/docs/sysadmin.html#command-line-tools Command-line Tools]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Under the hood==&lt;br /&gt;
Structure of datastore:&lt;br /&gt;
 /mnt/datastore/yourDS&lt;br /&gt;
contains:&lt;br /&gt;
===.chunks===&lt;br /&gt;
The actual data&lt;br /&gt;
===.lock===&lt;br /&gt;
===vm===&lt;br /&gt;
Metadata per vm:&lt;br /&gt;
client.log.blob  drive-scsi0.img.fidx  index.json.blob  qemu-server.conf.blob &lt;br /&gt;
===.gc-status===&lt;br /&gt;
&lt;br /&gt;
=Configuration files=&lt;br /&gt;
==/etc/proxmox/remote.cfg==&lt;br /&gt;
In WebUI under Configuration-&amp;gt;Remotes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Notifications==&lt;br /&gt;
===Notification system===&lt;br /&gt;
====/etc/backup-server/notifications.cfg====&lt;br /&gt;
Contains the default settings, managed via Configuration-&amp;gt;Notifications&lt;br /&gt;
=HOWTO=&lt;br /&gt;
&lt;br /&gt;
==Move datastore==&lt;br /&gt;
*Make sure there is no activity on that datastore, i suggest using rsync. As i can tell it should be safe to use rsync option &#039;&#039;&#039;--ignore-existing&#039;&#039;&#039; when updating a copy.&lt;br /&gt;
*Edit &#039;/etc/proxmox-backup/datastore.cfg&#039; to change path to datastore.&lt;br /&gt;
*Reload configuration (&#039;&#039;&#039;this will interrupt running garbage collectors&#039;&#039;&#039;) :&lt;br /&gt;
 systemctl reload proxmox-backup-proxy&lt;br /&gt;
&lt;br /&gt;
==Upgrade proxmox 6 to 7==&lt;br /&gt;
https://pve.proxmox.com/wiki/Upgrade_from_6.x_to_7.0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===WARN: &#039;noout&#039; flag not set - recommended to prevent rebalancing during cluster-wide upgrades===&lt;br /&gt;
https://docs.ceph.com/en/quincy/rados/troubleshooting/troubleshooting-osd/&lt;br /&gt;
 ceph osd set noout&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Restore disk from PBS==&lt;br /&gt;
Use [[pbs-restore]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==What&#039;s so busy?==&lt;br /&gt;
 proxmox-backup-manager list&lt;br /&gt;
and then&lt;br /&gt;
 proxmox-backup-manager task log &amp;lt;everying from and including &amp;quot;UPID:&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Show some logs==&lt;br /&gt;
 proxmox-backup-manager task list --all&lt;br /&gt;
&lt;br /&gt;
or perhaps&lt;br /&gt;
 proxmox-backup-debug api get /nodes/{node}/tasks --typefilter=backup&lt;br /&gt;
where {node} can be found with&lt;br /&gt;
 proxmox-backup-debug api get /nodes/&lt;br /&gt;
OR&lt;br /&gt;
 proxmox-backup-debug api get /nodes/localhost/tasks --typefilter=backup --start=0 --limit=500 --output-format json-pretty&lt;br /&gt;
&lt;br /&gt;
==List the vms in a datastore==&lt;br /&gt;
 proxmox-backup-client list&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Show cluster status==&lt;br /&gt;
 pvecm status&lt;br /&gt;
&lt;br /&gt;
=PBS Backups=&lt;br /&gt;
&lt;br /&gt;
==Create new backup repository==&lt;br /&gt;
===On PBS server:===&lt;br /&gt;
====Create account==== &lt;br /&gt;
&lt;br /&gt;
Configuration-&amp;gt;Access Control-&amp;gt;User Management-&amp;gt;Add&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Create datastore====&lt;br /&gt;
Create space, normally something like&lt;br /&gt;
 zfs create pbspool/mystore&lt;br /&gt;
&lt;br /&gt;
 Datastore-&amp;gt;Add Datastore&lt;br /&gt;
New subdirectory will be created &lt;br /&gt;
&lt;br /&gt;
Backup path must be full path to storage + datastore name&lt;br /&gt;
 Configuration-&amp;gt;Access Control-&amp;gt;Permissions&lt;br /&gt;
 Datastore-&amp;gt;yournewstore-&amp;gt;Permissions&lt;br /&gt;
to give the user access, Role is usually DatastoreBackup&lt;br /&gt;
&lt;br /&gt;
===On PBS guest:===&lt;br /&gt;
 Datacenter-&amp;gt;Storage-&amp;gt;Add-&amp;gt;Proxmox backup server&lt;br /&gt;
For &amp;quot;Datastore&amp;quot; enter the name as used on the PBS.&lt;br /&gt;
For fingerprint (on pbs server):&lt;br /&gt;
 proxmox-backup-manager cert info | grep Fingerprint&lt;br /&gt;
&lt;br /&gt;
Then:&lt;br /&gt;
 Backup-&amp;gt;Add storage: your-pbs&lt;br /&gt;
&lt;br /&gt;
==Remove PBS datastore==&lt;br /&gt;
 proxmox-backup-manager datastore remove yourdatastore&lt;br /&gt;
this does not delete the data!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Move a PBS datastore===&lt;br /&gt;
 rsync -auv /mnt/datastore/old /mnt/datastore/new&lt;br /&gt;
 systemctl stop proxmox-backup-proxy&lt;br /&gt;
 rsync -auv /mnt/datastore/old /mnt/datastore/new&lt;br /&gt;
 vi /etc/proxmox-backup/datastore.cfg&lt;br /&gt;
 systemctl start proxmox-backup-proxy&lt;br /&gt;
and after checking everything you can&lt;br /&gt;
 rm -vf /mnt/datastore/old&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Move vm data to another datastore==&lt;br /&gt;
=== Create local sync user ===&lt;br /&gt;
 localsync@pbs&lt;br /&gt;
Permissions: datastorereader on source, datastorebackup on target&lt;br /&gt;
&lt;br /&gt;
== PBS API ==&lt;br /&gt;
*[https://pbs.proxmox.com/docs/user-management.html?highlight=token#api-tokens API Tokens]&lt;br /&gt;
*[https://pbs.proxmox.com/docs/api-viewer/ PBS API viewer]&lt;br /&gt;
&lt;br /&gt;
PBS equivalent for &#039;&#039;&#039;pvesh&#039;&#039;&#039;: &lt;br /&gt;
 proxmox-backup-debug &lt;br /&gt;
&lt;br /&gt;
example:&lt;br /&gt;
 proxmox-backup-debug api get /status/datastore-usage&lt;br /&gt;
&lt;br /&gt;
 proxmox-backup-debug api get /nodes/localhost/tasks&lt;br /&gt;
&lt;br /&gt;
===Create cookie===&lt;br /&gt;
 PBS=your.pbs.server&lt;br /&gt;
 curl --silent --insecure --data &amp;quot;username=zabbix@pbs&amp;amp;password=n0tmyp4ss&amp;quot; https://$PBS:8007/api2/json/access/ticket | jq --raw-output &#039;.data.ticket&#039; | sed &#039;s/^/PBSAuthCookie=/&#039; &amp;gt; cookie&lt;br /&gt;
&lt;br /&gt;
Test cookie&lt;br /&gt;
 curl -XGET --silent -k -b $(cat cookie ) https://$PBS:8007/api2/json/&lt;br /&gt;
&lt;br /&gt;
== Recovering files from backup ==&lt;br /&gt;
&lt;br /&gt;
 export PBS_REPOSITORY=mypbs:mydatastore&lt;br /&gt;
 proxmox-backup-client snapshot list&lt;br /&gt;
&lt;br /&gt;
Output like: &#039;&#039;&#039;vm/109/2022-01-25T20:18:02Z │ 200.00 GiB │ client.log drive-ide0.img index.json qemu-server.conf&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 # proxmox-backup-client map vm/109/2022-01-25T20:18:02Z drive-ide0.img&lt;br /&gt;
 &lt;br /&gt;
 Image &#039;data2:vm/109/2022-01-25T20:18:02Z/drive-ide0.img&#039; mapped on /dev/loop0&lt;br /&gt;
&lt;br /&gt;
 # lsblk&lt;br /&gt;
 &lt;br /&gt;
 NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT&lt;br /&gt;
 loop0          7:0    0   200G  1 loop&lt;br /&gt;
 ├─loop0p1    259:0    0   251M  1 part&lt;br /&gt;
 ├─loop0p2    259:1    0   3.9G  1 part&lt;br /&gt;
 └─loop0p3    259:2    0 195.9G  1 part&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
 mount /dev/loop0p3 /mnt/loop/&lt;br /&gt;
&lt;br /&gt;
mount: /mnt/loop: cannot mount /dev/loop0p3 read-only.&lt;br /&gt;
&lt;br /&gt;
 mount -o loop,ro,norecovery /dev/loop0p3 /mnt/loop/&lt;br /&gt;
&lt;br /&gt;
and that should be it. After you&#039;re done:&lt;br /&gt;
&lt;br /&gt;
 umount /mnt/loop&lt;br /&gt;
 proxmox-backup-client unmap /dev/loop0&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
TBD: explain how t o use kpartx and friends to acces LVM volumes&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
==Error messages==&lt;br /&gt;
===user account disabled or expired===&lt;br /&gt;
&lt;br /&gt;
===error fetching datastores - 401 Unauthorized (500)===&lt;br /&gt;
Check username/password :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===datastore path not empty===&lt;br /&gt;
When trying to create a datastore.&lt;br /&gt;
https://forum.proxmox.com/threads/bug-when-adding-new-storage-task-error-datastore-path-is-not-empty.157629/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===TASK ERROR: sync failed with some errors===&lt;br /&gt;
??&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===remove the file &#039;/run/proxmox-backup/old-locking&#039;, and reload all PBS daemons===&lt;br /&gt;
When no jobs running:&lt;br /&gt;
 rm /run/proxmox-backup/old-locking&lt;br /&gt;
for me worked:&lt;br /&gt;
 systemctl restart proxmox-backup.service&lt;br /&gt;
 systemctl restart proxmox-backup-proxy.service&lt;br /&gt;
&lt;br /&gt;
==Limit bandwidth==&lt;br /&gt;
===On cluster node===&lt;br /&gt;
In /etc/vzdump.conf&lt;br /&gt;
 # In KB/s&lt;br /&gt;
 bwlimit: 1500&lt;br /&gt;
&lt;br /&gt;
==Garbage collection==&lt;br /&gt;
===What does the &#039;&#039;&#039;Prune all&#039;&#039;&#039; button do?===&lt;br /&gt;
It will give you a dialog with the usual &#039;Keep xxx&#039; options.&lt;br /&gt;
&lt;br /&gt;
=== TASK ERROR: update atime failed, disk full ===&lt;br /&gt;
Try pruning some&lt;br /&gt;
Check if some sync is running&lt;br /&gt;
&lt;br /&gt;
===unable to access non-existent chunk===&lt;br /&gt;
check if this returns?&lt;br /&gt;
&lt;br /&gt;
=== Pending removals ===&lt;br /&gt;
&lt;br /&gt;
 proxmox-backup-manager garbage-collection status mystore&lt;br /&gt;
&lt;br /&gt;
== error pruning backups - check log (500) ==&lt;br /&gt;
&lt;br /&gt;
Possibly a permissions thing, which is good. Leave pruning to the backup server&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==command error: http upgrade request timed out==&lt;br /&gt;
??&lt;br /&gt;
&lt;br /&gt;
==Connection error - server offline?==&lt;br /&gt;
This can also happen when you can actually connect to server:8007&lt;br /&gt;
Check&lt;br /&gt;
  systemctl status proxmox-backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Connection error 401: No ticket==&lt;br /&gt;
Browser issues, try clearing cache/cookies(?) or another browser.&lt;br /&gt;
&lt;br /&gt;
==Noout flag(s) set==&lt;br /&gt;
 ceph osd unset noout&lt;br /&gt;
&lt;br /&gt;
==qmp command &#039;query-backup&#039; failed - got wrong command id==&lt;br /&gt;
maybe bwlimit?&lt;br /&gt;
&lt;br /&gt;
==create storage failed: mypbs: error fetching datastores - 500 Can&#039;t connect to mypbs:8007 (Connection timed out) (500)==&lt;br /&gt;
&lt;br /&gt;
==Garbage collection failed: unlinking chunk ... ENOENT: No such file or directory==&lt;br /&gt;
Ignore?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Sync errror: owner check failed==&lt;br /&gt;
Check in datastore/yourrepository/vm/*/owner&lt;br /&gt;
&lt;br /&gt;
There&#039;s command&lt;br /&gt;
 proxmox-backup-client change-owner&lt;br /&gt;
&lt;br /&gt;
==Sync remote==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==tcp connect error: deadline has elapsed==&lt;br /&gt;
Probably connection timeout. &lt;br /&gt;
===proxmox-backup-manager remote list not showing remote===&lt;br /&gt;
Try&lt;br /&gt;
 proxmox-backup-manager remote show&lt;br /&gt;
Check&lt;br /&gt;
 /etc/proxmox-backup/remote.cfg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Retrieve PBS password===&lt;br /&gt;
On a pve node check &#039;&#039;&#039;/etc/pve/priv/storage/&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===group lock failed: Permission denied===&lt;br /&gt;
Probably a mismatch between path in /etc/proxmox-backup/datastore.cfg and actual location. &lt;br /&gt;
You also need to restart proxmox-backup-proxy.service after changing either of those.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Where are the devices behind the datastores listed/configured?==&lt;br /&gt;
 systemctl list-units | grep mount&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Backup]]&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Apt&amp;diff=10489</id>
		<title>Apt</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Apt&amp;diff=10489"/>
		<updated>2026-06-05T08:04:50Z</updated>

		<summary type="html">&lt;p&gt;Tony: /* FAQ */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
Debian/Ubuntu package manager&lt;br /&gt;
&lt;br /&gt;
=Documentation=&lt;br /&gt;
==Phased Packages==&lt;br /&gt;
* [https://documentation.ubuntu.com/server/explanation/software/about-apt-upgrade-and-phased-updates/index.html About apt upgrade and phased updates]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Unattended upgrades=&lt;br /&gt;
==Links==&lt;br /&gt;
*https://help.ubuntu.com/community/AutomaticSecurityUpdates&lt;br /&gt;
*[https://pimylifeup.com/unattended-upgrades-debian-ubuntu/ Using Unattended-Upgrades on Debian and Ubuntu]&lt;br /&gt;
*https://wiki.debian.org/UnattendedUpgrades&lt;br /&gt;
*https://linuxblog.io/how-to-enable-unattended-upgrades-on-ubuntu-debian/&lt;br /&gt;
*[https://gist.github.com/CodingKoopa/3b30afe8c91e3950f6b124cd2abe3b6b the apt manpage you were looking for]&lt;br /&gt;
&lt;br /&gt;
==Enabling/disabling unattended upgrades==&lt;br /&gt;
Maybe install it first&lt;br /&gt;
 apt install unattended-upgrades&lt;br /&gt;
that will most likely also enable unattended upgrades&lt;br /&gt;
then&lt;br /&gt;
 dpkg-reconfigure unattended-upgrades&lt;br /&gt;
The dialog will show which option is selected now.&lt;br /&gt;
&lt;br /&gt;
==The relevant systemd service==&lt;br /&gt;
 apt-daily-upgrade.service&lt;br /&gt;
&lt;br /&gt;
==Disable unattended upgrades==&lt;br /&gt;
In /etc/apt/apt.conf.d/20auto-upgrades&lt;br /&gt;
 APT::Periodic::Unattended-Upgrade &amp;quot;0&amp;quot;;&lt;br /&gt;
==The logs==&lt;br /&gt;
 /var/log/unattended-upgrades/*.log&lt;br /&gt;
&lt;br /&gt;
==FAQ==&lt;br /&gt;
===Unattended-upgrade is not upgrading all packages===&lt;br /&gt;
That&#039;s normal, it defaults to upgrading only security updates.&lt;br /&gt;
&lt;br /&gt;
===Unattended-Upgrade::DevRelease &amp;quot;auto&amp;quot;;===&lt;br /&gt;
Only works on &amp;quot;dev releases&amp;quot;, which is any not .04&lt;br /&gt;
&lt;br /&gt;
==What is this Allowed-Origins about?==&lt;br /&gt;
Check output of &lt;br /&gt;
 apt -s upgrade&lt;br /&gt;
&lt;br /&gt;
you might see something like&lt;br /&gt;
&lt;br /&gt;
 Conf cloud-init (25.1.2-0ubuntu0~22.04.2 &#039;&#039;&#039;Ubuntu:22.04/jammy-updates&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
which will match&lt;br /&gt;
 ${distro_id}:${distro_codename}-updates&lt;br /&gt;
&lt;br /&gt;
==No packages found that can be upgraded unattended==&lt;br /&gt;
By default &#039;&#039;&#039;&amp;quot;${distro_id}:${distro_codename}-updates&amp;quot;;&#039;&#039;&#039; is commented out in &#039;&#039;&#039;/etc/apt/apt.conf.d/50unattended-upgrades&#039;&#039;&#039;, so to get those updated as well, uncomment that line.&lt;br /&gt;
&lt;br /&gt;
=HOWTO=&lt;br /&gt;
==Extract files from .deb==&lt;br /&gt;
 dpkg-deb&lt;br /&gt;
or just &lt;br /&gt;
 dpkg -e foo.deb&lt;br /&gt;
note: this extracts to .&lt;br /&gt;
&lt;br /&gt;
==Pin a version==&lt;br /&gt;
*[https://help.ubuntu.com/community/PinningHowto Pinning Howto]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==List installed packages==&lt;br /&gt;
 apt list --installed&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Upgrade just one package==&lt;br /&gt;
 apt-get install --only-upgrade &amp;lt;packagename&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==exclude package from upgrade==&lt;br /&gt;
 apt-mark hold somepackage&lt;br /&gt;
and to undo&lt;br /&gt;
 apt-mark unhold somepackage&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Disable source in deb822 source file==&lt;br /&gt;
add&lt;br /&gt;
 Enabled: no&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
==What is new style sources files called?==&lt;br /&gt;
deb822&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== the following packages have been kept back: ==&lt;br /&gt;
&lt;br /&gt;
Time to apt-get dist-upgrade ( but check [https://askubuntu.com/questions/194651/why-use-apt-get-upgrade-instead-of-apt-get-dist-upgrade/226213#226213 ]first But it could be different things.&lt;br /&gt;
See https://askubuntu.com/questions/601/the-following-packages-have-been-kept-back-why-and-how-do-i-solve-it&lt;br /&gt;
Perhaps:&lt;br /&gt;
 apt-get upgrade package-that-is-kept-back&lt;br /&gt;
or try&lt;br /&gt;
 apt install package-that-is-kept-back&lt;br /&gt;
&lt;br /&gt;
==What version of a package is going to be installed?==&lt;br /&gt;
 apt-cache policy &amp;lt;package&amp;gt;&lt;br /&gt;
==What package does a file belong to?==&lt;br /&gt;
 dpkg -S /path/to/file&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
&lt;br /&gt;
===InRelease doesn&#039;t support architecture &#039;i386&#039;===&lt;br /&gt;
set &#039;&#039;arch=amd64&#039;&#039;&#039; in sources old style or &#039;&#039;&#039;Architectures: amd64&#039;&#039; new style&lt;br /&gt;
&lt;br /&gt;
===E: Could not get lock /var/lib/apt/lists/lock. It is held by process 1538337 (apt-get)===&lt;br /&gt;
&lt;br /&gt;
Try&lt;br /&gt;
 systemctl restart packagekit&lt;br /&gt;
and check&lt;br /&gt;
 fuser /var/lib/apt/lists/lock &lt;br /&gt;
again&lt;br /&gt;
&lt;br /&gt;
===Repository changed its &#039;Version&#039; value===&lt;br /&gt;
Try &lt;br /&gt;
 apt-get --allow-releaseinfo-change update&lt;br /&gt;
&lt;br /&gt;
===The repository &#039;http://security.debian.org buster/updates Release&#039; no longer has a Release file===&lt;br /&gt;
time to upgrade entire system&lt;br /&gt;
&lt;br /&gt;
==Unable to correct problems, you have held broken packages.==&lt;br /&gt;
Try&lt;br /&gt;
 dpkg --get-selections | grep hold&lt;br /&gt;
&lt;br /&gt;
==What packages depend on package==&lt;br /&gt;
 apt-cache rdepends --installed libc6-dev&lt;br /&gt;
&lt;br /&gt;
=== Clear cache ===&lt;br /&gt;
&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
==Could not handshake: The TLS connection was non-properly terminated.==&lt;br /&gt;
try http instead of https&lt;br /&gt;
&lt;br /&gt;
==Depends: but it is not going to be installed==&lt;br /&gt;
First try&lt;br /&gt;
 apt-get update &amp;amp;&amp;amp; apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
==E: Unable to correct problems, you have held broken packages.==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Which services should be restarted?==&lt;br /&gt;
That&#039;s from &#039;&#039;&#039;needrestart&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Prevent restarting all services when installing a package==&lt;br /&gt;
 NEEDRESTART_MODE=i apt install somepackage&lt;br /&gt;
&lt;br /&gt;
==What repository provides package==&lt;br /&gt;
 apt policy &amp;lt;packagename&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===Key is stored in legacy trusted.gpg keyring===&lt;br /&gt;
Check [https://itsfoss.com/apt-key-deprecated/  apt-key is deprecated]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Certificate verification failed: The certificate is NOT trusted.===&lt;br /&gt;
try&lt;br /&gt;
 deb [trusted=yes] ...&lt;br /&gt;
in sources.list, but things might be worse than that, in case of launchpad change to&lt;br /&gt;
 https://ppa.launchpadcontent.net/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===apt-key is deprecated. Manage keyring files in trusted.gpg.d instead===&lt;br /&gt;
See [https://itsfoss.com/apt-key-deprecated/ apt-key is deprecated]&lt;br /&gt;
&lt;br /&gt;
==The following upgrades have been deferred due to phasing==&lt;br /&gt;
apt install &amp;lt;whatever package it lists&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==needrestart==&lt;br /&gt;
===Show which services need restarting===&lt;br /&gt;
 needrestart -rl&lt;br /&gt;
===Service restarts being deferred===&lt;br /&gt;
Probably services like &#039;&#039;&#039;networkd-dispatcher.service&#039;&#039;&#039;.&lt;br /&gt;
Check &#039;&#039;&#039;/etc/needrestart/needrestart.conf&#039;&#039;&#039; for &#039;&#039;&#039;$nrconf{override_rc}&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Apt&amp;diff=10488</id>
		<title>Apt</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Apt&amp;diff=10488"/>
		<updated>2026-06-05T08:02:27Z</updated>

		<summary type="html">&lt;p&gt;Tony: /* FAQ */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
Debian/Ubuntu package manager&lt;br /&gt;
&lt;br /&gt;
=Documentation=&lt;br /&gt;
==Phased Packages==&lt;br /&gt;
* [https://documentation.ubuntu.com/server/explanation/software/about-apt-upgrade-and-phased-updates/index.html About apt upgrade and phased updates]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Unattended upgrades=&lt;br /&gt;
==Links==&lt;br /&gt;
*https://help.ubuntu.com/community/AutomaticSecurityUpdates&lt;br /&gt;
*[https://pimylifeup.com/unattended-upgrades-debian-ubuntu/ Using Unattended-Upgrades on Debian and Ubuntu]&lt;br /&gt;
*https://wiki.debian.org/UnattendedUpgrades&lt;br /&gt;
*https://linuxblog.io/how-to-enable-unattended-upgrades-on-ubuntu-debian/&lt;br /&gt;
*[https://gist.github.com/CodingKoopa/3b30afe8c91e3950f6b124cd2abe3b6b the apt manpage you were looking for]&lt;br /&gt;
&lt;br /&gt;
==Enabling/disabling unattended upgrades==&lt;br /&gt;
Maybe install it first&lt;br /&gt;
 apt install unattended-upgrades&lt;br /&gt;
that will most likely also enable unattended upgrades&lt;br /&gt;
then&lt;br /&gt;
 dpkg-reconfigure unattended-upgrades&lt;br /&gt;
The dialog will show which option is selected now.&lt;br /&gt;
&lt;br /&gt;
==The relevant systemd service==&lt;br /&gt;
 apt-daily-upgrade.service&lt;br /&gt;
&lt;br /&gt;
==Disable unattended upgrades==&lt;br /&gt;
In /etc/apt/apt.conf.d/20auto-upgrades&lt;br /&gt;
 APT::Periodic::Unattended-Upgrade &amp;quot;0&amp;quot;;&lt;br /&gt;
==The logs==&lt;br /&gt;
 /var/log/unattended-upgrades/*.log&lt;br /&gt;
&lt;br /&gt;
==FAQ==&lt;br /&gt;
===Unattended-upgrade is not upgrading all packages===&lt;br /&gt;
That&#039;s normal, it defaults to upgrading only security updates.&lt;br /&gt;
&lt;br /&gt;
===Unattended-Upgrade::DevRelease &amp;quot;auto&amp;quot;;===&lt;br /&gt;
Only works on &amp;quot;dev releases&amp;quot;, which is any not .04&lt;br /&gt;
&lt;br /&gt;
==What is this Allowed-Origins about?==&lt;br /&gt;
Check output of &lt;br /&gt;
 apt -s upgrade&lt;br /&gt;
&lt;br /&gt;
you might see something like&lt;br /&gt;
&lt;br /&gt;
 Conf cloud-init (25.1.2-0ubuntu0~22.04.2 &#039;&#039;&#039;Ubuntu:22.04/jammy-updates&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
which will match&lt;br /&gt;
 ${distro_id}:${distro_codename}-updates&lt;br /&gt;
&lt;br /&gt;
==No packages found that can be upgraded unattended==&lt;br /&gt;
By default &#039;&#039;&#039;&amp;quot;${distro_id}:${distro_codename}-updates&amp;quot;;&#039;&#039;&#039; is commented out in &#039;&#039;&#039;/etc/apt/apt.conf.d/50unattended-upgrades&#039;&#039;&#039;, so to get those updated as well, uncomment that line.&lt;br /&gt;
&lt;br /&gt;
=HOWTO=&lt;br /&gt;
==Extract files from .deb==&lt;br /&gt;
 dpkg-deb&lt;br /&gt;
or just &lt;br /&gt;
 dpkg -e foo.deb&lt;br /&gt;
note: this extracts to .&lt;br /&gt;
&lt;br /&gt;
==Pin a version==&lt;br /&gt;
*[https://help.ubuntu.com/community/PinningHowto Pinning Howto]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==List installed packages==&lt;br /&gt;
 apt list --installed&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Upgrade just one package==&lt;br /&gt;
 apt-get install --only-upgrade &amp;lt;packagename&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==exclude package from upgrade==&lt;br /&gt;
 apt-mark hold somepackage&lt;br /&gt;
and to undo&lt;br /&gt;
 apt-mark unhold somepackage&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Disable source in deb822 source file==&lt;br /&gt;
add&lt;br /&gt;
 Enabled: no&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
==What is new style sources files called?==&lt;br /&gt;
deb822&lt;br /&gt;
&lt;br /&gt;
==What version of a package is going to be installed?==&lt;br /&gt;
 apt-cache policy &amp;lt;package&amp;gt;&lt;br /&gt;
==What package does a file belong to?==&lt;br /&gt;
 dpkg -S /path/to/file&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===E: Could not get lock /var/lib/apt/lists/lock. It is held by process 1538337 (apt-get)===&lt;br /&gt;
&lt;br /&gt;
Try&lt;br /&gt;
 systemctl restart packagekit&lt;br /&gt;
and check&lt;br /&gt;
 fuser /var/lib/apt/lists/lock &lt;br /&gt;
again&lt;br /&gt;
&lt;br /&gt;
===Repository changed its &#039;Version&#039; value===&lt;br /&gt;
Try &lt;br /&gt;
 apt-get --allow-releaseinfo-change update&lt;br /&gt;
&lt;br /&gt;
===The repository &#039;http://security.debian.org buster/updates Release&#039; no longer has a Release file===&lt;br /&gt;
time to upgrade entire system&lt;br /&gt;
&lt;br /&gt;
==Unable to correct problems, you have held broken packages.==&lt;br /&gt;
Try&lt;br /&gt;
 dpkg --get-selections | grep hold&lt;br /&gt;
&lt;br /&gt;
==What packages depend on package==&lt;br /&gt;
 apt-cache rdepends --installed libc6-dev&lt;br /&gt;
&lt;br /&gt;
=== Clear cache ===&lt;br /&gt;
&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
==Could not handshake: The TLS connection was non-properly terminated.==&lt;br /&gt;
try http instead of https&lt;br /&gt;
&lt;br /&gt;
==Depends: but it is not going to be installed==&lt;br /&gt;
First try&lt;br /&gt;
 apt-get update &amp;amp;&amp;amp; apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
==E: Unable to correct problems, you have held broken packages.==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Which services should be restarted?==&lt;br /&gt;
That&#039;s from &#039;&#039;&#039;needrestart&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Prevent restarting all services when installing a package==&lt;br /&gt;
 NEEDRESTART_MODE=i apt install somepackage&lt;br /&gt;
&lt;br /&gt;
==What repository provides package==&lt;br /&gt;
 apt policy &amp;lt;packagename&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===Key is stored in legacy trusted.gpg keyring===&lt;br /&gt;
Check [https://itsfoss.com/apt-key-deprecated/  apt-key is deprecated]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Certificate verification failed: The certificate is NOT trusted.===&lt;br /&gt;
try&lt;br /&gt;
 deb [trusted=yes] ...&lt;br /&gt;
in sources.list, but things might be worse than that, in case of launchpad change to&lt;br /&gt;
 https://ppa.launchpadcontent.net/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===apt-key is deprecated. Manage keyring files in trusted.gpg.d instead===&lt;br /&gt;
See [https://itsfoss.com/apt-key-deprecated/ apt-key is deprecated]&lt;br /&gt;
&lt;br /&gt;
==The following upgrades have been deferred due to phasing==&lt;br /&gt;
apt install &amp;lt;whatever package it lists&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==needrestart==&lt;br /&gt;
===Show which services need restarting===&lt;br /&gt;
 needrestart -rl&lt;br /&gt;
===Service restarts being deferred===&lt;br /&gt;
Probably services like &#039;&#039;&#039;networkd-dispatcher.service&#039;&#039;&#039;.&lt;br /&gt;
Check &#039;&#039;&#039;/etc/needrestart/needrestart.conf&#039;&#039;&#039; for &#039;&#039;&#039;$nrconf{override_rc}&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Debian&amp;diff=10487</id>
		<title>Debian</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Debian&amp;diff=10487"/>
		<updated>2026-06-05T08:01:20Z</updated>

		<summary type="html">&lt;p&gt;Tony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Sites=&lt;br /&gt;
*[http://www.debian.org/ Homepage]&lt;br /&gt;
*[http://wiki.debian.org/ Wiki]&lt;br /&gt;
*[http://www.debian.org/doc/manuals/reference/index.en.html Debian Reference]&lt;br /&gt;
*[http://www.debian-administration.org/ debian-administration.org]&lt;br /&gt;
*[http://www.debianadmin.com/ http://www.debianadmin.com/]&lt;br /&gt;
&lt;br /&gt;
=Security=&lt;br /&gt;
*http://lists.debian.org/debian-security-announce/&lt;br /&gt;
*debsecan&lt;br /&gt;
*debsum&lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
*[[debconf]]&lt;br /&gt;
&lt;br /&gt;
=Netboot/PXE=&lt;br /&gt;
*https://wiki.debian.org/DebianInstaller/NetbootAssistant&lt;br /&gt;
*[https://wiki.debian.org/DebianInstaller/Preseed Preseed]&lt;br /&gt;
*[https://www.howtoforge.com/tutorial/install-debian-9-stretch-via-pxe-network-boot-server/ Install Debian 9 (Stretch) via PXE Network Boot Server]&lt;br /&gt;
&lt;br /&gt;
=Documentation=&lt;br /&gt;
&lt;br /&gt;
*[http://www.debian.org/releases/stable/i386/ch08s05.html.en Compiling kernels the Debian way]&lt;br /&gt;
*aptitude is often nicer than apt-get, but be careful&lt;br /&gt;
*apt-file to find package providing a certain file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Networking on Debian==&lt;br /&gt;
* [https://wiki.debian.org/NetworkConfiguration Debian Network Configuration]&lt;br /&gt;
&lt;br /&gt;
===Bonding===&lt;br /&gt;
* https://wiki.debian.org/Bonding&lt;br /&gt;
*[https://enterprise-support.nvidia.com/s/article/howto-create-linux-bond--lag--interface-over-infiniband-network Bonding on Infiniband]&lt;br /&gt;
&lt;br /&gt;
==https==&lt;br /&gt;
&lt;br /&gt;
*http://www.tuxick.net/docs/apache_ssl.html&lt;br /&gt;
&lt;br /&gt;
https on debian testing is a mess, ignore: &lt;br /&gt;
&lt;br /&gt;
*make-ssl-cert&lt;br /&gt;
*apache2-ssl-certificate in apache2.2-common only?&lt;br /&gt;
*http://www.debian-administration.org/articles/349&lt;br /&gt;
&lt;br /&gt;
http://www.eclectica.ca/howto/ssl-cert-howto.php looks promising&lt;br /&gt;
&lt;br /&gt;
==Handling packages==&lt;br /&gt;
*[[Compiling Debian Packages]]&lt;br /&gt;
===Pinning===&lt;br /&gt;
*[http://jaqque.sbih.org/kplug/apt-pinning.html Pinning]&lt;br /&gt;
*[http://www.argon.org/~roderick/apt-pinning.html Using APT with more than 2 sources]&lt;br /&gt;
*http://wiki.debian.org/AptPinning&lt;br /&gt;
&lt;br /&gt;
=HOWTO=&lt;br /&gt;
==Modules==&lt;br /&gt;
===Set module parameters===&lt;br /&gt;
in &#039;&#039;&#039;/etc/modprobe.d/somename.conf&#039;&#039;&#039;&lt;br /&gt;
 options somemodule paramname=2&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
&lt;br /&gt;
==Installer==&lt;br /&gt;
===Select a boot disk===&lt;br /&gt;
Depends a bit, customer installer would insist on that, but expects /boot to be a separate partition?&lt;br /&gt;
&lt;br /&gt;
==Check if a reboot is required==&lt;br /&gt;
Check &lt;br /&gt;
 /var/run/reboot-required.pkgs&lt;br /&gt;
or&lt;br /&gt;
 needrestart -k -b&lt;br /&gt;
&lt;br /&gt;
== change default editor ==&lt;br /&gt;
&lt;br /&gt;
 update-alternatives --config editor&lt;br /&gt;
&lt;br /&gt;
== change timezone ==&lt;br /&gt;
&lt;br /&gt;
 dpkg-reconfigure tzdata&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Change system language==&lt;br /&gt;
 dpkg-reconfigure locales&lt;br /&gt;
and&lt;br /&gt;
 setlocale&lt;br /&gt;
== kernel packages ==&lt;br /&gt;
&lt;br /&gt;
*kernel-image &lt;br /&gt;
*kernel-source &lt;br /&gt;
&lt;br /&gt;
 volatile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== clean cache ==&lt;br /&gt;
&lt;br /&gt;
 apt-get clean&lt;br /&gt;
       &lt;br /&gt;
&lt;br /&gt;
== E: Unable to correct problems, you have held broken packages. ==&lt;br /&gt;
&lt;br /&gt;
First try&lt;br /&gt;
&lt;br /&gt;
 dpkg --get-selections | grep hold&lt;br /&gt;
&lt;br /&gt;
==reportbug: The following newer release(s) are available in the Debian archive:==&lt;br /&gt;
Ignore than and just continue ( see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=900254 )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==apt-get update throwing KEYEXPIRED==&lt;br /&gt;
Ignore that, it updated just fine. You might run into the usual warnings when installing packaged. To Be Documented.&lt;br /&gt;
For example:&lt;br /&gt;
 deb [trusted=yes]&lt;br /&gt;
&lt;br /&gt;
==Missing key==&lt;br /&gt;
Missing key D9A7E9F52B9754A34443ED1DC9A78F8C43D8720A, which is needed to verify signature&lt;br /&gt;
&lt;br /&gt;
Find the key and add it to apt keyring, like&lt;br /&gt;
 curl -fsSL https://repo.charm.sh/apt/gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/charm.gpg&lt;br /&gt;
&lt;br /&gt;
=Show more package information=&lt;br /&gt;
 apt-cache show packagename*&lt;br /&gt;
&lt;br /&gt;
==List installed packages==&lt;br /&gt;
 apt list --installed&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== W: GPG error: ==&lt;br /&gt;
&lt;br /&gt;
[http://ftp2.de.debian.org http://ftp2.de.debian.org] etch/volatile Release: The following signatures couldn&#039;t be verified because the public key is not available: NO_PUBKEY EC61E0B0BBE55AB3&lt;br /&gt;
&lt;br /&gt;
 gpg --keyserver wwwkeys.eu.pgp.net --recv-keys EC61E0B0BBE55AB3&lt;br /&gt;
 #and that other thing&lt;br /&gt;
&lt;br /&gt;
Or just:&lt;br /&gt;
&lt;br /&gt;
 apt-get --allow-unauthenticated install debian-archive-keyring&lt;br /&gt;
       &lt;br /&gt;
Or&lt;br /&gt;
 apt-key adv  --keyserver pgp.mit.edu --recv-keys 8B48AD6246925553&lt;br /&gt;
&lt;br /&gt;
Or&lt;br /&gt;
 gpg --keyserver keyserver.ubuntu.com --recv-key 03BBF595D4DFD35C&lt;br /&gt;
 gpg -a --export 03BBF595D4DFD35C | apt-key add -&lt;br /&gt;
&lt;br /&gt;
==show dependency tree==&lt;br /&gt;
 apt-cache dotty&lt;br /&gt;
 apt-rdepends&lt;br /&gt;
&lt;br /&gt;
==show dependencies==&lt;br /&gt;
===What depens on package?===&lt;br /&gt;
 apt-cache rdepends &amp;lt;package&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 aptitude why&lt;br /&gt;
&lt;br /&gt;
==What package does a file belong to?==&lt;br /&gt;
 dpkg -S /path/to/file&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Disk&amp;diff=10486</id>
		<title>Disk</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Disk&amp;diff=10486"/>
		<updated>2026-06-04T13:40:13Z</updated>

		<summary type="html">&lt;p&gt;Tony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Tools=&lt;br /&gt;
==e2label==&lt;br /&gt;
===Get/set partition label===&lt;br /&gt;
 e2label /dev/sdi1 [ LABEL ]&lt;br /&gt;
===Errors===&lt;br /&gt;
====e2label: Bad magic number in super-block ====&lt;br /&gt;
check if there&#039;s filesystem at all, blkid&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=FAQ=&lt;br /&gt;
==Mount by label==&lt;br /&gt;
 mount -L LABEL /mnt/target&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Disk&amp;diff=10485</id>
		<title>Disk</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Disk&amp;diff=10485"/>
		<updated>2026-06-04T13:16:34Z</updated>

		<summary type="html">&lt;p&gt;Tony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Tools=&lt;br /&gt;
==e2label==&lt;br /&gt;
===Get/set partition label===&lt;br /&gt;
 e2label /dev/sdi1 [ LABEL ]&lt;br /&gt;
===Errors===&lt;br /&gt;
====e2label: Bad magic number in super-block ====&lt;br /&gt;
check if there&#039;s filesystem at all, blkid&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Disk&amp;diff=10484</id>
		<title>Disk</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Disk&amp;diff=10484"/>
		<updated>2026-06-04T12:41:05Z</updated>

		<summary type="html">&lt;p&gt;Tony: Created page with &amp;quot;=FAQ= ==Get/set partition label==  e2label /dev/sdi1 [ LABEL ]&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=FAQ=&lt;br /&gt;
==Get/set partition label==&lt;br /&gt;
 e2label /dev/sdi1 [ LABEL ]&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Fdisk&amp;diff=10483</id>
		<title>Fdisk</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Fdisk&amp;diff=10483"/>
		<updated>2026-06-04T12:12:36Z</updated>

		<summary type="html">&lt;p&gt;Tony: Created page with &amp;quot;=FAQ= ==What is &amp;quot;disk identifier&amp;quot;==&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=FAQ=&lt;br /&gt;
==What is &amp;quot;disk identifier&amp;quot;==&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Ubuntu&amp;diff=10482</id>
		<title>Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Ubuntu&amp;diff=10482"/>
		<updated>2026-06-04T08:59:13Z</updated>

		<summary type="html">&lt;p&gt;Tony: /* FAQ */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
*[http://ubuntu.com http://ubuntu.com] &lt;br /&gt;
*https://linuxize.com/post/how-to-add-apt-repository-in-ubuntu/&lt;br /&gt;
*[https://launchpad.net/ubuntu/+ppas Ubuntu PPA]&lt;br /&gt;
==Security==&lt;br /&gt;
===Check kernel vulnerabilities===&lt;br /&gt;
* [https://ubuntu.com/security/cves?package=linux&amp;amp;version=jammy Kernel on 22.04 LTS]&lt;br /&gt;
===Ubuntu security updates===&lt;br /&gt;
* https://ubuntu.com/security/notices&lt;br /&gt;
&lt;br /&gt;
===Hardening Ubuntu===&lt;br /&gt;
*[https://bookofzeus.com/harden-ubuntu/initial-setup/system-updates/ Harden Ubuntu]&lt;br /&gt;
&lt;br /&gt;
==Kernel==&lt;br /&gt;
* https://launchpad.net/ubuntu/+source/linux&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
*[https://ubuntu.com/download/server Ubuntu server]&lt;br /&gt;
*[https://ubuntu.com/server/docs/install/netboot-amd64 Ubuntu Netboot/PXE installation]&lt;br /&gt;
*[https://cdimage.ubuntu.com/ubuntu-mini-iso/ Uubntu mini iso for network install]&lt;br /&gt;
&lt;br /&gt;
== Ubuntu 20.04 LTS ==&lt;br /&gt;
&lt;br /&gt;
=== Storage configuration ===&lt;br /&gt;
&lt;br /&gt;
First create a boot partition!&lt;br /&gt;
&lt;br /&gt;
Remember to umount cdrom before rebooting&lt;br /&gt;
       &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Automatic install ==&lt;br /&gt;
&lt;br /&gt;
*[https://ubuntu.com/server/docs/install/autoinstall https://ubuntu.com/server/docs/install/autoinstall] &lt;br /&gt;
*[https://tlhakhan.medium.com/ubuntu-server-20-04-autoinstall-2e5f772b655a Ubuntu Server 20.04 autoinstall] &lt;br /&gt;
*[https://louwrentius.com/understanding-the-ubuntu-2004-lts-server-autoinstaller.html Understanding the Ubuntu 20.04 LTS Server Autoinstaller] &lt;br /&gt;
*[https://discourse.ubuntu.com/t/please-test-autoinstalls-for-20-04/15250/166 Discourse - Please test autoinstalls for 20.04] &lt;br /&gt;
*[https://cloudinit.readthedocs.io/en/latest/topics/examples.html Cloudconfig examples]&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== Snags ===&lt;br /&gt;
&lt;br /&gt;
=Documentation=&lt;br /&gt;
==Network configuration==&lt;br /&gt;
*[https://ubuntu.com/server/docs/configuring-networks Configuring networks]&lt;br /&gt;
*[[Netplan]]&lt;br /&gt;
*[https://ubuntu-archive-team.ubuntu.com/phased-updates.html Ubuntu Phased Updates]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==APT new style==&lt;br /&gt;
Is called &#039;&#039;&#039;deb822&#039;&#039;&#039;&lt;br /&gt;
*https://gist.github.com/Mealman1551/f75223b3cade0a218d51c06f6cb08f40&lt;br /&gt;
&lt;br /&gt;
= HOWTO =&lt;br /&gt;
==Upgrading Ubuntu==&lt;br /&gt;
 do-release-upgrade&lt;br /&gt;
&lt;br /&gt;
== Change nameservers ==&lt;br /&gt;
===If using systemd-resolved===&lt;br /&gt;
Show nameservers&lt;br /&gt;
 resolvectl status&lt;br /&gt;
Edit /etc/netplan/00-installer-config.yaml&lt;br /&gt;
 netplan apply&lt;br /&gt;
&lt;br /&gt;
==Using Ubuntu live CD for resque==&lt;br /&gt;
*[https://help.ubuntu.com/community/LiveCdRecovery LiveCdRecovery&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Download source code of package==&lt;br /&gt;
Add to /etc/apt/sources.list.d/ubuntu.sources&lt;br /&gt;
&lt;br /&gt;
 Types: deb-src&lt;br /&gt;
 URIs: http://us.archive.ubuntu.com/ubuntu/&lt;br /&gt;
 Suites: noble noble-updates noble-backports noble-proposed&lt;br /&gt;
 Components: main restricted universe multiverse&lt;br /&gt;
 Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg&lt;br /&gt;
&lt;br /&gt;
then update&lt;br /&gt;
 apt-get update&lt;br /&gt;
and to get the sources&lt;br /&gt;
 apt-get source somepackage&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Disable networking==&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
==Installing Ubuntu==&lt;br /&gt;
https://ubuntu.com/server/docs/install/storage&lt;br /&gt;
===Select a boot disk===&lt;br /&gt;
&lt;br /&gt;
==Upgrading==&lt;br /&gt;
===Please install all available updates for your release before upgrading.===&lt;br /&gt;
Double check&lt;br /&gt;
 apt-get dist-upgrade&lt;br /&gt;
and you might even need to reboot&lt;br /&gt;
&lt;br /&gt;
===Failed unmounting cdrom.mount===&lt;br /&gt;
&lt;br /&gt;
==Set timezone==&lt;br /&gt;
 dpkg-reconfigure tzdata&lt;br /&gt;
&lt;br /&gt;
== Get ubuntu version ==&lt;br /&gt;
&lt;br /&gt;
 cat /etc/lsb-release&lt;br /&gt;
       &lt;br /&gt;
==Where are the changelogs?==&lt;br /&gt;
&#039;&#039;&#039;/usr/share/doc/*/changelog.Debian.gz&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== disable ipv6 ==&lt;br /&gt;
&lt;br /&gt;
sysctl:&lt;br /&gt;
&lt;br /&gt;
 net.ipv6.conf.default.disable_ipv6=1&lt;br /&gt;
 net.ipv6.conf.all.disable_ipv6=1&lt;br /&gt;
&lt;br /&gt;
== changing locale ==&lt;br /&gt;
&lt;br /&gt;
/etc/default/locale&lt;br /&gt;
&lt;br /&gt;
 locale-gen&lt;br /&gt;
&lt;br /&gt;
 dpkg-reconfigure keyboard-configuration&lt;br /&gt;
 &lt;br /&gt;
 setupcon&lt;br /&gt;
&lt;br /&gt;
 loadkeys us&lt;br /&gt;
&lt;br /&gt;
and lots more&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== mail: command not found ==&lt;br /&gt;
&lt;br /&gt;
install heirloom-mailx&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
&lt;br /&gt;
install mailutils&lt;br /&gt;
&lt;br /&gt;
REMEMBER: to fix sender domain&lt;br /&gt;
&lt;br /&gt;
create /etc/mailutils.conf containing&lt;br /&gt;
&lt;br /&gt;
 address {&lt;br /&gt;
        email-domain yourdom.ain;&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
and check out&lt;br /&gt;
&lt;br /&gt;
 mail --config-help&lt;br /&gt;
&lt;br /&gt;
==The repository &#039;http://packages.ros.org/ros/ubuntu cosmic Release&#039; does not have a Release file.==&lt;br /&gt;
Switch path to repositories to old-releases.ubuntu.com&lt;br /&gt;
== failed unmounting /var ==&lt;br /&gt;
&lt;br /&gt;
ignore it? it&#039;s a journald issue&lt;br /&gt;
&lt;br /&gt;
== multipathd[667]: sda: failed to get sgio uid: No such file or directory ==&lt;br /&gt;
&lt;br /&gt;
Seems to be vmware setting: disk.EnableUUID = true&lt;br /&gt;
&lt;br /&gt;
CHECK!&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
==The following signatures couldn&#039;t be verified because the public key is not available:==&lt;br /&gt;
 gpg --keyserver keyserver.ubuntu.com --recv-keys  9D6D8F6BC857C906&lt;br /&gt;
Seems this doesn&#039;t (always) work, so &lt;br /&gt;
 apt-key adv --keyserver keyserver.ubuntu.com --recv-keys &amp;lt;yourkey&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which will complain about deprecation, but it should work&lt;br /&gt;
&lt;br /&gt;
==Upgrade to 22.04 (impish Release no longer has a Release file)==&lt;br /&gt;
That sucks, now what?&lt;br /&gt;
Check https://help.ubuntu.com/community/EOLUpgrades&lt;br /&gt;
&lt;br /&gt;
When apt-get update fails, set your repositories to old-releases.ubuntu.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Upgrades to the development release are only available from the latest supported release==&lt;br /&gt;
More obscure mess. Check https://linuxconfig.org/how-to-upgrade-ubuntu-to-20-04-lts-focal-fossa&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Not all translations for this language are installed.== &lt;br /&gt;
Use the Install&lt;br /&gt;
Missing Packages button to download and install all missing packages&lt;br /&gt;
&lt;br /&gt;
Instead of trying to find that mysterious button, try&lt;br /&gt;
 check-language-support&lt;br /&gt;
which will list missing packages&lt;br /&gt;
&lt;br /&gt;
==Release file not valid yet==&lt;br /&gt;
Mirror not up to date?&lt;br /&gt;
&lt;br /&gt;
==Keep your own resolv.conf==&lt;br /&gt;
Replace the symlink /etc/resolv.conf with a file&lt;br /&gt;
&lt;br /&gt;
==The following signatures couldn&#039;t be verified because the public key is not available: NO_PUBKEY 23E7166788B63E1E==&lt;br /&gt;
 apt-key adv --keyserver keyserver.ubuntu.com  --recv-keys 23E7166788B63E1E&lt;br /&gt;
&lt;br /&gt;
==Get into grub menu during boot==&lt;br /&gt;
Hold shift key&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===The repository &#039;http://archive.ubuntu.com/ubuntu jammy InRelease&#039; is no longer signed.===&lt;br /&gt;
Try again later?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Could not connect to archive.ubuntu.com:443===&lt;br /&gt;
Doesn&#039;t support https, pick another mirror&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Nginx&amp;diff=10481</id>
		<title>Nginx</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Nginx&amp;diff=10481"/>
		<updated>2026-06-04T08:30:08Z</updated>

		<summary type="html">&lt;p&gt;Tony: /* HOWTO */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;HTTP server, proxy, reverse proxy etc&lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
*[http://nginx.org/ Homepage]&lt;br /&gt;
*[https://deliciousbrains.com/page-caching-varnish-vs-nginx-fastcgi-cache/ Varnish vs nginx]&lt;br /&gt;
==Documentation==&lt;br /&gt;
*[https://www.nginx.com/resources/wiki/start/ Getting started]&lt;br /&gt;
&lt;br /&gt;
==Nginx and php-fpm==&lt;br /&gt;
*[https://www.digitalocean.com/community/tutorials/how-to-host-multiple-websites-securely-with-nginx-and-php-fpm-on-ubuntu-14-04 How To Host Multiple Websites Securely With Nginx And Php-fpm On Ubuntu 14.04]&lt;br /&gt;
===Monitoring php-fpm under nginx===&lt;br /&gt;
Create /etc/nginx/site-enabled/fpmstatus&lt;br /&gt;
 server {&lt;br /&gt;
        listen 89;&lt;br /&gt;
        listen [::]:89;&lt;br /&gt;
        server_name localhost;&lt;br /&gt;
        location = /fpm-status {&lt;br /&gt;
                access_log off;&lt;br /&gt;
&lt;br /&gt;
                allow 127.0.0.1;&lt;br /&gt;
                deny all;&lt;br /&gt;
&lt;br /&gt;
                fastcgi_param SCRIPT_FILENAME $fastcgi_script_name;&lt;br /&gt;
                include fastcgi_params;&lt;br /&gt;
                fastcgi_pass unix:/run/php/php-fpm.sock;&lt;br /&gt;
                # fastcgi_pass 127.0.0.1:9001;&lt;br /&gt;
        }&lt;br /&gt;
        location = /fpm-ping {&lt;br /&gt;
                access_log off;&lt;br /&gt;
&lt;br /&gt;
                allow 127.0.0.1;&lt;br /&gt;
                deny all;&lt;br /&gt;
&lt;br /&gt;
                fastcgi_param SCRIPT_FILENAME $fastcgi_script_name;&lt;br /&gt;
                include fastcgi_params;&lt;br /&gt;
                fastcgi_pass unix:/run/php/php-fpm.sock;&lt;br /&gt;
        }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
TODO find out why monitoring via tcp socket 127.0.0.1:9001 doesn&#039;t work&lt;br /&gt;
&lt;br /&gt;
=Notes=&lt;br /&gt;
&lt;br /&gt;
==SSL certificates==&lt;br /&gt;
The host.crt goes first in the bundle&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 server {&lt;br /&gt;
  listen   443;&lt;br /&gt;
  ssl    on;&lt;br /&gt;
  ssl_certificate    /etc/ssl/your_domain_name.pem; (or bundle.crt)&lt;br /&gt;
  ssl_certificate_key    /etc/ssl/your_domain_name.key;&lt;br /&gt;
  server_name your.domain.com;&lt;br /&gt;
  access_log /var/log/nginx/nginx.vhost.access.log;&lt;br /&gt;
  error_log /var/log/nginx/nginx.vhost.error.log;&lt;br /&gt;
  location / {&lt;br /&gt;
   root   /home/www/public_html/your.domain.com/public/;&lt;br /&gt;
   index  index.html;&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=HOWTO=&lt;br /&gt;
==SSL configuration==&lt;br /&gt;
*[https://nginx.org/en/docs/http/configuring_https_servers.html onfiguring HTTPS servers]&lt;br /&gt;
*[https://wiki.mozilla.org/Security/Server_Side_TLS Security/Server Side TLS] Mozilla: Security/Server Side TLS]&lt;br /&gt;
*[https://ssl-config.mozilla.org/ Mozilla SSL config generator] outdated?&lt;br /&gt;
&lt;br /&gt;
In case of letsencrypt check /etc/letsencrypt/options-ssl-nginx.conf&lt;br /&gt;
===Cipher order===&lt;br /&gt;
 ssl_prefer_server_ciphers on;&lt;br /&gt;
&lt;br /&gt;
==Set server directives globally==&lt;br /&gt;
Put them in &#039;&#039;&#039;/etc/nginx/conf.d/directives.conf&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===CSP===&lt;br /&gt;
Content Security Policy&lt;br /&gt;
&lt;br /&gt;
*[https://content-security-policy.com/examples/nginx/ Content Security Policy (CSP)&lt;br /&gt;
Examples ]&lt;br /&gt;
&lt;br /&gt;
====CSP config example====&lt;br /&gt;
 add_header Content-Security-Policy &amp;quot;&lt;br /&gt;
            default-src &#039;self&#039;;&lt;br /&gt;
            frame-src &#039;none&#039;;&lt;br /&gt;
            script-src &#039;self&#039;;&lt;br /&gt;
            frame-ancestors &#039;self&#039;;&lt;br /&gt;
            img-src &#039;self&#039; data:;&lt;br /&gt;
            manifest-src &#039;self&#039;;&lt;br /&gt;
            media-src &#039;self&#039;;&lt;br /&gt;
            object-src &#039;self&#039;;&lt;br /&gt;
            base-uri: &#039;self&#039;;&lt;br /&gt;
            form-action: &#039;self&#039;;&lt;br /&gt;
            worker-src &#039;self&#039;;&amp;quot; always;&lt;br /&gt;
&lt;br /&gt;
==Client certificates==&lt;br /&gt;
&lt;br /&gt;
===Create client certificate===&lt;br /&gt;
 openssl pkcs12 -export -inkey ./sample.key -in ./sample.crt -out ./sample.p12&lt;br /&gt;
&lt;br /&gt;
====Add client certificate to chromium====&lt;br /&gt;
Add the .p12 in Advanced-&amp;gt;Manage certificates-&amp;gt;Your certificates&lt;br /&gt;
&lt;br /&gt;
==Logging==&lt;br /&gt;
&lt;br /&gt;
===Log level===&lt;br /&gt;
Doesn&#039;t seem to be documented, defaults to log all?&lt;br /&gt;
&lt;br /&gt;
===Ignore IP addresses in logs===&lt;br /&gt;
Create &#039;&#039;&#039;/etc/nginx/conf.d/logignore.conf&#039;&#039;&#039; or put in your vhost config:&lt;br /&gt;
 map $remote_addr $loggable {&lt;br /&gt;
    &amp;quot;1.2.3.4&amp;quot; 0;&lt;br /&gt;
    # allow rest&lt;br /&gt;
    default 1;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
and then in your vhost configuration:&lt;br /&gt;
 access_log /var/log/nginx/myhost.access.log combined if=$loggable;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Regular expression on $request===&lt;br /&gt;
To filter out the nextcloud preview 404s:&lt;br /&gt;
 map $request $loggable {&lt;br /&gt;
   &amp;quot;~^GET \/index\.php\/core\/preview.*$&amp;quot; 0;&lt;br /&gt;
   default 1;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Get configuration items==&lt;br /&gt;
 getconf PAGESIZE&lt;br /&gt;
&lt;br /&gt;
==Redirecting in nginx==&lt;br /&gt;
https://www.liquidweb.com/kb/redirecting-urls-using-nginx/&lt;br /&gt;
&lt;br /&gt;
==enable ipv6==&lt;br /&gt;
In server section add&lt;br /&gt;
 listen [::]:443;&lt;br /&gt;
&lt;br /&gt;
==Configure buffer sizes==&lt;br /&gt;
See https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffer_size&lt;br /&gt;
&lt;br /&gt;
==Dump nginx configuration==&lt;br /&gt;
 nginx -T&lt;br /&gt;
&lt;br /&gt;
==Rate limiting==&lt;br /&gt;
*[https://www.nginx.com/blog/rate-limiting-nginx/ NGINX Rate limiting]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Limit access==&lt;br /&gt;
https://docs.hypernode.com/hypernode-platform/nginx/how-to-block-allow-ip-addresses-in-nginx.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==nginx and OCSP (stapling) ==&lt;br /&gt;
To make sure everything works have *all* certificates in bundle.pem&lt;br /&gt;
&lt;br /&gt;
 ssl_stapling on;&lt;br /&gt;
 ssl_stapling_verify on;&lt;br /&gt;
 ssl_trusted_certificate /etc/pki/tls/certs/bundle.pem&lt;br /&gt;
&lt;br /&gt;
 ssl_certificate /etc/pki/tls/certs/bundle.pem;&lt;br /&gt;
 ssl_certificate_key /etc/pki/tls/private/mydomain.key;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Letsencrypt and stapling===&lt;br /&gt;
Will be discontinued: https://kbeezie.com/nginx-ssl_stapling-ignored-ocsp-letsencrypt/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Exclude not found from log==&lt;br /&gt;
 log_not_found off;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Allow zabbix to read nginx error log==&lt;br /&gt;
 setfacl -m g:zabbix:r /var/log/nginx/error.log&lt;br /&gt;
(perhaps put this in logrotate postrotate)&lt;br /&gt;
&lt;br /&gt;
=FAQ=&lt;br /&gt;
==php not executed but downloaded==&lt;br /&gt;
In case of php-fpm see:&lt;br /&gt;
*https://oneuptime.com/blog/post/2025-12-16-nginx-php-download-instead-of-execute/view&lt;br /&gt;
&lt;br /&gt;
==Security settings==&lt;br /&gt;
===X-Content-Type-Options===&lt;br /&gt;
 # ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options&lt;br /&gt;
 add_header X-Content-Type-Options nosniff always;&lt;br /&gt;
&lt;br /&gt;
===Content-Security-Policy (CSP)===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===security.txt===&lt;br /&gt;
*[https://www.rfc-editor.org/rfc/rfc9116 RFC 9116]&lt;br /&gt;
&lt;br /&gt;
*https://securitytxt.org/&lt;br /&gt;
&lt;br /&gt;
==nginx serving wrong page==&lt;br /&gt;
Forgot to tell it to listen on ipv6?&lt;br /&gt;
Like&lt;br /&gt;
 listen [::]:443 ssl;l&lt;br /&gt;
&lt;br /&gt;
==Conflicting server name XXX on 0.0.0.0:80==&lt;br /&gt;
&lt;br /&gt;
==FastCGI sent in stderr: &amp;quot;Primary script unknown&amp;quot; ==&lt;br /&gt;
Usually means the php script just isn&#039;t there&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===ERR_HTTP2_PROTOCOL_ERROR===&lt;br /&gt;
Check with curl:&lt;br /&gt;
 curl --http2 https://example.com&lt;br /&gt;
I got&lt;br /&gt;
 curl: (92) : frame type: 1, stream: 1, Invalid HTTP header field was receivedname: [content-security-policy]&lt;br /&gt;
&lt;br /&gt;
found out the hard way that add_header arguments have to be on single line&lt;br /&gt;
&lt;br /&gt;
===nginx: [emerg] unknown log format===&lt;br /&gt;
Define log_format in &#039;&#039;&#039;http&#039;&#039;&#039; section before the includes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== upstream prematurely closed connection while reading upstream ===&lt;br /&gt;
Maybe trying to fetch a large file, like jpg?&lt;br /&gt;
&lt;br /&gt;
=== client intended to send too large body ===&lt;br /&gt;
 server {&lt;br /&gt;
   # default 1m&lt;br /&gt;
   client_max_body_size 4m;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===no live upstreams while connecting to upstream===&lt;br /&gt;
can&#039;t connect to whatever backend?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===upstream sent too big header while reading response header from upstream===&lt;br /&gt;
*[https://techglimpse.com/upstream-sent-too-big-header-while-reading-response-header-from-upstream-nginx/ Upstream sent too big header]&lt;br /&gt;
*[https://www.getpagespeed.com/server-setup/nginx/tuning-proxy_buffer_size-in-nginx Tuning proxy_buffer_size in NGINX]&lt;br /&gt;
&lt;br /&gt;
====In case of fastcgi====&lt;br /&gt;
https://gist.github.com/magnetikonline/11312172#determine-fastcgi-response-sizes&lt;br /&gt;
&lt;br /&gt;
Try settings like&lt;br /&gt;
 fastcgi_buffers 32 32k;&lt;br /&gt;
 fastcgi_buffer_size 32k;&lt;br /&gt;
&lt;br /&gt;
===an upstream response is buffered to a temporary file===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===(SSL: error:141CF06C:SSL routines:tls_parse_ctos_key_share:bad key share) while SSL handshaking===&lt;br /&gt;
Usually just a bad client or a scan.&lt;br /&gt;
&lt;br /&gt;
===cannot load certificate &amp;quot;/etc/ssl/certs/ssl-cert-snakeoil.pem===&lt;br /&gt;
Probably ubuntu?&lt;br /&gt;
 apt install ssl-cert&lt;br /&gt;
&lt;br /&gt;
===access forbidden by rule===&lt;br /&gt;
look for allow or deny lines&lt;br /&gt;
&lt;br /&gt;
===a client request body is buffered to a temporary file===&lt;br /&gt;
PLay some with&lt;br /&gt;
 client_body_buffer_size 10M;&lt;br /&gt;
 client_max_body_size 10M;&lt;br /&gt;
&lt;br /&gt;
TODO check, this doesn&#039;t seem to apply&lt;br /&gt;
If all else fails just set:&lt;br /&gt;
    proxy_max_temp_file_size 0;&lt;br /&gt;
and see if you get some feedback :)&lt;br /&gt;
&lt;br /&gt;
===upstream timed out===&lt;br /&gt;
Look for proxy_pass&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===failed (104: Unknown error) while reading response header from upstream===&lt;br /&gt;
&lt;br /&gt;
===[emerg] duplicate listen options for [::]:443 ===&lt;br /&gt;
looks like &amp;quot;ipv6only=on&amp;quot; added by letsencrypt causes that, removing it might help&lt;br /&gt;
&lt;br /&gt;
===nginx: [emerg] a duplicate default server for 0.0.0.0:80===&lt;br /&gt;
Multiple vhosts having &amp;quot;default_server&amp;quot; in their &#039;&#039;&#039;listen&#039;&#039;&#039; lines&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===nginx: [error] invalid PID number &amp;quot;&amp;quot; in &amp;quot;/run/nginx.pid&amp;quot;===&lt;br /&gt;
Try&lt;br /&gt;
 systemctl restart nginx&lt;br /&gt;
&lt;br /&gt;
===upstream sent no valid HTTP/1.0 ===&lt;br /&gt;
Check for confusion between http and https&lt;br /&gt;
&lt;br /&gt;
[[Category: Proxy]]&lt;br /&gt;
[[Category: Web Services]]&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Apc_UPS&amp;diff=10480</id>
		<title>Apc UPS</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Apc_UPS&amp;diff=10480"/>
		<updated>2026-06-03T13:05:31Z</updated>

		<summary type="html">&lt;p&gt;Tony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Links=&lt;br /&gt;
*[https://www.zabbix.com/integrations/apc Zabbix Templates for APC UPS]&lt;br /&gt;
*[https://www.apcguard.com/smart-ups-runtime-chart.asp Smart-UPS runtime chart]&lt;br /&gt;
&lt;br /&gt;
=Documentation=&lt;br /&gt;
==Outlet groups==&lt;br /&gt;
===Main Outlet Group===&lt;br /&gt;
Callled &amp;quot;Outlets&amp;quot; in manual&lt;br /&gt;
&lt;br /&gt;
First to switch on, last to switch off.&lt;br /&gt;
&lt;br /&gt;
===Controlled Outlet Group===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=NMC (Network Management Card)=&lt;br /&gt;
&lt;br /&gt;
== Get model of NMC card==&lt;br /&gt;
===UPS Network Management Card 2===&lt;br /&gt;
go to &#039;&#039;&#039;General-&amp;gt;About&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===UPS Network Management Card 3===&lt;br /&gt;
&#039;&#039;&#039;About-&amp;gt;Network&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Web interface ==&lt;br /&gt;
 :443 only&lt;br /&gt;
&lt;br /&gt;
==Default credentials==&lt;br /&gt;
 apc / apc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==FAQ==&lt;br /&gt;
===Disable alarm===&lt;br /&gt;
Configuration-&amp;gt;UPS-&amp;gt;Audible alarm&lt;br /&gt;
&lt;br /&gt;
[[Category:Hardware]]&lt;br /&gt;
[[Category:UPS]]&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Exiftool&amp;diff=10479</id>
		<title>Exiftool</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Exiftool&amp;diff=10479"/>
		<updated>2026-06-03T12:27:02Z</updated>

		<summary type="html">&lt;p&gt;Tony: /* set image title */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=FAQ=&lt;br /&gt;
&lt;br /&gt;
==set image title==&lt;br /&gt;
 exiftool stumpert.jpg -Title=&amp;quot;Willem Stumpert&amp;quot; stumpert.jpg&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Ansible&amp;diff=10478</id>
		<title>Ansible</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Ansible&amp;diff=10478"/>
		<updated>2026-06-03T10:46:58Z</updated>

		<summary type="html">&lt;p&gt;Tony: /* Tools */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Configuration management &lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
*[http://www.ansible.com/home Homepage]&lt;br /&gt;
*[http://www.hashbangcode.com/blog/adding-iptables-rules-ansible Adding iptables Rules With Ansible]&lt;br /&gt;
*[http://cloudacademy.com/blog/going-deeper-into-ansible-playbooks/ Going Deeper into Ansible Playbooks]&lt;br /&gt;
*[https://serversforhackers.com/an-ansible-tutorial An Ansible Tutorial]&lt;br /&gt;
*[https://www.cyberciti.biz/faq/how-to-install-and-configure-latest-version-of-ansible-on-ubuntu-linux/ How to Install and Configure latest version of Ansible on Ubuntu Linux]&lt;br /&gt;
*[https://networklore.com/ansible-getting-started/ Getting started with Ansible]&lt;br /&gt;
*[https://ansible-tips-and-tricks.readthedocs.io/en/latest/os-dependent-tasks/variables/ Tips and tricks]&lt;br /&gt;
*[https://www.ansible.com/products/awx-project AWX]&lt;br /&gt;
*[https://galaxy.ansible.com Ansible Galaxy]&lt;br /&gt;
*[https://docs.ansible.com/ansible/latest/user_guide/playbooks_async.html Timeouts]&lt;br /&gt;
*[https://manintheit.org/ansible/ansible-sample-scripts/ Ansible sample scripts]&lt;br /&gt;
*[https://gist.github.com/mgedmin/5f8ac034df0c371444be module for postfix]&lt;br /&gt;
*[https://docs.ansible.com/ansible/latest/collections/ Ansible collections]&lt;br /&gt;
&lt;br /&gt;
=Tools=&lt;br /&gt;
*[https://enroll.sh/ Enroll]&lt;br /&gt;
*[https://molecule.readthedocs.io/en/latest/ Molecule] for testing roles&lt;br /&gt;
*ansible-lint&lt;br /&gt;
*ansible-console&lt;br /&gt;
*ansible-inventory&lt;br /&gt;
&lt;br /&gt;
=Docs=&lt;br /&gt;
*[https://howto.cactus.de/index.php/Ansible_Howto Ansible Howto]&lt;br /&gt;
*[https://docs.ansible.com/ansible/latest/collections/ansible/builtin/ Ansible builtin modules]&lt;br /&gt;
*[https://docs.ansible.com/ansible/latest/collections/all_plugins.html All plugins]&lt;br /&gt;
*[http://ansible-docs.readthedocs.io/zh/stable-2.0/rst/playbooks_conditionals.html Conditionals]&lt;br /&gt;
*[https://docs.ansible.com/ansible/2.5/user_guide/playbooks_async.html Parallel!]&lt;br /&gt;
==Ansible style guides==&lt;br /&gt;
*[https://docs.ansible.com/ansible/2.6/dev_guide/style_guide/index.html Style guide]&lt;br /&gt;
*[https://redhat-cop.github.io/automation-good-practices/ Ansible good practices]&lt;br /&gt;
&lt;br /&gt;
*[https://spacelift.io/blog/ansible-variables Ansible variables]&lt;br /&gt;
&lt;br /&gt;
*[https://docs.ansible.com/projects/ansible/latest/reference_appendices/config.html#the-configuration-file ansible.cfg configuration file]&lt;br /&gt;
==Lineinfile==&lt;br /&gt;
*[https://docs.ansible.com/ansible/latest/collections/ansible/builtin/lineinfile_module.html Lineinfile module]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Popular modules==&lt;br /&gt;
*[https://docs.ansible.com/ansible/latest/collections/ansible/builtin/file_module.html ansible.builtin.file]&lt;br /&gt;
*[https://docs.ansible.com/ansible/latest/collections/ansible/builtin/apt_module.html ansible.builtin.apt]&lt;br /&gt;
*[https://docs.ansible.com/ansible/latest/collections/ansible/builtin/lineinfile_module.html ansible.builtin.lineinfile]&lt;br /&gt;
&lt;br /&gt;
=Some terms=&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
=Inventories=&lt;br /&gt;
*[https://spacelift.io/blog/ansible-inventory]&lt;br /&gt;
*[http://docs.ansible.com/ansible/latest/intro_dynamic_inventory.html Dynamic Inventory]&lt;br /&gt;
*[https://www.jeffgeerling.com/blog/creating-custom-dynamic-inventories-ansible Creating custom dynamic inventories]&lt;br /&gt;
*[https://www.digitalocean.com/community/tutorials/how-to-set-up-ansible-inventories  Set up ansible inventories]&lt;br /&gt;
&lt;br /&gt;
=Alternatives=&lt;br /&gt;
*[[Puppet]]&lt;br /&gt;
*[[Saltstack]]&lt;br /&gt;
&lt;br /&gt;
=Quickstart=&lt;br /&gt;
On server as root create key:&lt;br /&gt;
 ssh-keygen&lt;br /&gt;
(go for defaults)&lt;br /&gt;
and then get content of ~/.ssh/id_rsa.pub in your copypastebuffer&lt;br /&gt;
&lt;br /&gt;
On &#039;clients&#039; edit /etc/ssh/sshd_config to&lt;br /&gt;
 PermitRootLogin without-password&lt;br /&gt;
and restart sshd&lt;br /&gt;
&lt;br /&gt;
Edit/create ~root/.ssh/authorized_keys and add:&lt;br /&gt;
 from=&amp;quot;ip.of.ansible.server&amp;quot; &amp;lt;paste public key here&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Scripts/playbooks=&lt;br /&gt;
==Maintain useraccounts==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ---&lt;br /&gt;
&lt;br /&gt;
 - name: remove users&lt;br /&gt;
  user: name=exuser state=absent force=yes groups=&#039;&#039;&lt;br /&gt;
  with_dict: accounts&lt;br /&gt;
  tags:&lt;br /&gt;
    - delusers&lt;br /&gt;
&lt;br /&gt;
 - name: sync group&lt;br /&gt;
  group:&lt;br /&gt;
    name: sync&lt;br /&gt;
    gid: 999&lt;br /&gt;
    state: &amp;quot;present&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 - name: fix homedir rights&lt;br /&gt;
  lineinfile: dest=/etc/login.defs regexp=^UMASK line=&amp;quot;UMASK 007&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 - name: useraccounts&lt;br /&gt;
  user:&lt;br /&gt;
    name: &amp;quot;{{ item.key }}&amp;quot;&lt;br /&gt;
    comment: &amp;quot;{{ item.value.name }}&amp;quot;&lt;br /&gt;
    uid: &amp;quot;{{ item.value.uid }}&amp;quot;&lt;br /&gt;
    state: &amp;quot;present&amp;quot;&lt;br /&gt;
    shell: &amp;quot;/bin/bash&amp;quot;&lt;br /&gt;
    groups: sudo&lt;br /&gt;
  with_dict: accounts&lt;br /&gt;
  tags:&lt;br /&gt;
    - accounts&lt;br /&gt;
&lt;br /&gt;
 - name: userpasswords&lt;br /&gt;
  user:&lt;br /&gt;
    name: &amp;quot;{{ item.key }}&amp;quot;&lt;br /&gt;
    password: &amp;quot;{{ lookup(&#039;csvfile&#039;,item.key + &#039; file=/etc/shadow delimiter=: col=1&#039; ) }}&amp;quot;&lt;br /&gt;
  with_dict: accounts&lt;br /&gt;
&lt;br /&gt;
#ssh keys&lt;br /&gt;
 - name: userkeys&lt;br /&gt;
  authorized_key: user={{ item.key }} key=&amp;quot;{{ lookup(&#039;file&#039;,&#039;/home/&#039; + item.key + &#039;/.ssh/authorized_keys&#039; ) }}&amp;quot; exclusive=yes&lt;br /&gt;
  with_dict: accounts&lt;br /&gt;
  tags:&lt;br /&gt;
    - keys&lt;br /&gt;
&lt;br /&gt;
 - name: nofoobar&lt;br /&gt;
  user: name=foobar state=absent remove=yes&lt;br /&gt;
  tags:&lt;br /&gt;
    - foobar&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== comment out a line ==&lt;br /&gt;
 - name: remove java line from rclocal&lt;br /&gt;
   lineinfile:&lt;br /&gt;
     dest: /etc/rc.local&lt;br /&gt;
     regexp: &#039;^(java.*)$&#039;&lt;br /&gt;
     line: &#039;# \1&#039;&lt;br /&gt;
     backrefs: yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=HOWTO=&lt;br /&gt;
==Add user to group==&lt;br /&gt;
 name: add user to bargroup&lt;br /&gt;
  user:&lt;br /&gt;
    name: foo&lt;br /&gt;
    groups: bargroup&lt;br /&gt;
    append: yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Run command==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cronjobs and ssh passphrases==&lt;br /&gt;
See [https://gist.github.com/Justintime50/297d0d36da40834b037a65998d2149ca Use Your SSH Agent in a Crontab ( keychain)]&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
&lt;br /&gt;
==Notify multiple handlers==&lt;br /&gt;
 notify:&lt;br /&gt;
   - Call Handler1&lt;br /&gt;
   - Call Handler2&lt;br /&gt;
&lt;br /&gt;
==Print hostname in debug msg ==&lt;br /&gt;
 debug:&lt;br /&gt;
   msg: &amp;quot;Something to report in {{ inventory_hostname }}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Connect to a different port==&lt;br /&gt;
Try&lt;br /&gt;
 --extra-vars=&amp;quot;ansible_port=2345&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===Parse errors===&lt;br /&gt;
====ERROR! unexpected parameter type in action: &amp;lt;type &#039;bool&#039;&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====ERROR! conflicting action statements: debug, msg====&lt;br /&gt;
&#039;&#039;&#039;indentation&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====[WARNING]: Unable to parse &amp;lt;some hostname&amp;gt; as an inventory source====&lt;br /&gt;
Append a comma&lt;br /&gt;
 ansible-playbook myplay.yml -i myhostname,&lt;br /&gt;
&lt;br /&gt;
===sftp transfer mechanism failed===&lt;br /&gt;
??&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Using a SSH password instead of a key is not possible because Host Key checking is enabled and sshpass does not support this.===&lt;br /&gt;
Please add this host&#039;s fingerprint to your known_hosts file to manage this host.&lt;br /&gt;
&lt;br /&gt;
Try &lt;br /&gt;
 ANSIBLE_HOST_KEY_CHECKING=False playbook ...&lt;br /&gt;
Or just ssh to the host and accept key&lt;br /&gt;
&lt;br /&gt;
===Platform linux on host backup01 is using the discovered Python interpreter at /usr/bin/python3===&lt;br /&gt;
one hack is adding to ~/.ansible.cfg:&lt;br /&gt;
 [defaults]&lt;br /&gt;
 interpreter_python=auto_silent  &lt;br /&gt;
&lt;br /&gt;
Or fix on that system:&lt;br /&gt;
 update-alternatives --install /usr/bin/python python /usr/bin/python3 1&lt;br /&gt;
&lt;br /&gt;
===The error was: &#039;item&#039; is undefined&amp;quot;===&lt;br /&gt;
wrong indentation for with_items&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Failed to connect to the host via ssh: Permission denied (publickey,password) ===&lt;br /&gt;
To connect without public key in authorized keys try&lt;br /&gt;
 --ask-pass&lt;br /&gt;
&lt;br /&gt;
===SSH Connection timed out during banner exchange===&lt;br /&gt;
See:&lt;br /&gt;
*[https://oneuptime.com/blog/post/2026-02-21-how-to-configure-ansible-ssh-connection-keepalive/view  How to Configure Ansible SSH Connection Keepalive ]&lt;br /&gt;
So far working for me: &lt;br /&gt;
 [ssh_connection]&lt;br /&gt;
 ssh_args = -o ServerAliveInterval=5&lt;br /&gt;
 retries = 5&lt;br /&gt;
&lt;br /&gt;
==ansible-lint==&lt;br /&gt;
===Use shell only when shell functionality is required===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== roles for multiple distributions ==&lt;br /&gt;
&lt;br /&gt;
  include_vars with &amp;quot;distro-{{ansible_distro_name}}.yml&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Escape single quote ==&lt;br /&gt;
&lt;br /&gt;
 &#039;foo &#039;&#039;bar&#039;&#039; &#039;&lt;br /&gt;
&lt;br /&gt;
==Syntax Error while loading YAML. did not find expected key==&lt;br /&gt;
Check indentation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Newlines in output ==&lt;br /&gt;
&lt;br /&gt;
instead of all those &#039;\n&#039;:&lt;br /&gt;
&lt;br /&gt;
In ansible.cfg:&lt;br /&gt;
&lt;br /&gt;
 stdout_callback = yaml&lt;br /&gt;
&lt;br /&gt;
== Ad-hoc commands ==&lt;br /&gt;
&lt;br /&gt;
[http://docs.ansible.com/ansible/latest/intro_adhoc.html http://docs.ansible.com/ansible/latest/intro_adhoc.html]&lt;br /&gt;
&lt;br /&gt;
== check python code ==&lt;br /&gt;
&lt;br /&gt;
 ansible-test sanity --test pep8 mycode.py&lt;br /&gt;
&lt;br /&gt;
== Command/shell output on single line ==&lt;br /&gt;
&lt;br /&gt;
 ANSIBLE_STDOUT_CALLBACK=oneline ansible-playbook foo.yml&lt;br /&gt;
&lt;br /&gt;
== Storing passwords ==&lt;br /&gt;
&lt;br /&gt;
[http://docs.ansible.com/ansible/2.4/vault.html http://docs.ansible.com/ansible/2.4/vault.html]&lt;br /&gt;
&lt;br /&gt;
== Show all host variables ==&lt;br /&gt;
&lt;br /&gt;
 ansible -m setup &amp;lt;hostname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Show all OS/versions ==&lt;br /&gt;
&lt;br /&gt;
 ansible all -m setup -a &amp;quot;filter=ansible_distribution*&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Syntax highlighting for ansible ==&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/chase/vim-ansible-yaml https://github.com/chase/vim-ansible-yaml] &lt;br /&gt;
&lt;br /&gt;
Drop the files in ~/vim/bundle and in .vimrc:&lt;br /&gt;
&lt;br /&gt;
 call pathogen#infect()&lt;br /&gt;
 call pathogen#helptags()&lt;br /&gt;
&lt;br /&gt;
Or maybe better:&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/pearofducks/ansible-vim https://github.com/pearofducks/ansible-vim] &lt;br /&gt;
&lt;br /&gt;
== Retry ==&lt;br /&gt;
&lt;br /&gt;
 --limit @/home/ansible/ssh.retry&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===ERROR! &#039;when&#039; is not a valid attribute for a Play===&lt;br /&gt;
&lt;br /&gt;
=== ERROR! this task &#039;import_playbook&#039; has extra params ===&lt;br /&gt;
&lt;br /&gt;
meh&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== /usr/bin/chattr: Clearing extent flag not supported ===&lt;br /&gt;
&lt;br /&gt;
Probably trying to make a backup of a symlink&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Missing sudo password===&lt;br /&gt;
set NOPASSWD in sudo config&lt;br /&gt;
&lt;br /&gt;
== Escape curly braces ==&lt;br /&gt;
&lt;br /&gt;
 {{ &#039;{&#039; }}&lt;br /&gt;
&lt;br /&gt;
== Check file for string ==&lt;br /&gt;
&lt;br /&gt;
  tasks:&lt;br /&gt;
    - name: grep line&lt;br /&gt;
      shell: &amp;quot;grep -q swap /etc/fstab&amp;quot;&lt;br /&gt;
      failed_when: false&lt;br /&gt;
      register: grepped&lt;br /&gt;
&lt;br /&gt;
    - name: show grep&lt;br /&gt;
      debug:&lt;br /&gt;
        msg: &amp;quot;exists&amp;quot;&lt;br /&gt;
      when: grepped.rc == 0&lt;br /&gt;
       &lt;br /&gt;
      &lt;br /&gt;
&lt;br /&gt;
== Error messages ==&lt;br /&gt;
&lt;br /&gt;
=== msg: The PyMySQL (Python 2.7 and Python 3.X) or MySQL-python (Python 2.X) module is required ===&lt;br /&gt;
&lt;br /&gt;
Means you need to install for example python2-PyMySQL on that host&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Ansible-lint messages==&lt;br /&gt;
===Commands should not change things if nothing needs doing===&lt;br /&gt;
Ignore, or use&lt;br /&gt;
 changed_when: false&lt;br /&gt;
===Shells that use pipes should set the pipefail option===&lt;br /&gt;
 shell: |&lt;br /&gt;
   set -o pipefail&lt;br /&gt;
   some command&lt;br /&gt;
&lt;br /&gt;
=Tips &amp;amp; tricks=&lt;br /&gt;
==Includes only when on host group==&lt;br /&gt;
   - block:&lt;br /&gt;
     - include: foo.yml &lt;br /&gt;
     - include: bar.yml&lt;br /&gt;
   when: &amp;quot;&#039;foobar&#039; in group_names&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Show info/facts of a host ==&lt;br /&gt;
&lt;br /&gt;
 ansible somehost -m setup&lt;br /&gt;
 ansible somehost -m ansible.builtin.setup&lt;br /&gt;
&lt;br /&gt;
==Show distribution and version==&lt;br /&gt;
  - name: show some host info&lt;br /&gt;
    debug:&lt;br /&gt;
      msg: Dist {{ ansible_distribution }} {{ ansible_distribution_version }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Configuration management]]&lt;br /&gt;
[[Category:Ansible]]&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Hugo&amp;diff=10477</id>
		<title>Hugo</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Hugo&amp;diff=10477"/>
		<updated>2026-06-03T10:46:07Z</updated>

		<summary type="html">&lt;p&gt;Tony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Links=&lt;br /&gt;
&lt;br /&gt;
=HOWTO=&lt;br /&gt;
==Add a theme==&lt;br /&gt;
 git submodule add https://github.com/alex-shpak/hugo-book themes/hugo-book&lt;br /&gt;
&lt;br /&gt;
=FAQ=&lt;br /&gt;
==Error messages==&lt;br /&gt;
===Section &#039;docs&#039; not found, check BookSection theme parameter===&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Hugo&amp;diff=10476</id>
		<title>Hugo</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Hugo&amp;diff=10476"/>
		<updated>2026-06-03T09:49:38Z</updated>

		<summary type="html">&lt;p&gt;Tony: Created page with &amp;quot;=Links=  =HOWTO= ==Add a theme==  git submodule add https://github.com/alex-shpak/hugo-book themes/hugo-book&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Links=&lt;br /&gt;
&lt;br /&gt;
=HOWTO=&lt;br /&gt;
==Add a theme==&lt;br /&gt;
 git submodule add https://github.com/alex-shpak/hugo-book themes/hugo-book&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Socket_statistics&amp;diff=10475</id>
		<title>Socket statistics</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Socket_statistics&amp;diff=10475"/>
		<updated>2026-06-02T08:40:07Z</updated>

		<summary type="html">&lt;p&gt;Tony: /* HOWTO */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Known as &#039;&#039;&#039;ss&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Documentation=&lt;br /&gt;
*[https://www.tecmint.com/ss-command-examples-in-linux/ 12 ss Command Examples to Monitor Network Connections]&lt;br /&gt;
*[https://www.cyberciti.biz/tips/linux-investigate-sockets-network-connections.htmlss command: Display Linux TCP / UDP Network/Socket Information]&lt;br /&gt;
&lt;br /&gt;
=HOWTO=&lt;br /&gt;
==List all listening tcp ports==&lt;br /&gt;
 ss -natl&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==List all connections to a port==&lt;br /&gt;
 ss -nat &#039;( dport = :1234 )&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Show processes listening on ports==&lt;br /&gt;
 ss -pl&lt;br /&gt;
&lt;br /&gt;
==List all listening ports and their processes==&lt;br /&gt;
 ss -tlnp&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Network]]&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Zabbix&amp;diff=10474</id>
		<title>Zabbix</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Zabbix&amp;diff=10474"/>
		<updated>2026-06-02T07:47:51Z</updated>

		<summary type="html">&lt;p&gt;Tony: /* Which items using most data in database? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
*[http://www.zabbix.org/ Homepage] &lt;br /&gt;
*[https://zabbix.org/wiki/Docs/DB_schema/4.0 zabbix 4 database schema] &lt;br /&gt;
*[https://www.zabbix.com/documentation/current/en/manual/appendix/compatibility Zabbix compatibility matrix]&lt;br /&gt;
*[https://www.digitalocean.com/community/tutorials/introduction-to-queries-mysql https://www.digitalocean.com/community/tutorials/introduction-to-queries-mysql] &lt;br /&gt;
*[http://zabbix.org/wiki/Compilation_instructions compilation instructions] &lt;br /&gt;
*[http://www.zabbix.com/documentation Documentation] &lt;br /&gt;
*[https://dev.mysql.com/doc/mysql-tutorial-excerpt/8.0/en/examples.html Examples of Common Queries] &lt;br /&gt;
*[http://zabbixzone.com/zabbix/easy-update-on-custom-scripts/ Custom scripts] &lt;br /&gt;
*[https://github.com/q1x/zabbix-gnomes Various scripts to automate tasks in Zabbix] &lt;br /&gt;
*[https://www.percona.com/blog/2014/11/14/optimizing-mysql-zabbix/ Tuning mysql for zabbix] &lt;br /&gt;
*[https://huyabbix.com https://huyabbix.com] &lt;br /&gt;
*[http://techblog.procurios.nl/k/n618/news/view/56429/14863/how-to-migrate-mysql-databases-without-downtime.html Migrating zabbix database with minimal downtime] &lt;br /&gt;
*[https://support.zabbix.com/browse/ZBX/ Zabbix Bug tracker] &lt;br /&gt;
*[http://www.michaelfoster82.co.uk/zabbix-database-cleanup-delete-old-data/ Clean up database] &lt;br /&gt;
*[https://linux.die.net/man/8/zabbix_selinux Zabbix and selinux] &lt;br /&gt;
*[https://github.com/a-schild/zabbix-ssl Apache/SSL checks] &lt;br /&gt;
*[[Zabbix_on_RHEL/Centos|Zabbix on RHEL/Centos]] &lt;br /&gt;
*[[Grafana|Grafana]] &lt;br /&gt;
*[https://blog.zabbix.com/zabbix-ha-cluster-setups/8264/ https://blog.zabbix.com/zabbix-ha-cluster-setups/8264/] Zabbix HA cluster] &lt;br /&gt;
*[https://blog.zabbix.com/zabbix-agent-active-vs-passive/9207/ Active vs Passive]&lt;br /&gt;
*[https://blog.zabbix.com/fighting-notification-floods-and-misleading-alerts-in-distributed-zabbix-deployments/11600/ Fighting zabbix alert floods] &lt;br /&gt;
*[https://github.com/unioslo/zabbix-cli zabbix-cli]&lt;br /&gt;
&lt;br /&gt;
=Documentation=&lt;br /&gt;
==Triggers==&lt;br /&gt;
*[https://www.zabbix.com/documentation/current/en/manual/appendix/functions Trigger functions]&lt;br /&gt;
Function str() searches for substrings&lt;br /&gt;
&lt;br /&gt;
==AND OR case==&lt;br /&gt;
not, and and or operators are case-sensitive and must be in lowercase. They also must be surrounded by spaces or parentheses.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Installing zabbix==&lt;br /&gt;
*[https://www.zabbix.com/download Download and install zabbix]&lt;br /&gt;
*[https://repo.zabbix.com/ Zabbix repositories]&lt;br /&gt;
*[https://wiki.gentoo.org/wiki/User:MalakymR/Zabbix Zabbix on Gentoo]&lt;br /&gt;
&lt;br /&gt;
== Installing Zabbix from git ==&lt;br /&gt;
&lt;br /&gt;
 git clone [https://github.com/zabbix/zabbix.git https://github.com/zabbix/zabbix.git]&lt;br /&gt;
 cd zabbix &lt;br /&gt;
 ./bootstrap.sh&lt;br /&gt;
 ./configure --help&lt;br /&gt;
 autoreconf -fvi&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t have a Makefile, try&lt;br /&gt;
 ./config.status Makefile&lt;br /&gt;
and then&lt;br /&gt;
 ./configure&lt;br /&gt;
again&lt;br /&gt;
&lt;br /&gt;
== Zabbix API ==&lt;br /&gt;
&lt;br /&gt;
*[https://www.zabbix.com/documentation/current/manual/api The Zabbix API] &lt;br /&gt;
*[https://www.zabbix.com/integrations/python API and python]&lt;br /&gt;
&lt;br /&gt;
===FAQ===&lt;br /&gt;
====Error: Zabbix API library must be installed.====&lt;br /&gt;
It wants the OTHER zabbix API, so&lt;br /&gt;
 pip install zabbix-api&lt;br /&gt;
&lt;br /&gt;
==Zabbix agent paths==&lt;br /&gt;
===Ubuntu===&lt;br /&gt;
 /etc/zabbix/zabbix_agentd.conf.d/&lt;br /&gt;
 /etc/zabbix/zabbix_agentd.conf&lt;br /&gt;
&lt;br /&gt;
===Ubuntu 24.04===&lt;br /&gt;
 /etc/zabbix/zabbix_agentd.d&lt;br /&gt;
&lt;br /&gt;
==Simple check==&lt;br /&gt;
*[https://www.zabbix.com/documentation/6.4/en/manual/config/items/itemtypes/simple_checks Simple checks]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Zabbix and SNMP==&lt;br /&gt;
===Links===&lt;br /&gt;
*[https://www.zabbix.com/integrations/snmp#interfaces_snmp Interfaces by SNMP]&lt;br /&gt;
*[https://www.zabbix.com/documentation/5.0/en/manual/discovery/low_level_discovery/snmp_oids Discovery of SNMP OIDs]&lt;br /&gt;
&lt;br /&gt;
On proxy/server:&lt;br /&gt;
 apt install snmp-mibs-downloader&lt;br /&gt;
 download-mibs&lt;br /&gt;
&lt;br /&gt;
*[https://bestmonitoringtools.com/tutorial-snmp-traps-on-zabbix/ Zabbix SNMP Traps: A Step-by-Step Guide]&lt;br /&gt;
&lt;br /&gt;
==External check==&lt;br /&gt;
*[https://www.zabbix.com/documentation/current/en/manual/config/items/itemtypes/external External checks]&lt;br /&gt;
Scripts usually in &#039;&#039;&#039;/usr/lib/zabbix/externalscripts/&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Tagging==&lt;br /&gt;
* [https://www.zabbix.com/documentation/guidelines/en/thosts/configuration/template_items#tags Item tags]&lt;br /&gt;
* [https://www.zabbix.com/documentation/guidelines/en/thosts/configuration/templates#tag-name-and-value-format Template tags]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Web monitoring==&lt;br /&gt;
* https://www.zabbix.com/documentation/current/en/manual/web_monitoring&lt;br /&gt;
&lt;br /&gt;
= Zabbix error codes =&lt;br /&gt;
&lt;br /&gt;
== Z3005 ==&lt;br /&gt;
&lt;br /&gt;
Database issue&lt;br /&gt;
&lt;br /&gt;
= Zabbix Items =&lt;br /&gt;
[https://www.zabbix.com/documentation/6.0/en/manual/config/items/itemtypes/zabbix_agent Agent item keys]&lt;br /&gt;
==Item dialog==&lt;br /&gt;
*[https://www.zabbix.com/documentation/5.4/en/manual/config/items/item Item documentation]&lt;br /&gt;
*[https://www.zabbix.com/documentation/5.4/en/manual/config/items/itemtypes/zabbix_agent Zabbix agent items]&lt;br /&gt;
===Type of information===&lt;br /&gt;
====Numeric(unsigned)====&lt;br /&gt;
====Character====&lt;br /&gt;
character (string) data limited to 255 bytes&lt;br /&gt;
====Text====&lt;br /&gt;
Text of any size&lt;br /&gt;
&lt;br /&gt;
===Units===&lt;br /&gt;
&lt;br /&gt;
*B&lt;br /&gt;
*uptime&lt;br /&gt;
*unixtime&lt;br /&gt;
*s&lt;br /&gt;
&lt;br /&gt;
== proc.mem ==&lt;br /&gt;
*[https://www.zabbix.com/documentation/current/en/manual/config/items/itemtypes/zabbix_agent#proc.mem zabbix agent proc.mem]&lt;br /&gt;
&lt;br /&gt;
proc.mem[&amp;lt;name&amp;gt;,&amp;lt;user&amp;gt;,&amp;lt;mode&amp;gt;,&amp;lt;cmdline&amp;gt;,&amp;lt;memtype&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=== name ===&lt;br /&gt;
process name&lt;br /&gt;
&lt;br /&gt;
=== cmdline ===&lt;br /&gt;
&lt;br /&gt;
regex like php-fpm:&lt;br /&gt;
&lt;br /&gt;
===memtype===&lt;br /&gt;
On linux default is vsize (VmSize)&lt;br /&gt;
*[https://www.zabbix.com/documentation/5.0/en/manual/appendix/items/proc_mem_notes Notes on proc.mem memtypes]&lt;br /&gt;
&lt;br /&gt;
==proc.num==&lt;br /&gt;
*[https://www.zabbix.com/documentation/current/en/manual/config/items/itemtypes/zabbix_agent#proc.num proc.num]&lt;br /&gt;
&lt;br /&gt;
==Item preprocessing==&lt;br /&gt;
===Preprocessing regular expressions===&lt;br /&gt;
See [https://www.zabbix.com/documentation/current/en/manual/regular_expressions#example Regular expressions: example]&lt;br /&gt;
&lt;br /&gt;
===XML/xpath preprocessing===&lt;br /&gt;
https://blog.zabbix.com/zabbix-xpath-preprocessing/7936/&lt;br /&gt;
&lt;br /&gt;
NOTE xq -x does not want the number() bit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Incorrect value for field &amp;quot;Prev. time&amp;quot;: a relative time is expected.===&lt;br /&gt;
Prev. Time should be something like&lt;br /&gt;
 now-30s&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Monitoring incremental/counters===&lt;br /&gt;
 Preprocessing -&amp;gt; Change per second&lt;br /&gt;
&lt;br /&gt;
==Windows performance counters==&lt;br /&gt;
https://www.zabbix.com/documentation/current/en/manual/config/items/perfcounters&lt;br /&gt;
&lt;br /&gt;
= Templates =&lt;br /&gt;
*[https://www.zabbix.com/integrations?cat=official_templates Zabbix Offical Templates]&lt;br /&gt;
*[https://github.com/zabbix/community-templates/ Community templates]&lt;br /&gt;
&lt;br /&gt;
==Template App MySQL==&lt;br /&gt;
https://github.com/tiramiseb/zabbix-templates/blob/master/Template%20App%20MySQL.txt&lt;br /&gt;
TODO shouldn&#039;t this be user zabbix?&lt;br /&gt;
&lt;br /&gt;
mysql user account:&lt;br /&gt;
 create user &#039;monitor&#039;@&#039;localhost&#039; identified by auth_socket;&lt;br /&gt;
 grant PROCESS,SHOW DATABASES,SHOW VIEW on *.* to &#039;monitor&#039;@&#039;localhost&#039;;&lt;br /&gt;
 flush privileges;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Monitoring sensors==&lt;br /&gt;
Template https://github.com/blind-oracle/zabbix-sensors for sensors discovery.&lt;br /&gt;
See also https://www.zabbix.com/documentation/current/en/manual/appendix/items/sensor&lt;br /&gt;
&lt;br /&gt;
= Configuration =&lt;br /&gt;
&lt;br /&gt;
== Zabbix agent active ==&lt;br /&gt;
&lt;br /&gt;
=== On client ===&lt;br /&gt;
Have port 10051 open and:&lt;br /&gt;
 ActiveServer zabbix.ser.ver&lt;br /&gt;
&lt;br /&gt;
=== On server ===&lt;br /&gt;
&lt;br /&gt;
Set Agent IP to 0.0.0.0&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
=Zabbix and SQL=&lt;br /&gt;
==Find hosts with hostmacro defined== &lt;br /&gt;
 select h.host, m.macro, m.value from hosts h, hostmacro m where macro like &#039;%FOO%&#039; and h.hostid = m.hostid;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==most frequent items in history_uint==&lt;br /&gt;
 select itemid,count(itemid) as freq from history_uint group by itemid order by freq desc limit 5;&lt;br /&gt;
&lt;br /&gt;
and then&lt;br /&gt;
 select name from items where itemid = whateveryoufind;&lt;br /&gt;
&lt;br /&gt;
= HOWTO =&lt;br /&gt;
==Mysql command line==&lt;br /&gt;
===Use custom variables===&lt;br /&gt;
 set @foo=12;&lt;br /&gt;
 select * from items where id &amp;lt; @foo;&lt;br /&gt;
&lt;br /&gt;
==Useful queries==&lt;br /&gt;
===Find most items filling up history===&lt;br /&gt;
 SELECT itemid, count(*) AS cnt FROM history GROUP BY itemid ORDER BY cnt DESC limit 30;&lt;br /&gt;
&lt;br /&gt;
===Find host and item by itemid===&lt;br /&gt;
 select h.name,i.hostid,i.name from hosts h,items i where i.itemid = 212624 and i.hostid = h.hostid;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Define discovery filters==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== LLD with JSON ==&lt;br /&gt;
*[https://blog.zabbix.com/low-level-discovery-with-dependent-items/13634/ LLD with JSON and dependent items]&lt;br /&gt;
*https://www.zabbix.com/forum/zabbix-help/383827-json-and-lld-understanding &lt;br /&gt;
*https://www.zabbix.com/forum/zabbix-troubleshooting-and-problems/456663-lld-macros-with-json&lt;br /&gt;
&lt;br /&gt;
if you want multiple keys, use jsonpath like &lt;br /&gt;
 $[?(@.share==&#039;{#FSTYPE}&#039; &amp;amp;&amp;amp; @.name==&#039;{#NAME}&#039;)].size.first()&lt;br /&gt;
===testing jsonpath preprocessing===&lt;br /&gt;
In Value paste valid json, then name {#NAME} value somevalue&lt;br /&gt;
&lt;br /&gt;
== Test trapper ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Reset admin password==&lt;br /&gt;
Mysql prompt:&lt;br /&gt;
 select * from user where username=&#039;Admin&#039;;&lt;br /&gt;
bcrypt your new password:&lt;br /&gt;
 htpasswd -nbBC 10 USER YOURPASSWORD|awk -F &#039;:&#039; &#039;{ print $2 }&#039;&lt;br /&gt;
Mysql prompt:&lt;br /&gt;
 update user set passwd = &#039;your bcrypted pass&#039; where userid = 1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Zabbix and PSK==&lt;br /&gt;
See:&lt;br /&gt;
*[https://www.zabbix.com/documentation/5.2/en/manual/encryption/using_pre_shared_keys  Using pre-shared keys]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Updating multiple triggers/alerts==&lt;br /&gt;
Select them via &#039;&#039;&#039;Monitoring-&amp;gt;Problems&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Testing javascript==&lt;br /&gt;
 zabbix_js&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Zabbix maps==&lt;br /&gt;
* [https://www.zabbix.com/documentation/8.0/en/manual/config/visualization/maps/map maps]&lt;br /&gt;
===Add link===&lt;br /&gt;
&amp;quot;Two map elements should be selected&amp;quot;&lt;br /&gt;
Select one, hold control and select the other&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
==macro naming convention==&lt;br /&gt;
{$SOME.NAME} is better than {$SOME_NAME}&lt;br /&gt;
&lt;br /&gt;
==cannot convert value to numeric type==&lt;br /&gt;
Some javascript :)&lt;br /&gt;
&lt;br /&gt;
==Failed: cannot calculate delta (speed per second) for value of type &amp;quot;none&amp;quot;==&lt;br /&gt;
In preprocessing use Javascript to&lt;br /&gt;
 if ( &amp;quot;&amp;quot; == value ) { return 0; } else { return value; }&lt;br /&gt;
&lt;br /&gt;
==Handling division by zero==&lt;br /&gt;
In preprocessing find &amp;quot;Check for not supported&amp;quot;, &amp;quot;error matches&amp;quot; and add &amp;quot;division by zero&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==zabbix[proxy_buffer,state,current] not supported==&lt;br /&gt;
Zabbix proxy must be monitored by itself, not by server&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==What is this &amp;quot;$1&amp;quot; in item name?==&lt;br /&gt;
In older versions of zabbix this was first parameter of key, use the macros like {#SNMPVALUE}, {#FSNAME}, or {#IFNAME} now&lt;br /&gt;
&lt;br /&gt;
==Locations of Userparameters==&lt;br /&gt;
===Ubuntu===&lt;br /&gt;
 /etc/zabbix/agentd.d/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==What takes most space in the database?==&lt;br /&gt;
*[https://blog.zabbix.com/what-takes-disk-space/13349/ What takes disk space]&lt;br /&gt;
&lt;br /&gt;
==forced reloading of the snmp cache==&lt;br /&gt;
looks like nothing to worry about&lt;br /&gt;
&lt;br /&gt;
==Where is last userid stored?==&lt;br /&gt;
ids:&lt;br /&gt;
 table_name: users&lt;br /&gt;
 field_name: userid&lt;br /&gt;
 nextid: the next id &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SERVER ==&lt;br /&gt;
==Which items using most data in database?==&lt;br /&gt;
*[https://serverfault.com/questions/749397/zabbix-determine-what-item-checks-are-responsible-for-storing-the-most-data determine what item checks are responsible for storing the most data]&lt;br /&gt;
&lt;br /&gt;
 SELECT itemid, count(*) AS cnt FROM history GROUP BY itemid ORDER BY cnt DESC LIMIT 20;&lt;br /&gt;
or maybe&lt;br /&gt;
 SELECT h.itemid, i.name, count(*) AS cnt FROM history h, items i where h.itemid = i.itemid GROUP BY itemid ORDER BY cnt DESC limit 20;&lt;br /&gt;
=== Adjust loglevel ===&lt;br /&gt;
&lt;br /&gt;
 zabbix_server --runtime-control log_level_increase=trapper&lt;br /&gt;
       &lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== Reload zabbix server configuration ===&lt;br /&gt;
&lt;br /&gt;
You can&#039;t, but you might want&lt;br /&gt;
&lt;br /&gt;
 zabbix_server -c /etc/zabbix/zabbix_server.conf -R config_cache_reload&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== No media defined for user ===&lt;br /&gt;
&lt;br /&gt;
=== The frontend does not match Zabbix database. ===&lt;br /&gt;
&lt;br /&gt;
Probably version conflict between frontend and server&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== value cache working in low memory mode ===&lt;br /&gt;
&lt;br /&gt;
Increase ValueCacheSize&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Message from 1.2.3.4 is missing header. Message ignored. ===&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== PROXY ==&lt;br /&gt;
&lt;br /&gt;
[[ Zabbix Proxy ]]&lt;br /&gt;
&lt;br /&gt;
===cannot send proxy data to server===&lt;br /&gt;
empty string received&lt;br /&gt;
&lt;br /&gt;
===failed to update local proxy configuration copy: unexpected field &amp;quot;host_inventory.type&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Front end ==&lt;br /&gt;
&lt;br /&gt;
===Round numbers===&lt;br /&gt;
Preprocessing javascript&lt;br /&gt;
2 decimals:&lt;br /&gt;
 return Math.round(value* 100) / 100&lt;br /&gt;
0 decimals:&lt;br /&gt;
 return Math.round(value)&lt;br /&gt;
&lt;br /&gt;
=== Visable name vs hostname ===&lt;br /&gt;
&lt;br /&gt;
Visible name: {HOST.NAME}&lt;br /&gt;
&lt;br /&gt;
Hostname: {HOST.HOST}&lt;br /&gt;
&lt;br /&gt;
Host IP: (as defined in Interface-&amp;gt;IP/DNS) {HOST.CONN}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Acknowledge multiple items ===&lt;br /&gt;
&lt;br /&gt;
Monitor-&amp;gt;Problems apply filters, select all, mass update&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== No permissions to referred object or it does not exist! ===&lt;br /&gt;
&lt;br /&gt;
Graph no longer exists. Probably items no longer discovered&lt;br /&gt;
&lt;br /&gt;
Maybe you&#039;ve been editing a template file, remember to replace template name everywhere&lt;br /&gt;
&lt;br /&gt;
=== Cannot add host ===&lt;br /&gt;
&lt;br /&gt;
??&lt;br /&gt;
===match for value of type &amp;quot;none&amp;quot;: pattern does not match===&lt;br /&gt;
Agent returning empty string?&lt;br /&gt;
&lt;br /&gt;
== Monitoring SNMP ==&lt;br /&gt;
===Cannot find module (IF-MIB): At line 1 in (none)===&lt;br /&gt;
 apt install snmp-mibs-downloader&lt;br /&gt;
and restart zabbix-proxy&lt;br /&gt;
&lt;br /&gt;
=== Cannot find host interface on &amp;quot;xxxhost&amp;quot; for item key foo ===&lt;br /&gt;
&lt;br /&gt;
Might mean you&#039;re trying to import an SNMP template before configuring SNMP for the host&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== No SNMP data ===&lt;br /&gt;
&lt;br /&gt;
=== snmp_parse_oid(): cannot parse OID &amp;quot;IF-MIB::ifSpeed.3 ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Timeout while connecting===&lt;br /&gt;
Could be wrong community string, remember delay when using proxy.&lt;br /&gt;
&lt;br /&gt;
== Agent side ping check ==&lt;br /&gt;
&lt;br /&gt;
 UserParameter=pingtime[*],fping -e $1|sed &#039;s/^.*(\([0-9].*\) ms).*$/\1/g&#039;&lt;br /&gt;
 UserParameter=pingalive[*],fping $1|grep -q alive;echo $?&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==LLD/Discovery==&lt;br /&gt;
=== Discover: value must be a JSON object ===&lt;br /&gt;
&lt;br /&gt;
Could mean you need to escape slashes, check output with zabbix_get&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Cannot create item: item with the same key already exists===&lt;br /&gt;
make sure the key contains &amp;quot;{#SOMENAME}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Discovery data example ==&lt;br /&gt;
&lt;br /&gt;
Output of a discovery script should look like:&lt;br /&gt;
&lt;br /&gt;
 {&amp;quot;data&amp;quot;:[&lt;br /&gt;
   {&amp;quot;{#VAR1}&amp;quot;:&amp;quot;value11&amp;quot;,&amp;quot;#{VAR2&amp;quot;:&amp;quot;value12&amp;quot;},&lt;br /&gt;
   {&amp;quot;{#VAR1}&amp;quot;:&amp;quot;value21&amp;quot;,&amp;quot;#{VAR2&amp;quot;:&amp;quot;value22&amp;quot;}&lt;br /&gt;
 ]}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== IPMI ==&lt;br /&gt;
&lt;br /&gt;
=== IPMI Monitoring account for zabbix ===&lt;br /&gt;
&lt;br /&gt;
[https://www.thomas-krenn.com/en/wiki/Configuring_IPMI_under_Linux_using_ipmitool https://www.thomas-krenn.com/en/wiki/Configuring_IPMI_under_Linux_using_ipmitool]&lt;br /&gt;
&lt;br /&gt;
 ipmitool user set name 3 monitor&lt;br /&gt;
 ipmitool user set password 3&lt;br /&gt;
 ipmitool channel setaccess 1 3 link=on ipmi=on callin=on privilege=2&lt;br /&gt;
 ipmitool user enable 3&lt;br /&gt;
&lt;br /&gt;
To test these:&lt;br /&gt;
 ipmitool -I lanplus -H &amp;lt;host&amp;gt; -L USER -U monitor sdr elist full&lt;br /&gt;
&lt;br /&gt;
===Zabbix credentials===&lt;br /&gt;
====Privilege Level====&lt;br /&gt;
 User&lt;br /&gt;
&lt;br /&gt;
====Authentication algorithm====&lt;br /&gt;
 Default&lt;br /&gt;
but what is that?&lt;br /&gt;
&lt;br /&gt;
=== cannot connect to IPMI host: [22] Operation canceled ===&lt;br /&gt;
&lt;br /&gt;
Usually temporary because of broken ipmi lib, ignore it&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== cannot connect to IPMI host: [16777411] Unknown error 16777411 ===&lt;br /&gt;
&lt;br /&gt;
classic, probably authentication problem&lt;br /&gt;
&lt;br /&gt;
=== cannot connect to IPMI host: [22] Invalid argument ===&lt;br /&gt;
wrong password/credentials?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===IPMI pollers are disabled in configuration===&lt;br /&gt;
Check&lt;br /&gt;
 StartIPMIPollers&lt;br /&gt;
in server/proxy configuration&lt;br /&gt;
&lt;br /&gt;
=== Cannot connect to IPMI host: [2] No such file or directory===&lt;br /&gt;
??&lt;br /&gt;
&lt;br /&gt;
== zabbix_sender ==&lt;br /&gt;
&lt;br /&gt;
=== processed: 0; failed: 1 ===&lt;br /&gt;
&lt;br /&gt;
Possible causes:&lt;br /&gt;
&lt;br /&gt;
*incorrect hostname &lt;br /&gt;
*incorrect item key &lt;br /&gt;
*item not in the server configuration cache yet &lt;br /&gt;
*Allowed hosts in trapper item &lt;br /&gt;
*phase of moon &lt;br /&gt;
*aliens &lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== Testing zabbix_sender ===&lt;br /&gt;
&lt;br /&gt;
 zabbix_sender stuff&lt;br /&gt;
&lt;br /&gt;
== Filters ==&lt;br /&gt;
&lt;br /&gt;
The regular expressions referred to in discovery are found under Administration-&amp;gt;General, and then &amp;quot;Regular expressions&amp;quot; in the dropdown at top right of the page&lt;br /&gt;
&lt;br /&gt;
=== cannot connect to IPMI host: [125] Operation canceled ===&lt;br /&gt;
&lt;br /&gt;
possibly authentication method issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
== Calculated items ==&lt;br /&gt;
See [https://blog.zabbix.com/zabbix-monitoring-with-calculated-items-explained/9950/ Calculated items explained]&lt;br /&gt;
=== Cannot create item: Invalid first parameter ===&lt;br /&gt;
For calculated items use last(&amp;quot;youritemkey&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
=== Cannot create item, error in formula ===&lt;br /&gt;
Problably a calculated item, try doublequoting the item key:&lt;br /&gt;
&lt;br /&gt;
 last(&amp;quot;foo[bar]&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
===Invalid parameter &amp;quot;/1/params&amp;quot;===&lt;br /&gt;
Maybe forgot to use last()?&lt;br /&gt;
You might need to doublequote your items, or prepend with double slashes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Reset trigger/alert ==&lt;br /&gt;
For example when you changed the settings &lt;br /&gt;
Just disable, wait a bit and enable again.&lt;br /&gt;
== Install recent zabbix on CentOS/RHEL ==&lt;br /&gt;
&lt;br /&gt;
 rpm -ivh [https://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm https://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm]&lt;br /&gt;
 yum install zabbix-agent&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Backing up tables ==&lt;br /&gt;
&lt;br /&gt;
[https://www.zabbix.org/wiki/Docs/howto/mysql_backup_script https://www.zabbix.org/wiki/Docs/howto/mysql_backup_script]&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== cannot send list of active checks ==&lt;br /&gt;
Verify hostname:&lt;br /&gt;
 /usr/sbin/zabbix_agentd -t &#039;agent.hostname&#039;&lt;br /&gt;
&lt;br /&gt;
If in agent log: most likely ServerActive is defined in agent config, while not used at all&lt;br /&gt;
&lt;br /&gt;
It is also possible agent is sending some active check to server while host is monitored via proxy.&lt;br /&gt;
&lt;br /&gt;
In proxy/server log:&lt;br /&gt;
most likely &#039;&#039;&#039;Hostname&#039;&#039;&#039; in agent config does not match hostname used on server.&lt;br /&gt;
&lt;br /&gt;
==cannot send list of active checks to &amp;quot;127.0.0.1&amp;quot;: host [Zabbix server] not found==&lt;br /&gt;
??&lt;br /&gt;
&lt;br /&gt;
== active check configuration update started to fail ==&lt;br /&gt;
&lt;br /&gt;
??&lt;br /&gt;
&lt;br /&gt;
== Latest 20 issues ==&lt;br /&gt;
&lt;br /&gt;
DEFAULT_LATEST_ISSUES_CNT in/usr/share/zabbix/include/defines.inc.php&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== Zabbix unreachable poller processes more than 75% busy ==&lt;br /&gt;
&lt;br /&gt;
Increase &#039;&#039;&#039;StartPollersUnreachable&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== Zabbix poller processes more than 75% busy ==&lt;br /&gt;
&lt;br /&gt;
Maybe StartPollersUnreachable?&lt;br /&gt;
&lt;br /&gt;
== More than 100 items having missing data for more than 10 minutes ==&lt;br /&gt;
&lt;br /&gt;
Could be high load. Also check Administration-&amp;gt;Queue&lt;br /&gt;
&lt;br /&gt;
== Zabbix escalator processes more than 75% busy ==&lt;br /&gt;
&lt;br /&gt;
probably high system load overall&lt;br /&gt;
&lt;br /&gt;
== Check agent ==&lt;br /&gt;
&lt;br /&gt;
 zabbix_get -s my.host.com -k agent.version&lt;br /&gt;
&lt;br /&gt;
== ZBX_NOTSUPPORTED ==&lt;br /&gt;
&lt;br /&gt;
Could be anything, enable logging on agent. It could be version mismatch. Check&lt;br /&gt;
&lt;br /&gt;
 zabbix_get -s yourhost -k agent.version&lt;br /&gt;
&lt;br /&gt;
If that works, you&#039;re calling for an undefined or unsupported key.&lt;br /&gt;
&lt;br /&gt;
== Incorrect trigger expression. Host &amp;quot;xx&amp;quot; does not exist or you have no access to this host. ==&lt;br /&gt;
&lt;br /&gt;
Means there&#039;s no related item.&lt;br /&gt;
&lt;br /&gt;
== zabbix_get returns nothing ==&lt;br /&gt;
&lt;br /&gt;
best look at log on agent side&lt;br /&gt;
&lt;br /&gt;
== run playbook on single host ==&lt;br /&gt;
&lt;br /&gt;
 ansible_playbook -l somehost somplay.yml&lt;br /&gt;
&lt;br /&gt;
[[:Category:Monitoring]]&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== Zabbix server is not running: the information displayed may not be current ==&lt;br /&gt;
&lt;br /&gt;
Might be selinux: [http://sysads.co.uk/2013/11/zabbix-server-running-alert/ http://sysads.co.uk/2013/11/zabbix-server-running-alert/]&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== Monitoring vmware ==&lt;br /&gt;
&lt;br /&gt;
=== vmware.hv.cpu.usage[{$URL},{HOST.HOST}]&amp;quot; became not supported: Couldn&#039;t resolve host name ===&lt;br /&gt;
&lt;br /&gt;
 Set macro {$URL} to [https://your.ip/sdk/ https://your.ip/sdk/] (shouldn&#039;t discovery figure that out from {$HOST}&amp;amp;nbsp;?&lt;br /&gt;
       &lt;br /&gt;
&lt;br /&gt;
=== Couldn&#039;t resolve host name ===&lt;br /&gt;
&lt;br /&gt;
Sometimes it&#039;s a matter of waiting a few hours&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== vmware events collector returned empty result ===&lt;br /&gt;
&lt;br /&gt;
???&lt;br /&gt;
&lt;br /&gt;
=== No &amp;quot;vmware collector&amp;quot; processes started. ===&lt;br /&gt;
&lt;br /&gt;
Check StartVMwareCollectors on server or proxy&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== unsupported item key ==&lt;br /&gt;
&lt;br /&gt;
This might mean it&#039;s expecting a value from the script you&#039;re calling.&lt;br /&gt;
&lt;br /&gt;
 echo 1&lt;br /&gt;
remember: not supported is not disabled, server/proxy will try again after interval &lt;br /&gt;
&lt;br /&gt;
=== became not supported: Not supported by Zabbix Agent ===&lt;br /&gt;
&lt;br /&gt;
probably output by userparameter/script&lt;br /&gt;
&lt;br /&gt;
== ansible or API not showing host groups ==&lt;br /&gt;
&lt;br /&gt;
Permissions!! See Administration-&amp;gt;User Groups&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== failed to update local proxy configuration copy: invalid field name &amp;quot;items.lastlogsize&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
check everything&amp;amp;nbsp;:)&lt;br /&gt;
&lt;br /&gt;
== Received value [11] is not suitable for value type [Numeric (unsigned)] and data type [Decimal] ==&lt;br /&gt;
&lt;br /&gt;
 This probably means the agent returned 1\n1&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== database is down: retrying in 10 seconds ==&lt;br /&gt;
&lt;br /&gt;
try upping max_connections&lt;br /&gt;
&lt;br /&gt;
== [Incorrect key file for table &#039;items&#039;; try to repair it ==&lt;br /&gt;
&lt;br /&gt;
Could be something /tmp related&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== another network error, wait for 8 seconds ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;UnreachableDelay&#039;&#039;&#039;=8&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== failed: first network error, wait for XY seconds ==&lt;br /&gt;
&lt;br /&gt;
Waits for UnreachableDelay seconds before trying again&lt;br /&gt;
&lt;br /&gt;
Loglevel LOG_LEVEL_WARNING&lt;br /&gt;
&lt;br /&gt;
== no active checks on server ==&lt;br /&gt;
*Hostname in agent config (-kagent.hostname) must match name on server&lt;br /&gt;
*simple no connection possible? firewall?&lt;br /&gt;
*maybe the host was configured to be monitored by (another) proxy?&lt;br /&gt;
&lt;br /&gt;
== show cpu utilization ==&lt;br /&gt;
&lt;br /&gt;
Monitoring-&amp;gt;host-&amp;gt;graphs&lt;br /&gt;
&lt;br /&gt;
===fuzzytime on command line===&lt;br /&gt;
 TS=lotsofseconds&lt;br /&gt;
#output in hours&lt;br /&gt;
 echo $(( ($(date +%s) - $TS) / 3600 ))&lt;br /&gt;
&lt;br /&gt;
==duplicate entry adding user/group==&lt;br /&gt;
Check table &#039;ids&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
===zabbix_get: no route to host===&lt;br /&gt;
Check the firewall&lt;br /&gt;
&lt;br /&gt;
=Error messages=&lt;br /&gt;
==Error: Zabbix API library must be installed==&lt;br /&gt;
 pip install zabbix_utils&lt;br /&gt;
OR&lt;br /&gt;
 pip install zabbix-api&lt;br /&gt;
&lt;br /&gt;
==Get value from agent failed: cannot connect to [[xx]:10050]: [4] Interrupted system call==&lt;br /&gt;
Check firewall?&lt;br /&gt;
&lt;br /&gt;
==connection error (POLLERR,POLLHUP)==&lt;br /&gt;
probably firewall&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Agent error messages==&lt;br /&gt;
===unspecified certificate verification error: TLS handshake set result code to 5:===&lt;br /&gt;
Try restarting agent.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==zabbix : problem with defaults entries ==&lt;br /&gt;
Could be sudo/resolving problem&lt;br /&gt;
&lt;br /&gt;
[[Category:Monitoring]]&lt;br /&gt;
[[Category:Zabbix]]&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Ansible&amp;diff=10473</id>
		<title>Ansible</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Ansible&amp;diff=10473"/>
		<updated>2026-06-01T14:45:56Z</updated>

		<summary type="html">&lt;p&gt;Tony: /* Error messages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Configuration management &lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
*[http://www.ansible.com/home Homepage]&lt;br /&gt;
*[http://www.hashbangcode.com/blog/adding-iptables-rules-ansible Adding iptables Rules With Ansible]&lt;br /&gt;
*[http://cloudacademy.com/blog/going-deeper-into-ansible-playbooks/ Going Deeper into Ansible Playbooks]&lt;br /&gt;
*[https://serversforhackers.com/an-ansible-tutorial An Ansible Tutorial]&lt;br /&gt;
*[https://www.cyberciti.biz/faq/how-to-install-and-configure-latest-version-of-ansible-on-ubuntu-linux/ How to Install and Configure latest version of Ansible on Ubuntu Linux]&lt;br /&gt;
*[https://networklore.com/ansible-getting-started/ Getting started with Ansible]&lt;br /&gt;
*[https://ansible-tips-and-tricks.readthedocs.io/en/latest/os-dependent-tasks/variables/ Tips and tricks]&lt;br /&gt;
*[https://www.ansible.com/products/awx-project AWX]&lt;br /&gt;
*[https://galaxy.ansible.com Ansible Galaxy]&lt;br /&gt;
*[https://docs.ansible.com/ansible/latest/user_guide/playbooks_async.html Timeouts]&lt;br /&gt;
*[https://manintheit.org/ansible/ansible-sample-scripts/ Ansible sample scripts]&lt;br /&gt;
*[https://gist.github.com/mgedmin/5f8ac034df0c371444be module for postfix]&lt;br /&gt;
*[https://docs.ansible.com/ansible/latest/collections/ Ansible collections]&lt;br /&gt;
&lt;br /&gt;
=Tools=&lt;br /&gt;
*[https://molecule.readthedocs.io/en/latest/ Molecule] for testing roles&lt;br /&gt;
*ansible-lint&lt;br /&gt;
*ansible-console&lt;br /&gt;
*ansible-inventory&lt;br /&gt;
&lt;br /&gt;
=Docs=&lt;br /&gt;
*[https://howto.cactus.de/index.php/Ansible_Howto Ansible Howto]&lt;br /&gt;
*[https://docs.ansible.com/ansible/latest/collections/ansible/builtin/ Ansible builtin modules]&lt;br /&gt;
*[https://docs.ansible.com/ansible/latest/collections/all_plugins.html All plugins]&lt;br /&gt;
*[http://ansible-docs.readthedocs.io/zh/stable-2.0/rst/playbooks_conditionals.html Conditionals]&lt;br /&gt;
*[https://docs.ansible.com/ansible/2.5/user_guide/playbooks_async.html Parallel!]&lt;br /&gt;
==Ansible style guides==&lt;br /&gt;
*[https://docs.ansible.com/ansible/2.6/dev_guide/style_guide/index.html Style guide]&lt;br /&gt;
*[https://redhat-cop.github.io/automation-good-practices/ Ansible good practices]&lt;br /&gt;
&lt;br /&gt;
*[https://spacelift.io/blog/ansible-variables Ansible variables]&lt;br /&gt;
&lt;br /&gt;
*[https://docs.ansible.com/projects/ansible/latest/reference_appendices/config.html#the-configuration-file ansible.cfg configuration file]&lt;br /&gt;
==Lineinfile==&lt;br /&gt;
*[https://docs.ansible.com/ansible/latest/collections/ansible/builtin/lineinfile_module.html Lineinfile module]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Popular modules==&lt;br /&gt;
*[https://docs.ansible.com/ansible/latest/collections/ansible/builtin/file_module.html ansible.builtin.file]&lt;br /&gt;
*[https://docs.ansible.com/ansible/latest/collections/ansible/builtin/apt_module.html ansible.builtin.apt]&lt;br /&gt;
*[https://docs.ansible.com/ansible/latest/collections/ansible/builtin/lineinfile_module.html ansible.builtin.lineinfile]&lt;br /&gt;
&lt;br /&gt;
=Some terms=&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
=Inventories=&lt;br /&gt;
*[https://spacelift.io/blog/ansible-inventory]&lt;br /&gt;
*[http://docs.ansible.com/ansible/latest/intro_dynamic_inventory.html Dynamic Inventory]&lt;br /&gt;
*[https://www.jeffgeerling.com/blog/creating-custom-dynamic-inventories-ansible Creating custom dynamic inventories]&lt;br /&gt;
*[https://www.digitalocean.com/community/tutorials/how-to-set-up-ansible-inventories  Set up ansible inventories]&lt;br /&gt;
&lt;br /&gt;
=Alternatives=&lt;br /&gt;
*[[Puppet]]&lt;br /&gt;
*[[Saltstack]]&lt;br /&gt;
&lt;br /&gt;
=Quickstart=&lt;br /&gt;
On server as root create key:&lt;br /&gt;
 ssh-keygen&lt;br /&gt;
(go for defaults)&lt;br /&gt;
and then get content of ~/.ssh/id_rsa.pub in your copypastebuffer&lt;br /&gt;
&lt;br /&gt;
On &#039;clients&#039; edit /etc/ssh/sshd_config to&lt;br /&gt;
 PermitRootLogin without-password&lt;br /&gt;
and restart sshd&lt;br /&gt;
&lt;br /&gt;
Edit/create ~root/.ssh/authorized_keys and add:&lt;br /&gt;
 from=&amp;quot;ip.of.ansible.server&amp;quot; &amp;lt;paste public key here&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Scripts/playbooks=&lt;br /&gt;
==Maintain useraccounts==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ---&lt;br /&gt;
&lt;br /&gt;
 - name: remove users&lt;br /&gt;
  user: name=exuser state=absent force=yes groups=&#039;&#039;&lt;br /&gt;
  with_dict: accounts&lt;br /&gt;
  tags:&lt;br /&gt;
    - delusers&lt;br /&gt;
&lt;br /&gt;
 - name: sync group&lt;br /&gt;
  group:&lt;br /&gt;
    name: sync&lt;br /&gt;
    gid: 999&lt;br /&gt;
    state: &amp;quot;present&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 - name: fix homedir rights&lt;br /&gt;
  lineinfile: dest=/etc/login.defs regexp=^UMASK line=&amp;quot;UMASK 007&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 - name: useraccounts&lt;br /&gt;
  user:&lt;br /&gt;
    name: &amp;quot;{{ item.key }}&amp;quot;&lt;br /&gt;
    comment: &amp;quot;{{ item.value.name }}&amp;quot;&lt;br /&gt;
    uid: &amp;quot;{{ item.value.uid }}&amp;quot;&lt;br /&gt;
    state: &amp;quot;present&amp;quot;&lt;br /&gt;
    shell: &amp;quot;/bin/bash&amp;quot;&lt;br /&gt;
    groups: sudo&lt;br /&gt;
  with_dict: accounts&lt;br /&gt;
  tags:&lt;br /&gt;
    - accounts&lt;br /&gt;
&lt;br /&gt;
 - name: userpasswords&lt;br /&gt;
  user:&lt;br /&gt;
    name: &amp;quot;{{ item.key }}&amp;quot;&lt;br /&gt;
    password: &amp;quot;{{ lookup(&#039;csvfile&#039;,item.key + &#039; file=/etc/shadow delimiter=: col=1&#039; ) }}&amp;quot;&lt;br /&gt;
  with_dict: accounts&lt;br /&gt;
&lt;br /&gt;
#ssh keys&lt;br /&gt;
 - name: userkeys&lt;br /&gt;
  authorized_key: user={{ item.key }} key=&amp;quot;{{ lookup(&#039;file&#039;,&#039;/home/&#039; + item.key + &#039;/.ssh/authorized_keys&#039; ) }}&amp;quot; exclusive=yes&lt;br /&gt;
  with_dict: accounts&lt;br /&gt;
  tags:&lt;br /&gt;
    - keys&lt;br /&gt;
&lt;br /&gt;
 - name: nofoobar&lt;br /&gt;
  user: name=foobar state=absent remove=yes&lt;br /&gt;
  tags:&lt;br /&gt;
    - foobar&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== comment out a line ==&lt;br /&gt;
 - name: remove java line from rclocal&lt;br /&gt;
   lineinfile:&lt;br /&gt;
     dest: /etc/rc.local&lt;br /&gt;
     regexp: &#039;^(java.*)$&#039;&lt;br /&gt;
     line: &#039;# \1&#039;&lt;br /&gt;
     backrefs: yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=HOWTO=&lt;br /&gt;
==Add user to group==&lt;br /&gt;
 name: add user to bargroup&lt;br /&gt;
  user:&lt;br /&gt;
    name: foo&lt;br /&gt;
    groups: bargroup&lt;br /&gt;
    append: yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Run command==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cronjobs and ssh passphrases==&lt;br /&gt;
See [https://gist.github.com/Justintime50/297d0d36da40834b037a65998d2149ca Use Your SSH Agent in a Crontab ( keychain)]&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
&lt;br /&gt;
==Notify multiple handlers==&lt;br /&gt;
 notify:&lt;br /&gt;
   - Call Handler1&lt;br /&gt;
   - Call Handler2&lt;br /&gt;
&lt;br /&gt;
==Print hostname in debug msg ==&lt;br /&gt;
 debug:&lt;br /&gt;
   msg: &amp;quot;Something to report in {{ inventory_hostname }}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Connect to a different port==&lt;br /&gt;
Try&lt;br /&gt;
 --extra-vars=&amp;quot;ansible_port=2345&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===Parse errors===&lt;br /&gt;
====ERROR! unexpected parameter type in action: &amp;lt;type &#039;bool&#039;&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====ERROR! conflicting action statements: debug, msg====&lt;br /&gt;
&#039;&#039;&#039;indentation&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====[WARNING]: Unable to parse &amp;lt;some hostname&amp;gt; as an inventory source====&lt;br /&gt;
Append a comma&lt;br /&gt;
 ansible-playbook myplay.yml -i myhostname,&lt;br /&gt;
&lt;br /&gt;
===sftp transfer mechanism failed===&lt;br /&gt;
??&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Using a SSH password instead of a key is not possible because Host Key checking is enabled and sshpass does not support this.===&lt;br /&gt;
Please add this host&#039;s fingerprint to your known_hosts file to manage this host.&lt;br /&gt;
&lt;br /&gt;
Try &lt;br /&gt;
 ANSIBLE_HOST_KEY_CHECKING=False playbook ...&lt;br /&gt;
Or just ssh to the host and accept key&lt;br /&gt;
&lt;br /&gt;
===Platform linux on host backup01 is using the discovered Python interpreter at /usr/bin/python3===&lt;br /&gt;
one hack is adding to ~/.ansible.cfg:&lt;br /&gt;
 [defaults]&lt;br /&gt;
 interpreter_python=auto_silent  &lt;br /&gt;
&lt;br /&gt;
Or fix on that system:&lt;br /&gt;
 update-alternatives --install /usr/bin/python python /usr/bin/python3 1&lt;br /&gt;
&lt;br /&gt;
===The error was: &#039;item&#039; is undefined&amp;quot;===&lt;br /&gt;
wrong indentation for with_items&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Failed to connect to the host via ssh: Permission denied (publickey,password) ===&lt;br /&gt;
To connect without public key in authorized keys try&lt;br /&gt;
 --ask-pass&lt;br /&gt;
&lt;br /&gt;
===SSH Connection timed out during banner exchange===&lt;br /&gt;
See:&lt;br /&gt;
*[https://oneuptime.com/blog/post/2026-02-21-how-to-configure-ansible-ssh-connection-keepalive/view  How to Configure Ansible SSH Connection Keepalive ]&lt;br /&gt;
So far working for me: &lt;br /&gt;
 [ssh_connection]&lt;br /&gt;
 ssh_args = -o ServerAliveInterval=5&lt;br /&gt;
 retries = 5&lt;br /&gt;
&lt;br /&gt;
==ansible-lint==&lt;br /&gt;
===Use shell only when shell functionality is required===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== roles for multiple distributions ==&lt;br /&gt;
&lt;br /&gt;
  include_vars with &amp;quot;distro-{{ansible_distro_name}}.yml&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Escape single quote ==&lt;br /&gt;
&lt;br /&gt;
 &#039;foo &#039;&#039;bar&#039;&#039; &#039;&lt;br /&gt;
&lt;br /&gt;
==Syntax Error while loading YAML. did not find expected key==&lt;br /&gt;
Check indentation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Newlines in output ==&lt;br /&gt;
&lt;br /&gt;
instead of all those &#039;\n&#039;:&lt;br /&gt;
&lt;br /&gt;
In ansible.cfg:&lt;br /&gt;
&lt;br /&gt;
 stdout_callback = yaml&lt;br /&gt;
&lt;br /&gt;
== Ad-hoc commands ==&lt;br /&gt;
&lt;br /&gt;
[http://docs.ansible.com/ansible/latest/intro_adhoc.html http://docs.ansible.com/ansible/latest/intro_adhoc.html]&lt;br /&gt;
&lt;br /&gt;
== check python code ==&lt;br /&gt;
&lt;br /&gt;
 ansible-test sanity --test pep8 mycode.py&lt;br /&gt;
&lt;br /&gt;
== Command/shell output on single line ==&lt;br /&gt;
&lt;br /&gt;
 ANSIBLE_STDOUT_CALLBACK=oneline ansible-playbook foo.yml&lt;br /&gt;
&lt;br /&gt;
== Storing passwords ==&lt;br /&gt;
&lt;br /&gt;
[http://docs.ansible.com/ansible/2.4/vault.html http://docs.ansible.com/ansible/2.4/vault.html]&lt;br /&gt;
&lt;br /&gt;
== Show all host variables ==&lt;br /&gt;
&lt;br /&gt;
 ansible -m setup &amp;lt;hostname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Show all OS/versions ==&lt;br /&gt;
&lt;br /&gt;
 ansible all -m setup -a &amp;quot;filter=ansible_distribution*&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Syntax highlighting for ansible ==&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/chase/vim-ansible-yaml https://github.com/chase/vim-ansible-yaml] &lt;br /&gt;
&lt;br /&gt;
Drop the files in ~/vim/bundle and in .vimrc:&lt;br /&gt;
&lt;br /&gt;
 call pathogen#infect()&lt;br /&gt;
 call pathogen#helptags()&lt;br /&gt;
&lt;br /&gt;
Or maybe better:&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/pearofducks/ansible-vim https://github.com/pearofducks/ansible-vim] &lt;br /&gt;
&lt;br /&gt;
== Retry ==&lt;br /&gt;
&lt;br /&gt;
 --limit @/home/ansible/ssh.retry&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===ERROR! &#039;when&#039; is not a valid attribute for a Play===&lt;br /&gt;
&lt;br /&gt;
=== ERROR! this task &#039;import_playbook&#039; has extra params ===&lt;br /&gt;
&lt;br /&gt;
meh&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== /usr/bin/chattr: Clearing extent flag not supported ===&lt;br /&gt;
&lt;br /&gt;
Probably trying to make a backup of a symlink&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Missing sudo password===&lt;br /&gt;
set NOPASSWD in sudo config&lt;br /&gt;
&lt;br /&gt;
== Escape curly braces ==&lt;br /&gt;
&lt;br /&gt;
 {{ &#039;{&#039; }}&lt;br /&gt;
&lt;br /&gt;
== Check file for string ==&lt;br /&gt;
&lt;br /&gt;
  tasks:&lt;br /&gt;
    - name: grep line&lt;br /&gt;
      shell: &amp;quot;grep -q swap /etc/fstab&amp;quot;&lt;br /&gt;
      failed_when: false&lt;br /&gt;
      register: grepped&lt;br /&gt;
&lt;br /&gt;
    - name: show grep&lt;br /&gt;
      debug:&lt;br /&gt;
        msg: &amp;quot;exists&amp;quot;&lt;br /&gt;
      when: grepped.rc == 0&lt;br /&gt;
       &lt;br /&gt;
      &lt;br /&gt;
&lt;br /&gt;
== Error messages ==&lt;br /&gt;
&lt;br /&gt;
=== msg: The PyMySQL (Python 2.7 and Python 3.X) or MySQL-python (Python 2.X) module is required ===&lt;br /&gt;
&lt;br /&gt;
Means you need to install for example python2-PyMySQL on that host&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Ansible-lint messages==&lt;br /&gt;
===Commands should not change things if nothing needs doing===&lt;br /&gt;
Ignore, or use&lt;br /&gt;
 changed_when: false&lt;br /&gt;
===Shells that use pipes should set the pipefail option===&lt;br /&gt;
 shell: |&lt;br /&gt;
   set -o pipefail&lt;br /&gt;
   some command&lt;br /&gt;
&lt;br /&gt;
=Tips &amp;amp; tricks=&lt;br /&gt;
==Includes only when on host group==&lt;br /&gt;
   - block:&lt;br /&gt;
     - include: foo.yml &lt;br /&gt;
     - include: bar.yml&lt;br /&gt;
   when: &amp;quot;&#039;foobar&#039; in group_names&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Show info/facts of a host ==&lt;br /&gt;
&lt;br /&gt;
 ansible somehost -m setup&lt;br /&gt;
 ansible somehost -m ansible.builtin.setup&lt;br /&gt;
&lt;br /&gt;
==Show distribution and version==&lt;br /&gt;
  - name: show some host info&lt;br /&gt;
    debug:&lt;br /&gt;
      msg: Dist {{ ansible_distribution }} {{ ansible_distribution_version }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Configuration management]]&lt;br /&gt;
[[Category:Ansible]]&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Meshcore&amp;diff=10472</id>
		<title>Meshcore</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Meshcore&amp;diff=10472"/>
		<updated>2026-06-01T13:11:56Z</updated>

		<summary type="html">&lt;p&gt;Tony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Links=&lt;br /&gt;
* https://meshcore.co.uk/&lt;br /&gt;
* https://www.meshnet.nl/wiki/MeshCore&lt;br /&gt;
* https://www.lorameshdevices.com/blog/meshcore/meshtastic-vs-meshcore-key-differences-explained.html&lt;br /&gt;
* [https://meshmap.net/ Mesh Map]&lt;br /&gt;
* [https://meshcore.co.uk/map.html Meshcore Map]&lt;br /&gt;
* https://github.com/folkertvanheusden/lora-pipe&lt;br /&gt;
* https://nurdspace.nl/Meshcore#settings&lt;br /&gt;
&lt;br /&gt;
==Articles==&lt;br /&gt;
*[https://hackaday.com/2025/12/06/lessons-learned-after-trying-meshcore-for-off-grid-text-messaging/ Lessons Learned After Trying MeshCore For Off-grid Text Messaging]&lt;br /&gt;
&lt;br /&gt;
[[category:Networking]]&lt;br /&gt;
[[Category:Packet Radio]]&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Reticulum&amp;diff=10471</id>
		<title>Reticulum</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Reticulum&amp;diff=10471"/>
		<updated>2026-06-01T13:11:13Z</updated>

		<summary type="html">&lt;p&gt;Tony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Links=&lt;br /&gt;
*[https://reticulum.network/ Reticulum homepage]&lt;br /&gt;
*[https://rmap.world/ Reticulum map]&lt;br /&gt;
&lt;br /&gt;
[[Category:Networking]]&lt;br /&gt;
[[Category:Packet Radio]]&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Github&amp;diff=10470</id>
		<title>Github</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Github&amp;diff=10470"/>
		<updated>2026-06-01T10:55:49Z</updated>

		<summary type="html">&lt;p&gt;Tony: /* Use ssh */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Links=&lt;br /&gt;
*[https://docs.github.com/en/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication 2 factor authentication on github]&lt;br /&gt;
https://github.com/drduh/YubiKey-Guide&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=HOWTO=&lt;br /&gt;
==Use ssh==&lt;br /&gt;
*[https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent Generating a new SSH key for a hardware security key]&lt;br /&gt;
On github.com go to &#039;&#039;&#039;Settings-&amp;gt;SSH and GPG keys&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;Add key&#039;&#039;&#039;: paste your public key&lt;br /&gt;
Make sure your ssh client uses correct key:&lt;br /&gt;
 Host github.com&lt;br /&gt;
   IdentityFile ~/.ssh/id_ed25519&lt;br /&gt;
&lt;br /&gt;
And&lt;br /&gt;
 git remote set-url origin git@github.com:username/your-repository.git&lt;br /&gt;
&lt;br /&gt;
=FAQ=&lt;br /&gt;
==Error messages==&lt;br /&gt;
===The authenticity of host &#039;github.com (140.82.121.3)&#039; can&#039;t be established. ===&lt;br /&gt;
??&lt;br /&gt;
&lt;br /&gt;
===git@github.com: Permission denied (publickey).===&lt;br /&gt;
Most likely github doesn&#039;t know your public key, try&lt;br /&gt;
 ssh -vT git@github.com&lt;br /&gt;
and check on your account: &#039;&#039;&#039;SSH and GPG keys -&amp;gt; SSH keys&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==This branch has conflicts that must be resolved ==&lt;br /&gt;
resolve them :)&lt;br /&gt;
&lt;br /&gt;
==remote: Support for password authentication was removed ==&lt;br /&gt;
* https://docs.github.com/en/authentication/connecting-to-github-with-ssh&lt;br /&gt;
&lt;br /&gt;
==Password authentication is not supported for Git operations==&lt;br /&gt;
Check:&lt;br /&gt;
* https://docs.github.com/en/authentication/connecting-to-github-with-ssh&lt;br /&gt;
&lt;br /&gt;
or use Personal Acces Token instead: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token&lt;br /&gt;
&lt;br /&gt;
==Local copy contains &amp;quot;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; HEAD&amp;quot; ==&lt;br /&gt;
Merge conflict, fixing it:&lt;br /&gt;
 git mergetool&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Create pull request ==&lt;br /&gt;
&lt;br /&gt;
*https://opensource.com/article/19/7/create-pull-request-github&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Markdown&amp;diff=10469</id>
		<title>Markdown</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Markdown&amp;diff=10469"/>
		<updated>2026-06-01T09:21:25Z</updated>

		<summary type="html">&lt;p&gt;Tony: /* Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
Markup language&lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
*[https://daringfireball.net/projects/markdown/syntax Syntax]&lt;br /&gt;
*[https://www.markdownguide.org/basic-syntax/ Basic syntax]&lt;br /&gt;
*[https://www.markdownguide.org/extended-syntax/ Extended syntax]&lt;br /&gt;
&lt;br /&gt;
=Tools=&lt;br /&gt;
==Markdown Editors==&lt;br /&gt;
===ghostwriter===&lt;br /&gt;
===Typora===&lt;br /&gt;
 snap install typora&lt;br /&gt;
&lt;br /&gt;
=Markdown cheat sheet=&lt;br /&gt;
==URL==&lt;br /&gt;
 [The Title](https://examplecom)&lt;br /&gt;
&lt;br /&gt;
==Converters==&lt;br /&gt;
===pandoc===&lt;br /&gt;
====docx to markdown====&lt;br /&gt;
 pandoc -f docx -t markdown foo.docx -o foo.markdown&lt;br /&gt;
&lt;br /&gt;
====Convert markdown to pdf====&lt;br /&gt;
 pandoc -o mydoc.pdf mydoc.md&lt;br /&gt;
&lt;br /&gt;
 pandoc --pdf-engine=pdflatex -V &#039;fontfamily:sans&#039; -V &#039;margin-top:10mm&#039; -o mydoc.pdf mydoc.md&lt;br /&gt;
&lt;br /&gt;
==mdpdf==&lt;br /&gt;
https://github.com/elliotblackburn/mdpdf&lt;br /&gt;
&lt;br /&gt;
==Markdown viewers==&lt;br /&gt;
*[https://github.com/ttscoff/mdless mdless] not too bad&lt;br /&gt;
*view&lt;br /&gt;
*npm -g install mdr&lt;br /&gt;
*mdp has problems with lines&lt;br /&gt;
*mdless not too pretty&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/charmbracelet/glow/releases glow]&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=AI&amp;diff=10468</id>
		<title>AI</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=AI&amp;diff=10468"/>
		<updated>2026-05-29T12:58:45Z</updated>

		<summary type="html">&lt;p&gt;Tony: Created page with &amp;quot;=Links= *[https://platform.openai.com/tokenizer-explorer Tokenizer explorer]  *[https://localai.io/reference/cli-reference/ LocalAI CLI reference]   =Terms= ==LLM== Large Language Model  ==BPE== Byte pair encoding&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Links=&lt;br /&gt;
*[https://platform.openai.com/tokenizer-explorer Tokenizer explorer]&lt;br /&gt;
&lt;br /&gt;
*[https://localai.io/reference/cli-reference/ LocalAI CLI reference]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Terms=&lt;br /&gt;
==LLM==&lt;br /&gt;
Large Language Model&lt;br /&gt;
&lt;br /&gt;
==BPE==&lt;br /&gt;
Byte pair encoding&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=LocalAI&amp;diff=10467</id>
		<title>LocalAI</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=LocalAI&amp;diff=10467"/>
		<updated>2026-05-27T19:53:07Z</updated>

		<summary type="html">&lt;p&gt;Tony: /* HOWTO */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Links=&lt;br /&gt;
*[https://localai.io LocalAI homepage]&lt;br /&gt;
*[https://localai.io/faq/ LocalAI FAQ]&lt;br /&gt;
*[https://github.com/open-webui/open-webui Check out Open webui]&lt;br /&gt;
==Installing localai==&lt;br /&gt;
*https://localai.io/installation/index.print&lt;br /&gt;
&lt;br /&gt;
=HOWTO=&lt;br /&gt;
==List models==&lt;br /&gt;
 curl http://localhost:8080/v1/models&lt;br /&gt;
&lt;br /&gt;
==Audio to text==&lt;br /&gt;
*https://localai.io/features/audio-to-text/&lt;br /&gt;
*https://docs.llamaindex.ai/en/stable/examples/llm/localai/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Apply model==&lt;br /&gt;
 curl http://localhost:8080/models/apply -H &amp;quot;Content-Type: application/json&amp;quot; -d &#039;{&lt;br /&gt;
   &amp;quot;id&amp;quot;: &amp;quot;huggingface@TheBloke/Yarn-Mistral-7B-128k-GGUF/yarn-mistral-7b-128k.Q5_K_M.gguf&amp;quot;&lt;br /&gt;
 }&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==CLI==&lt;br /&gt;
https://localai.io/reference/cli-reference/&lt;br /&gt;
===Reset conversation===&lt;br /&gt;
?&lt;br /&gt;
&lt;br /&gt;
=Scripts=&lt;br /&gt;
==Talk to the chat interface==&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 echo -n &amp;quot;Ask me anything: &amp;quot;&lt;br /&gt;
 read A&lt;br /&gt;
 curl -s http://localhost:8080/v1/chat/completions \&lt;br /&gt;
    -H &amp;quot;Content-Type: application/json&amp;quot; \&lt;br /&gt;
    -d &#039;{ &amp;quot;model&amp;quot;: &amp;quot;gpt-4&amp;quot;, &amp;quot;messages&amp;quot;: [{&amp;quot;role&amp;quot;: &amp;quot;user&amp;quot;, &amp;quot;content&amp;quot;: &amp;quot;&#039;&amp;quot;$A&amp;quot;&#039;&amp;quot;, &amp;quot;temperature&amp;quot;: 0.1}] }&#039; |\&lt;br /&gt;
     jq     &#039;.choices[].message.content&#039; | sed &#039;s/\\n/\n/g&#039; | sed &#039;s/\\&amp;quot;/&amp;quot;/g&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=FAQ=&lt;br /&gt;
==File/directory locations==&lt;br /&gt;
===Local-ai log===&lt;br /&gt;
  /usr/share/local-ai/llama.log&lt;br /&gt;
===Models===&lt;br /&gt;
 /usr/share/local-ai/models&lt;br /&gt;
&lt;br /&gt;
==Messages==&lt;br /&gt;
===GPU device found but no CUDA backend present===&lt;br /&gt;
If running in docker, try restarting docker&lt;br /&gt;
&lt;br /&gt;
===WARNING: failed to read int from file: open /sys/class/drm/card0/device/numa_node: no such file or directory===&lt;br /&gt;
&lt;br /&gt;
===failed to load model with internal loader: grpc service not ready===&lt;br /&gt;
??&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===Failed to process stream===&lt;br /&gt;
something broken?&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Ansible&amp;diff=10466</id>
		<title>Ansible</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Ansible&amp;diff=10466"/>
		<updated>2026-05-27T08:27:50Z</updated>

		<summary type="html">&lt;p&gt;Tony: /* Docs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Configuration management &lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
*[http://www.ansible.com/home Homepage]&lt;br /&gt;
*[http://www.hashbangcode.com/blog/adding-iptables-rules-ansible Adding iptables Rules With Ansible]&lt;br /&gt;
*[http://cloudacademy.com/blog/going-deeper-into-ansible-playbooks/ Going Deeper into Ansible Playbooks]&lt;br /&gt;
*[https://serversforhackers.com/an-ansible-tutorial An Ansible Tutorial]&lt;br /&gt;
*[https://www.cyberciti.biz/faq/how-to-install-and-configure-latest-version-of-ansible-on-ubuntu-linux/ How to Install and Configure latest version of Ansible on Ubuntu Linux]&lt;br /&gt;
*[https://networklore.com/ansible-getting-started/ Getting started with Ansible]&lt;br /&gt;
*[https://ansible-tips-and-tricks.readthedocs.io/en/latest/os-dependent-tasks/variables/ Tips and tricks]&lt;br /&gt;
*[https://www.ansible.com/products/awx-project AWX]&lt;br /&gt;
*[https://galaxy.ansible.com Ansible Galaxy]&lt;br /&gt;
*[https://docs.ansible.com/ansible/latest/user_guide/playbooks_async.html Timeouts]&lt;br /&gt;
*[https://manintheit.org/ansible/ansible-sample-scripts/ Ansible sample scripts]&lt;br /&gt;
*[https://gist.github.com/mgedmin/5f8ac034df0c371444be module for postfix]&lt;br /&gt;
*[https://docs.ansible.com/ansible/latest/collections/ Ansible collections]&lt;br /&gt;
&lt;br /&gt;
=Tools=&lt;br /&gt;
*[https://molecule.readthedocs.io/en/latest/ Molecule] for testing roles&lt;br /&gt;
*ansible-lint&lt;br /&gt;
*ansible-console&lt;br /&gt;
*ansible-inventory&lt;br /&gt;
&lt;br /&gt;
=Docs=&lt;br /&gt;
*[https://howto.cactus.de/index.php/Ansible_Howto Ansible Howto]&lt;br /&gt;
*[https://docs.ansible.com/ansible/latest/collections/ansible/builtin/ Ansible builtin modules]&lt;br /&gt;
*[https://docs.ansible.com/ansible/latest/collections/all_plugins.html All plugins]&lt;br /&gt;
*[http://ansible-docs.readthedocs.io/zh/stable-2.0/rst/playbooks_conditionals.html Conditionals]&lt;br /&gt;
*[https://docs.ansible.com/ansible/2.5/user_guide/playbooks_async.html Parallel!]&lt;br /&gt;
==Ansible style guides==&lt;br /&gt;
*[https://docs.ansible.com/ansible/2.6/dev_guide/style_guide/index.html Style guide]&lt;br /&gt;
*[https://redhat-cop.github.io/automation-good-practices/ Ansible good practices]&lt;br /&gt;
&lt;br /&gt;
*[https://spacelift.io/blog/ansible-variables Ansible variables]&lt;br /&gt;
&lt;br /&gt;
*[https://docs.ansible.com/projects/ansible/latest/reference_appendices/config.html#the-configuration-file ansible.cfg configuration file]&lt;br /&gt;
==Lineinfile==&lt;br /&gt;
*[https://docs.ansible.com/ansible/latest/collections/ansible/builtin/lineinfile_module.html Lineinfile module]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Popular modules==&lt;br /&gt;
*[https://docs.ansible.com/ansible/latest/collections/ansible/builtin/file_module.html ansible.builtin.file]&lt;br /&gt;
*[https://docs.ansible.com/ansible/latest/collections/ansible/builtin/apt_module.html ansible.builtin.apt]&lt;br /&gt;
*[https://docs.ansible.com/ansible/latest/collections/ansible/builtin/lineinfile_module.html ansible.builtin.lineinfile]&lt;br /&gt;
&lt;br /&gt;
=Some terms=&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
=Inventories=&lt;br /&gt;
*[https://spacelift.io/blog/ansible-inventory]&lt;br /&gt;
*[http://docs.ansible.com/ansible/latest/intro_dynamic_inventory.html Dynamic Inventory]&lt;br /&gt;
*[https://www.jeffgeerling.com/blog/creating-custom-dynamic-inventories-ansible Creating custom dynamic inventories]&lt;br /&gt;
*[https://www.digitalocean.com/community/tutorials/how-to-set-up-ansible-inventories  Set up ansible inventories]&lt;br /&gt;
&lt;br /&gt;
=Alternatives=&lt;br /&gt;
*[[Puppet]]&lt;br /&gt;
*[[Saltstack]]&lt;br /&gt;
&lt;br /&gt;
=Quickstart=&lt;br /&gt;
On server as root create key:&lt;br /&gt;
 ssh-keygen&lt;br /&gt;
(go for defaults)&lt;br /&gt;
and then get content of ~/.ssh/id_rsa.pub in your copypastebuffer&lt;br /&gt;
&lt;br /&gt;
On &#039;clients&#039; edit /etc/ssh/sshd_config to&lt;br /&gt;
 PermitRootLogin without-password&lt;br /&gt;
and restart sshd&lt;br /&gt;
&lt;br /&gt;
Edit/create ~root/.ssh/authorized_keys and add:&lt;br /&gt;
 from=&amp;quot;ip.of.ansible.server&amp;quot; &amp;lt;paste public key here&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Scripts/playbooks=&lt;br /&gt;
==Maintain useraccounts==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ---&lt;br /&gt;
&lt;br /&gt;
 - name: remove users&lt;br /&gt;
  user: name=exuser state=absent force=yes groups=&#039;&#039;&lt;br /&gt;
  with_dict: accounts&lt;br /&gt;
  tags:&lt;br /&gt;
    - delusers&lt;br /&gt;
&lt;br /&gt;
 - name: sync group&lt;br /&gt;
  group:&lt;br /&gt;
    name: sync&lt;br /&gt;
    gid: 999&lt;br /&gt;
    state: &amp;quot;present&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 - name: fix homedir rights&lt;br /&gt;
  lineinfile: dest=/etc/login.defs regexp=^UMASK line=&amp;quot;UMASK 007&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 - name: useraccounts&lt;br /&gt;
  user:&lt;br /&gt;
    name: &amp;quot;{{ item.key }}&amp;quot;&lt;br /&gt;
    comment: &amp;quot;{{ item.value.name }}&amp;quot;&lt;br /&gt;
    uid: &amp;quot;{{ item.value.uid }}&amp;quot;&lt;br /&gt;
    state: &amp;quot;present&amp;quot;&lt;br /&gt;
    shell: &amp;quot;/bin/bash&amp;quot;&lt;br /&gt;
    groups: sudo&lt;br /&gt;
  with_dict: accounts&lt;br /&gt;
  tags:&lt;br /&gt;
    - accounts&lt;br /&gt;
&lt;br /&gt;
 - name: userpasswords&lt;br /&gt;
  user:&lt;br /&gt;
    name: &amp;quot;{{ item.key }}&amp;quot;&lt;br /&gt;
    password: &amp;quot;{{ lookup(&#039;csvfile&#039;,item.key + &#039; file=/etc/shadow delimiter=: col=1&#039; ) }}&amp;quot;&lt;br /&gt;
  with_dict: accounts&lt;br /&gt;
&lt;br /&gt;
#ssh keys&lt;br /&gt;
 - name: userkeys&lt;br /&gt;
  authorized_key: user={{ item.key }} key=&amp;quot;{{ lookup(&#039;file&#039;,&#039;/home/&#039; + item.key + &#039;/.ssh/authorized_keys&#039; ) }}&amp;quot; exclusive=yes&lt;br /&gt;
  with_dict: accounts&lt;br /&gt;
  tags:&lt;br /&gt;
    - keys&lt;br /&gt;
&lt;br /&gt;
 - name: nofoobar&lt;br /&gt;
  user: name=foobar state=absent remove=yes&lt;br /&gt;
  tags:&lt;br /&gt;
    - foobar&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== comment out a line ==&lt;br /&gt;
 - name: remove java line from rclocal&lt;br /&gt;
   lineinfile:&lt;br /&gt;
     dest: /etc/rc.local&lt;br /&gt;
     regexp: &#039;^(java.*)$&#039;&lt;br /&gt;
     line: &#039;# \1&#039;&lt;br /&gt;
     backrefs: yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=HOWTO=&lt;br /&gt;
==Add user to group==&lt;br /&gt;
 name: add user to bargroup&lt;br /&gt;
  user:&lt;br /&gt;
    name: foo&lt;br /&gt;
    groups: bargroup&lt;br /&gt;
    append: yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Run command==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cronjobs and ssh passphrases==&lt;br /&gt;
See [https://gist.github.com/Justintime50/297d0d36da40834b037a65998d2149ca Use Your SSH Agent in a Crontab ( keychain)]&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
&lt;br /&gt;
==Notify multiple handlers==&lt;br /&gt;
 notify:&lt;br /&gt;
   - Call Handler1&lt;br /&gt;
   - Call Handler2&lt;br /&gt;
&lt;br /&gt;
==Print hostname in debug msg ==&lt;br /&gt;
 debug:&lt;br /&gt;
   msg: &amp;quot;Something to report in {{ inventory_hostname }}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Connect to a different port==&lt;br /&gt;
Try&lt;br /&gt;
 --extra-vars=&amp;quot;ansible_port=2345&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===Parse errors===&lt;br /&gt;
====ERROR! unexpected parameter type in action: &amp;lt;type &#039;bool&#039;&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====ERROR! conflicting action statements: debug, msg====&lt;br /&gt;
&#039;&#039;&#039;indentation&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====[WARNING]: Unable to parse &amp;lt;some hostname&amp;gt; as an inventory source====&lt;br /&gt;
Append a comma&lt;br /&gt;
 ansible-playbook myplay.yml -i myhostname,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Using a SSH password instead of a key is not possible because Host Key checking is enabled and sshpass does not support this.===&lt;br /&gt;
Please add this host&#039;s fingerprint to your known_hosts file to manage this host.&lt;br /&gt;
&lt;br /&gt;
Try &lt;br /&gt;
 ANSIBLE_HOST_KEY_CHECKING=False playbook ...&lt;br /&gt;
Or just ssh to the host and accept key&lt;br /&gt;
&lt;br /&gt;
===Platform linux on host backup01 is using the discovered Python interpreter at /usr/bin/python3===&lt;br /&gt;
one hack is adding to ~/.ansible.cfg:&lt;br /&gt;
 [defaults]&lt;br /&gt;
 interpreter_python=auto_silent  &lt;br /&gt;
&lt;br /&gt;
Or fix on that system:&lt;br /&gt;
 update-alternatives --install /usr/bin/python python /usr/bin/python3 1&lt;br /&gt;
&lt;br /&gt;
===The error was: &#039;item&#039; is undefined&amp;quot;===&lt;br /&gt;
wrong indentation for with_items&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Failed to connect to the host via ssh: Permission denied (publickey,password) ===&lt;br /&gt;
To connect without public key in authorized keys try&lt;br /&gt;
 --ask-pass&lt;br /&gt;
&lt;br /&gt;
===SSH Connection timed out during banner exchange===&lt;br /&gt;
See:&lt;br /&gt;
*[https://oneuptime.com/blog/post/2026-02-21-how-to-configure-ansible-ssh-connection-keepalive/view  How to Configure Ansible SSH Connection Keepalive ]&lt;br /&gt;
So far working for me: &lt;br /&gt;
 [ssh_connection]&lt;br /&gt;
 ssh_args = -o ServerAliveInterval=5&lt;br /&gt;
 retries = 5&lt;br /&gt;
&lt;br /&gt;
==ansible-lint==&lt;br /&gt;
===Use shell only when shell functionality is required===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== roles for multiple distributions ==&lt;br /&gt;
&lt;br /&gt;
  include_vars with &amp;quot;distro-{{ansible_distro_name}}.yml&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Escape single quote ==&lt;br /&gt;
&lt;br /&gt;
 &#039;foo &#039;&#039;bar&#039;&#039; &#039;&lt;br /&gt;
&lt;br /&gt;
==Syntax Error while loading YAML. did not find expected key==&lt;br /&gt;
Check indentation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Newlines in output ==&lt;br /&gt;
&lt;br /&gt;
instead of all those &#039;\n&#039;:&lt;br /&gt;
&lt;br /&gt;
In ansible.cfg:&lt;br /&gt;
&lt;br /&gt;
 stdout_callback = yaml&lt;br /&gt;
&lt;br /&gt;
== Ad-hoc commands ==&lt;br /&gt;
&lt;br /&gt;
[http://docs.ansible.com/ansible/latest/intro_adhoc.html http://docs.ansible.com/ansible/latest/intro_adhoc.html]&lt;br /&gt;
&lt;br /&gt;
== check python code ==&lt;br /&gt;
&lt;br /&gt;
 ansible-test sanity --test pep8 mycode.py&lt;br /&gt;
&lt;br /&gt;
== Command/shell output on single line ==&lt;br /&gt;
&lt;br /&gt;
 ANSIBLE_STDOUT_CALLBACK=oneline ansible-playbook foo.yml&lt;br /&gt;
&lt;br /&gt;
== Storing passwords ==&lt;br /&gt;
&lt;br /&gt;
[http://docs.ansible.com/ansible/2.4/vault.html http://docs.ansible.com/ansible/2.4/vault.html]&lt;br /&gt;
&lt;br /&gt;
== Show all host variables ==&lt;br /&gt;
&lt;br /&gt;
 ansible -m setup &amp;lt;hostname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Show all OS/versions ==&lt;br /&gt;
&lt;br /&gt;
 ansible all -m setup -a &amp;quot;filter=ansible_distribution*&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Syntax highlighting for ansible ==&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/chase/vim-ansible-yaml https://github.com/chase/vim-ansible-yaml] &lt;br /&gt;
&lt;br /&gt;
Drop the files in ~/vim/bundle and in .vimrc:&lt;br /&gt;
&lt;br /&gt;
 call pathogen#infect()&lt;br /&gt;
 call pathogen#helptags()&lt;br /&gt;
&lt;br /&gt;
Or maybe better:&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/pearofducks/ansible-vim https://github.com/pearofducks/ansible-vim] &lt;br /&gt;
&lt;br /&gt;
== Retry ==&lt;br /&gt;
&lt;br /&gt;
 --limit @/home/ansible/ssh.retry&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===ERROR! &#039;when&#039; is not a valid attribute for a Play===&lt;br /&gt;
&lt;br /&gt;
=== ERROR! this task &#039;import_playbook&#039; has extra params ===&lt;br /&gt;
&lt;br /&gt;
meh&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== /usr/bin/chattr: Clearing extent flag not supported ===&lt;br /&gt;
&lt;br /&gt;
Probably trying to make a backup of a symlink&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Missing sudo password===&lt;br /&gt;
set NOPASSWD in sudo config&lt;br /&gt;
&lt;br /&gt;
== Escape curly braces ==&lt;br /&gt;
&lt;br /&gt;
 {{ &#039;{&#039; }}&lt;br /&gt;
&lt;br /&gt;
== Check file for string ==&lt;br /&gt;
&lt;br /&gt;
  tasks:&lt;br /&gt;
    - name: grep line&lt;br /&gt;
      shell: &amp;quot;grep -q swap /etc/fstab&amp;quot;&lt;br /&gt;
      failed_when: false&lt;br /&gt;
      register: grepped&lt;br /&gt;
&lt;br /&gt;
    - name: show grep&lt;br /&gt;
      debug:&lt;br /&gt;
        msg: &amp;quot;exists&amp;quot;&lt;br /&gt;
      when: grepped.rc == 0&lt;br /&gt;
       &lt;br /&gt;
      &lt;br /&gt;
&lt;br /&gt;
== Error messages ==&lt;br /&gt;
&lt;br /&gt;
=== msg: The PyMySQL (Python 2.7 and Python 3.X) or MySQL-python (Python 2.X) module is required ===&lt;br /&gt;
&lt;br /&gt;
Means you need to install for example python2-PyMySQL on that host&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Ansible-lint messages==&lt;br /&gt;
===Commands should not change things if nothing needs doing===&lt;br /&gt;
Ignore, or use&lt;br /&gt;
 changed_when: false&lt;br /&gt;
===Shells that use pipes should set the pipefail option===&lt;br /&gt;
 shell: |&lt;br /&gt;
   set -o pipefail&lt;br /&gt;
   some command&lt;br /&gt;
&lt;br /&gt;
=Tips &amp;amp; tricks=&lt;br /&gt;
==Includes only when on host group==&lt;br /&gt;
   - block:&lt;br /&gt;
     - include: foo.yml &lt;br /&gt;
     - include: bar.yml&lt;br /&gt;
   when: &amp;quot;&#039;foobar&#039; in group_names&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Show info/facts of a host ==&lt;br /&gt;
&lt;br /&gt;
 ansible somehost -m setup&lt;br /&gt;
 ansible somehost -m ansible.builtin.setup&lt;br /&gt;
&lt;br /&gt;
==Show distribution and version==&lt;br /&gt;
  - name: show some host info&lt;br /&gt;
    debug:&lt;br /&gt;
      msg: Dist {{ ansible_distribution }} {{ ansible_distribution_version }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Configuration management]]&lt;br /&gt;
[[Category:Ansible]]&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Ansible&amp;diff=10465</id>
		<title>Ansible</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Ansible&amp;diff=10465"/>
		<updated>2026-05-27T08:21:01Z</updated>

		<summary type="html">&lt;p&gt;Tony: /* Connection timed out during banner exchange */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Configuration management &lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
*[http://www.ansible.com/home Homepage]&lt;br /&gt;
*[http://www.hashbangcode.com/blog/adding-iptables-rules-ansible Adding iptables Rules With Ansible]&lt;br /&gt;
*[http://cloudacademy.com/blog/going-deeper-into-ansible-playbooks/ Going Deeper into Ansible Playbooks]&lt;br /&gt;
*[https://serversforhackers.com/an-ansible-tutorial An Ansible Tutorial]&lt;br /&gt;
*[https://www.cyberciti.biz/faq/how-to-install-and-configure-latest-version-of-ansible-on-ubuntu-linux/ How to Install and Configure latest version of Ansible on Ubuntu Linux]&lt;br /&gt;
*[https://networklore.com/ansible-getting-started/ Getting started with Ansible]&lt;br /&gt;
*[https://ansible-tips-and-tricks.readthedocs.io/en/latest/os-dependent-tasks/variables/ Tips and tricks]&lt;br /&gt;
*[https://www.ansible.com/products/awx-project AWX]&lt;br /&gt;
*[https://galaxy.ansible.com Ansible Galaxy]&lt;br /&gt;
*[https://docs.ansible.com/ansible/latest/user_guide/playbooks_async.html Timeouts]&lt;br /&gt;
*[https://manintheit.org/ansible/ansible-sample-scripts/ Ansible sample scripts]&lt;br /&gt;
*[https://gist.github.com/mgedmin/5f8ac034df0c371444be module for postfix]&lt;br /&gt;
*[https://docs.ansible.com/ansible/latest/collections/ Ansible collections]&lt;br /&gt;
&lt;br /&gt;
=Tools=&lt;br /&gt;
*[https://molecule.readthedocs.io/en/latest/ Molecule] for testing roles&lt;br /&gt;
*ansible-lint&lt;br /&gt;
*ansible-console&lt;br /&gt;
*ansible-inventory&lt;br /&gt;
&lt;br /&gt;
=Docs=&lt;br /&gt;
*[https://howto.cactus.de/index.php/Ansible_Howto Ansible Howto]&lt;br /&gt;
*[https://docs.ansible.com/ansible/latest/collections/ansible/builtin/ Ansible builtin modules]&lt;br /&gt;
*[https://docs.ansible.com/ansible/latest/collections/all_plugins.html All plugins]&lt;br /&gt;
*[http://ansible-docs.readthedocs.io/zh/stable-2.0/rst/playbooks_conditionals.html Conditionals]&lt;br /&gt;
*[https://docs.ansible.com/ansible/2.5/user_guide/playbooks_async.html Parallel!]&lt;br /&gt;
==Ansible style guides==&lt;br /&gt;
*[https://docs.ansible.com/ansible/2.6/dev_guide/style_guide/index.html Style guide]&lt;br /&gt;
*[https://redhat-cop.github.io/automation-good-practices/ Ansible good practices]&lt;br /&gt;
&lt;br /&gt;
*[https://spacelift.io/blog/ansible-variables Ansible variables]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Lineinfile==&lt;br /&gt;
*[https://docs.ansible.com/ansible/latest/collections/ansible/builtin/lineinfile_module.html Lineinfile module]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Popular modules==&lt;br /&gt;
*[https://docs.ansible.com/ansible/latest/collections/ansible/builtin/file_module.html ansible.builtin.file]&lt;br /&gt;
*[https://docs.ansible.com/ansible/latest/collections/ansible/builtin/apt_module.html ansible.builtin.apt]&lt;br /&gt;
*[https://docs.ansible.com/ansible/latest/collections/ansible/builtin/lineinfile_module.html ansible.builtin.lineinfile]&lt;br /&gt;
&lt;br /&gt;
=Some terms=&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
=Inventories=&lt;br /&gt;
*[https://spacelift.io/blog/ansible-inventory]&lt;br /&gt;
*[http://docs.ansible.com/ansible/latest/intro_dynamic_inventory.html Dynamic Inventory]&lt;br /&gt;
*[https://www.jeffgeerling.com/blog/creating-custom-dynamic-inventories-ansible Creating custom dynamic inventories]&lt;br /&gt;
*[https://www.digitalocean.com/community/tutorials/how-to-set-up-ansible-inventories  Set up ansible inventories]&lt;br /&gt;
&lt;br /&gt;
=Alternatives=&lt;br /&gt;
*[[Puppet]]&lt;br /&gt;
*[[Saltstack]]&lt;br /&gt;
&lt;br /&gt;
=Quickstart=&lt;br /&gt;
On server as root create key:&lt;br /&gt;
 ssh-keygen&lt;br /&gt;
(go for defaults)&lt;br /&gt;
and then get content of ~/.ssh/id_rsa.pub in your copypastebuffer&lt;br /&gt;
&lt;br /&gt;
On &#039;clients&#039; edit /etc/ssh/sshd_config to&lt;br /&gt;
 PermitRootLogin without-password&lt;br /&gt;
and restart sshd&lt;br /&gt;
&lt;br /&gt;
Edit/create ~root/.ssh/authorized_keys and add:&lt;br /&gt;
 from=&amp;quot;ip.of.ansible.server&amp;quot; &amp;lt;paste public key here&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Scripts/playbooks=&lt;br /&gt;
==Maintain useraccounts==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ---&lt;br /&gt;
&lt;br /&gt;
 - name: remove users&lt;br /&gt;
  user: name=exuser state=absent force=yes groups=&#039;&#039;&lt;br /&gt;
  with_dict: accounts&lt;br /&gt;
  tags:&lt;br /&gt;
    - delusers&lt;br /&gt;
&lt;br /&gt;
 - name: sync group&lt;br /&gt;
  group:&lt;br /&gt;
    name: sync&lt;br /&gt;
    gid: 999&lt;br /&gt;
    state: &amp;quot;present&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 - name: fix homedir rights&lt;br /&gt;
  lineinfile: dest=/etc/login.defs regexp=^UMASK line=&amp;quot;UMASK 007&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 - name: useraccounts&lt;br /&gt;
  user:&lt;br /&gt;
    name: &amp;quot;{{ item.key }}&amp;quot;&lt;br /&gt;
    comment: &amp;quot;{{ item.value.name }}&amp;quot;&lt;br /&gt;
    uid: &amp;quot;{{ item.value.uid }}&amp;quot;&lt;br /&gt;
    state: &amp;quot;present&amp;quot;&lt;br /&gt;
    shell: &amp;quot;/bin/bash&amp;quot;&lt;br /&gt;
    groups: sudo&lt;br /&gt;
  with_dict: accounts&lt;br /&gt;
  tags:&lt;br /&gt;
    - accounts&lt;br /&gt;
&lt;br /&gt;
 - name: userpasswords&lt;br /&gt;
  user:&lt;br /&gt;
    name: &amp;quot;{{ item.key }}&amp;quot;&lt;br /&gt;
    password: &amp;quot;{{ lookup(&#039;csvfile&#039;,item.key + &#039; file=/etc/shadow delimiter=: col=1&#039; ) }}&amp;quot;&lt;br /&gt;
  with_dict: accounts&lt;br /&gt;
&lt;br /&gt;
#ssh keys&lt;br /&gt;
 - name: userkeys&lt;br /&gt;
  authorized_key: user={{ item.key }} key=&amp;quot;{{ lookup(&#039;file&#039;,&#039;/home/&#039; + item.key + &#039;/.ssh/authorized_keys&#039; ) }}&amp;quot; exclusive=yes&lt;br /&gt;
  with_dict: accounts&lt;br /&gt;
  tags:&lt;br /&gt;
    - keys&lt;br /&gt;
&lt;br /&gt;
 - name: nofoobar&lt;br /&gt;
  user: name=foobar state=absent remove=yes&lt;br /&gt;
  tags:&lt;br /&gt;
    - foobar&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== comment out a line ==&lt;br /&gt;
 - name: remove java line from rclocal&lt;br /&gt;
   lineinfile:&lt;br /&gt;
     dest: /etc/rc.local&lt;br /&gt;
     regexp: &#039;^(java.*)$&#039;&lt;br /&gt;
     line: &#039;# \1&#039;&lt;br /&gt;
     backrefs: yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=HOWTO=&lt;br /&gt;
==Add user to group==&lt;br /&gt;
 name: add user to bargroup&lt;br /&gt;
  user:&lt;br /&gt;
    name: foo&lt;br /&gt;
    groups: bargroup&lt;br /&gt;
    append: yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Run command==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cronjobs and ssh passphrases==&lt;br /&gt;
See [https://gist.github.com/Justintime50/297d0d36da40834b037a65998d2149ca Use Your SSH Agent in a Crontab ( keychain)]&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
&lt;br /&gt;
==Notify multiple handlers==&lt;br /&gt;
 notify:&lt;br /&gt;
   - Call Handler1&lt;br /&gt;
   - Call Handler2&lt;br /&gt;
&lt;br /&gt;
==Print hostname in debug msg ==&lt;br /&gt;
 debug:&lt;br /&gt;
   msg: &amp;quot;Something to report in {{ inventory_hostname }}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Connect to a different port==&lt;br /&gt;
Try&lt;br /&gt;
 --extra-vars=&amp;quot;ansible_port=2345&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===Parse errors===&lt;br /&gt;
====ERROR! unexpected parameter type in action: &amp;lt;type &#039;bool&#039;&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====ERROR! conflicting action statements: debug, msg====&lt;br /&gt;
&#039;&#039;&#039;indentation&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====[WARNING]: Unable to parse &amp;lt;some hostname&amp;gt; as an inventory source====&lt;br /&gt;
Append a comma&lt;br /&gt;
 ansible-playbook myplay.yml -i myhostname,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Using a SSH password instead of a key is not possible because Host Key checking is enabled and sshpass does not support this.===&lt;br /&gt;
Please add this host&#039;s fingerprint to your known_hosts file to manage this host.&lt;br /&gt;
&lt;br /&gt;
Try &lt;br /&gt;
 ANSIBLE_HOST_KEY_CHECKING=False playbook ...&lt;br /&gt;
Or just ssh to the host and accept key&lt;br /&gt;
&lt;br /&gt;
===Platform linux on host backup01 is using the discovered Python interpreter at /usr/bin/python3===&lt;br /&gt;
one hack is adding to ~/.ansible.cfg:&lt;br /&gt;
 [defaults]&lt;br /&gt;
 interpreter_python=auto_silent  &lt;br /&gt;
&lt;br /&gt;
Or fix on that system:&lt;br /&gt;
 update-alternatives --install /usr/bin/python python /usr/bin/python3 1&lt;br /&gt;
&lt;br /&gt;
===The error was: &#039;item&#039; is undefined&amp;quot;===&lt;br /&gt;
wrong indentation for with_items&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Failed to connect to the host via ssh: Permission denied (publickey,password) ===&lt;br /&gt;
To connect without public key in authorized keys try&lt;br /&gt;
 --ask-pass&lt;br /&gt;
&lt;br /&gt;
===SSH Connection timed out during banner exchange===&lt;br /&gt;
See:&lt;br /&gt;
*[https://oneuptime.com/blog/post/2026-02-21-how-to-configure-ansible-ssh-connection-keepalive/view  How to Configure Ansible SSH Connection Keepalive ]&lt;br /&gt;
So far working for me: &lt;br /&gt;
 [ssh_connection]&lt;br /&gt;
 ssh_args = -o ServerAliveInterval=5&lt;br /&gt;
 retries = 5&lt;br /&gt;
&lt;br /&gt;
==ansible-lint==&lt;br /&gt;
===Use shell only when shell functionality is required===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== roles for multiple distributions ==&lt;br /&gt;
&lt;br /&gt;
  include_vars with &amp;quot;distro-{{ansible_distro_name}}.yml&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Escape single quote ==&lt;br /&gt;
&lt;br /&gt;
 &#039;foo &#039;&#039;bar&#039;&#039; &#039;&lt;br /&gt;
&lt;br /&gt;
==Syntax Error while loading YAML. did not find expected key==&lt;br /&gt;
Check indentation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Newlines in output ==&lt;br /&gt;
&lt;br /&gt;
instead of all those &#039;\n&#039;:&lt;br /&gt;
&lt;br /&gt;
In ansible.cfg:&lt;br /&gt;
&lt;br /&gt;
 stdout_callback = yaml&lt;br /&gt;
&lt;br /&gt;
== Ad-hoc commands ==&lt;br /&gt;
&lt;br /&gt;
[http://docs.ansible.com/ansible/latest/intro_adhoc.html http://docs.ansible.com/ansible/latest/intro_adhoc.html]&lt;br /&gt;
&lt;br /&gt;
== check python code ==&lt;br /&gt;
&lt;br /&gt;
 ansible-test sanity --test pep8 mycode.py&lt;br /&gt;
&lt;br /&gt;
== Command/shell output on single line ==&lt;br /&gt;
&lt;br /&gt;
 ANSIBLE_STDOUT_CALLBACK=oneline ansible-playbook foo.yml&lt;br /&gt;
&lt;br /&gt;
== Storing passwords ==&lt;br /&gt;
&lt;br /&gt;
[http://docs.ansible.com/ansible/2.4/vault.html http://docs.ansible.com/ansible/2.4/vault.html]&lt;br /&gt;
&lt;br /&gt;
== Show all host variables ==&lt;br /&gt;
&lt;br /&gt;
 ansible -m setup &amp;lt;hostname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Show all OS/versions ==&lt;br /&gt;
&lt;br /&gt;
 ansible all -m setup -a &amp;quot;filter=ansible_distribution*&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Syntax highlighting for ansible ==&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/chase/vim-ansible-yaml https://github.com/chase/vim-ansible-yaml] &lt;br /&gt;
&lt;br /&gt;
Drop the files in ~/vim/bundle and in .vimrc:&lt;br /&gt;
&lt;br /&gt;
 call pathogen#infect()&lt;br /&gt;
 call pathogen#helptags()&lt;br /&gt;
&lt;br /&gt;
Or maybe better:&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/pearofducks/ansible-vim https://github.com/pearofducks/ansible-vim] &lt;br /&gt;
&lt;br /&gt;
== Retry ==&lt;br /&gt;
&lt;br /&gt;
 --limit @/home/ansible/ssh.retry&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===ERROR! &#039;when&#039; is not a valid attribute for a Play===&lt;br /&gt;
&lt;br /&gt;
=== ERROR! this task &#039;import_playbook&#039; has extra params ===&lt;br /&gt;
&lt;br /&gt;
meh&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== /usr/bin/chattr: Clearing extent flag not supported ===&lt;br /&gt;
&lt;br /&gt;
Probably trying to make a backup of a symlink&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Missing sudo password===&lt;br /&gt;
set NOPASSWD in sudo config&lt;br /&gt;
&lt;br /&gt;
== Escape curly braces ==&lt;br /&gt;
&lt;br /&gt;
 {{ &#039;{&#039; }}&lt;br /&gt;
&lt;br /&gt;
== Check file for string ==&lt;br /&gt;
&lt;br /&gt;
  tasks:&lt;br /&gt;
    - name: grep line&lt;br /&gt;
      shell: &amp;quot;grep -q swap /etc/fstab&amp;quot;&lt;br /&gt;
      failed_when: false&lt;br /&gt;
      register: grepped&lt;br /&gt;
&lt;br /&gt;
    - name: show grep&lt;br /&gt;
      debug:&lt;br /&gt;
        msg: &amp;quot;exists&amp;quot;&lt;br /&gt;
      when: grepped.rc == 0&lt;br /&gt;
       &lt;br /&gt;
      &lt;br /&gt;
&lt;br /&gt;
== Error messages ==&lt;br /&gt;
&lt;br /&gt;
=== msg: The PyMySQL (Python 2.7 and Python 3.X) or MySQL-python (Python 2.X) module is required ===&lt;br /&gt;
&lt;br /&gt;
Means you need to install for example python2-PyMySQL on that host&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Ansible-lint messages==&lt;br /&gt;
===Commands should not change things if nothing needs doing===&lt;br /&gt;
Ignore, or use&lt;br /&gt;
 changed_when: false&lt;br /&gt;
===Shells that use pipes should set the pipefail option===&lt;br /&gt;
 shell: |&lt;br /&gt;
   set -o pipefail&lt;br /&gt;
   some command&lt;br /&gt;
&lt;br /&gt;
=Tips &amp;amp; tricks=&lt;br /&gt;
==Includes only when on host group==&lt;br /&gt;
   - block:&lt;br /&gt;
     - include: foo.yml &lt;br /&gt;
     - include: bar.yml&lt;br /&gt;
   when: &amp;quot;&#039;foobar&#039; in group_names&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Show info/facts of a host ==&lt;br /&gt;
&lt;br /&gt;
 ansible somehost -m setup&lt;br /&gt;
 ansible somehost -m ansible.builtin.setup&lt;br /&gt;
&lt;br /&gt;
==Show distribution and version==&lt;br /&gt;
  - name: show some host info&lt;br /&gt;
    debug:&lt;br /&gt;
      msg: Dist {{ ansible_distribution }} {{ ansible_distribution_version }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Configuration management]]&lt;br /&gt;
[[Category:Ansible]]&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Docker&amp;diff=10464</id>
		<title>Docker</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Docker&amp;diff=10464"/>
		<updated>2026-05-26T20:11:01Z</updated>

		<summary type="html">&lt;p&gt;Tony: /* HOWTO */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Links=&lt;br /&gt;
*[https://www.docker.com/ Homepage]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Docs=&lt;br /&gt;
*[https://docs.docker.com/manuals/ The Docker Manuals]&lt;br /&gt;
*[https://docs.docker.com/compose Docker-compose]&lt;br /&gt;
*https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-centos-7&lt;br /&gt;
*[https://www.digitalocean.com/community/tutorials/how-to-remove-docker-images-containers-and-volumes Removing images, containers and volumes]&lt;br /&gt;
*[https://training.play-with-docker.com/beginner-linux/ Docker for beginners]&lt;br /&gt;
*[https://runnable.com/docker/basic-docker-networking Docker networking]&lt;br /&gt;
*[https://docs.docker.com/config/pruning/ Docker pruning]&lt;br /&gt;
*[https://www.virtualizationhowto.com/2023/11/docker-overlay2-cleanup-5-ways-to-reclaim-disk-space/ Docker Overlay2 Cleanup: 5 Ways to Reclaim Disk Space]&lt;br /&gt;
&lt;br /&gt;
=HOWTO=&lt;br /&gt;
==Run container==&lt;br /&gt;
 docker run &amp;lt;IMAGE ID&amp;gt;&lt;br /&gt;
==List running containers==&lt;br /&gt;
 docker ps&lt;br /&gt;
&lt;br /&gt;
==List containers==&lt;br /&gt;
 docker ps -a&lt;br /&gt;
&lt;br /&gt;
==Start container==&lt;br /&gt;
 docker start &amp;lt;name&amp;gt;&lt;br /&gt;
name as found with docker ps -a&lt;br /&gt;
&lt;br /&gt;
==Show log==&lt;br /&gt;
 docker logs &amp;lt;container&amp;gt;&lt;br /&gt;
or to follow:&lt;br /&gt;
 docker logs -f &amp;lt;container&amp;gt;&lt;br /&gt;
==Show disk usage==&lt;br /&gt;
*https://niklasmtj.de/blog/understand-docker-storage/&lt;br /&gt;
&lt;br /&gt;
 docker system df&lt;br /&gt;
outputs:&lt;br /&gt;
 TYPE            TOTAL     ACTIVE    SIZE      RECLAIMABLE&lt;br /&gt;
 Images          27        10        11.35GB   5.72GB (50%)&lt;br /&gt;
 Containers      12        12        123.6MB   0B (0%)&lt;br /&gt;
 Local Volumes   0         0         0B        0B&lt;br /&gt;
 Build Cache     0         0         0B        0B&lt;br /&gt;
===RECLAIMABLE===&lt;br /&gt;
Is what you get back when running&lt;br /&gt;
 docker system prune -a&lt;br /&gt;
&lt;br /&gt;
==List images==&lt;br /&gt;
 docker images&lt;br /&gt;
&lt;br /&gt;
==Remove image==&lt;br /&gt;
===docker rm===&lt;br /&gt;
removes container&lt;br /&gt;
 docker ps -a&lt;br /&gt;
and then&lt;br /&gt;
 docker rm &amp;lt;container id&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===docker rmi===&lt;br /&gt;
alias for &#039;&#039;&#039;docker image rm&#039;&#039;&#039;&lt;br /&gt;
 docker image ls&lt;br /&gt;
and then&lt;br /&gt;
 docker rmi &amp;lt;ID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Export image==&lt;br /&gt;
 docker save &amp;lt;image name&amp;gt; &amp;gt; imagename.tar&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Update image==&lt;br /&gt;
 docker pull imagename&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Get shell in running container==&lt;br /&gt;
To get image name&lt;br /&gt;
 docker ps&lt;br /&gt;
then&lt;br /&gt;
 docker exec -it &amp;lt;image-id&amp;gt; bash&lt;br /&gt;
&lt;br /&gt;
==Network==&lt;br /&gt;
 docker network ls&lt;br /&gt;
 docker network inspect&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==image has dependent child images==&lt;br /&gt;
 docker inspect --format=&#039;{{.Id}} {{.Parent}}&#039; $(docker images --filter since=&amp;lt;image_id&amp;gt; -q)&lt;br /&gt;
or get [https://github.com/justone/dockviz dockviz] and run&lt;br /&gt;
 dockviz images --tree -l&lt;br /&gt;
&lt;br /&gt;
==Dangling images==&lt;br /&gt;
===list dangling images===&lt;br /&gt;
 docker images -f dangling=true&lt;br /&gt;
&lt;br /&gt;
===Remove dangling image===&lt;br /&gt;
 docker rmi image-id&lt;br /&gt;
====Errors/warnings====&lt;br /&gt;
=====Error response from daemon: conflict: unable to delete 9e82ccb228df (must be forced) - image is being used by stopped container a14fb2b549f1=====&lt;br /&gt;
Find the culprit with&lt;br /&gt;
 docker ps -a&lt;br /&gt;
and then&lt;br /&gt;
 docker rm &amp;lt;id you find&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Remove all dangling images===&lt;br /&gt;
 docker rmi $(docker images -f dangling=true -q)&lt;br /&gt;
&lt;br /&gt;
==image is being used by stopped container xyz==&lt;br /&gt;
 docker rm xyz&lt;br /&gt;
and try again&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Backups==&lt;br /&gt;
*https://linuxconfig.org/docker-container-backup-and-recovery&lt;br /&gt;
*[https://bobcares.com/blog/docker-backup/ Docker - Easy backup &amp;amp; restore]&lt;br /&gt;
&lt;br /&gt;
=FAQ=&lt;br /&gt;
==Error messages==&lt;br /&gt;
===The container name &amp;quot;/mycontainer&amp;quot; is already in use by container===&lt;br /&gt;
It already exists, so use&lt;br /&gt;
 docker start &amp;lt;container id&amp;gt;&lt;br /&gt;
instead of&lt;br /&gt;
 docker run&lt;br /&gt;
&lt;br /&gt;
OR find the culprit&lt;br /&gt;
 docker ps -a&lt;br /&gt;
and then&lt;br /&gt;
 docker rm container/name&lt;br /&gt;
etc&lt;br /&gt;
&lt;br /&gt;
===ERROR: failed to solve: failed to read dockerfile: open Dockerfile: no such file or directory===&lt;br /&gt;
It really wants a file called &#039;&#039;&#039;Dockerfile&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===docker.service: Start request repeated too quickly===&lt;br /&gt;
Try&lt;br /&gt;
 dockerd --debug&lt;br /&gt;
&lt;br /&gt;
===dial unix /var/run/docker.sock: connect: permission denied===&lt;br /&gt;
You&#039;re not in group &#039;&#039;&#039;docker&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===docker rmi===&lt;br /&gt;
 Error response from daemon: reference does not exist&lt;br /&gt;
See https://www.baeldung.com/linux/docker-image-deletion-problem-fix&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Address already in use===&lt;br /&gt;
First try&lt;br /&gt;
 lsof -i:8080&lt;br /&gt;
&lt;br /&gt;
==Compose==&lt;br /&gt;
===unknown shorthand flag: &#039;d&#039; in -d===&lt;br /&gt;
docker-compose is probably a script/wrapper.&lt;br /&gt;
Install the https://docs.docker.com/engine/install/debian/&lt;br /&gt;
&lt;br /&gt;
===docker: &#039;compose&#039; is not a docker command.===&lt;br /&gt;
Check https://docs.docker.com/engine/install/debian/&lt;br /&gt;
&lt;br /&gt;
===unknown flag: --detach===&lt;br /&gt;
 apt install docker-compose-v2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== image is being used by stopped container===&lt;br /&gt;
use the force&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Docker rmi not freeing space==&lt;br /&gt;
Correct, you need&lt;br /&gt;
 docker image prune&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Alsamixer&amp;diff=10463</id>
		<title>Alsamixer</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Alsamixer&amp;diff=10463"/>
		<updated>2026-05-26T20:06:26Z</updated>

		<summary type="html">&lt;p&gt;Tony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Links=&lt;br /&gt;
*https://wiki.archlinux.org/title/Advanced_Linux_Sound_Architecture&lt;br /&gt;
&lt;br /&gt;
=Howto=&lt;br /&gt;
==Enable channel==&lt;br /&gt;
M&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Sound]]&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Ansible&amp;diff=10462</id>
		<title>Ansible</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Ansible&amp;diff=10462"/>
		<updated>2026-05-26T11:15:14Z</updated>

		<summary type="html">&lt;p&gt;Tony: /* Error messages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Configuration management &lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
*[http://www.ansible.com/home Homepage]&lt;br /&gt;
*[http://www.hashbangcode.com/blog/adding-iptables-rules-ansible Adding iptables Rules With Ansible]&lt;br /&gt;
*[http://cloudacademy.com/blog/going-deeper-into-ansible-playbooks/ Going Deeper into Ansible Playbooks]&lt;br /&gt;
*[https://serversforhackers.com/an-ansible-tutorial An Ansible Tutorial]&lt;br /&gt;
*[https://www.cyberciti.biz/faq/how-to-install-and-configure-latest-version-of-ansible-on-ubuntu-linux/ How to Install and Configure latest version of Ansible on Ubuntu Linux]&lt;br /&gt;
*[https://networklore.com/ansible-getting-started/ Getting started with Ansible]&lt;br /&gt;
*[https://ansible-tips-and-tricks.readthedocs.io/en/latest/os-dependent-tasks/variables/ Tips and tricks]&lt;br /&gt;
*[https://www.ansible.com/products/awx-project AWX]&lt;br /&gt;
*[https://galaxy.ansible.com Ansible Galaxy]&lt;br /&gt;
*[https://docs.ansible.com/ansible/latest/user_guide/playbooks_async.html Timeouts]&lt;br /&gt;
*[https://manintheit.org/ansible/ansible-sample-scripts/ Ansible sample scripts]&lt;br /&gt;
*[https://gist.github.com/mgedmin/5f8ac034df0c371444be module for postfix]&lt;br /&gt;
*[https://docs.ansible.com/ansible/latest/collections/ Ansible collections]&lt;br /&gt;
&lt;br /&gt;
=Tools=&lt;br /&gt;
*[https://molecule.readthedocs.io/en/latest/ Molecule] for testing roles&lt;br /&gt;
*ansible-lint&lt;br /&gt;
*ansible-console&lt;br /&gt;
*ansible-inventory&lt;br /&gt;
&lt;br /&gt;
=Docs=&lt;br /&gt;
*[https://howto.cactus.de/index.php/Ansible_Howto Ansible Howto]&lt;br /&gt;
*[https://docs.ansible.com/ansible/latest/collections/ansible/builtin/ Ansible builtin modules]&lt;br /&gt;
*[https://docs.ansible.com/ansible/latest/collections/all_plugins.html All plugins]&lt;br /&gt;
*[http://ansible-docs.readthedocs.io/zh/stable-2.0/rst/playbooks_conditionals.html Conditionals]&lt;br /&gt;
*[https://docs.ansible.com/ansible/2.5/user_guide/playbooks_async.html Parallel!]&lt;br /&gt;
==Ansible style guides==&lt;br /&gt;
*[https://docs.ansible.com/ansible/2.6/dev_guide/style_guide/index.html Style guide]&lt;br /&gt;
*[https://redhat-cop.github.io/automation-good-practices/ Ansible good practices]&lt;br /&gt;
&lt;br /&gt;
*[https://spacelift.io/blog/ansible-variables Ansible variables]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Lineinfile==&lt;br /&gt;
*[https://docs.ansible.com/ansible/latest/collections/ansible/builtin/lineinfile_module.html Lineinfile module]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Popular modules==&lt;br /&gt;
*[https://docs.ansible.com/ansible/latest/collections/ansible/builtin/file_module.html ansible.builtin.file]&lt;br /&gt;
*[https://docs.ansible.com/ansible/latest/collections/ansible/builtin/apt_module.html ansible.builtin.apt]&lt;br /&gt;
*[https://docs.ansible.com/ansible/latest/collections/ansible/builtin/lineinfile_module.html ansible.builtin.lineinfile]&lt;br /&gt;
&lt;br /&gt;
=Some terms=&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
=Inventories=&lt;br /&gt;
*[https://spacelift.io/blog/ansible-inventory]&lt;br /&gt;
*[http://docs.ansible.com/ansible/latest/intro_dynamic_inventory.html Dynamic Inventory]&lt;br /&gt;
*[https://www.jeffgeerling.com/blog/creating-custom-dynamic-inventories-ansible Creating custom dynamic inventories]&lt;br /&gt;
*[https://www.digitalocean.com/community/tutorials/how-to-set-up-ansible-inventories  Set up ansible inventories]&lt;br /&gt;
&lt;br /&gt;
=Alternatives=&lt;br /&gt;
*[[Puppet]]&lt;br /&gt;
*[[Saltstack]]&lt;br /&gt;
&lt;br /&gt;
=Quickstart=&lt;br /&gt;
On server as root create key:&lt;br /&gt;
 ssh-keygen&lt;br /&gt;
(go for defaults)&lt;br /&gt;
and then get content of ~/.ssh/id_rsa.pub in your copypastebuffer&lt;br /&gt;
&lt;br /&gt;
On &#039;clients&#039; edit /etc/ssh/sshd_config to&lt;br /&gt;
 PermitRootLogin without-password&lt;br /&gt;
and restart sshd&lt;br /&gt;
&lt;br /&gt;
Edit/create ~root/.ssh/authorized_keys and add:&lt;br /&gt;
 from=&amp;quot;ip.of.ansible.server&amp;quot; &amp;lt;paste public key here&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Scripts/playbooks=&lt;br /&gt;
==Maintain useraccounts==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ---&lt;br /&gt;
&lt;br /&gt;
 - name: remove users&lt;br /&gt;
  user: name=exuser state=absent force=yes groups=&#039;&#039;&lt;br /&gt;
  with_dict: accounts&lt;br /&gt;
  tags:&lt;br /&gt;
    - delusers&lt;br /&gt;
&lt;br /&gt;
 - name: sync group&lt;br /&gt;
  group:&lt;br /&gt;
    name: sync&lt;br /&gt;
    gid: 999&lt;br /&gt;
    state: &amp;quot;present&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 - name: fix homedir rights&lt;br /&gt;
  lineinfile: dest=/etc/login.defs regexp=^UMASK line=&amp;quot;UMASK 007&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 - name: useraccounts&lt;br /&gt;
  user:&lt;br /&gt;
    name: &amp;quot;{{ item.key }}&amp;quot;&lt;br /&gt;
    comment: &amp;quot;{{ item.value.name }}&amp;quot;&lt;br /&gt;
    uid: &amp;quot;{{ item.value.uid }}&amp;quot;&lt;br /&gt;
    state: &amp;quot;present&amp;quot;&lt;br /&gt;
    shell: &amp;quot;/bin/bash&amp;quot;&lt;br /&gt;
    groups: sudo&lt;br /&gt;
  with_dict: accounts&lt;br /&gt;
  tags:&lt;br /&gt;
    - accounts&lt;br /&gt;
&lt;br /&gt;
 - name: userpasswords&lt;br /&gt;
  user:&lt;br /&gt;
    name: &amp;quot;{{ item.key }}&amp;quot;&lt;br /&gt;
    password: &amp;quot;{{ lookup(&#039;csvfile&#039;,item.key + &#039; file=/etc/shadow delimiter=: col=1&#039; ) }}&amp;quot;&lt;br /&gt;
  with_dict: accounts&lt;br /&gt;
&lt;br /&gt;
#ssh keys&lt;br /&gt;
 - name: userkeys&lt;br /&gt;
  authorized_key: user={{ item.key }} key=&amp;quot;{{ lookup(&#039;file&#039;,&#039;/home/&#039; + item.key + &#039;/.ssh/authorized_keys&#039; ) }}&amp;quot; exclusive=yes&lt;br /&gt;
  with_dict: accounts&lt;br /&gt;
  tags:&lt;br /&gt;
    - keys&lt;br /&gt;
&lt;br /&gt;
 - name: nofoobar&lt;br /&gt;
  user: name=foobar state=absent remove=yes&lt;br /&gt;
  tags:&lt;br /&gt;
    - foobar&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== comment out a line ==&lt;br /&gt;
 - name: remove java line from rclocal&lt;br /&gt;
   lineinfile:&lt;br /&gt;
     dest: /etc/rc.local&lt;br /&gt;
     regexp: &#039;^(java.*)$&#039;&lt;br /&gt;
     line: &#039;# \1&#039;&lt;br /&gt;
     backrefs: yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=HOWTO=&lt;br /&gt;
==Add user to group==&lt;br /&gt;
 name: add user to bargroup&lt;br /&gt;
  user:&lt;br /&gt;
    name: foo&lt;br /&gt;
    groups: bargroup&lt;br /&gt;
    append: yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Run command==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cronjobs and ssh passphrases==&lt;br /&gt;
See [https://gist.github.com/Justintime50/297d0d36da40834b037a65998d2149ca Use Your SSH Agent in a Crontab ( keychain)]&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
&lt;br /&gt;
==Notify multiple handlers==&lt;br /&gt;
 notify:&lt;br /&gt;
   - Call Handler1&lt;br /&gt;
   - Call Handler2&lt;br /&gt;
&lt;br /&gt;
==Print hostname in debug msg ==&lt;br /&gt;
 debug:&lt;br /&gt;
   msg: &amp;quot;Something to report in {{ inventory_hostname }}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Connect to a different port==&lt;br /&gt;
Try&lt;br /&gt;
 --extra-vars=&amp;quot;ansible_port=2345&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===Parse errors===&lt;br /&gt;
====ERROR! unexpected parameter type in action: &amp;lt;type &#039;bool&#039;&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====ERROR! conflicting action statements: debug, msg====&lt;br /&gt;
&#039;&#039;&#039;indentation&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====[WARNING]: Unable to parse &amp;lt;some hostname&amp;gt; as an inventory source====&lt;br /&gt;
Append a comma&lt;br /&gt;
 ansible-playbook myplay.yml -i myhostname,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Using a SSH password instead of a key is not possible because Host Key checking is enabled and sshpass does not support this.===&lt;br /&gt;
Please add this host&#039;s fingerprint to your known_hosts file to manage this host.&lt;br /&gt;
&lt;br /&gt;
Try &lt;br /&gt;
 ANSIBLE_HOST_KEY_CHECKING=False playbook ...&lt;br /&gt;
Or just ssh to the host and accept key&lt;br /&gt;
&lt;br /&gt;
===Platform linux on host backup01 is using the discovered Python interpreter at /usr/bin/python3===&lt;br /&gt;
one hack is adding to ~/.ansible.cfg:&lt;br /&gt;
 [defaults]&lt;br /&gt;
 interpreter_python=auto_silent  &lt;br /&gt;
&lt;br /&gt;
Or fix on that system:&lt;br /&gt;
 update-alternatives --install /usr/bin/python python /usr/bin/python3 1&lt;br /&gt;
&lt;br /&gt;
===The error was: &#039;item&#039; is undefined&amp;quot;===&lt;br /&gt;
wrong indentation for with_items&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Failed to connect to the host via ssh: Permission denied (publickey,password) ===&lt;br /&gt;
To connect without public key in authorized keys try&lt;br /&gt;
 --ask-pass&lt;br /&gt;
&lt;br /&gt;
===Connection timed out during banner exchange===&lt;br /&gt;
So far working for me: &lt;br /&gt;
 [ssh_connection]&lt;br /&gt;
 ssh_args = -o ServerAliveInterval=5&lt;br /&gt;
 retries = 5&lt;br /&gt;
&lt;br /&gt;
==ansible-lint==&lt;br /&gt;
===Use shell only when shell functionality is required===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== roles for multiple distributions ==&lt;br /&gt;
&lt;br /&gt;
  include_vars with &amp;quot;distro-{{ansible_distro_name}}.yml&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Escape single quote ==&lt;br /&gt;
&lt;br /&gt;
 &#039;foo &#039;&#039;bar&#039;&#039; &#039;&lt;br /&gt;
&lt;br /&gt;
==Syntax Error while loading YAML. did not find expected key==&lt;br /&gt;
Check indentation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Newlines in output ==&lt;br /&gt;
&lt;br /&gt;
instead of all those &#039;\n&#039;:&lt;br /&gt;
&lt;br /&gt;
In ansible.cfg:&lt;br /&gt;
&lt;br /&gt;
 stdout_callback = yaml&lt;br /&gt;
&lt;br /&gt;
== Ad-hoc commands ==&lt;br /&gt;
&lt;br /&gt;
[http://docs.ansible.com/ansible/latest/intro_adhoc.html http://docs.ansible.com/ansible/latest/intro_adhoc.html]&lt;br /&gt;
&lt;br /&gt;
== check python code ==&lt;br /&gt;
&lt;br /&gt;
 ansible-test sanity --test pep8 mycode.py&lt;br /&gt;
&lt;br /&gt;
== Command/shell output on single line ==&lt;br /&gt;
&lt;br /&gt;
 ANSIBLE_STDOUT_CALLBACK=oneline ansible-playbook foo.yml&lt;br /&gt;
&lt;br /&gt;
== Storing passwords ==&lt;br /&gt;
&lt;br /&gt;
[http://docs.ansible.com/ansible/2.4/vault.html http://docs.ansible.com/ansible/2.4/vault.html]&lt;br /&gt;
&lt;br /&gt;
== Show all host variables ==&lt;br /&gt;
&lt;br /&gt;
 ansible -m setup &amp;lt;hostname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Show all OS/versions ==&lt;br /&gt;
&lt;br /&gt;
 ansible all -m setup -a &amp;quot;filter=ansible_distribution*&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Syntax highlighting for ansible ==&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/chase/vim-ansible-yaml https://github.com/chase/vim-ansible-yaml] &lt;br /&gt;
&lt;br /&gt;
Drop the files in ~/vim/bundle and in .vimrc:&lt;br /&gt;
&lt;br /&gt;
 call pathogen#infect()&lt;br /&gt;
 call pathogen#helptags()&lt;br /&gt;
&lt;br /&gt;
Or maybe better:&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/pearofducks/ansible-vim https://github.com/pearofducks/ansible-vim] &lt;br /&gt;
&lt;br /&gt;
== Retry ==&lt;br /&gt;
&lt;br /&gt;
 --limit @/home/ansible/ssh.retry&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Error messages==&lt;br /&gt;
===ERROR! &#039;when&#039; is not a valid attribute for a Play===&lt;br /&gt;
&lt;br /&gt;
=== ERROR! this task &#039;import_playbook&#039; has extra params ===&lt;br /&gt;
&lt;br /&gt;
meh&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
=== /usr/bin/chattr: Clearing extent flag not supported ===&lt;br /&gt;
&lt;br /&gt;
Probably trying to make a backup of a symlink&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Missing sudo password===&lt;br /&gt;
set NOPASSWD in sudo config&lt;br /&gt;
&lt;br /&gt;
== Escape curly braces ==&lt;br /&gt;
&lt;br /&gt;
 {{ &#039;{&#039; }}&lt;br /&gt;
&lt;br /&gt;
== Check file for string ==&lt;br /&gt;
&lt;br /&gt;
  tasks:&lt;br /&gt;
    - name: grep line&lt;br /&gt;
      shell: &amp;quot;grep -q swap /etc/fstab&amp;quot;&lt;br /&gt;
      failed_when: false&lt;br /&gt;
      register: grepped&lt;br /&gt;
&lt;br /&gt;
    - name: show grep&lt;br /&gt;
      debug:&lt;br /&gt;
        msg: &amp;quot;exists&amp;quot;&lt;br /&gt;
      when: grepped.rc == 0&lt;br /&gt;
       &lt;br /&gt;
      &lt;br /&gt;
&lt;br /&gt;
== Error messages ==&lt;br /&gt;
&lt;br /&gt;
=== msg: The PyMySQL (Python 2.7 and Python 3.X) or MySQL-python (Python 2.X) module is required ===&lt;br /&gt;
&lt;br /&gt;
Means you need to install for example python2-PyMySQL on that host&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Ansible-lint messages==&lt;br /&gt;
===Commands should not change things if nothing needs doing===&lt;br /&gt;
Ignore, or use&lt;br /&gt;
 changed_when: false&lt;br /&gt;
===Shells that use pipes should set the pipefail option===&lt;br /&gt;
 shell: |&lt;br /&gt;
   set -o pipefail&lt;br /&gt;
   some command&lt;br /&gt;
&lt;br /&gt;
=Tips &amp;amp; tricks=&lt;br /&gt;
==Includes only when on host group==&lt;br /&gt;
   - block:&lt;br /&gt;
     - include: foo.yml &lt;br /&gt;
     - include: bar.yml&lt;br /&gt;
   when: &amp;quot;&#039;foobar&#039; in group_names&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Show info/facts of a host ==&lt;br /&gt;
&lt;br /&gt;
 ansible somehost -m setup&lt;br /&gt;
 ansible somehost -m ansible.builtin.setup&lt;br /&gt;
&lt;br /&gt;
==Show distribution and version==&lt;br /&gt;
  - name: show some host info&lt;br /&gt;
    debug:&lt;br /&gt;
      msg: Dist {{ ansible_distribution }} {{ ansible_distribution_version }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Configuration management]]&lt;br /&gt;
[[Category:Ansible]]&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Sed&amp;diff=10461</id>
		<title>Sed</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Sed&amp;diff=10461"/>
		<updated>2026-05-26T09:58:12Z</updated>

		<summary type="html">&lt;p&gt;Tony: /* Replace with newline */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;S&#039;&#039;&#039;tream &#039;&#039;&#039;E&#039;&#039;&#039;ditor&lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Tutorials=&lt;br /&gt;
*[http://www.grymoire.com/Unix/Sed.html Sed - An Introduction and Tutorial by Bruce Barnett]&lt;br /&gt;
=HOWTO=&lt;br /&gt;
==Back references without escaping parenthesis==&lt;br /&gt;
 sed &#039;s/foo (bar)/\1/g&#039;&lt;br /&gt;
&lt;br /&gt;
=FAQ=&lt;br /&gt;
==+ or *==&lt;br /&gt;
===*===&lt;br /&gt;
matches 0 or more&lt;br /&gt;
===+===&lt;br /&gt;
matches 1 or more&lt;br /&gt;
==errror messages==&lt;br /&gt;
===sed: -e expression #1, char 32: unknown command: `\&#039;===&lt;br /&gt;
try &lt;br /&gt;
 &#039;s/...&lt;br /&gt;
instead of&lt;br /&gt;
 &#039;/...&lt;br /&gt;
==Replace with newline==&lt;br /&gt;
 ^V^M&lt;br /&gt;
&lt;br /&gt;
==Replace literal \n with actual newline==&lt;br /&gt;
 sed &#039;s/\\n/\n/g&#039;&lt;br /&gt;
&lt;br /&gt;
==match whitespace==&lt;br /&gt;
 \s&lt;br /&gt;
&lt;br /&gt;
==replace newline==&lt;br /&gt;
try tr instead:&lt;br /&gt;
 tr -d &#039;\n&#039; &amp;lt; file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Edit in-place==&lt;br /&gt;
 sed -i&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==match number==&lt;br /&gt;
 sed &#039;s/.*\([0-9]\+\).*/\1/&#039;&lt;br /&gt;
or&lt;br /&gt;
 sed -r &#039;s/.*([0-9]+).*/\1/&#039;&lt;br /&gt;
&lt;br /&gt;
==Split words==&lt;br /&gt;
 sed -r &#039;s/([^ ]+) +([^ ]+) +([^ ]+) +([^ ]+) +([^ ]+) +([^ ]+) +([^ ]+).*/\4/g&#039;&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Docker&amp;diff=10460</id>
		<title>Docker</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Docker&amp;diff=10460"/>
		<updated>2026-05-25T21:15:32Z</updated>

		<summary type="html">&lt;p&gt;Tony: /* Show disk usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Links=&lt;br /&gt;
*[https://www.docker.com/ Homepage]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Docs=&lt;br /&gt;
*[https://docs.docker.com/manuals/ The Docker Manuals]&lt;br /&gt;
*[https://docs.docker.com/compose Docker-compose]&lt;br /&gt;
*https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-centos-7&lt;br /&gt;
*[https://www.digitalocean.com/community/tutorials/how-to-remove-docker-images-containers-and-volumes Removing images, containers and volumes]&lt;br /&gt;
*[https://training.play-with-docker.com/beginner-linux/ Docker for beginners]&lt;br /&gt;
*[https://runnable.com/docker/basic-docker-networking Docker networking]&lt;br /&gt;
*[https://docs.docker.com/config/pruning/ Docker pruning]&lt;br /&gt;
*[https://www.virtualizationhowto.com/2023/11/docker-overlay2-cleanup-5-ways-to-reclaim-disk-space/ Docker Overlay2 Cleanup: 5 Ways to Reclaim Disk Space]&lt;br /&gt;
&lt;br /&gt;
=HOWTO=&lt;br /&gt;
==Run container==&lt;br /&gt;
 docker run &amp;lt;IMAGE ID&amp;gt;&lt;br /&gt;
==List running containers==&lt;br /&gt;
 docker ps&lt;br /&gt;
&lt;br /&gt;
==List containers==&lt;br /&gt;
 docker ps -a&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Show log==&lt;br /&gt;
 docker logs &amp;lt;container&amp;gt;&lt;br /&gt;
or to follow:&lt;br /&gt;
 docker logs -f &amp;lt;container&amp;gt;&lt;br /&gt;
==Show disk usage==&lt;br /&gt;
*https://niklasmtj.de/blog/understand-docker-storage/&lt;br /&gt;
&lt;br /&gt;
 docker system df&lt;br /&gt;
outputs:&lt;br /&gt;
 TYPE            TOTAL     ACTIVE    SIZE      RECLAIMABLE&lt;br /&gt;
 Images          27        10        11.35GB   5.72GB (50%)&lt;br /&gt;
 Containers      12        12        123.6MB   0B (0%)&lt;br /&gt;
 Local Volumes   0         0         0B        0B&lt;br /&gt;
 Build Cache     0         0         0B        0B&lt;br /&gt;
===RECLAIMABLE===&lt;br /&gt;
Is what you get back when running&lt;br /&gt;
 docker system prune -a&lt;br /&gt;
&lt;br /&gt;
==List images==&lt;br /&gt;
 docker images&lt;br /&gt;
&lt;br /&gt;
==Remove image==&lt;br /&gt;
===docker rm===&lt;br /&gt;
removes container&lt;br /&gt;
 docker ps -a&lt;br /&gt;
and then&lt;br /&gt;
 docker rm &amp;lt;container id&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===docker rmi===&lt;br /&gt;
alias for &#039;&#039;&#039;docker image rm&#039;&#039;&#039;&lt;br /&gt;
 docker image ls&lt;br /&gt;
and then&lt;br /&gt;
 docker rmi &amp;lt;ID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Export image==&lt;br /&gt;
 docker save &amp;lt;image name&amp;gt; &amp;gt; imagename.tar&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Update image==&lt;br /&gt;
 docker pull imagename&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Get shell in running container==&lt;br /&gt;
To get image name&lt;br /&gt;
 docker ps&lt;br /&gt;
then&lt;br /&gt;
 docker exec -it &amp;lt;image-id&amp;gt; bash&lt;br /&gt;
&lt;br /&gt;
==Network==&lt;br /&gt;
 docker network ls&lt;br /&gt;
 docker network inspect&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==image has dependent child images==&lt;br /&gt;
 docker inspect --format=&#039;{{.Id}} {{.Parent}}&#039; $(docker images --filter since=&amp;lt;image_id&amp;gt; -q)&lt;br /&gt;
or get [https://github.com/justone/dockviz dockviz] and run&lt;br /&gt;
 dockviz images --tree -l&lt;br /&gt;
&lt;br /&gt;
==Dangling images==&lt;br /&gt;
===list dangling images===&lt;br /&gt;
 docker images -f dangling=true&lt;br /&gt;
&lt;br /&gt;
===Remove dangling image===&lt;br /&gt;
 docker rmi image-id&lt;br /&gt;
====Errors/warnings====&lt;br /&gt;
=====Error response from daemon: conflict: unable to delete 9e82ccb228df (must be forced) - image is being used by stopped container a14fb2b549f1=====&lt;br /&gt;
Find the culprit with&lt;br /&gt;
 docker ps -a&lt;br /&gt;
and then&lt;br /&gt;
 docker rm &amp;lt;id you find&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Remove all dangling images===&lt;br /&gt;
 docker rmi $(docker images -f dangling=true -q)&lt;br /&gt;
&lt;br /&gt;
==image is being used by stopped container xyz==&lt;br /&gt;
 docker rm xyz&lt;br /&gt;
and try again&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Backups==&lt;br /&gt;
*https://linuxconfig.org/docker-container-backup-and-recovery&lt;br /&gt;
*[https://bobcares.com/blog/docker-backup/ Docker - Easy backup &amp;amp; restore]&lt;br /&gt;
&lt;br /&gt;
=FAQ=&lt;br /&gt;
==Error messages==&lt;br /&gt;
===The container name &amp;quot;/mycontainer&amp;quot; is already in use by container===&lt;br /&gt;
It already exists, so use&lt;br /&gt;
 docker start &amp;lt;container id&amp;gt;&lt;br /&gt;
instead of&lt;br /&gt;
 docker run&lt;br /&gt;
&lt;br /&gt;
OR find the culprit&lt;br /&gt;
 docker ps -a&lt;br /&gt;
and then&lt;br /&gt;
 docker rm container/name&lt;br /&gt;
etc&lt;br /&gt;
&lt;br /&gt;
===ERROR: failed to solve: failed to read dockerfile: open Dockerfile: no such file or directory===&lt;br /&gt;
It really wants a file called &#039;&#039;&#039;Dockerfile&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===docker.service: Start request repeated too quickly===&lt;br /&gt;
Try&lt;br /&gt;
 dockerd --debug&lt;br /&gt;
&lt;br /&gt;
===dial unix /var/run/docker.sock: connect: permission denied===&lt;br /&gt;
You&#039;re not in group &#039;&#039;&#039;docker&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===docker rmi===&lt;br /&gt;
 Error response from daemon: reference does not exist&lt;br /&gt;
See https://www.baeldung.com/linux/docker-image-deletion-problem-fix&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Address already in use===&lt;br /&gt;
First try&lt;br /&gt;
 lsof -i:8080&lt;br /&gt;
&lt;br /&gt;
==Compose==&lt;br /&gt;
===unknown shorthand flag: &#039;d&#039; in -d===&lt;br /&gt;
docker-compose is probably a script/wrapper.&lt;br /&gt;
Install the https://docs.docker.com/engine/install/debian/&lt;br /&gt;
&lt;br /&gt;
===docker: &#039;compose&#039; is not a docker command.===&lt;br /&gt;
Check https://docs.docker.com/engine/install/debian/&lt;br /&gt;
&lt;br /&gt;
===unknown flag: --detach===&lt;br /&gt;
 apt install docker-compose-v2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== image is being used by stopped container===&lt;br /&gt;
use the force&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Docker rmi not freeing space==&lt;br /&gt;
Correct, you need&lt;br /&gt;
 docker image prune&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Docker&amp;diff=10459</id>
		<title>Docker</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Docker&amp;diff=10459"/>
		<updated>2026-05-25T21:14:50Z</updated>

		<summary type="html">&lt;p&gt;Tony: /* RECLAIMABLE */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Links=&lt;br /&gt;
*[https://www.docker.com/ Homepage]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Docs=&lt;br /&gt;
*[https://docs.docker.com/manuals/ The Docker Manuals]&lt;br /&gt;
*[https://docs.docker.com/compose Docker-compose]&lt;br /&gt;
*https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-centos-7&lt;br /&gt;
*[https://www.digitalocean.com/community/tutorials/how-to-remove-docker-images-containers-and-volumes Removing images, containers and volumes]&lt;br /&gt;
*[https://training.play-with-docker.com/beginner-linux/ Docker for beginners]&lt;br /&gt;
*[https://runnable.com/docker/basic-docker-networking Docker networking]&lt;br /&gt;
*[https://docs.docker.com/config/pruning/ Docker pruning]&lt;br /&gt;
*[https://www.virtualizationhowto.com/2023/11/docker-overlay2-cleanup-5-ways-to-reclaim-disk-space/ Docker Overlay2 Cleanup: 5 Ways to Reclaim Disk Space]&lt;br /&gt;
&lt;br /&gt;
=HOWTO=&lt;br /&gt;
==Run container==&lt;br /&gt;
 docker run &amp;lt;IMAGE ID&amp;gt;&lt;br /&gt;
==List running containers==&lt;br /&gt;
 docker ps&lt;br /&gt;
&lt;br /&gt;
==List containers==&lt;br /&gt;
 docker ps -a&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Show log==&lt;br /&gt;
 docker logs &amp;lt;container&amp;gt;&lt;br /&gt;
or to follow:&lt;br /&gt;
 docker logs -f &amp;lt;container&amp;gt;&lt;br /&gt;
==Show disk usage==&lt;br /&gt;
 docker system df&lt;br /&gt;
outputs:&lt;br /&gt;
 TYPE            TOTAL     ACTIVE    SIZE      RECLAIMABLE&lt;br /&gt;
 Images          27        10        11.35GB   5.72GB (50%)&lt;br /&gt;
 Containers      12        12        123.6MB   0B (0%)&lt;br /&gt;
 Local Volumes   0         0         0B        0B&lt;br /&gt;
 Build Cache     0         0         0B        0B&lt;br /&gt;
===RECLAIMABLE===&lt;br /&gt;
Is what you get back when running&lt;br /&gt;
 docker system prune -a&lt;br /&gt;
&lt;br /&gt;
==List images==&lt;br /&gt;
 docker images&lt;br /&gt;
&lt;br /&gt;
==Remove image==&lt;br /&gt;
===docker rm===&lt;br /&gt;
removes container&lt;br /&gt;
 docker ps -a&lt;br /&gt;
and then&lt;br /&gt;
 docker rm &amp;lt;container id&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===docker rmi===&lt;br /&gt;
alias for &#039;&#039;&#039;docker image rm&#039;&#039;&#039;&lt;br /&gt;
 docker image ls&lt;br /&gt;
and then&lt;br /&gt;
 docker rmi &amp;lt;ID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Export image==&lt;br /&gt;
 docker save &amp;lt;image name&amp;gt; &amp;gt; imagename.tar&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Update image==&lt;br /&gt;
 docker pull imagename&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Get shell in running container==&lt;br /&gt;
To get image name&lt;br /&gt;
 docker ps&lt;br /&gt;
then&lt;br /&gt;
 docker exec -it &amp;lt;image-id&amp;gt; bash&lt;br /&gt;
&lt;br /&gt;
==Network==&lt;br /&gt;
 docker network ls&lt;br /&gt;
 docker network inspect&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==image has dependent child images==&lt;br /&gt;
 docker inspect --format=&#039;{{.Id}} {{.Parent}}&#039; $(docker images --filter since=&amp;lt;image_id&amp;gt; -q)&lt;br /&gt;
or get [https://github.com/justone/dockviz dockviz] and run&lt;br /&gt;
 dockviz images --tree -l&lt;br /&gt;
&lt;br /&gt;
==Dangling images==&lt;br /&gt;
===list dangling images===&lt;br /&gt;
 docker images -f dangling=true&lt;br /&gt;
&lt;br /&gt;
===Remove dangling image===&lt;br /&gt;
 docker rmi image-id&lt;br /&gt;
====Errors/warnings====&lt;br /&gt;
=====Error response from daemon: conflict: unable to delete 9e82ccb228df (must be forced) - image is being used by stopped container a14fb2b549f1=====&lt;br /&gt;
Find the culprit with&lt;br /&gt;
 docker ps -a&lt;br /&gt;
and then&lt;br /&gt;
 docker rm &amp;lt;id you find&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Remove all dangling images===&lt;br /&gt;
 docker rmi $(docker images -f dangling=true -q)&lt;br /&gt;
&lt;br /&gt;
==image is being used by stopped container xyz==&lt;br /&gt;
 docker rm xyz&lt;br /&gt;
and try again&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Backups==&lt;br /&gt;
*https://linuxconfig.org/docker-container-backup-and-recovery&lt;br /&gt;
*[https://bobcares.com/blog/docker-backup/ Docker - Easy backup &amp;amp; restore]&lt;br /&gt;
&lt;br /&gt;
=FAQ=&lt;br /&gt;
==Error messages==&lt;br /&gt;
===The container name &amp;quot;/mycontainer&amp;quot; is already in use by container===&lt;br /&gt;
It already exists, so use&lt;br /&gt;
 docker start &amp;lt;container id&amp;gt;&lt;br /&gt;
instead of&lt;br /&gt;
 docker run&lt;br /&gt;
&lt;br /&gt;
OR find the culprit&lt;br /&gt;
 docker ps -a&lt;br /&gt;
and then&lt;br /&gt;
 docker rm container/name&lt;br /&gt;
etc&lt;br /&gt;
&lt;br /&gt;
===ERROR: failed to solve: failed to read dockerfile: open Dockerfile: no such file or directory===&lt;br /&gt;
It really wants a file called &#039;&#039;&#039;Dockerfile&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===docker.service: Start request repeated too quickly===&lt;br /&gt;
Try&lt;br /&gt;
 dockerd --debug&lt;br /&gt;
&lt;br /&gt;
===dial unix /var/run/docker.sock: connect: permission denied===&lt;br /&gt;
You&#039;re not in group &#039;&#039;&#039;docker&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===docker rmi===&lt;br /&gt;
 Error response from daemon: reference does not exist&lt;br /&gt;
See https://www.baeldung.com/linux/docker-image-deletion-problem-fix&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Address already in use===&lt;br /&gt;
First try&lt;br /&gt;
 lsof -i:8080&lt;br /&gt;
&lt;br /&gt;
==Compose==&lt;br /&gt;
===unknown shorthand flag: &#039;d&#039; in -d===&lt;br /&gt;
docker-compose is probably a script/wrapper.&lt;br /&gt;
Install the https://docs.docker.com/engine/install/debian/&lt;br /&gt;
&lt;br /&gt;
===docker: &#039;compose&#039; is not a docker command.===&lt;br /&gt;
Check https://docs.docker.com/engine/install/debian/&lt;br /&gt;
&lt;br /&gt;
===unknown flag: --detach===&lt;br /&gt;
 apt install docker-compose-v2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== image is being used by stopped container===&lt;br /&gt;
use the force&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Docker rmi not freeing space==&lt;br /&gt;
Correct, you need&lt;br /&gt;
 docker image prune&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
</feed>