- CheckMates
- :
- Products
- :
- General Topics
- :
- Syslog alert for power supply failure
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Are you a member of CheckMates?
×- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Syslog alert for power supply failure
I have been trying to find the file or parameter responsible for monitoring of power supply status on Check Point firewalls.
In F5 products, it can be modifies using /etc/alertd/alert.conf file, However, I cannot find any option for Check Point.
Purpose is generate syslog message and not to use cp_monitor or snmp monitoring for power supply failure.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
More elegant one-Liner:
if cpstat os -f power_supply | grep -qi "down"; then logger -s -p kern.crit -t kernel 'PSU is down !!! Please replace faulty PSU.'; fi
This command will check if output of "cpstat os -f power_supply" contains string "down" (not case sensitive) and in case yes, issue command logger with facility kern and priority crit to print desired text in /var/log/messages in order to be caught by any Syslog server as critical message (or check it some other way within logs).
Just schedule this one line using cron job every day and you have monitoring of PSU in place 🙂
Please note that there are some exceptions where PSU is considered as down, but not really:
Another solution is to use snmpwalk to get status of PSUs, or create trap for it:
OID Name: powerSupplyStatus
OID Number: 1.3.6.1.4.1.2620.1.6.7.9.1.1.2
Jozko Mrkvicka
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Afaik such a feature is based on hardware sensor information, e.g. see sk111273 for using SNMP where Smart-1 25, 50 and 150 hardware does not support sensors for power supply and RAID failure. So please specify where you need that!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You could use GAiA's job scheduler to monitor it via a simple One-Liner like this:
clish -c 'show sysenv all' | grep Power | awk '{print $3": "$4}' | sed 's/#//' | tr '\n' ' ' | sed 's/Up /Up /'
and have it sending a message to syslog if the status is not Up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nice One-Liner.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
More elegant one-Liner:
if cpstat os -f power_supply | grep -qi "down"; then logger -s -p kern.crit -t kernel 'PSU is down !!! Please replace faulty PSU.'; fi
This command will check if output of "cpstat os -f power_supply" contains string "down" (not case sensitive) and in case yes, issue command logger with facility kern and priority crit to print desired text in /var/log/messages in order to be caught by any Syslog server as critical message (or check it some other way within logs).
Just schedule this one line using cron job every day and you have monitoring of PSU in place 🙂
Please note that there are some exceptions where PSU is considered as down, but not really:
Another solution is to use snmpwalk to get status of PSUs, or create trap for it:
OID Name: powerSupplyStatus
OID Number: 1.3.6.1.4.1.2620.1.6.7.9.1.1.2
Jozko Mrkvicka
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Interesting "stattest" command which I was not aware about. But since it still uses SNMP OIDs, which is mandatory to be configured, not sure if there can be different result from snmpwalk vs. stattest.
Jozko Mrkvicka
