FENCE_AGENT(8)
π FENCE_AGENT(8) π β the System Manager's Manual, but make it make sense
okay bestie, so this is a page from section 8 of the manual (that's the system manager's manual, the admin-y one), and it's all about fence_shelly_gen2. sit down, grab a strawberry drink, we're doing fencing π
β¨ NAME β¨
fence_shelly_gen2 β the fence agent for Shelly Gen 2+ Switches. that's it, that's the name, no cap.
π¦ DESCRIPTION π¦
so fence_shelly_gen2 is a Power Fencing agent you use with Shelly Switches that speak the gen 2+ API, and its whole job is fencing the hardware that's attached to them. slay.
and here's the thing about how it takes input β the fence agent accepts options on the command line and from stdin. when fenced execs the agent, it sends parameters through stdin. but you can also just run the agent by itself with command line options, which is genuinely so useful for testing and for flipping outlets on or off from scripts. main character behavior honestly.
Vendor URL: https://shelly-api-docs.shelly.cloud/gen2/ β go look, iykyk π
π PARAMETERS π
-o,--action=[action]β the fencing action. (Default Value:reboot) π«-a,--ip=[ip]β IP address or hostname of the fencing device. This parameter is always required. like, always always.-u,--ipport=[port]β TCP/UDP port to use for the connection with the device. (Default Value:80)-t,--notlsβ Disable TLS negotiation and force SSL3.0. β οΈ lowkey scary: this should only be used for devices that do not support TLS1.0 and up.-p,--password=[password]β Login password or passphrase π-S,--password-script=[script]β Script to run to retrieve the password.-n,--plug=[id]β Physical plug number on the device, UUID, or identification of the machine. This parameter is always required. no skipping bestie.-z,--sslβ Use SSL connection with verifying certificate. π--ssl-insecureβ Use SSL connection without verifying certificate. π--ssl-secureβ Use SSL connection with verifying certificate. π-q,--quietβ Disable logging to stderr. Does not affect--verboseor--debug-fileor logging to syslog.-v,--verboseβ Verbose mode. Multiple-vflags can be stacked on the command line (e.g.,-vvv) to increase verbosity. stacking buffs, literally.--verbose-levelβ Level of debugging detail in output. Defaults to the number of--verboseflags specified on the command line, or to1ifverbose=1in a stonith device configuration (i.e., on stdin).-D,--debug-file=[debugfile]β Write debug information to the given file.-V,--versionβ Display version information and exit.-h,--helpβ Display help and exit.--plug-separator=[char]β Separator for the plug parameter when you're specifying more than 1 plug. (Default Value:,)-C,--separator=[char]β Separator for the CSV created by thelistoperation. (Default Value:,)--delay=[seconds]β Wait X seconds before fencing is started. (Default Value:0)--disable-timeout=[true/false]β Disable timeout (true/false) (default:truewhen run from Pacemaker 2.0+)--login-timeout=[seconds]β Wait X seconds for the cmd prompt after login. (Default Value:5)--power-timeout=[seconds]β Test X seconds for status change after ON/OFF. (Default Value:20)--power-wait=[seconds]β Wait X seconds after issuing ON/OFF. (Default Value:1)--shell-timeout=[seconds]β Wait X seconds for the cmd prompt after issuing a command. (Default Value:5)--stonith-status-sleep=[seconds]β Sleep X seconds between status calls during a STONITH action. (Default Value:1)--retry-on=[attempts]β Count of attempts to retry power on. (Default Value:1)--gnutlscli-path=[path]β Path to thegnutls-clibinary. (Default Value:/usr/bin/gnutls-cli)
π ACTIONS π
onβ Power on machine. β‘offβ Power off machine. πrebootβ Reboot machine. πstatusβ This returns the status of the plug/virtual machine.listβ List available plugs with aliases/virtual machines if there is support for more than one device. ReturnsN/Aotherwise.list-statusβ List available plugs with aliases/virtual machines and their power state, if it can be obtained without additional commands.monitorβ Check the health of the fence device. π©Ίmetadataβ Display the XML metadata describing this resource.manpageβ The operational behavior of this is not known. π (yes, that's what it says. we don't know. iconic honestly.)validate-allβ Validate if all required parameters are entered. β
πΈ STDIN PARAMETERS πΈ
same energy, different door β these are the ones that come in over stdin:
actionβ Fencing action (Default Value:reboot)ipβ IP address or hostname of fencing device. This parameter is always required. Obsoletes:ipaddripportβ TCP/UDP port to use for connection with device (Default Value:80)notlsβ Disable TLS negotiation and force SSL3.0. This should only be used for devices that do not support TLS1.0 and up.passwordβ Login password or passphrase. Obsoletes:passwdpassword_scriptβ Script to run to retrieve password. Obsoletes:passwd_scriptplugβ Physical plug number on device, UUID or identification of machine. This parameter is always required. Obsoletes:portsslβ Use SSL connection with verifying certificatessl_insecureβ Use SSL connection without verifying certificatessl_secureβ Use SSL connection with verifying certificatequietβ Disable logging to stderr. Does not affect--verboseor--debug-fileor logging to syslog.verboseβ Verbose mode. Multiple-vflags can be stacked on the command line (e.g.,-vvv) to increase verbosity.verbose_levelβ Level of debugging detail in output. Defaults to the number of--verboseflags specified on the command line, or to1ifverbose=1in a stonith device configuration (i.e., on stdin).debug_fileβ Write debug information to given file. Obsoletes:debugversionβ Display version information and exithelpβ Display help and exitplug_separatorβ Separator for plug parameter when specifying more than 1 plug (Default Value:,)separatorβ Separator for CSV created bylistoperation (Default Value:,)delayβ Wait X seconds before fencing is started (Default Value:0)disable_timeoutβ Disable timeout (true/false) (default:truewhen run from Pacemaker 2.0+)login_timeoutβ Wait X seconds for cmd prompt after login (Default Value:5)power_timeoutβ Test X seconds for status change after ON/OFF (Default Value:20)power_waitβ Wait X seconds after issuing ON/OFF (Default Value:1)shell_timeoutβ Wait X seconds for cmd prompt after issuing command (Default Value:5)stonith_status_sleepβ Sleep X seconds between status calls during a STONITH action (Default Value:1)retry_onβ Count of attempts to retry power on (Default Value:1)gnutlscli_pathβ Path to gnutls-cli binary (Default Value:/usr/bin/gnutls-cli)
quick vibe check:-t/--notlsforcing SSL3.0 is not a casual choice. only for devices that don't do TLS1.0 and up. don't be reckless with your security bestie π«Ά
and that's the whole page!! this one's fence_shelly_gen2 (Fence Agent), dated 2009-10-20, and it lives in section FENCE_AGENT(8). thanks for reading my little manual rant, you ate π
β¨π
π¦ where this page comes from
- fedora 43: fence-agents-shelly 4.17.0-1.fc43 Β· GPL-2.0-or-later AND LGPL-2.0-or-later
- fedora 44: fence-agents-shelly 4.17.0-2.fc44 Β· GPL-2.0-or-later AND LGPL-2.0-or-later
- ubuntu resolute: fence-agents-shelly 4.17.0-1ubuntu1 Β· GPL-2.0-or-later
- ubuntu stonking: fence-agents-shelly 4.17.0-1ubuntu2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms