From: Pegasus [MVP] on


"i dude eclair" <br26354(a)yahoo.co.uk> wrote in message
news:Xns9DB99C57955Cbr26354yahoocouk(a)74.209.136.83...
> "Pegasus [MVP]" <news(a)microsoft.com> wrote in
> news:ep2CF6pJLHA.5464(a)TK2MSFTNGP02.phx.gbl:
>
>>
>>
>> "i dude eclair" <br26354(a)yahoo.co.uk> wrote in message
>> news:Xns9DB9789105DAFbr26354yahoocouk(a)74.209.136.86...
>>> Hi
>>>
>>> our W2K3 servers are too small to justify 3rd party applications or
>>> hardware.
>>>
>>> Is there a way to send notifications to the LAN clients when the
>>> servers lose AC power?
>>>
>>> Ideally - inform them when AC is restored as well.
>>>
>>> thanx
>>>
>>
>> Every UPS I have purchased so far came with a CD with management
>> software that did all of the above. What does yours do? If it only
>> writes an event to the Event Logger then you could pick up these
>> events with a VB Script and generate some EMail message.
>>
>>
>
> the application delivered is only for local use
>
> Event ID is ambiguous (7035) - nothing specific to the UPS device

- Does the text for event 7035 tell you what happened?
- Is the the same ID and text for mains failure & mains restoration?

Since the mains supply to your server is not affected by a mains failure,
only the UPS will know what's happened. Your only chance at creating a
notification is to find an unambiguous signal from the UPS.

If this is not possible then a crude alternative would be to connect some
old IP-device to the network (e.g. a router or printer server). If it
derives its power supply from the same outlet as the UPS then the lack of a
ping response would signal a mains failure.

From: Shenan Stanley on
i dude eclair wrote:
> our W2K3 servers are too small to justify 3rd party applications or
> hardware.
>
> Is there a way to send notifications to the LAN clients when the
> servers lose AC power?
>
> Ideally - inform them when AC is restored as well.

When your server loses power (goes to UPS) - does your network switch still
have power?

--
Shenan Stanley
MS-MVP
--
How To Ask Questions The Smart Way
http://www.catb.org/~esr/faqs/smart-questions.html


From: i dude eclair on
"Shenan Stanley" <newshelper(a)gmail.com> wrote in
news:OwRmaerJLHA.2276(a)TK2MSFTNGP06.phx.gbl:

> i dude eclair wrote:
>> our W2K3 servers are too small to justify 3rd party applications or
>> hardware.
>>
>> Is there a way to send notifications to the LAN clients when the
>> servers lose AC power?
>>
>> Ideally - inform them when AC is restored as well.
>
> When your server loses power (goes to UPS) - does your network switch
> still have power?
>

yes
From: i dude eclair on
"Pegasus [MVP]" <news(a)microsoft.com> wrote in
news:ueZKGarJLHA.2276(a)TK2MSFTNGP06.phx.gbl:

>
>
> "i dude eclair" <br26354(a)yahoo.co.uk> wrote in message
> news:Xns9DB99C57955Cbr26354yahoocouk(a)74.209.136.83...
>> "Pegasus [MVP]" <news(a)microsoft.com> wrote in
>> news:ep2CF6pJLHA.5464(a)TK2MSFTNGP02.phx.gbl:
>>
>>>
>>>
>>> "i dude eclair" <br26354(a)yahoo.co.uk> wrote in message
>>> news:Xns9DB9789105DAFbr26354yahoocouk(a)74.209.136.86...
>>>> Hi
>>>>
>>>> our W2K3 servers are too small to justify 3rd party applications or
>>>> hardware.
>>>>
>>>> Is there a way to send notifications to the LAN clients when the
>>>> servers lose AC power?
>>>>
>>>> Ideally - inform them when AC is restored as well.
>>>>
>>>> thanx
>>>>
>>>
>>> Every UPS I have purchased so far came with a CD with management
>>> software that did all of the above. What does yours do? If it only
>>> writes an event to the Event Logger then you could pick up these
>>> events with a VB Script and generate some EMail message.
>>>
>>>
>>
>> the application delivered is only for local use
>>
>> Event ID is ambiguous (7035) - nothing specific to the UPS device
>
> - Does the text for event 7035 tell you what happened?
> - Is the the same ID and text for mains failure & mains restoration?
>
> Since the mains supply to your server is not affected by a mains
> failure, only the UPS will know what's happened. Your only chance at
> creating a notification is to find an unambiguous signal from the UPS.
>
> If this is not possible then a crude alternative would be to connect
> some old IP-device to the network (e.g. a router or printer server).
> If it derives its power supply from the same outlet as the UPS then
> the lack of a ping response would signal a mains failure.
>
>

7035 is a generic start/stop indicator - nothing specific for the device


but the description reads "The APC UPS Service service was successfully
sent a start control."




From: Pegasus [MVP] on


"i dude eclair" <br26354(a)yahoo.co.uk> wrote in message
news:Xns9DB9CB0C0101Bbr26354yahoocouk(a)74.209.136.86...
> "Pegasus [MVP]" <news(a)microsoft.com> wrote in
> news:ueZKGarJLHA.2276(a)TK2MSFTNGP06.phx.gbl:
>
>>
>>
>> "i dude eclair" <br26354(a)yahoo.co.uk> wrote in message
>> news:Xns9DB99C57955Cbr26354yahoocouk(a)74.209.136.83...
>>> "Pegasus [MVP]" <news(a)microsoft.com> wrote in
>>> news:ep2CF6pJLHA.5464(a)TK2MSFTNGP02.phx.gbl:
>>>
>>>>
>>>>
>>>> "i dude eclair" <br26354(a)yahoo.co.uk> wrote in message
>>>> news:Xns9DB9789105DAFbr26354yahoocouk(a)74.209.136.86...
>>>>> Hi
>>>>>
>>>>> our W2K3 servers are too small to justify 3rd party applications or
>>>>> hardware.
>>>>>
>>>>> Is there a way to send notifications to the LAN clients when the
>>>>> servers lose AC power?
>>>>>
>>>>> Ideally - inform them when AC is restored as well.
>>>>>
>>>>> thanx
>>>>>
>>>>
>>>> Every UPS I have purchased so far came with a CD with management
>>>> software that did all of the above. What does yours do? If it only
>>>> writes an event to the Event Logger then you could pick up these
>>>> events with a VB Script and generate some EMail message.
>>>>
>>>>
>>>
>>> the application delivered is only for local use
>>>
>>> Event ID is ambiguous (7035) - nothing specific to the UPS device
>>
>> - Does the text for event 7035 tell you what happened?
>> - Is the the same ID and text for mains failure & mains restoration?
>>
>> Since the mains supply to your server is not affected by a mains
>> failure, only the UPS will know what's happened. Your only chance at
>> creating a notification is to find an unambiguous signal from the UPS.
>>
>> If this is not possible then a crude alternative would be to connect
>> some old IP-device to the network (e.g. a router or printer server).
>> If it derives its power supply from the same outlet as the UPS then
>> the lack of a ping response would signal a mains failure.
>>
>>
>
> 7035 is a generic start/stop indicator - nothing specific for the device
>
>
> but the description reads "The APC UPS Service service was successfully
> sent a start control."

Well, this doesn't seem too hard. Try the script below. It is based on an
idea by the Scripting Guy.

iEventID = "'7035'" 'Watch out for the single/double quotes!

Set objWMIService = GetObject("winmgmts:{(Security)}\\.\root\cimv2")
Set colMonitoredEvents = objWMIService.ExecNotificationQuery _
("Select * from __InstanceCreationEvent Where " _
& "TargetInstance ISA 'Win32_NTLogEvent' " _
& "and TargetInstance.EventCode = " & iEventID)

Do
Set objLatestEvent = colMonitoredEvents.NextEvent
If InStr(1, objLatestEvent.TargetInstance.Message, "APC UPS", 1) > 0 _
Then SendMessage objLatestEvent.TargetInstance.Message
Loop

Sub SendMessage (sText)
WScript.Echo sText
schema = "http://schemas.microsoft.com/cdo/configuration/"
Set objEmail = CreateObject("CDO.Message")
cdoBasic=1
With objEmail
.From = "Joe(a)company.com"
.To = "Jack(a)company.com"
.Subject = "RAID disk failed"
.Textbody = Now & ": " & sText
With .Configuration.Fields
.Item (schema & "sendusing") = 2
.Item (schema & "smtpserver") = "mail(a)company.com"
.Item (schema & "smtpserverport") = 25
.Item (schema & "smtpauthenticate") = cdoBasic
End With
.Configuration.Fields.Update
.Send
End With
End Sub