ActionSyslog, Syslog action

Syntax

Inside a callback action:

ActionSyslog(
"<log_message>"
[, severity=<severity>]
[, title=<title>])

Outside of a callback action:

self.r.action("Syslog",
"<log_message>"
[, severity=<severity>]
[, title=<title>])

Description

The ActionSyslog action enters the specified message in the event log. Users can access event log messages from the CLI, REST API, or Web UI of the switch.

Parameters

<log_message>

A text string of the message to be entered into the log.

The size and content of this message is subject to the same requirements as any other event log message on this system.

<severity>

Specifies the severity of the log message.

The Aruba Network Analytics Engine supports the following values:

  • SYSLOG_ALERT

  • SYSLOG_CRIT

  • SYSLOG_ERR

  • SYSLOG_WARNING

  • SYSLOG_INFO

Default: SYSLOG_INFO

<title>

Specifies the title to be displayed for this action. The definition of <title> must use the Title function.

For example: title=Title("Report CPU utilization")

Usage

Use this action to record event log messages that can be accessed from the CLI, REST API, or Web UI of the switch.

This action sends a message to the event log. Log messages are labeled with a severity level. Only the specified message is sent to the log—additional information such as the monitor or agent name is not included.

You can create a custom title for this action. The title you create can help the user of the Web UI to determine what action was executed. The title is displayed in the Action Results section of the Alert Details dialog box.

Examples

The following example sends a message to the event log, using the parameter message, inside a callback action:

ActionSyslog("Sample message: {}", [self.params["message"]], severity=SYSLOG_WARNING, facility=SYSLOG_DAEMON)

The following example sends a message to the event log, using the parameter message, outside of a callback action:

self.r.action("Syslog", "Sample message: {}", [self.params["message"]])