APC Smartups 3000 FreeNAS integration

Status
Not open for further replies.

Terry Wilson

Explorer
Joined
Aug 10, 2016
Messages
63
Currently we have FreeNAS 9.10.1-U1 running well and have been give a SmartUPS 3000 with the network management card. We are using the FreeNAS as a iscsi datastore to hold all our VM's in Vmware 6.0 and have integrated the power management feature in APC with the vsphere to shutdown the VM's when the UPS is on battery and it has 25% life left in the battery. This is done with APC's VM appliance that works well and is fully integrated with the vcenter.

Now, with that out of the way we want to be able to shutdown the FreeNAS using ??? Batch file? Some integration within FreeNAS communicating directly with the APC network management card or Vcenter???? Surely someone has done this and I don't have to re-invent the wheel???

Looking for some guidance here and or suggestions from the experts here.....
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
FreeNAS will shutdown safely if you just give it a shutdown signal (i.e. Push the power button on a real box). Can VMware not do that?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Does your APC unit also have a USB port? If so, plug it into your FreeNAS box and configure the UPS service that way. That's what I'm doing with my APC unit.
 

Dice

Wizard
Joined
Dec 11, 2015
Messages
1,410
IIRC @joeschmuck messed around with this in his thread in the off-topic section..?
 

Terry Wilson

Explorer
Joined
Aug 10, 2016
Messages
63

Terry Wilson

Explorer
Joined
Aug 10, 2016
Messages
63
Does your APC unit also have a USB port? If so, plug it into your FreeNAS box and configure the UPS service that way. That's what I'm doing with my APC unit.
Yeah, its a weird Cat 5 USB cable which I have never seen before. Have one on order $20 from Amazon Smartups 3000 USB / Network cable. Looks like literally a USB cable and standard USB female on one end and Cat 5 on the other... .only APC would do that.... sigh... Standards, who needs them? (said the APC Engineer).

I wanted to get this done before the Hurricane hits here Saturday but looks like I will be out of luck, will not arrive until Monday. If anyone knows the pinout I am willing to try and make one.

UPDATE - Found the pinout - http://pinoutsguide.com/UPS/apc_usb_cable_pinout.shtml

Yeaaahh little problem, anyone got a spare 10 pin RJ50 1ying around? hahahahaa

So my guess is order will have to wait to arrive before this works, or next stop serial connection and try and make that work. Before I head down that road is the network card not supported at all?
 
Last edited:

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
Yeah, its a weird Cat 5 USB cable which I have never seen before. Have one on order $20 from Amazon Smartups 3000 USB / Network cable. Looks like literally a USB cable and standard USB female on one end and Cat 5 on the other... .only APC would do that.... sigh... Standards, who needs them? (said the APC Engineer).

I wanted to get this done before the Hurricane hits here Saturday but looks like I will be out of luck, will not arrive until Monday. If anyone knows the pinout I am willing to try and make one.

UPDATE - Found the pinout - http://pinoutsguide.com/UPS/apc_usb_cable_pinout.shtml

It's actually an RJ50, two extra pins.
 

Terry Wilson

Explorer
Joined
Aug 10, 2016
Messages
63
yeah
It's actually an RJ50, two extra pins.
Sadly I just discovered that... I also assume any time spent attempting to communicate with the UPS network card is a waste of time? Last option if that is the case is serial and not sure how well that works in UNIX
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
yeah

Sadly I just discovered that... I also assume any time spent attempting to communicate with the UPS network card is a waste of time? Last option if that is the case is serial and not sure how well that works in UNIX

Which card have you got?
 

Spearfoot

He of the long foot
Moderator
Joined
May 13, 2015
Messages
2,478
@Terry Wilson, sounds like have a good plan of attack with the USB approach...

For a stop-gap, short-term fix just to get through the hurricane... have you considered setting up one of your VM's to simply send a shutdown command to the FreeNAS system via SSH?
 

Terry Wilson

Explorer
Joined
Aug 10, 2016
Messages
63
@Terry Wilson, sounds like have a good plan of attack with the USB approach...

For a stop-gap, short-term fix just to get through the hurricane... have you considered setting up one of your VM's to simply send a shutdown command to the FreeNAS system via SSH?

Wow, so simple and great idea... like the paperclip. So obvious yet I missed it... agggghhh

Thanks, I will jump on that.
 

Terry Wilson

Explorer
Joined
Aug 10, 2016
Messages
63

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
SmartUPS 3000 with a 9630 network management card

I assume it can be made to work. Unfortunately my card seems busted so haven't been able to do anything with it :(


(Red led = failure)
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I haven't tried communicating with my UPS using the network interface on my FreeNAS box, but setting it up on my pfSense box was simplicity itself. IIRC, the driver was ups-snmp or something similar. Gave it the host name of the UPS, and it was good to go. Sorry about the misdirection on the USB cable, I'd forgotten the wacky APC cable.
 

Terry Wilson

Explorer
Joined
Aug 10, 2016
Messages
63
I assume it can be made to work. Unfortunately my card seems busted so haven't been able to do anything with it :(


(Red led = failure)

I know the feeling... took me 3 tries to get a good one on ebay. I have it working on Vmware 6 via an appliance and Spearfoot brought up a good idea, I could script it via ssh to shutdown as part of the vmware shutdown, maybe even within the mgmt portal on APC's mgmt interface. I need to play around with it, was hoping I would be so lucky as to use the GUI to interface with the card and 2 minutes later be done =o)
 

Terry Wilson

Explorer
Joined
Aug 10, 2016
Messages
63
I haven't tried communicating with my UPS using the network interface on my FreeNAS box, but setting it up on my pfSense box was simplicity itself. IIRC, the driver was ups-snmp or something similar. Gave it the host name of the UPS, and it was good to go. Sorry about the misdirection on the USB cable, I'd forgotten the wacky APC cable.
yeah, found that (APC ups 3 (various) AP9630 SNMP monitoring card (snmp-ups privProtocol=AES)) and it appears (or leads me to think) that the module is snmp based (so IP based)/ So the other option would be to configure this in slave mode?
 
Last edited:

Terry Wilson

Explorer
Joined
Aug 10, 2016
Messages
63
After spending some time with the scripting tonight I realize this is not going to work as I can't control which VM or esxi host shuts down last since the 2 esxi host are in a HA cluster and depending on which VM and load state determines at any moment in time which esxi host will shutdown last.

So ideally what I would like to accomplish is to have the FreeNAS server poll the UPS and when it see's that that the UPS is in a low power mode it starts a shutdown. This would cover me as the VM's and esxi host would have long since shutdown and there will be no iscsi traffic on the datastores and FreeNAS can then do a clean shutdown before the UPS batteries die completely.

To accomplish this I will need to use the 9630 network management card in the APC UPS, or the usb / RJ50 cable (on order). knowing we are about to get hammered with this massive hurricane I am under a time crunch and the cable will not make it here in time so its the 9630 or a sleeping bag in the server room ;(
 
Status
Not open for further replies.
Top