KS-Soft. Network Management Solutions
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister    ProfileProfile    Log inLog in 

UPS power check

 
Post new topic   Reply to topic    KS-Soft Forum Index -> Other
View previous topic :: View next topic  
Author Message
Mogge



Joined: 04 Mar 2004
Posts: 83
Location: Denmark

PostPosted: Fri Jun 04, 2004 1:20 am    Post subject: UPS power check Reply with quote

Hi!

A little question...

How do I make a check on my APC Smart-UPS (connected to the server by a serial cable) if itīs on battery or on normal power?

It writes in the Event log but itīs only a "write when event happens" and then again "write when event happens". e.i. It can write a log entry somthing like "APC on battery" and then when power returns "APC on normal power".

I have tried with a NTLog scan but .... no....

Can anyone help me?

Kind regards
Mogge
Back to top
View user's profile Send private message MSN Messenger
timn



Joined: 20 Nov 2003
Posts: 184
Location: United States

PostPosted: Mon Jun 07, 2004 12:09 pm    Post subject: Reply with quote

Mogge

Can't tell you about the SmartUPS, however we have 3 APC Symmetra 16000s.

We monitor the Output Status OID from the Powernet MIB:

(1.3.6.1.4.1.318.1.1.1.4.1.1.0)

Return codes for output status are:

1 = Unknown
2 = On Line
3 = On Battery
4 = On Smart Boost
5 = Timed Sleeping
6 = Software Bypass
7 = Off
8 = Rebooting
9 = switched Bypass
10 = Hardware Failure Bypass
11 = Sleeping Until Power Return
12 = On Smart Trim
Back to top
View user's profile Send private message
Mogge



Joined: 04 Mar 2004
Posts: 83
Location: Denmark

PostPosted: Mon Jun 07, 2004 2:02 pm    Post subject: Reply with quote

Hi

Just to be on the safe side... The UPS are not connected to any network - only directly to a server thru a serial cable.

Is this still a surgestion then? If this should work I have to ask the server ...???

Regards
/Mogge
Back to top
View user's profile Send private message MSN Messenger
KS-Soft



Joined: 03 Apr 2002
Posts: 12795
Location: USA

PostPosted: Mon Jun 07, 2004 3:19 pm    Post subject: Reply with quote

Any software comes with UPS? Probably it provides some standard interface (e.g. SNMP)
Back to top
View user's profile Send private message Visit poster's website
Mogge



Joined: 04 Mar 2004
Posts: 83
Location: Denmark

PostPosted: Mon Jun 07, 2004 3:34 pm    Post subject: Reply with quote

Sure, but it dosn't give any help on the SNMP part...

Just a normal monitoring / setup program.

Any idea on the NT Log part ?

It write in the NT log when it gets an event but itīs not easy to make a "On power / on batteri" of a NT log...

/Mogge
Back to top
View user's profile Send private message MSN Messenger
KS-Soft



Joined: 03 Apr 2002
Posts: 12795
Location: USA

PostPosted: Tue Jun 08, 2004 7:48 am    Post subject: Reply with quote

I just compiled and uploaded simple utiltity that can check power status and return appropriate exit code.
www.ks-soft.net/download/powercheck.exe
Quote:

Usage:> powercheck.exe [-ls | -bf | -bl]
Options:
-ls - Line Status. Utility will return EXITCODE with following meanings:
1 = ONLINE
2 = BACKUP POWER
0 = OFFLINE
255= Unknown
-bf - Battery Flag. Utility will return EXITCODE with following meanings:
1 = HIGH
2 = LOW
4 = CRITICAL
8 = CHARGING
9 = CHARGING. Level is HIGH
10 = CHARGING. Level is LOW
12 = CHARGING. Level is CRITICAL
128= NO BATTERY
255= Unknown
-bl - Battery Level. EXITCODE will represent battery level (%)
255= Uknown


If your UPS provides necessary information to Windows, you will be able to use External test method to perform check. Also you may use Shell Script test method but in this case you will need to write simple script (e.g. BAT file) to check exit codes.

Utility should work on Windows 98, ME, 2000, XP, 2003. It will not work on Windows NT
Utility checks power status on local system only. So, if you want to monitor remote system, install RMA and utility on that system.

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
Mogge



Joined: 04 Mar 2004
Posts: 83
Location: Denmark

PostPosted: Fri Jun 11, 2004 1:45 am    Post subject: Reply with quote

I donīt know what to say, Alex...

You amaze me again and again...
Quote:

I just compiled and uploaded simple utiltity


This is simply fantastic...!

Now comes the time where I have to tell you that the APC Smart-UPS use their own software to control the UPS so actually your utility dosn't work. It will only work on a Windows controlled UPS.

I contacted the support at APC and got a long answer return telling me that I can connect to a WEB page on the Smart-UPS (actually the Agent installed on the server) even that the UPS is connected thru a serial cable. The web page give me the possibility to configure the UPS in details so a lot of good possibilities has been discovered. Now I have a oppotunity to let HM check the web page for the information - if it wasn't for the fact that the web page demands a username/password on a seperate page before displaying the desired page. Is there any way to get around this?

There is another way to get the alert. The UPS Agent can send a eMail to a mail account with an alert text. What about an eMail interface in HM? You know - HM reads the mails and then set/reset an alert according to the text in the mail? Maybe this could also be used to control some of the functionalities in HM...

Just a surgesstion.

Very kind regards
Mogens B. Lassen[/b]
Back to top
View user's profile Send private message MSN Messenger
KS-Soft



Joined: 03 Apr 2002
Posts: 12795
Location: USA

PostPosted: Fri Jun 11, 2004 4:59 pm    Post subject: Reply with quote

Quote:
Now I have a oppotunity to let HM check the web page for the information - if it wasn't for the fact that the web page demands a username/password on a seperate page before displaying the desired page. Is there any way to get around this?


Probably its possible. You should check HTML code of the page (page that asks username and password). Page contains some form that sends GET or POST request to UPS's web server. Setup HTTP test using the same URL with your username and password as parameters.
E.g. URL may look like http://localhost/ups/upsstatistics.php?username=myname&password=mysecretword

Quote:
There is another way to get the alert. The UPS Agent can send a eMail to a mail account with an alert text. What about an eMail interface in HM? You know - HM reads the mails and then set/reset an alert according to the text in the mail? Maybe this could also be used to control some of the functionalities in HM...


Sorry, it will not work. HostMonitor can send mail but it does not retrieve any.

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    KS-Soft Forum Index -> Other All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

KS-Soft Forum Index