The logic module of the firmware of NetPing devices is designed for a simple automation and can perform such tasks as maintaining micro climate, controlling automatic switching on/switching off the backup equipment and much more. A logic works on the basis of the rules programmed by the user via a web interface.
Task: Sometimes situations of unplanned deenergizing of a server room take place, for example, because of a power line failure. After eliminating failures, all server equipment should be switched on in a certain consequence, with the aim to ensure a correct start of corporate services in the network and decrease the load to the uninterruptible power supply sources for the time of switching the servers on.
Let us examine the way of solving this task using a NetPing 4/PWR-220 v4/SMS power distribution unit with the updated module "Logic" that has been implemented in the firmware starting from the version DKSF 54.3.2.
For example, we have the next connection of servers to the NetPing 4/PWR-220 v4/SMS device:
- Socket 1 – a main domain controller is connected (AD, DNS, DHCP);
- Socket 2 – a secondary domain controller is connected (AD);
- Socket 3 – an Exchange mail server is connected;
- Socket 4 – a file server is connected
Operation Algorithm of the Solution:
- When there is an external power supply at the input of NetPing 4/PWR-220 v4/SMS, a device will automatically load a main domain controller;
- As soon as a main domain controller loaded (Pinger 1 determines the presence of a controller in the network according to the presence of ICMP echo responses from a server to the requests of Pinger 1), and a secondary domain controller is launched;
- As soon as a secondary domain controler loaded, (Pinger 2 checks the presence of a secondary controller in the network by the presence of ICMP echo responses from a server to the requests of Pinger 2), a mail server is launched;
- 300 seconds after the start of switching on a mail server, a file server is launched.
Configuring a NetPing 4/PWR-220 v4/SMS Power Distribution Unit
Let us consider that a NetPing 4/PWR-220 v4/SMS device is configured for the operation in your local network. It is possible to see the configuration of NetPing 4/PWR-220 v4/SMS in the documentation for a device.
First, let us configure «Pingers» to determine accessibility of servers in the network. It is possible to configure no more than two pingers – «PINGER 1», «PINGER 2».
Go to the page «Logic»:
Configuration of pingers is located at the page «Logic» below the block «Rules»:
where:
Address – is the address of a device that is tested for accessibility. An empty line disables polling. On default: empty line. In our case, there is a need to take into account that a DNS server of the organization for the moment of the start of the operation of pinger will be unavailable yet, therefore it is recommended to indicate IP addresses of servers. In our example, 192.168.0.1 is an IP address of a main domain controller, 192.168.0.2 is an IP address of a secondary domain controller.
Polling Period, s (5-900) – a value is chosen taking into account how quickly switching a server on must be discovered. If there is no response, ICMP echo (ping) is repeated after a timeout is over, and not when the next polling period starts. On default: 15.
Ping Timeout, ms (100-10000) – is the waiting time for a response to «ping». A timeout is chosen considering the operation speed of local network and the frequency of repeating unresponded «pings». If there is no response to «ping» when a specified timeout is over, sending «ping» is repeated immediately. If there is no response after 5 repeated sending, a status of a pinger is changed to «no reply», and repeats are stopped until the next polling period starts. On default: 1000.
Status – possible values are: «responding», «no reply», «-». If polling is not completed, a status can be undefined. In tis case, the rules that depend on a pinger status do not form any commands and their outputs are managed by other rules or keep a previous status. A pinger status is updated automatically nearly 4 times a minute.
Let us configure pingers as in the example, and click the button «Apply changes».
Now, let us specify a logic of actions for a device when a power supply is restored for sequential connecting the servers according to the algorithm described above.
Go back to the top of the page «Logic».
Check checkbox «Enable» (1) and specify the first rule in the block «Rules»:
When a power supply is restored, switch on a relay 1, to which a domain controller is connected. Check the first checkbox (2) and specify a condition as in the example below:
The second rule is as follows:
When a main domain controller starts responding to ICMP requests from the pinger 1, there is a need to switch on the relay 2, to which a secondary domain controller is connected. Check the second checkbox and specify the condition as in the example:
The third rule:
When a backup domain controller starts responding to ICMP requests from pinger 2, there is a need to switch on the relay 3, to which an Exchange mail server is connected. Check the third checkbox and specify a condition as in the example:
Fourth and fifth rules:
After switching on the third relay, to which an Exchange mail server is connected, start timer/counter 1 . When a timer reaches the value of 300 seconds, switch on the fourth relay, to which a file server is connected. Check the fourth and the fifth checkboxes and specify the condition as in the example below:
After the configuration of rules is completed, click the button «Apply changes» (1) in the block «Rules» and «Apply changes» (2) in the block «Logic»:
As a result of the configurations described above, the servers will be switched on in a specified sequence when the power supply is restored.