Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7450602
syslog.pp
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
syslog.pp
View Options
# @summary
# Configures the Icinga 2 feature syslog.
#
# @param [Enum['absent', 'present']] ensure
# Set to present enables the feature syslog, absent disables it.
#
# @param [Optional[Icinga2::LogSeverity]] severity
# You can choose the log severity between information, notice, warning or debug.
#
# @param [Optional[Icinga2::LogFacility]] facility
# Defines the facility to use for syslog entries. This can be a facility constant
# like FacilityDaemon.
#
class
icinga2
::
feature
::
syslog
(
Enum
[
'absent'
,
'present'
]
$ensure
=
present
,
Optional
[
Icinga2
::
LogSeverity
]
$severity
=
undef
,
Optional
[
Icinga2
::
LogFacility
]
$facility
=
undef
,
)
{
if
!
defined
(
Class
[
'::icinga2'
])
{
fail
(
'You must include the icinga2 base class before using any icinga2 feature class!'
)
}
$conf_dir
=
$::icinga2::globals::conf_dir
$_notify
=
$ensure
?
{
'present'
=>
Class
[
'::icinga2::service'
],
default
=>
undef
,
}
# compose attributes
$attrs
=
{
severity
=>
$severity,
facility
=>
$facility,
}
# create object
icinga2
::
object
{
'icinga2::object::SyslogLogger::syslog'
:
object_name
=>
'syslog'
,
object_type
=>
'SyslogLogger'
,
attrs
=>
delete_undef_values
(
$attrs),
attrs_list
=>
keys
(
$attrs),
target
=>
"${conf_dir}/features-available/syslog.conf"
,
order
=>
10
,
notify
=>
$_notify,
}
# manage feature
icinga2
::
feature
{
'syslog'
:
ensure
=>
$ensure,
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 17, 8:02 AM (5 d, 12 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3282569
Attached To
rSPICI Icinga 2 Puppet Module
Event Timeline
Log In to Comment