Com base em um dos comentários sobre setroubleshoot
você pode instalar este pacote extra da seguinte forma:
$ sudo yum install -y setroubleshoot
Uma vez instalado, dê uma olhada no seu arquivo de configuração, especificamente nesta seção:
[email]
# recipients_filepath: Path name of file with email recipients. One address
# per line, optionally followed by enable flag. Comment character is #.
recipients_filepath = /var/lib/setroubleshoot/email_alert_recipients
Agora, vá em frente e crie o arquivo mencionado:
$ echo "[email protected]" > /var/lib/setroubleshoot/email_alert_recipients
Em seguida, reinicie / inicie o serviço:
$ sudo systemctl start setroubleshoot
Opções avançadas
setroubleshoot
também fornece a capacidade de filtrar os alertas do SE por meio do arquivo email_alert_recipients:
[email protected] filter_type=after_first
Esses filtros são um pouco difíceis de brilhar nos documentos , mas são os seguintes:
Ignore After First
Alert::
- This is the default. The address will receive an alert only the first time it fires. Email alerts will be filtered for the alert in question for all subsequent firings of the alert.
Never Ignore
::
- An email alert will be sent for every instance of every alert to this address.
Ignore Always
::
Email alerts will never be sent for this address. One can use this to temporarily disable alerts to an address.
But I don't have a desktop session on the node I want to receive email alerts for? For instance how can I monitor a server?
You can directly edit the file
/var/lib/setroubleshoot/email_alert_recipients
. This is the file the above GUI is modifying. The format of the file is line based, the hash (#) character is the comment character, the comment extends to the end of the line, blank lines are ignored.NOTE: Addresses are one per line, optionally following the address (separated by whitespace) are options in the form name=value. Currently there is only one option:
filter_type
::after_first
,never
, oralways
I heavily edited the above snippet, but tried to keep the "spirit" of this section from the FAQ.