OCF_HEARTBEAT_VARNIS(7)
β¨ OCF_HEARTBEAT_VARNIS β¨
okay bestie, welcome to the OCF_HEARTBEAT_VARNIS(7) page, aka the group chat where we talk about the Varnish resource agent π
this is section 7 of the manual, and it's literally all about managing a Varnish instance like a boss π
πΈ NAME πΈ
ocf_heartbeat_varnish β Manage a Varnish instance π
π¦ SYNOPSIS π¦
varnish [start | stop | status | monitor | meta-data | validate-all]
π DESCRIPTION π
The Varnish Resource Agent can manage several varnishd instances all over the cluster. no cap. π«Ά
The way it pulls this off? It creates a unique PID file for each one, and it needs a unique listen address and a unique name for every single instance. so likeβ¦ don't reuse them, okay? π
π₯ SUPPORTED PARAMETERS π₯
configβ the VCL configuration file that Varnish should manage, for example"/etc/varnish/default.vcl". π
(unique, required, string, no default)
nameβ overrides the name of the instance that should be given to Varnish. if you don't set it, it defaults to the resource identifier. β¨
(unique, optional, string, default "RESOURCE_ID")
pidβ writes the process's PID to the specified file. the default will include the name you specified, like"/var/run/varnish_production.pid". and ngl, even though this help message makes it sound like a whole thing, it is most likely not necessary to change this parameter. leave it alone bestie π
(unique, optional, string, default "/var/run/varnishd_RESOURCE_ID.pid")
listen_addressβ listen on this address:port, for example"192.168.1.1:80"π§
(unique, optional, string, default "0.0.0.0:80")
mgmt_addressβ provide a management interface, for example"127.0.0.1:2222"π§
(unique, required, string, no default)
ttlβ specify a hard minimum time to live for cached documents. β³
(optional, integer, default 600)
varnish_userβ specify the name of an unprivileged user that the child process should switch to before it starts accepting connections. π«Ά
(optional, string, default "varnish")
varnish_groupβ specify the name of an unprivileged group that the child process should switch to before it starts accepting connections. π
(optional, string, default "varnish")
backend_typeβ use the specified storage backend. valid options are'malloc'for memory and'file'for a file backend. πΎ
(optional, string, default "malloc")
backend_sizeβ specify the size of the backend. for example"1G". π
(optional, string, default "1G")
backend_fileβ specify the backend filename if you usebackend_typefile. for example/var/lib/varnish/mybackend.binποΈ
(unique, optional, string, default "/var/lib/varnish/RESOURCE_ID.bin")
threads_poolsβ number of worker thread pools. each pool has the minimum, maximum and timeout values configured in thethread_pool_min,thread_pool_maxandthread_pool_timeoutparameters. π
(optional, string, default "2")
thread_pool_minβ start at least min but no more than max worker threads with the specified idle timeout in each pool. π§΅
(optional, string, default "100")
thread_pool_maxβ start at least min but no more than max worker threads with the specified idle timeout in each pool. π§΅
(optional, string, default "3000")
thread_pool_timeoutβ start at least min but no more than max worker threads with the specified idle timeout in each pool. π§΅
(optional, string, default "120")
client_binaryβ this is used to control Varnish via a CLI. it's currently only used to check the status of the running child process. π₯οΈ
(optional, string, default "varnishadm")
maxfilesβ maximum number of open files (forulimit -n) π
(optional, string, default "131072")
max_locked_memoryβ locked shared memory limit (forulimit -l) π
(optional, string, default "82000")
secretβ path to a file containing a secret used for authorizing access to the management port. π€«
(optional, string, default "/etc/varnish/secret")
π SUPPORTED ACTIONS π
this resource agent supports the following actions (operations), and yes, every single one of them is iconic in its own way:
startβ starts the resource. suggested minimum timeout:20s. πstopβ stops the resource. suggested minimum timeout:20s. πmonitorβ performs a detailed status check. suggested minimum timeout:20s. suggested interval:10s. πstatusβ performs a status check. suggested minimum timeout:20s. πmeta-dataβ retrieves resource agent metadata (internal use only). suggested minimum timeout:5s. πvalidate-allβ performs a validation of the resource configuration. suggested minimum timeout:20s. β
π EXAMPLE CRM SHELL π
here's an example configuration for a varnish resource using the crm(8) shell, screenshot this πΈ:
primitive p_varnish ocf:heartbeat:varnish \
params \
config=string \
mgmt_address=string \
op monitor timeout="20s" interval="10s" depth="0"
π EXAMPLE PCS π
and here's an example configuration for a varnish resource using pcs(8), because we love options:
pcs resource create p_varnish ocf:heartbeat:varnish \
config=string \
mgmt_address=string \
op monitor timeout="20s" interval="10s" OCF_CHECK_LEVEL="0"
β SEE ALSO β
π AUTHOR π
ClusterLabs contributors (see the resource agent source for information about individual authors) π«Ά
and that's the whole page bestie, you ate it up fr fr π
resource-agents Β· version UNKNOWN Β· dated 04/08/2026 β mwah, see you in the next manpage π¦πβ¨
π¦ where this page comes from
- fedora 43: resource-agents 4.18.0-1.fc43 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- fedora 44: resource-agents 4.18.0-1.fc44 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms