on_agent_restart

Syntax

on_agent_restart(<agent>, <event>)

Description

Performs the specified actions when the NAE agent is restarted.

Parameters

<agent>

Specifies the agent that has the changed parameters.

Typically, this parameter is defined as the variable: self

<event>

Specifies a Python dictionary that contains the event information.

Typically, this parameter is defined as the variable: event

Usage

The NAE daemon might be stopped and restarted because of a management module failover operation or because a core dump operation has been performed.

When the NAE daemon restarts, it restarts the agents. When an agent is restarted, it might not be in the correct state to perform its monitoring tasks. The Aruba Network Analytics Engine provides the on_agent_restart function to enable you to specify actions to perform to update an agent after it is restarted.

Example

def on_agent_restart(self, event):
    ActionCLI("show core-dumps")
    self.remove_alert_level()