nut
: Installs Network UPS Tools (NUT).nut::cgi
: Installs the Network UPS Tools (NUT) CGI scripts.nut::cgi::config
nut::cgi::install
nut::client
: Installs the Network UPS Tools (NUT) client.nut::client::config
nut::common
nut::common::config
nut::common::install
nut::common::service
nut::config
nut::install
nut::params
nut::service
nut::cgi::ups
: Add a UPS to visualise with the CGI scripts.nut::client::ups
: Add a local or remote UPS to monitor.nut::client::upssched
: Define actions forupssched
.nut::ups
: Adds and configures a UPS.nut::user
: Configure a user for UPS access.
Installs Network UPS Tools (NUT).
- See also
- puppet_classes::nut::client
- ::nut::client
- puppet_defined_types::nut::ups
- ::nut::ups
- puppet_defined_types::nut::user
- ::nut::user
- puppet_defined_types::nut::client::ups
- ::nut::client::ups
- puppet_defined_types::nut::client::upssched
- ::nut::client::upssched
- puppet_classes::nut::client
include ::nut
class { '::nut':
listen => [
{
'address' => $::ipaddress_eth0,
},
{
'address' => $::ipaddress6_eth0,
},
],
}
The following parameters are available in the nut
class.
Data type: Optional[Stdlib::Absolutepath]
Path to OpenSSL TLS certificate and key.
Default value: undef
Data type: Optional[Tuple[String, String]]
Tuple of certificate name and NSS database password.
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Path to NSS certificate database.
Default value: undef
Data type: Optional[Enum['no', 'request', 'require']]
Client certificate authentication options for NSS.
Default value: undef
Data type: Optional[Tuple[String, String]]
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Default value: undef
Data type: Optional[Boolean]
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Boolean]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Boolean
If the client is installed with the same
package then set this to false
.
Default value: $::nut::params::client_manage_package
Data type: Boolean
If the client is started as part of the same
service as the server then set this to false
.
Default value: $::nut::params::client_manage_service
Data type: Integer[1]
Default value: 1
Data type: Optional[Integer[0]]
Default value: undef
Data type: Boolean
Default value: false
Data type: Optional[Stdlib::Absolutepath]
Default value: $client_use_upssched
Data type: Optional[Hash[Nut::Event, Tuple[Boolean, 3, 3]]]
Default value: undef
Data type: Optional[Hash[Nut::Event, String]]
Default value: undef
Data type: String
Default value: $::nut::params::client_package_name
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: String
Default value: $::nut::params::client_service_name
Data type: String
Default value: $::nut::params::shutdown_command
Data type: Stdlib::Absolutepath
Top-level configuration directory, usually /etc/nut
or
/etc/ups
.
Default value: $::nut::params::conf_dir
Data type: Hash[String, String]
Hash of driver types to the package that provides it.
Default value: $::nut::params::driver_packages
Data type: String
The unprivileged group used to drop root privileges.
Default value: $::nut::params::group
Data type: Optional[Array[Nut::Listen, 1]]
An array of hashes of interface addresses to listen on, optionally with a port.
Default value: undef
Data type: Optional[Integer[1]]
Timeout for UPS drivers.
Default value: undef
Data type: Optional[Integer[1]]
Maximum number of connections.
Default value: undef
Data type: String
The name of the package.
Default value: $::nut::params::server_package_name
Data type: String
Name of the service.
Default value: $::nut::params::server_service_name
Data type: Stdlib::Absolutepath
Top-level state directory, usually /var/run/nut
or
/var/db/nut
.
Default value: $::nut::params::state_dir
Data type: String
The unprivileged user used to drop root privileges.
Default value: $::nut::params::user
Installs the Network UPS Tools (NUT) CGI scripts.
- See also
- puppet_classes::nut
- ::nut
- puppet_defined_types::nut::cgi::ups
- ::nut::cgi::ups
- puppet_classes::nut
include ::nut::cgi
class { '::nut::cgi':
manage_vhost => false,
}
The following parameters are available in the nut::cgi
class.
Data type: Hash
Hash of Apache resources to create that configures the virtual host serving the CGI scripts.
Default value: $::nut::params::apache_resources
Data type: Stdlib::Absolutepath
Top-level configuration directory, usually
/var/www/conf/nut
or /etc/ups
.
Default value: $::nut::params::cgi_conf_dir
Data type: String
The unprivileged group used to drop root privileges.
Default value: $::nut::params::group
Data type: Enum['apache', 'httpd']
Which HTTP server to configure a virtual host for.
Default value: $::nut::params::http_server
Data type: Boolean
Whether to create a virtual host for the CGI scripts or not.
Default value: $::nut::params::manage_vhost
Data type: String
The name of the package.
Default value: $::nut::params::cgi_package_name
Data type: String
The unprivileged user used to drop root privileges.
Default value: $::nut::params::user
The nut::cgi::config class.
The nut::cgi::install class.
Installs the Network UPS Tools (NUT) client.
- See also
- puppet_defined_types::nut::client::ups
- ::nut::client::ups
- puppet_defined_types::nut::client::upssched
- ::nut::client::upssched
- puppet_defined_types::nut::client::ups
include ::nut::client
class { '::nut::client':
use_upssched => true,
}
The following parameters are available in the nut::client
class.
Data type: Optional[Tuple[String, String]]
Tuple of certificate name and NSS database password.
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Path to NSS certificate database.
Default value: undef
Data type: Optional[Boolean]
Verify any TLS connections.
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
The script invoked by upssched
when a timer expires.
Default value: undef
Data type: Stdlib::Absolutepath
Top-level configuration directory, usually /etc/nut
or
/etc/ups
.
Default value: $::nut::params::conf_dir
Data type: Optional[Integer[0]]
How long a UPS can go without reporting anything before being declared dead.
Default value: undef
Data type: Optional[Integer[0]]
How long to wait after warning users before shutting the host down.
Default value: undef
Data type: Optional[Boolean]
Always use TLS connections.
Default value: undef
Data type: String
The unprivileged group used to drop root privileges.
Default value: $::nut::params::group
Data type: Optional[Integer[0]]
Wait this long for slave hosts to disconnect in a shutdown situation.
Default value: undef
Data type: Integer[1]
The number of power supplies receiving power for the host to remain powered on.
Default value: 1
Data type: Optional[Integer[0]]
How oftern to warn when no configured UPS is reachable.
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
The command to invoke for UPS events.
Default value: $use_upssched
Data type: Optional[Hash[Nut::Event, Tuple[Boolean, 3, 3]]]
Hash of UPS event to tuple of three booleans representing
using Syslog, wall(1)
and $notifycmd
for notifications.
Default value: undef
Data type: Optional[Hash[Nut::Event, String]]
Hash of UPS event to string for overriding the message for that event.
Default value: undef
Data type: String
The name of the package.
Default value: $::nut::params::client_package_name
Data type: Optional[Integer[0]]
How often to poll a UPS.
Default value: undef
Data type: Optional[Integer[0]]
How often to poll a UPS running on battery.
Default value: undef
Data type: Optional[Integer[0]]
How often to warn a UPS needs a replacement battery.
Default value: undef
Data type: String
The name of the service.
Default value: $::nut::params::client_service_name
Data type: String
The command used to power the host off.
Default value: $::nut::params::shutdown_command
Data type: Stdlib::Absolutepath
Top-level state directory, usually /var/run/nut
or
/var/db/nut
.
Default value: $::nut::params::state_dir
Data type: Boolean
Whether to use upssched
for notifications or not.
Default value: false
Data type: String
The unprivileged user used to drop root privileges.
Default value: $::nut::params::user
The nut::client::config class.
The nut::common class.
The following parameters are available in the nut::common
class.
Data type: Stdlib::Absolutepath
Data type: String
Data type: Integer[1]
Data type: String
Data type: String
Data type: String
Data type: Stdlib::Absolutepath
Data type: Boolean
Data type: String
Data type: Optional[Tuple[String, String]]
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Default value: undef
Data type: Optional[Boolean]
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Boolean]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Boolean
Default value: true
Data type: Boolean
Default value: true
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Default value: undef
Data type: Optional[Hash[Nut::Event, Tuple[Boolean, 3, 3]]]
Default value: undef
Data type: Optional[Hash[Nut::Event, String]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
The nut::common::config class.
The nut::common::install class.
The nut::common::service class.
The nut::config class.
The nut::install class.
The nut::params class.
The nut::service class.
Add a UPS to visualise with the CGI scripts.
- See also
- puppet_classes::nut::cgi
- ::nut::cgi
- puppet_classes::nut::cgi
include ::nut::cgi
::nut::cgi::ups { 'sua1000i@remotehost':
description => 'A remote UPS',
}
The following parameters are available in the nut::cgi::ups
defined type.
Data type: String
Description of the UPS.
Data type: Nut::Device
The UPS to visualise.
Default value: $title
Add a local or remote UPS to monitor.
- See also
- puppet_classes::nut::client
- ::nut::client
- puppet_defined_types::nut::client::upssched
- ::nut::client::upssched
- puppet_classes::nut::client
include ::nut
::nut::ups { 'sua1000i':
driver => 'usbhid-ups',
port => 'auto',
}
::nut::user { 'test':
password => 'password',
upsmon => 'master',
}
::nut::client::ups { 'sua1000i@localhost':
user => 'test',
password => 'password',
type => 'master',
}
include ::nut::client
::nut::client::ups { 'sua1000i@remotehost':
user => 'test',
password => 'password',
type => 'slave',
}
The following parameters are available in the nut::client::ups
defined type.
Data type: String
Username to use to connect to upsd
.
Data type: String
Password to use to connect to upsd
.
Data type: Optional[Tuple[String, Boolean, Boolean]]
If using NSS and client certificate authentication specify a tuple of certificate name, whether to verify and whether to force TLS with the remote host.
Default value: undef
Data type: Integer[0]
How many power supplies does this UPS feed.
Default value: 1
Data type: Enum['master', 'slave']
Is the UPS being monitored attached to the local system or not.
Default value: $title
Data type: Nut::Device
The UPS to monitor.
Default value: $title
Define actions for upssched
.
- See also
- puppet_classes::nut::client
- ::nut::client
- puppet_defined_types::nut::client::ups
- ::nut::client::ups
- puppet_classes::nut::client
class { '::nut::client':
use_upssched => true,
}
::nut::client::upssched { 'local ups has disconnected':
args => [
'upsgone',
10,
],
command => 'start-timer',
notifytype => 'commbad',
ups => 'test@localhost',
}
The following parameters are available in the nut::client::upssched
defined type.
Data type: Array[Variant[String, Integer], 1]
Additional arguments to pass to the command.
Data type: Enum['start-timer', 'cancel-timer', 'execute']
The command to run.
Data type: Nut::Event
The event notification to apply the action to.
Data type: Variant[Nut::Device, Enum['*']]
The UPS to apply the action to, or "*" to apply to all.
Adds and configures a UPS.
- See also
- puppet_classes::nut
- ::nut
- puppet_defined_types::nut::user
- ::nut::user
- puppet_classes::nut
include ::nut
::nut::ups { 'sua1000i':
driver => 'usbhid-ups',
port => 'auto',
}
The following parameters are available in the nut::ups
defined type.
Data type: String
The driver to use for this UPS.
Data type: Variant[Integer[0, 65535], String]
The port or device name where the UPS is attached.
Data type: Hash[String, Any]
Any additional driver-specific options can be passed here.
Default value: {}
Data type: String
The name of the UPS.
Default value: $title
Configure a user for UPS access.
- See also
- puppet_classes::nut
- ::nut
- puppet_defined_types::nut::ups
- ::nut::ups
- puppet_classes::nut
include ::nut
::nut::user { 'test':
password => 'password',
}
include ::nut
::nut::user { 'monmaster':
password => 'secret',
upsmon => 'master',
}
The following parameters are available in the nut::user
defined type.
Data type: String
The password for the user.
Data type: Optional[Array[String, 1]]
List of actions to permit the user to do.
Default value: undef
Data type: Optional[Array[String, 1]]
List of instant commands the user can initiate.
Default value: undef
Data type: Optional[Enum['master', 'slave']]
Set the user to be used by upsmon.
Default value: undef
Data type: String
The name of the user.
Default value: $title
The Nut::Device data type.
Alias of Pattern[/\A[^@]+@[^:]+(:\d+)?\Z/]
The Nut::Event data type.
Alias of Enum['online', 'onbatt', 'lowbatt', 'fsd', 'commok', 'commbad', 'shutdown', 'replbatt', 'nocomm']
The Nut::Listen data type.
Alias of Struct[{'address' => Stdlib::IP::Address::NoSubnet, Optional['port'] => Integer[0, 65535]}]