Operating System - HP-UX
1753528 Members
5103 Online
108795 Solutions
New Discussion юеВ

UPS Firewall and sendmail

 
Susan Prosser
Advisor

UPS Firewall and sendmail

Hi
We have recently bought and had installed an APCC UPS system. It, and the main computer room reside behind a firewall. We access the UPS menus by through the firewall and pointing the IE5 brower at the UPS's ip addess.
In order to recieve alerts from the UPS I need to configure the APCC system to send me emails via our Exchange Server.
Any ideas on how we could do this please?? TIA
3 REPLIES 3
Steven Sim Kok Leong
Honored Contributor

Re: UPS Firewall and sendmail

Hi,

Your UPS runs HTTPD. Does it run SNMPD as well?

I snmpquery the MIBs on the UPS over the network to monitor the UPS load, the UPS battery time remaining and the UPS temperature. When the threshold is exceeded, a paging alert and email is sent to me.

For your case, if your UPS runs only HTTPD, you can make use of lynx (need to compile on HP-UX) and interface it with your scripts to monitor such statistics.

# lynx -dump http://...

This will provide you with the HTML output which you can parse using sed, awk, cut or perl etc. text manipulation tools.

Hope this helps. Regards.

Steven Sim Kok Leong

Paula J Frazer-Campbell
Honored Contributor

Re: UPS Firewall and sendmail

Hi Kevin

ups_mond is not able to send email:-

ups_mond uses the syslog message logging facility to log these
occurrences (see syslog(3C)). Messages are written to the console if
ups_mond is unable to send them to syslogd. Critical messages (see
DIAGNOSTICS section) are also sent to the console.

What you can do is write a script to monitor the syslog file for ups messages and have the script mail you the error (using mailx).

Along the lines of:-

---------------------------------------
#!/bin/sh
cat /var/adm/syslog/syslog.log | grep UPS | grep CRITICAL > /tmp/UPSCRITICAL

mailx -s "UPS CRITICAL WARNING" me@my-company.com
# after sending clean up syslog.log appending to a ups warning log
# Remove the error from syslog
cat /var/adm/syslog/syslog.log | grep -v UPS | grep -v CRITICAL > /var/adm/syslog/syslog.log.clean
# Copy log with error to history and email to to sysadmin
mailx ???s ???UPS ERROR??? me @my-company.com cp /var/adm/syslog/syslog.log /var/adm/syslog/syslog.last
# Put clean log in place so on next check same error not reported.
cp /var/adm/syslog/syslog.log.clean /var/adm/syslog/syslog.log
--------------------------------------


Paula


If you can spell SysAdmin then you is one - anon
Paula J Frazer-Campbell
Honored Contributor

Re: UPS Firewall and sendmail

Kevin

I forgot to put a check to see if /tmp/UPSCRITICAL actually contains data - if not then no further action is required.


HTH

Paula
If you can spell SysAdmin then you is one - anon