Defined Type: pulsevtm::actions

Defined in:
manifests/actions.pp

Overview

Define: pulsevtm::actions

Alerting Action A response to an event occurring in your traffic manager. An example of an action might be sending an email or writing a line to a log file.

Parameters

basic__note

A description of the action.

basic__syslog_msg_len_limit

Maximum length in bytes of a message sent to the remote syslog. Messages longer than this will be truncated before they are sent.

basic__timeout

How long the action can run for before it is stopped automatically (set to 0 to disable timeouts).

basic__type

The action type.

basic__verbose

Enable or disable verbose logging for this action.

email__from

The e-mail address from which messages will appear to originate.

email__server

The SMTP server to which messages should be sent. This must be a valid IPv4 address or resolvable hostname (with optional port).

email__to

A set of e-mail addresses to which messages will be sent. Type:array Properties:

log__file

The full path of the file to log to. The text “%zeushome%” will be replaced with the location where the software is installed.

program__arguments

A table containing arguments and argument values to be passed to the event handling program. Type:array Properties:name of the argument to be passed to the event handling program.”, “type”=>“string”, “value”=>value of the argument to be passed to the event handling program.”, “type”=>“string”, “description”=>description for the argument provided to the program.”, “type”=>“string”, “default”=>“”}

program__program

The program to run.

soap__additional_data

Additional information to send with the SOAP call.

soap__password

The password for HTTP basic authentication.

soap__proxy

The address of the server implementing the SOAP interface (For example, example.com).

soap__username

Username for HTTP basic authentication. Leave blank if you do not wish to use authentication.

syslog__sysloghost

The host and optional port to send syslog messages to (if empty, messages will be sent to localhost).

trap__auth_password

The authentication password for sending a Notify over SNMPv3. Blank to send unauthenticated traps.

trap__community

The community string to use when sending a Trap over SNMPv1 or a Notify over SNMPv2c.

trap__hash_algorithm

The hash algorithm for SNMPv3 authentication.

trap__priv_password

The encryption password to encrypt a Notify message for SNMPv3. Requires that authentication also be configured. Blank to send unencrypted traps.

trap__traphost

The hostname or IPv4 address and optional port number that should receive traps.

trap__username

The SNMP username to use to send the Notify over SNMPv3.

trap__version

The SNMP version to use to send the Trap/Notify.

Examples

pulsevtm::actions { ‘example’:

ensure => present,
basic__type => 'foo'

}

Authors

Pulse Secure <puppet-vadc@pulsesecure.net>

Copyright 2018 Pulse Secure

Parameters:

  • ensure (Any)
  • basic__type (Any)
  • basic__note (Any) (defaults to: undef)
  • basic__syslog_msg_len_limit (Any) (defaults to: 1024)
  • basic__timeout (Any) (defaults to: 60)
  • basic__verbose (Any) (defaults to: false)
  • email__from (Any) (defaults to: 'vTM@%hostname%')
  • email__server (Any) (defaults to: undef)
  • email__to (Any) (defaults to: '[]')
  • log__file (Any) (defaults to: undef)
  • program__arguments (Any) (defaults to: '[]')
  • program__program (Any) (defaults to: undef)
  • soap__additional_data (Any) (defaults to: undef)
  • soap__password (Any) (defaults to: undef)
  • soap__proxy (Any) (defaults to: undef)
  • soap__username (Any) (defaults to: undef)
  • syslog__sysloghost (Any) (defaults to: undef)
  • trap__auth_password (Any) (defaults to: undef)
  • trap__community (Any) (defaults to: undef)
  • trap__hash_algorithm (Any) (defaults to: 'md5')
  • trap__priv_password (Any) (defaults to: undef)
  • trap__traphost (Any) (defaults to: undef)
  • trap__username (Any) (defaults to: undef)
  • trap__version (Any) (defaults to: 'snmpv1')


115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# File 'manifests/actions.pp', line 115

define pulsevtm::actions (
  $ensure,
  $basic__type,
  $basic__note                 = undef,
  $basic__syslog_msg_len_limit = 1024,
  $basic__timeout              = 60,
  $basic__verbose              = false,
  $email__from                 = 'vTM@%hostname%',
  $email__server               = undef,
  $email__to                   = '[]',
  $log__file                   = undef,
  $program__arguments          = '[]',
  $program__program            = undef,
  $soap__additional_data       = undef,
  $soap__password              = undef,
  $soap__proxy                 = undef,
  $soap__username              = undef,
  $syslog__sysloghost          = undef,
  $trap__auth_password         = undef,
  $trap__community             = undef,
  $trap__hash_algorithm        = 'md5',
  $trap__priv_password         = undef,
  $trap__traphost              = undef,
  $trap__username              = undef,
  $trap__version               = 'snmpv1',
){
  include pulsevtm
  $ip              = $pulsevtm::rest_ip
  $port            = $pulsevtm::rest_port
  $user            = $pulsevtm::rest_user
  $pass            = $pulsevtm::rest_pass
  $purge           = $pulsevtm::purge
  $purge_state_dir = $pulsevtm::purge_state_dir

  info ("Configuring actions ${name}")
  vtmrest { "actions/${name}":
    ensure   => $ensure,
    before   => Class[pulsevtm::purge],
    endpoint => "https://${ip}:${port}/api/tm/6.0/config/active",
    username => $user,
    password => $pass,
    content  => template('pulsevtm/actions.erb'),
    type     => 'application/json',
    internal => 'actions',
    failfast => $pulsevtm::failfast,
    debug    => $pulsevtm::debug,
  }

  if ( $purge ) {
    ensure_resource('file', "${purge_state_dir}/actions", {ensure => present})
    file_line { "actions/${name}":
      line => "actions/${name}",
      path => "${purge_state_dir}/actions",
    }
  }
}