Shut down if no ping response

osiala

Cadet
Joined
Jun 1, 2022
Messages
9
Hello,
I have two physical servers, one Windows server with a Eaton UPS connected to it with USB and then a physical TrueNAS Core server.

I want my TrueNAS server to power down when my Windows server has been powered off by the UPS.

What would be the best way to accomplish this? I am thinking of a script that will be sending pings to the Windows server, and if five pings are missed, the TrueNAS server will power off.
Thanks!
 

Dice

Wizard
Joined
Dec 11, 2015
Messages
1,410
What would be the best way to accomplish this?
Setup the windows server NUT (network ups tools) as server/master, and setup the TN box as 'client'.
Then NUTserver will broadcast a 'I'm on battery - just as you know' to all clients. Then each client can be configured to react differently.
TN can be set as client or server, however far less customizable than a stand alone NUT setup.
 

osiala

Cadet
Joined
Jun 1, 2022
Messages
9
Setup the windows server NUT (network ups tools) as server/master, and setup the TN box as 'client'.
Then NUTserver will broadcast a 'I'm on battery - just as you know' to all clients. Then each client can be configured to react differently.
TN can be set as client or server, however far less customizable than a stand alone NUT setup.
Thank you. I have looked at NUT but I cannot seem to find a way to make Windows the master/host, am I missing something?
 

Dice

Wizard
Joined
Dec 11, 2015
Messages
1,410
Keep looking at NUT.
An option would be to run TN as master and connect the windows box as client.
Another option is to run NUT on a raspberry pi for example, and let both boxes run as client.
TechnoTim on youtube has an excellent starting point video (although it is not quite copy/paste).

I don't do Windows.
 

osiala

Cadet
Joined
Jun 1, 2022
Messages
9
Keep looking at NUT.
An option would be to run TN as master and connect the windows box as client.
Another option is to run NUT on a raspberry pi for example, and let both boxes run as client.
TechnoTim on youtube has an excellent starting point video (although it is not quite copy/paste).

I don't do Windows.
I'll keep looking. What would happen in a power outage where all networking is lost? Will WinNUT-client power the system down or will it just idle looking for the UPS?
 

Dice

Wizard
Joined
Dec 11, 2015
Messages
1,410
If all networking is lost, NUT has a flag you can set for scenarios where connectivity to the UPS is lost, and what to act at that point.
I understand it might not be setup like so, but the easy solution would be to have all three (inc networking) on UPS.
 

osiala

Cadet
Joined
Jun 1, 2022
Messages
9
If all networking is lost, NUT has a flag you can set for scenarios where connectivity to the UPS is lost, and what to act at that point.
I understand it might not be setup like so, but the easy solution would be to have all three (inc networking) on UPS.
I would have no way to connect my router to the UPS, but a switch where both systems are connected to will be possible to connect. Would they still be able to communicate without the router and just a switch?
 

Dice

Wizard
Joined
Dec 11, 2015
Messages
1,410
Generally yes (requires an advanced network setup you'd be aware of, to make it not work).

There is no trickery. NUT just needs to talk to clients over network, and to the UPS(s) over USB.
Remember N in NUT Is for Network ;)
 

Paul5

Contributor
Joined
Jun 17, 2013
Messages
117
I would have no way to connect my router to the UPS, but a switch where both systems are connected to will be possible to connect. Would they still be able to communicate without the router and just a switch?

I have been using this script since 2013 on all FN/TN versions without fault, No IP's and NAS shutsdown. Read it well, add your IP's to monitor, your shutdown time lapse and create a Cron Job to run the script every few minutes. It's very well done and self explanatory.

 
Top