Hand Off Management Tasks to IBM Systems Director 6.1

Article ID: 63547
Automate scheduling, notifications, and event-based tasks

A systems management product reveals its true worth when you want to use it to automate actions based on the monitoring data the product provides. IBM Systems Director provides a rich set of automation capabilities. In fact, you might find that once you've set up IBM Systems Director, you'll interact with the product less often because it can automate much of what you want to do in your day-to-day management. Let's look more closely at the capabilities IBM Systems Director offers for automating systems management tasks. (For an introduction to the product, see "IBM Systems Director 6.1: Next-Generation Management for Your Data Center," January 2009.)

Automation Overview

IBM Systems Director provides several types of automation. The first and most basic type is scheduling, and IBM Systems Director provides a full scheduler. The second type is simple email notifications. IBM Systems Director provides two ways for you to receive emails when events happen. The third type is task automation, which IBM Systems Director provides through event automation plans. The fourth, and final, type is full command and scripting automation. To help you understand how it all works right out of the box, IBM Systems Director provides an Automation Manager summary page, as Figure 1 shows.

The summary page displays the information you'll need to determine which tasks to automate. First, it shows scheduling status and a task to view active and scheduled jobs. The next two sections show the systems with the most frequent critical or warning events and the most frequent critical events. This information can help you decide which systems or events are causing the most grief and plan how to automate to fix them faster. The last section shows event automation plans, how many plans are active and inactive, and links to manage the automation plan elements (plans, actions, and filters).

Task Scheduling

Scheduling is the most basic and most frequently used type of automation. IBM Systems Director has a rich scheduling function that you can use for almost any task. To start, find a task you want to run via the Find a Task link (in the left-pane Views area), in the navigation area, or by right-clicking a system. For example, to collect inventory for a group of systems, you can right-click the systems, select Inventory, View and Collect Inventory. Then click the Collect button, and the Run dialog box appears, as Figure 2 shows.

The default is to run now, but if you click Schedule you can customize the frequency in various ways. Once you click OK, a job is created and added to the Active and Scheduled Jobs task, as Figure 3 shows. This task shows all scheduled, active, and completed jobs you've created and is where you can view overall status, job history, and logs for detailed status.

Regarding jobs in IBM Systems Director: A new job represents a new activity that you want to happen in your data center. If you want to collect inventory once a week forever, that's one activity. If you want to power down a system once, that's an activity. Thus, over time, a single Check for Updates job that you've scheduled to run daily in the Active and Scheduled Jobs task might eventually run hundreds of times. You can see specific details about any job instance by clicking the job, then clicking the History tab and locating the instance you're interested in.

Tip: If you want to run a job in this list to the same set of systems immediately, right-click and select Run Now, and a new instance will run. You can use this capability as a timesaving shortcut. Instead of walking through a complex wizard again, simply right-click and tell Systems Director to rerun the job.

Email Notifications

The latest version of IBM Systems Director, 6.1, lets you set up automated email notifications of the status of selected jobs. Specifically, in the Notification tab in Figure 2, you can opt to receive an email notification about the progress of the new job you're creating. Email-notification options include

  • Notify when this job begins.
  • Notify when this job is completed successfully.
  • Notify when this job fails:
    • any error
    • x percentage targets with errors
    • x number of targets with errors

These last two options let you give IBM Systems Director instructions such as, "If this job fails on 80 percent of the systems, email me" or "if this job fails on four or more systems, email me." Also note that if a system you scheduled a job for is unavailable when the job runs, you can choose to fail the job and report an error or queue the job so that it will run when the system becomes available.

Event Automation Plans

The event automation plan feature reveals some of IBM System Director's true power. Event automation plans let you automate dozens of actions to run when a particular event or set of events happen. Think of it an event automation plan in this way: The event log contains events from numerous sources communicating many different events. Events include hardware events, threshold events, virtualization status events, energy management events, job status events, LED events, and many other types. The automation plan lets you choose which actions you want to run when events you're interested in occur.

Here are some examples of event automation plans you might create:

  • If you receive any critical or fatal event, you can be emailed.
  • If you receive a critical energy usage event, you can change the power usage of a server or groups of servers.
  • If you receive a hardware event, you can run a Relocate task that evacuates all your Linux and AIX virtual servers from your power system and relocates them onto other servers.

The fastest way to set up event automation plans is by using the Create wizard. The Create wizard will guide you through performing these tasks:

  • choosing the systems for which you want to monitor events
  • selecting the events you're interested in
  • adding the actions to run when those events occur

The wizard is useful for setting up overall plans. In Figure 4, I selected the types of events I'm interested in (i.e., event filters): any critical or fatal event, when any new updates are available, and when CPU utilization is more than 95 percent. If any of those events happen, the action I've chosen is for IBM Systems Director to email me with a notification.

The list of common events shown in Figure 4 is only a small subset of what you can monitor for. If you select Advanced from the Events drop-down list, you'll see a table of all event filters. You can use this table to create a complex event filter that looks for exactly the event or event type you're interested in. You'll want to create this type of event filter to automate an action for specific events. After you've created the filter, select it in the table and continue on in the wizard to select the action to run. (I'll explain the actions you can create in the next section.) At the end of the wizard, you can select the time range, which basically tells the automation plan when to pay attention to the incoming events. If events matching the event filter arrive outside of the specified time range, no actions will run.

Be aware that if you need to create an event filter, you'll have to spend some time learning the concepts. You can find helpful articles about IBM Systems Director event automation filters in the IBM System i and i5/OS Information Center at publib.boulder.ibm.com/iseries. In IBM Systems Director 6.1, creating a new event filter opens a Java applet and shows the older UI from IBM Director 5.2 (the predecessor to IBM Systems Director 6.1). It's a powerful UI, though not the easiest to navigate.

Automation Actions

Regardless of how simple or complex you make your automation plan and filtering, you can select any number of event actions to run. I recommend creating a few email actions, so that you can quickly set up a notification scheme for you and your team members.

Here's another tip: One request I get frequently is that users want Short Message Service (SMS)—or "texting"—support. Although IBM Systems Director doesn't provide SMS notifications, you can use the email-notification feature to send text messages to cell phones. For example, if I know I have an AT&T phone, I can simply email number@txt.att.net, and the specified phone number will receive a text message. This feature is very useful for basic phones that support text messaging but not data-access email. To find your provider, simply search "email to text message," and you'll see a variety of providers listed.

IBM Systems Director lets you automate many types of event actions, including common and advanced actions. The sidebar "IBM System Director Automation Actions" provides a complete list of these actions. The only difference in how they work is that you can create common actions directly in the Systems Director web UI, whereas the advanced actions currently launch the older Java UI to create the event action. However, once you've created any action, it's available to select through the web-based wizard.

Command Automation and Scripting

The most advanced, yet most powerful, automation feature that IBM System Director provides is the ability to use command definitions and command-line interface (CLI) scripting. You'll want to use command definitions to run OS-level commands or scripts on managed systems when events occur. These can be CL commands on IBM i, Linux/AIX commands, or full scripts that you've created and want to kick off based on when certain events arise. This is also how you automate using Systems Director's commands.

Tip: There is a Generate Event task on IBM Systems Director–managed systems that lets you create your own events for specific events you want to automate. This means if you have some unique event on your OS for which you want to automate an action, simply generate the event and give it a unique ID. Then in Systems Director create an event filter that will capture the event and use an automation plan to map it to run a command definition. This method provides the full-circle way to automate very specific OS problems that require specific OS solutions.

To automate running a command definition, you use the advanced action Start a task on the system that generated the event listed in "IBM System Director Automation Actions." Clicking to create the action opens a Java applet that lets you specify the command definition. I created a command definition called FixMe that runs a specific OS command. In Figure 5, you can see the FixMe command definition in the [Process Management][Command Definitions][FixMe] line. Although the process of creating the action is a little cumbersome, the result is quite powerful.

Finally, nearly all IBM System Director tasks that you can perform through the web UI are also available via the CLI. This lets you automate Systems Director tasks that don't appear directly in the Start a task action by creating a command definition for other system director tasks, such as Edit virtual servers. For example, if you get a threshold event from your IBM i, AIX, or Linux virtual server saying that the server's CPU utilization is too high, you can create a command definition with a Systems Director command inside of it, then call the command definition to change the virtual server settings. In this example, I run the following command, which I specified in my command definition, to increase the amount of allocated CPU to two virtual processors:

smcli chvs -A "cpu=2" vs_1

Get Automated

As you've seen, IBM Systems Director provides a number of powerful methods you can use to automate systems management in your data center. You can use any or all of these methods—task scheduling, email notifications, event automation plans, and customized commands and scripts—to offload manual systems management chores to IBM Systems Director. Letting IBM Systems Director do a larger share of the work of responding to system events may just free more of your time for strategic IT projects.

IBM System Director Automation Actions

Common event actions:

  • Start a program on a system.
  • Start a program on the system that generated the event.
  • Send an email to a mobile phone.
  • Start a program on the management server.
  • Send an email (Internet SMTP).
  • Send an alphanumeric page (using Telocator Alphanumeric Protocol—TAP).

Advanced event actions:

  • Static group: Add or remove group members.
  • Post to a newsgroup (via Network News Transfer Protocol—NNTP).
  • Send an SNMP trap reliably to an IBM Tivoli NetView host.
  • Send an IBM Tivoli Enterprise Console event.
  • Static group: Add or remove the event-generating system.
  • Send an SNMP inform request to an IP host.
  • Send an SNMP trap to an IP host.
  • Modify an event and send it.
  • Start a program using a timed alarm.
  • Set an event system variable.
  • Start a task on a specified system.
  • Generate an event using a timed alarm.
  • Start a task on the system that generated the event.
  • Log to a log file.
  • Send a numeric page.

ProVIP Sponsors

ProVIP Sponsors