Passer au contenu principal
  • Passer des commandes rapidement et facilement
  • Afficher les commandes et suivre l’état de votre expédition
  • Créez et accédez à une liste de vos produits
  • Gérer vos sites, vos produits et vos contacts au niveau des produits Dell EMC à l’aide de la rubrique Gestion des informations de l’entreprise.

Dell OpenManage Server Administrator Version 7.3 User's Guide

Setting Alert Actions For Systems Running Supported Red Hat Enterprise Linux And SUSE Linux Enterprise Server Operating Systems

When you set alert actions for an event, you can specify the action to display an alert on the server. To perform this action, Server Administrator sends a message to /dev/console. If the Server Administrator system is running an X Window System, the messsage is not displayed. To see the alert message on a Red Hat Enterprise Linux system when the X Window System is running, you must start xconsole or xterm -C before the event occurs. To see the alert message on a SUSE Linux Enterprise Server system when the X Window System is running, you must start a terminal such as xterm -C before the event occurs.

When you set Alert Actions for an event, you can specify the action to Broadcast a message. To perform this action, Server Administrator executes the wall command, which sends the message to everybody logged in with their message permission set to Yes. If the Server Administrator system is running an X Window System, the message is not displayed by default. To see the broadcast message when the X Window System is running, you must start a terminal such as xterm or gnome-terminal before the event occurs.

When you set Alert Actions for an event, you can specify the action to Execute application. There are limitations on the applications that Server Administrator can execute. To ensure proper execution:

  • Do not specify X Window System based applications because Server Administrator cannot execute such applications properly.
  • Do not specify applications that require input from the user because Server Administrator cannot execute such applications properly.
  • Redirect stdout and stderr to a file when specifying the application so that you can see any output or error messages.
  • If you want to execute multiple applications (or commands) for an alert, create a script to do that and insert the full path to the script in the Absolute path to the application box.
Example 1: ps -ef >/tmp/psout.txt 2>&1

The command in Example 1 executes the application ps, redirects stdout to the file /tmp/psout.txt, and redirects stderr to the same file as stdout.

Example 2: mail -s "Server Alert" admin </tmp/alertmsg.txt>/tmp/mailout.txt 2>&1

The command in Example 2 executes the mail application to send the message contained in the file /tmp/alertmsg.txtto the Red Hat Enterprise Linux user or SUSE Linux Enterprise Server user, and Administrator, with the subject Server Alert. The file /tmp/alertmsg.txt must be created by the user before the event occurs. In addition, stdout and stderr are redirected to the file /tmp/mailout.txt in case an error occurs.


Évaluez ce contenu

Précis
Utile
Facile à comprendre
Avez-vous trouvé cet article utile ?
0/3000 characters
  Veuillez attribuer une note (1 à 5 étoiles).
  Veuillez attribuer une note (1 à 5 étoiles).
  Veuillez attribuer une note (1 à 5 étoiles).
  Veuillez indiquer si l’article a été utile ou non.
  Les commentaires ne doivent pas contenir les caractères spéciaux : <>()\