Use Management Agent Events

You can use Oracle Cloud Infrastructure Events to monitor important changes for Management Agent resources and trigger actions such as notifications, streams, or functions.

Use the below information to learn how to create an event rule for Management Agent events, including upcoming agent deletion, successful agent upgrades, failed agent upgrades, new agent version availability, and agent availability status changes:

Prerequisites

Before you create a Management Agent event rule, complete the prerequisites for Events. You need the required IAM policies for Events and at least one action resource for the rule, such as a Notifications topic and subscription, a stream, or a function. For more information, see Getting Started with Events and Prerequisites for Creating Rules.

Create a Management Agent Event Rule

  1. Open the navigation menu and select Observability & Management. Under Events Service, select Rules.
  2. Select the compartment where you want to create the rule, and then select Create Rule. Ensure that you have permissions to operate in this compartment. Events compares rules in this compartment to event messages from resources in this compartment and its child compartments.
  3. Enter a display name and description for the rule.
  4. In Rule Conditions, select Event Type from Condition.
  5. In Service Name, select Management Agent.
  6. In Event Type, select one or more Management Agent event types. If you select more than one event type, you will be notified for all the events that get matched.
  7. Optionally, to filter events by attribute, select + Another Condition, select Attribute from Condition, and enter the attribute name and value to match. Available attributes depend on the event type.
  8. In Actions, specify the action resources to trigger when the rule finds a match. You can select Notifications, Streaming, or Functions, depending on your requirements.
  9. Select Create Rule.

Management Agent Event Types

Use the following event types and attributes when you create rules for Management Agent events.

Warning Events

Event display name Event type Description Attribute filters
Management Agent - Deletion Pending com.oraclecloud.managementagent.upcomingagentdeletion Sent when an agent is scheduled for automatic deletion because it has been silent for 60 days. daysleftforautodeletion: Number of days before automatic deletion. Current accepted value: 7.
Management Agent - Availability Status Changed com.oraclecloud.managementagent.agentavailabilitystatuschanged Sent when an agent's availability status changes from Active to Silent. previousstate: Availability status before the transition.

currentstate: Availability status after the transition.

Information Events

Event display name Event type Description Attribute filters
Management Agent - Upgraded com.oraclecloud.managementagent.agentupgraded Sent when an agent is upgraded successfully. previousversion: Version before the upgrade.

currentversion: Version after the upgrade.

Management Agent - New Version Available com.oraclecloud.managementagent.agentimagenewversionavailable Sent when a new Management Agent or Management Gateway image is available for download. Create the rule in the root compartment to receive this event. installtype: Image type, such as agent or gateway.

platformtype: Platform type, such as Windows or Linux.

platformname: Platform name, such as windows-x86-64.

Management Agent - Availability Status Changed com.oraclecloud.managementagent.agentavailabilitystatuschanged Sent when an agent's availability status changes from Silent to Active. previousstate: Availability status before the transition.

currentstate: Availability status after the transition.

Error Events

Event display name Event type Description Attribute filters
Management Agent - Upgrade Failed com.oraclecloud.managementagent.agentupgradefailed Sent when an agent upgrade attempt fails. errorcode: Error code, such as MA_01001.

currentversion: Current agent version.

targetversion: Target agent version.

availabilitystate: Agent availability state at the time of the upgrade attempt.