Following up from one of my earlier posts on SNMP traps, I often get asked on how to receive email alerts with PowerFlex?
For folks that are on PowerFlex rack / PowerFlex appliance, this should be relatively straight forward by using the Alert Connector feature in PowerFlex Manager.
Please see the high level detail of Alerting in the PowerFlex rack system here:
Within PowerFlex Manager, the Alert Connector needs to be setup correctly, along with the nodes themselves:
The Alert connector can be configured as to what level alerts should be triggered on (default Critical):
The important options here in my opinion is to also set for Email alerts – multiple recipients can be included on those emails for additional visibility of what is being triggered and sent. This is a perfect way to test and verify exactly what’s happening.
After all this has been checked and tested, you should be getting alerts for:
|PowerFlex storage layer||Critical alerts by default|
|PowerFlex nodes hardware errors||Critical alerts by default|
|CloudLink for D@RE||You must manually configure CloudLink to send alerts to PowerFlex Manager.|
|Cisco switches||Cisco dial-home alerts are sent separately via Cisco Smart Call Home|
What about for us folks that aren’t using PowerFlex Manager?
With the current version 3.6, this is where it requires a bit of additional work and it’s likely in conjunction with my earlier posts on SNMP traps.
- Get your SNMP traps working to a small Linux VM or the like. (I used a Fedora machine).
- Once those traps are working, you will then need to ensure sendmail or another mail tool is available on this host and configured properly. For sendmail, I had to to follow these instructions to for the SMTP relay to get it working in my lab. (I deleted the 3rd line about the TCP port though, had to leave it as default).
- Use this basic script, and then “chmod +x” the file. I put this in “email_alert.sh”
#!/bin/bash length=0 while sleep 60 # use wanted delay here do new_length=$(find "$1" -printf "%s") if [ $length -lt $new_length ] then tail --bytes=$[new_length-length] "$1" | mail -s "PowerFlex Alert $(hostname -f)" firstname.lastname@example.org fi length=$new_length done
- Give it a try! —- # ./email_alert.sh /var/log/snmptrapd.log
- You should then hopefully start receiving emails like this:
- These emails will continue by default every 60 seconds until the condition triggering the alert has been resolved. So please set according to your tolerance level!
- I haven’t gotten around to it yet, but making this into a cron job or converting it to a service shouldn’t be too much trouble, and is what would be needed to make this into a longer term email alerting solution.
Do you have another method of monitoring PowerFlex alerts via email? Our Grafana method also comes to mind for certain threshold alerts. Please us know in the comments if you do.