This service is used to configure and manage the script that checks the network connectivity of OpenPort.
This service is activated when OpenPort is set up on a DINGO device. The check is executed at regular intervals and will reboot the DINGO device, if network problems are continuous.
To check the status on OpenPort check; select the OpenPort check service and click the "Log..." button. See screenshot.
Name: OpenPort check
Description: Check the OpenPort connectivity.
Configuration file: /opt/GoIoT/DinGo/bin/network/rn_check_openport.conf
Log command: cat /var/log/messages | grep 'GoIoT: Openport'
Status command: grep -F 'rn_check_openport.sh' /etc/crontab && (cat /etc/crontab | grep rn_check_openport.sh | grep '#' && echo '(dead)' || echo '(running)') || echo '(dead)'
To configure the OpenPort check; select the OpenPort check service and click the "Main config. file..." button. See screenshot.
The configuration items are:
- API_TOKEN: This is a token that belongs to the Go-IoT account. The token is used by the check-script to check the status at OpenPort.
- ENABLE_OPENPORT_CHECK: Determines if the script should be executed.
- ENABLE_REBOOT_ON_NETWORK_PROBLEMS: Determines if the script should try and reboot the device, if there are network problems.
- RETRIES_BEFORE_REBOOT_ON_NETWORK_PROBLEMS: Determines how often the script should execute and encounter network problems before rebooting the device. The script executes hourly - so 5 means 5 hour of network problems before rebooting. If the network problem disappears during script execution, then the counter is reset.
- RETRIES_BEFORE_REBOOT_ON_INACTIVE_PORT: Determines how often the script should execute and encounter an inactive port before rebooting the device. E.g. if ports 22 and 80 should be open, and 22 becomes inactive, then that becomes a connectivity problem that should not happen. The script executes hourly - so 5 means 5 hour of inactive port before rebooting. If the inactive port network problem disappears during script execution, then the counter is reset.
- PREVENT_REBOOT_GREATER_THAN_MINUTE and PREVENT_REBOOT_LESS_THAN_MINUTE: If set to 55 and 5, then this prevents the script from rebooting between e.g. 11:55 and 12:05, because this is the period where logging usually takes place.
Any changes to the configuration file will take immediate effect.
The frequency of the OpenPort check is defined by the crontab service. Add this entry to the cron-table (crontab), to do the check hourly, at 10 minutes past the hour:
10 * * * * root /opt/GoIoT/DinGo/bin/network/rn_check_openport.sh